• Thông Tin Cần Biết
  • Hướng Dẫn
  • Câu Hỏi Thường Gặp
  • Thông Tin Cần Biết
  • Hướng Dẫn
  • Câu Hỏi Thường Gặp
Home/Hướng Dẫn/DirectAdmin/Installing DirectAdmin on CentOS and Ubuntu

Installing DirectAdmin on CentOS and Ubuntu

115 lượt xem 0

DirectAdmin là bảng điều khiển lưu trữ mạnh mẽ và thân thiện với người dùng được thiết kế cho các máy chủ dựa trên Linux. Nổi tiếng nhờ tính hiệu quả và dễ sử dụng, DirectAdmin đơn giản hóa các tác vụ quản lý máy chủ phức tạp, khiến nó trở thành lựa chọn lý tưởng cho cả người mới bắt đầu và quản trị viên hệ thống có kinh nghiệm. Cung cấp một bộ tính năng toàn diện, DirectAdmin hợp lý hóa việc triển khai và quản trị môi trường lưu trữ web, cung cấp nền tảng đáng tin cậy cho việc lưu trữ trang web, quản lý email, v.v. Trong hướng dẫn từng bước này, chúng tôi sẽ đi sâu vào quy trình cài đặt phiên bản DirectAdmin mới nhất trên cả máy chủ CentOS 7/8 và Ubuntu 20.04/22.4, đảm bảo thiết lập suôn sẻ và phù hợp với nhu cầu lưu trữ của bạn.

Trước khi bắt đầu cài đặt, hãy đảm bảo hệ thống của bạn có các gói và phần phụ thuộc cần thiết. Tùy thuộc vào hệ điều hành của bạn, hãy làm theo hướng dẫn bên dưới:

On CentOS 7/8:

$ yum update
$ yum install bind bind-libs bind-utils openssl openssl-devel gcc gcc-c++ flex bison make 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 psmisc net-tools systemd-devel libdb-devel perl-DBI perl-libwww-perl xfsprogs rsyslog logrotate crontabs file kernel-headers

On Ubuntu 20.04/22.04:

$ apt update
$ sudo apt install build-essential bind9 dnsutils gcc make openssl libssl-dev zlib1g zlib1g-dev libaio1 libaio-dev libcap-dev cron bzip2 cmake pkg-config libdb-dev libsasl2-dev libncurses5 libncurses5-dev libsystemd-dev quota patch logrotate rsyslog libc6-dev libexpat1-dev libcrypt-openssl-rsa-perl

Downloading and Running Installer

  • Download the auto-installer script:
$ wget -O setup.sh https://www.directadmin.com/setup.sh
  • Make the script executable:
$ chmod 755 setup.sh
  • Run the installer in auto mode:
$ ./setup.sh auto
  • Accept the license agreement.
  • Use default options, except for the database; choose “MariaDB” instead of MySQL.
  • Monitor the installation progress at /var/log/directadmin/custombuild.xxxx.log.

Trình cài đặt tự động phát hiện môi trường hệ điều hành và cài đặt Apache+PHP, máy chủ DNS, cơ sở dữ liệu MariaDB và tất cả các thành phần DirectAdmin khác.

Post-Install Configuration

Sau khi cài đặt DirectAdmin, hãy tuân thủ các phương pháp hay nhất:

  • Enable Opcache for faster PHP performance:
$ cd /usr/local/directadmin/custombuild
$ ./build set opcache yes  
$ ./build opcache
  • Switch the database to MariaDB if MySQL was installed:
$ ./build set mariadb 10.6
$ ./build set mysql_inst mariadb
$ ./build set mysql_backup yes
$ ./build update
$ ./build mariadb  

The base DirectAdmin setup is now complete!

(Optional) Switching Web Server to Nginx

For improved performance, switch to Nginx:

  • Enable PHP as FPM:
$ ./build set php1_mode php-fpm
  • Update configs:
$ ./build update 
  • Install Nginx:
$ ./build set webserver nginx
$ ./build nginx
  • Rebuild PHP for FPM:
$ ./build php d
  • Restart services:
$ ./build restart

The web server is now running on Nginx + PHP-FPM!

(Optional) Switching Web Server to LiteSpeed

For maximum performance, consider LiteSpeed web server with LSPHP:

  • Update config:
$ ./build update
  • Set the webserver to LiteSpeed:
$ ./build set webserver litespeed
  • Set PHP modes to LSPHP:
$ ./build set php1_mode lsphp 
$ ./build set php2_mode lsphp
$ ./build set php3_mode lsphp 
$ ./build set php4_mode lsphp
  • Build and install:
$ ./build litespeed
  • If errors related to mod_ruid2 occur, disable it:
$ ./build set mod_ruid2 no
  • Recompile PHP for LSPHP:
$ ./build php n

This completes the migration to LiteSpeed! Add the commercial license to finish the setup.

Kết Quả

Bạn đã cài đặt và định cấu hình thành công DirectAdmin trên máy chủ của mình, điều chỉnh nó theo sở thích của bạn bằng Nginx hoặc LiteSpeed. Các bước toàn diện này đảm bảo một môi trường lưu trữ mạnh mẽ. Thường xuyên kiểm tra nhật ký để cập nhật và cải tiến. Chúc mừng bạn đã thiết lập thành công!

Tags:install directAdmindirectadmin

Bài viết này hữu ích không?

Yes  No
Bài viết liên quan
  • DirectAdmin Fix Permissions
  • Hướng dẫn sao lưu (Backup) website trên DirectAdmin
  • Fix configure: error: Package requirements libzip
  • Hướng dẫn backup và Restore trên DirectAdmin
  • Xử lý lỗi full Inode trên server DirectAdmin
  • Hướng dẫn thiết lập kết nối MySQL từ xa trên DirectAdmin

Không tìm thấy câu trả lời của bạn? Liên hệ

DirectAdmin
  • Installing DirectAdmin on CentOS and Ubuntu
  • Hướng dẫn cài đặt SSL trên DirectAdmin
  • Cài đặt SSL Let’s Encrypt trên DirectAdmin
  • Hướng dẫn tạo tài khoản FTP trên Directadmin
  • Xóa tin nhắn hệ thống trên DirectAdmin
  • Khắc phục lỗi License has expired DirectAdmin
  • Tăng giới hạn upload PhpMyAdmin
  • Thay đổi IP VPS/Server trên Directadmin
  • Fix lỗi Your DirectAdmin version (1.61) is older than
  • DirectAdmin là gì?
  • Kiểm tra dung lượng hosting trên DirectAdmin
  • Hướng dẫn tạo tài khoản Email trên DirectAdmin
  • Cài đặt mcrypt cho PHP 7.2 trên Directadmin
  • Hướng dẫn fix lỗi Your DirectAdmin version (1.62) is older than minimal required for this version of CustomBuild (1.63)
  • Hướng dẫn sử dụng Cron Jobs trên Directadmin
  • Hướng dẫn bật tắt extension PHP trên Directadmin
  • Hướng dẫn thiết lập kết nối MySQL từ xa trên DirectAdmin
  • Xử lý lỗi full Inode trên server DirectAdmin
  • Hướng dẫn backup và Restore trên DirectAdmin
  • Fix configure: error: Package requirements libzip
  • Hướng dẫn sao lưu (Backup) website trên DirectAdmin
  • DirectAdmin Fix Permissions
All Categories
  • WordPress Website
  • Quản trị Website
  • Quản lý tài khoản
  • Tên miền
  • Chứng chỉ số SSL
  • Email Hosting Server
  • Web Hosting
  • VPS / Server
  • Plesk
  • DirectAdmin
  • Networking
  • Linux
  • Windows
© BizMaC | Rainbow E-Commerce