• Về minhduy.vn
  • Đăng ký Hosting
  • Thiết kế Website
  • Khuyến mãi HOT
Hướng Dẫn Sử Dụng Dịch Vụ - Minh Duy Solutions
  • Trang chủ
  • Hosting
    • Hướng dẫn Hosting cPanel
    • Hướng dẫn Hosting DirectAdmin
  • Tên miền
  • Website
    • Hướng dẫn WordPress
    • Hướng dẫn Webmaster
  • Email Doanh Nghiệp
    • Office 365
    • Google Work Space
    • Email Zimbra
  • VPS – Máy chủ
    • Hướng dẫn Linux
    • Hướng dẫn DirectAdmin
  • Hướng dẫn chung
  • Góc ICT
No Result
View All Result
  • Trang chủ
  • Hosting
    • Hướng dẫn Hosting cPanel
    • Hướng dẫn Hosting DirectAdmin
  • Tên miền
  • Website
    • Hướng dẫn WordPress
    • Hướng dẫn Webmaster
  • Email Doanh Nghiệp
    • Office 365
    • Google Work Space
    • Email Zimbra
  • VPS – Máy chủ
    • Hướng dẫn Linux
    • Hướng dẫn DirectAdmin
  • Hướng dẫn chung
  • Góc ICT
No Result
View All Result
Hướng Dẫn Sử Dụng Dịch Vụ - Minh Duy Solutions
No Result
View All Result
Home Hướng dẫn máy chủ Hướng dẫn DirectAdmin

Hướng dẫn cài đặt tối ưu Direct Admin

Minh Duy Solutions by Minh Duy Solutions
22/09/2021
Reading Time: 6 mins read
A A
0
528
SHARES
1.7k
VIEWS
Share on FacebookShare on Twitter
4.8/5 - (1863 bình chọn)

Trong các Control panel hiện nay thì Direct Admin là một sự lựa chọn rất tốt dùng để quản lý, tuy nhiên chúng ta cần phải bỏ tiền ra để mua nó. Còn sau đây là cách cài đặt tối ưu cho VPS chạy CentOS 7 của bạn.

Trước khi tiền hành cài đặt chúng ta cần tải các gói cần thiết cho Direct Admin(DA) trc.

yum install wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio \ libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed \ autoconf automake libtool which patch mailx bzip2-devel lsof glibc-headers kernel-devel expat-devel yum install psmisc net-tools systemd-devel libdb-devel perl-DBI xfsprogs rsyslog logrotate crontabs file

 

Đợi cài xong ta tiền hành tải gói cài đặt DA về và cài:

wget http://www.directadmin.com/setup.sh && chmod 755 setup.sh ./setup.sh

 

Tại đây DA sẽ hỏi bạn cài các gói cần thiết, tuy nhiên chúng ta đã cài sẵn ở trên trước rồi, nếu để cho chắc chắn bạn cứ chọn Y để kiểm tra lại xem đã cài đủ chưa, nếu đủ nó sẽ tự bỏ qua ko cài lại nữa.

* DirectAdmin requires certain packages, described here: * http://help.directadmin.com/item.php?id=354 * Would you like to install these required pre-install packages? (y/n): y

 

Sau đó bạn điền key đã mua vào, tên miền bạn có thể chọn bất kỳ, gõ Y để  xác nhận các thông tin về IP của bạn rồi tiến hành cài đặt

Please enter your Client ID : 123456 Please enter your License ID : 12345 Please enter your hostname (server.domain.com) It must be a Fully Qualified Domain Name Do *not* use a domain you plan on using for the hostname: eg. don't use domain.com. Use server.domain.com instead. Do not enter http:// or www Enter your hostname (FQDN) : DA.tidgroup.com.vn Client ID: 123456 License ID: 12345 Hostname: DA.tidgroup.com.vn Is this correct? (y,n) : y Is eth0 your network adaptor with the license IP (103.81.84.50)? (y,n) : y Your external IP: 103.81.84.50 The external IP should typically match your license IP. Is 103.81.84.50 the IP in your license? (y,n) : y DirectAdmin will now be installed on: Enterprise 7.4 Is this correct? (must match license) (y,n) : y

 

Sau đó chọn theo các tùy chọn như sau,  ở lựa chọn cuối cùng các bạn đừng bấm Enter vội .

Would you like the default settings of apache 2.4 with mod_ruid2 and php 5.6 cli? (y/n): n Would you like to backup the current options.conf? (yes/no): no Please select webserver you would like to use (apache/nginx/nginx_apache/litespeed):nginx_apache Please select FTP server you would like to use (proftpd/pureftpd/no):pureftpd Please select default PHP version you would like to use (5.3/5.4/5.5/5.6/7.0/7.1):5.6 Please select default PHP mode you would like to use (php-fpm/fastcgi/suphp/lsphp/mod_php):fastcgi Would you like to have a second instance of PHP installed? (yes/no): no Please select if you would like to use ionCube (yes/no):yes Please select if you would like to use Zend Guard Loader (yes/no):yes Please select if you would like to use suhosin (yes/no):no Please select if you would like CustomBuild to manage Exim installation (yes/no):yes Please select if you would like CustomBuild to manage Dovecot installation (yes/no):yes Please select if you would like CustomBuild to manage phpMyAdmin installation (yes/no):yes Please select if you would like CustomBuild to manage SquirrelMail installation (yes/no):no Please select if you would like CustomBuild to manage RoundCube installation (yes/no):yes Would you like to search for the fastest download mirror? (y/n):n

 

Hãy mở 1 cửa sổ SSH khác vào VPS rồi gõ lệnh

vi /usr/local/directadmin/custombuild/options.conf

Tìm tới dòng có chứa đoạn như dưới, bấm chữ “i” rồi thay số 8 bằng số 14, vì 14 là server ở VN nên sẽ tải rất nhanh. Bấm ESC rồi gõ “:wq” rồi enter để lưu lại rồi quay sang cửa sổ đang cài đặt gõ enter để tiến hành cài đăt. Quá trình sẽ mất khoảng 15-30p tùy vào tốc độ VPS và internet.

#CustomBuild Settings custombuild=2.0 autover=no bold=yes clean=yes cleanapache=yes clean_old_tarballs=yes clean_old_webapps=yes downloadserver=files8.directadmin.com

 

Danh sách các server cho các bạn tùy chọn.

files1.directadmin.com  -USA        files2.directadmin.com  -USA files3.directadmin.com  -USA        files6.directadmin.com  -Netherlands files7.directadmin.com  -Netherlands  files8.directadmin.com  -Israel files9.directadmin.com  -USA        files10.directadmin.com -Thailand files11.directadmin.com -Italy      files12.directadmin.com -Hong Kong files13.directadmin.com -Thailand   files14.directadmin.com -Vietnam files15.directadmin.com -Italy       files16.directadmin.com -Ukraine files17.directadmin.com -Singapore   files18.directadmin.com -Turkey files19.directadmin.com -Japan      files20.directadmin.com -Iran files22.directadmin.com -Netherlands files23.directadmin.com -Iran files24.directadmin.com -Poland      files25.directadmin.com -Netherlands files26.directadmin.com -Belgium     files27.directadmin.com -Iran

 

Sau khi cài đặt xong sẽ hiển thị tài khoản admin cũng như link đăng nhập. Tuy nhiên bạn cần cho cổng 2222 vào tường lửa trc đã vì Direct Admin dùng cổng 2222, sau đó khởi động lại tường lửa.

firewall-cmd --permanent --zone=public --add-port=2222/tcp service firewalld restart

 

Tiếp theo ta tiến hành tùy chỉnh và cài đặt một số tiện ích hữu ích cho Direct Admin:

Cho phép upload 5GB qua directadmin File manager:

echo 'maxfilesize=5368709120' >> /usr/local/directadmin/conf/directadmin.conf && echo 'request_timeout=360' >> /usr/local/directadmin/conf/directadmin.conf

 

Cài đặt cURL:

cd /usr/local/directadmin/custombuild/ && ./build set curl yes && ./build curl

 

Cài đặt Let’s Encrypt: Cho phép cài đặt SSL miền phí

echo 'letsencrypt=1' >> /usr/local/directadmin/conf/directadmin.conf && echo 'enable_ssl_sni=1' >> /usr/local/directadmin/conf/directadmin.conf && echo 'letsencrypt_list=www:mail:ftp:pop:smtp' >> /usr/local/directadmin/conf/directadmin.conf && echo 'letsencrypt_list_selected=' >> /usr/local/directadmin/conf/directadmin.conf && service directadmin restart && cd /usr/local/directadmin/custombuild/ && ./build update && ./build rewrite_confs && wget -O /usr/local/directadmin/scripts/letsencrypt.sh http://files.directadmin.com/services/all/letsencrypt.sh && ./build letsencrypt

 

Cài đặt Opcache cho PHP: Giúp tối ưu code PHP

cd /usr/local/directadmin/custombuild/ && ./build set sa_update daily && ./build set opcache yes && ./build opcache

 

Cài đặt Mariadb (Đổi từ Mysql sang Mariadb):MariaDB dùng tối ưu hơn MySQL

cd /usr/local/directadmin/custombuild/ && ./build opcache && ./build set mysql_inst mariadb && ./build mariadb

 

Cho phép download file .tar.gz từ directadmin

echo 'application/x-gzip gz tgz' >> /etc/mime.types && echo 'text/plain xml' >> /etc/mime.types

 

Mở file không bị lỗi font chữ tiếng Việt trong DirectAdmin File Manager:

echo 'LANG_ENCODING=UTF-8' >> /usr/local/directadmin/data/skins/enhanced/lang/en/lf_standard.html

 

Cài thêm phần để nhận Quota

sed -i '/GRUB_CMDLINE_LINUX/cGRUB_CMDLINE_LINUX=\"rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto vconsole.keymap=us rhgb quiet rootflags=uquota,pquota\"' /etc/default/grub; cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig ; grub2-mkconfig -o /boot/grub2/grub.cfg;

 

Bật firewall và cho các cổng của các dịch vụ đi qua

service firewalld start && firewall-cmd --permanent --zone=public --add-port=443/tcp && firewall-cmd --permanent --zone=public --add-port=80/tcp && firewall-cmd --permanent --zone=public --add-port=20/tcp && firewall-cmd --permanent --zone=public --add-port=2222/tcp && firewall-cmd --permanent --zone=public --add-port=21/tcp && firewall-cmd --permanent --zone=public --add-port=9020/tcp && firewall-cmd --reload

 

Sau đó khởi động lại VPS để có hiệu lực

Tags: DirectAdmin
Share211Tweet132
Minh Duy Solutions

Minh Duy Solutions

Bài viết liên quan

huong dan xoa clamav tren vps directadmin 4417
Hướng dẫn DirectAdmin

Hướng dẫn xóa ClamAV Trên VPS DirectAdmin

07/11/2024
1.5k
huong dan cai dat modsecurity tren directadmin 4221 1
Hướng dẫn DirectAdmin

Hướng dẫn cài đặt ModSecurity trên Directadmin

25/05/2024
1.7k
csf firewall
Hướng dẫn DirectAdmin

Cài đặt CSF lên DirectAdmin

28/05/2023
1.5k
sua loi domain is already processing an ssl request tren directadmin 3758 1
Hướng dẫn DirectAdmin

Sửa lỗi Domain is already processing an SSL request trên DirectAdmin

31/03/2023
1.7k
df4857f61b8f21529a251a29271076cd
Hướng dẫn DirectAdmin

Hướng dẫn cài đặt NGINX + Apache trên Directadmin

02/10/2022
1.7k
1641eb63aaf5c390fc85beee96e21122
Hướng dẫn DirectAdmin

Hướng dẫn cài đặt OpenLiteSpeed trên VPS sử dụng DirectAdmin

02/10/2022
1.7k

Để lại một bình luận Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

No Result
View All Result

Recommended.

canva create 2025 gioi thieu ve canva visual suite 2 0 nang suat gap go sang tao 4525

Canva Create 2025: Giới thiệu về Canva Visual Suite 2.0 – Năng suất gặp gỡ Sáng tạo

12/04/2025
1.5k
what is cpanel

Hướng dẫn cài đặt mã nguồn Joomla trên hosting tại Minh Duy Solutions.

22/09/2021
1.5k

Trending.

cach tao doi quoc gia cho tai khoan google 4082

Cách tạo (đổi quốc gia) cho tài khoản Google

24/01/2024
16.5k
cach tao doi quoc gia cho tai khoan google 4082

Cách xóa hồ sơ thanh toán tài khoản Google

24/01/2024
4.3k
57acc582dde37df0a76107d2fb2448d8

Cách Ngắt Link Ảnh Trong Adobe Illustrator, Đơn Giản, Hiệu Quả

04/10/2022
15k
huong dan cai dat laragon moi truong phat trien website de dang va nhanh chong tren windows 4053 2

Hướng dẫn cài đặt Laragon – Môi trường phát triển website dễ dàng và nhanh chóng trên Windows

07/12/2023
5.4k
cach sua loi co ve nhu ban o quoc gia khac voi nguoi quan ly gia dinh google 4097 3

Cách sửa lỗi Có vẻ như bạn ở quốc gia khác với người quản lý gia đình Google

24/01/2024
2.3k
Wiki Minh Duy Solutions

WIKI.MINHDUY.VN

Chuyên trang hướng dẫn sử dụng dịch vụ của Minh Duy Solutions

DMCA.com Protection Status

Danh mục

  • aaPanel
  • Góc ICT
  • Thiết Kế Đồ Hoạ
  • SEO
  • Hướng dẫn WHMCS
  • Hướng dẫn Hosting
  • Hướng dẫn WordPress
  • Email Zimbra
  • Hướng dẫn DirectAdmin
  • Hướng dẫn Hosting cPanel
  • Office 365
  • Hướng dẫn Website
  • Hướng dẫn Linux
  • Hướng dẫn Hosting DirectAdmin
  • Google Work Space
  • Hướng dẫn Webmaster
  • Hướng dẫn máy chủ
  • Hướng dẫn Email Doanh Nghiệp
  • Hướng dẫn Tên miền
  • Hướng dẫn chung
  • Uncategorized

Thẻ

AFC apt-get update apt-get upgrade category chủ thể cPanel debian DirectAdmin email doanh nghiệp Environment Variables giải nén Google Workspace G Suite hosting ioncube khôi phục mật khẩu linux nginx nmap nodejs npm Office 365 OneDrive Outlook out of memory path Paypal phpmyadmin SMTP. GMail SSH sudo swap Symbolic Link tar tar.gz thông báo tên miền tên miền ubuntu user whois WooCommerce WordPress wordpress cơ bản wp rocket Zimbra
  • Về minhduy.vn
  • Đăng ký Hosting
  • Thiết kế Website
  • Khuyến mãi HOT

Copyright © 2021 Hướng dẫn Minh Duy Solutions

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

×
    No Result
    View All Result
    • Trang chủ
    • Hosting
      • Hướng dẫn Hosting cPanel
      • Hướng dẫn Hosting DirectAdmin
    • Tên miền
    • Website
      • Hướng dẫn WordPress
      • Hướng dẫn Webmaster
    • Email Doanh Nghiệp
      • Office 365
      • Google Work Space
      • Email Zimbra
    • VPS – Máy chủ
      • Hướng dẫn Linux
      • Hướng dẫn DirectAdmin
    • Hướng dẫn chung
    • Góc ICT

    Copyright © 2021 Hướng dẫn Minh Duy Solutions