Hướng Dẫn Cài đặt Tối ưu Direct Admin - Hướng Dẫn Sử Dụng Dịch Vụ
Có thể bạn quan tâm
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.shTạ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): ySau đó 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) : ySau đó 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):nHã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.comDanh 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 -IranSau 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 restartTiế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.confCài đặt cURL:
cd /usr/local/directadmin/custombuild/ && ./build set curl yes && ./build curlCà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 letsencryptCà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 opcacheCà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 mariadbCho phép download file .tar.gz từ directadmin
echo 'application/x-gzip gz tgz' >> /etc/mime.types && echo 'text/plain xml' >> /etc/mime.typesMở 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.htmlCà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 --reloadSau đó khởi động lại VPS để có hiệu lực
4.8/5 - (1863 bình chọn) Tags: DirectAdminTừ khóa » Cái đặt Directadmin
-
Hướng Dẫn Cài đặt DirectAdmin Trên CentOS 7 & 8 - Blog KDATA
-
Hướng Dẫn Cài đặt DirectAdmin Với 3 Bước
-
Hướng Dẫn Cài đặt DirectAdmin Trên Máy Chủ Cloud Server
-
Hướng Dẫn Cài đặt Directadmin Trên Server/VPS Sử Dụng Hệ điều ...
-
Hướng Dẫn Cài đặt DirectAdmin Lên Server - Hiệp Phạm Blog
-
DirectAdmin Là Gì? Hướng Dẫn Cài đặt Và Sử Dụng ... - Vietnix
-
Hướng Dẫn Cài đặt DirectAdmin Trên CentOS, Ubuntu
-
Hướng Dẫn Cài đặt DirectAdmin Cho Cloud Server - ODS
-
Hướng Dẫn Cài đặt DirectAdmin - Đỗ Trung Quân
-
Hướng Dẫn Cài đặt Directadmin Trên Centos | VIETISO.COM
-
Các Bước Cài đặt DirectAdmin Trên Máy Chủ Cloud Server Linux
-
Hướng Dẫn Setup DirectAdmin Trên Centos 7-8 - Knowledge Base
-
Các Bước Cài đặt Directadmin Cho OS - BKNS.VN
-
[DirectAdmin] Giới Thiệu Và Cài đặt Direct Admin (phần 1)