• Webmaster Tools
  • Diễn Đàn Hỏi Đáp
  • Profile
  • Ủng hộ
  • DNS Check
  • CheckIP
  • Liên Hệ
Đỗ Trung Quân
  • HƯỚNG DẪN
  • LINUX
    • Linux Tricks
    • Distro Linux
      • CentOS/RedHat
      • CloudLinux
      • Ubuntu/Debian
      • AlmaLinux
    • WebServer
      • NGINX
      • Apache
      • LiteSpeed
    • Virtualization
    • Monitoring Tool
      • Zabbix
    • DevOPS
      • Ansible
      • Docker
      • Jenkins
      • AWS
    • Mail Server
    • VPN
  • CONTROL PANEL
    • cPanel
    • DirectAdmin
    • aaPanel
    • FastPanel
    • CyberPanel
    • Easypanel
    • VestaCP
    • CloudPanel
    • HestiaCP
    • Plesk
    • Script VPS
  • DNS
    • Domain
  • CMS
    • WordPress
    • Laravel
  • SECURITY
    • SSL
    • Firewall
  • DỊCH VỤHOT
  • WEB MẪUHOT

Hướng dẫn sử dụng aaPanel CLI

by ĐỖ TRUNG QUÂN 27/09/2020
Tác giả: ĐỖ TRUNG QUÂN Date: 27/09/2020Last Update 11/07/2022 0 comments 2,8K lượt xem
Dịch vụ xử lý mã độc WordPress
WEB MẪU WORDPRESS
Share FacebookTwitterPinterestTelegramEmail
2,8K

NỘI DUNG

  • I. Quản trị Menu
  • II. Script quản lý AAPANEL
    • 1. Management
    • 2. NGINX
    • 3. APACHE
    • 4. MySQL
    • 5. FTP
    • 6. PHP
    • 7. Redis
    • 8. Memcached

Có một công cụ ở aaPanel mà mình rất thích đó là CLI, cũng giống như các control khác ngoài giao diện ra còn có thể tương tác qua CLI. Ở bài viết này mình sẽ hướng dẫn bạn các chức năng CLI của aaPanel.

Để thực hiện được bạn cần SSH vào máy chủ server/vps và nhập lệnh bt như ảnh đính kèm bên dưới.

  • Hướng dẫn truy cập server/vps bằng giao thức SSH.

I. Quản trị Menu

Để gọi bảng menu bạn sử dụng lệnh bt. Ngay sau đó sẽ hiện thị bảng menu quản lý Panel.

[root@aapanel ~]# bt
dotrungquan 2020 07 13 at 10.35.35

Tại đây bạn sẽ thấy menu quản lý, rất chi tiết và dể sử dụng, bạn muôn sử dụng chức năng nào chỉ cần nhập vào số thứ tự tương ứng là được.

CleanShot 2020 09 27 at
  1. Restart panel: Chức năng này sẽ khởi động lại control aaPanel
  2. Stop panel: Chức năng này sẽ stop (dừng) control aaPanel
  3. Start panel: Chức năng này sẽ start (mở) control aaPanel
  4. Reload panel: Chức năng này sẽ tải lại control aaPanel
  5. Change panel password: Nếu bạn quên mật khẩu control panel bạn dùng chức năng này để reset lại pass.
  6. Change panel username: Chức năng để change lại tên user
  7. Forcibly change MySQL root password: Dùng để thay đổi pass root MySQL
  8. Change panel port: Port mặc định là 8888 bạn có thể thay đổi port khác với chức năng này
  9. Clear panel cache: xóa cache panel
  10. Clear login limit: Nếu đã bị giới hạn login bạn hãy sử dụng tùy chọn này để reset về mặc định
  11. Cancel entrance limit:
  12. Cancel domain binding limit
  13. Cacel IP access limit
  14. View panel default info
  15. Clear system rubbish
  16. Repair panel (check for errors and update panel files to the latest version)
  17. Set log cutting on/off compression
  18. Set whether to save a historical copy of the file
  19. #
  20. #
  21. #
  22. Display panel error log
  23. Turn off BasicAuth authentication
  24. Turn off Google Authenticator
  25. Set whether to back up the panel automatically

II. Script quản lý AAPANEL

1. Management

  • Stop Panel/Tắt Panel
service bt stop
  • Start Panel/Bật Panel
service bt start
  • Restart Panel/Khởi động lại Panel
service bt restart
  • Uninstall/Gở cài đặt Panel
service bt stop && chkconfig --del bt && rm -f /etc/init.d/bt && rm -rf /www/server/panel
  • View current port of control panel/Xem port hiện tại của Panel
cat /www/server/panel/data/port.pl
  • Change port of control panel/Thay đổi Port của Panel

Lệnh bên dưới sử dụng Port 6789

echo '6789' > /www/server/panel/data/port.pl && service bt restart firewall-cmd --permanent --zone=public --add-port=6789/tcp firewall-cmd --reload
  • Force to change MySQL manager (root)/Thay đổi mật khẩu root MySQL

VD: Bên dưới thay đổi mật khẩu root thành 123456. Bạn hãy nhập mật khẩu của bạn cần thay đổi.

cd /www/server/panel && python tools.py root 123456
  • Change control Panel login password/Thay đổi mật khẩu Panel

VD: Bên dưới thay đổi mật khẩu panel thành 123456. Bạn hãy nhập mật khẩu của bạn cần thay đổi.

cd /www/server/panel && python tools.py panel 123456
  • Site Configuration location/Vị trí cấu hình vhost
/www/server/panel/vhost
  • Delete banding domain of control panel
rm -f /www/server/panel/data/domain.conf
  • Clean login restriction/Xoá hạn chế đăng nhập.
rm -f /www/server/panel/data/*.login
  • View control panel authorization IP/Xem IP uỷ quyển của bảng điều khiển
cat /www/server/panel/data/limitip.conf
  • Stop access restriction/Ngừng hạn chế quyền truy cập
rm -f /www/server/panel/data/limitip.conf
  • View permission domain/Xem quyền của tên miền
cat /www/server/panel/data/domain.conf
  • Turn off control panel SSL/Vô hiệu SSL Panel
rm -f /www/server/panel/data/ssl.pl && /etc/init.d/bt restart
  • View control panel error logs/Xem nhật ký lỗi của Panel
cat /tmp/panelBoot
  • View database error log/Xem nhật ký lỗi của Database
cat /www/server/data/*.err
  • Site Configuration directory(nginx)/Thư mục cấu hình trang NGINX
/www/server/panel/vhost/nginx
  • Site Configuration directory(apache)/Thư mục cấu hình trang APANEL
/www/server/panel/vhost/apache
  • Site default directory/Thư mục mặc định của trang
/www/wwwroot
  • Database backup directory/Thư mục sao lưu Database
/www/backup/database
  • Site backup directory/Thư mực sao lưu website
/www/backup/site
  • Site logs/Nhật ký trang web
/www/wwwlogs

2. NGINX

  • nginx installation directory/Thư mục cài đặt NGINX
/www/server/nginx
  • Start/Khởi động NGINX
service nginx start
  • Stop/Tắt dịch vụ NGINX
service nginx stop
  • Restart/Khởi động lại NGINX
service nginx restart
  • Reload/Tải lại NGINX
service nginx reload
  • nginx Configuration/File cấu hình NGINX
/www/server/nginx/conf/nginx.conf

3. APACHE

  • apache installation directory/Thư mục cài đặt APACHE
/www/server/httpd
  • Start/Bật dịch vụ
service httpd start
  • Stop/Tắt dịch vụ
service httpd stop
  • Restart/Khởi động lại dịch vụ
service httpd restart
  • Reload/Tải lại dịch vụ
service httpd reload
  • apache Configuration/File cấu hình apache
/www/server/apache/conf/httpd.conf

4. MySQL

  • mysql installation directory/Thư mục cài đặt MySQL
/www/server/mysql
  • phpmyadmin installation directory/Thư mục cài đặt phpmyadmin
/www/server/phpmyadmin
  • Data storage directory/Thư mục lưu trữ dữ liệu
/www/server/data mysql
  • Start/Bật dịch vụ
service mysqld start
  • Stop/Tắt dịch vụ
service mysqld stop
  • Restart/Khởi động lại dịch vụ
service mysqld restart
  • Reload/Tải lại dịch vụ
service mysqld reload
  • mysql Configuration/File cấu hình mysql
/etc/my.cnf

5. FTP

  • ftp installation directory/Thư mục cài đặt
/www/server/pure-ftpd
  • Start/Bật dịch vụ
service pure-ftpd start
  • Stop/Tắt dịch vụ
service pure-ftpd stop
  • Restart/Khởi động lại dịch vụ
service pure-ftpd restart
  • ftp Configuration/File cấu hình FTP
/www/server/pure-ftpd/etc/pure-ftpd

6. PHP

  • php installation directory/Thư mục cài đặt
/www/server/php
  • Start(Please modify by PHP version, e.g. service php-fpm-74 start)
servicephp-fpm-{52|53|54|55|56|70|71|72|73|74|80|81} start
  • Stop(Please modify by PHP version, e.g. service php-fpm-74 stop)
service php-fpm-{52|53|54|55|56|70|71|72|73|74|80|81} stop
  • Restart(Please modify by PHP version, e.g. service php-fpm-74 restart)
service php-fpm-{52|53|54|55|56|70|71|72|73|74|80|81} restart
  • Reload(Please modify by PHP version, e.g. service php-fpm-74 reload)
service php-fpm-{52|53|54|55|56|70|71|72|73|74|80|81} reload
  • Configuration(Please modify by PHP version, e.g. /www/server/php/74/etc/php.ini)
/www/server/php/{52|53|54|55|56|70|71|72|73|74|80|81}/etc/php.ini

7. Redis

  • redis installation directory/Thư mục cài đặt
/www/server/redis
  • Start/Bật dịch vụ
service redis start
  • Stop/Tắt dịch vụ
service redis stop
  • redis Configuration/File cấu hình
/www/server/redis/redis.conf

8. Memcached

  • memcached installation directory/Thư mục cài đặt
/usr/local/memcached
  • Start/Bật dịch vụ
service memcached start
  • Stop/Tắt dịch vụ
service memcached stop
  • Restart/Khởi động lại dịch vụ
service memcached restart
  • Reload/Tải lại dịch vụ
service memcached reload

Tham khảo:

  • Series hướng dẫn sủ dụng aaPanel
  • aaPanel installation script
4.6/5 - (9 bình chọn)
aapanel

Tham gia nhóm hỗ trợ WordPress

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay
ĐỖ TRUNG QUÂN

Mình tên là Đỗ Trung Quân, hiện đang công tác tại AZDIGI với vị trí là SysAdmin. Mình đam mê viết Blog. Vì viết Blog giúp mình trau dồi được nhiều kỹ năng. Học hỏi thêm nhiều kiến thức mới, từ đó mình có thể chia sẻ đến các bạn các bài viết tài liệu bổ ích hơn. Hiện tại mình là admin của Blog DOTRUNGQUAN.INFO - CaiSSL.COM - QuantriVPS.COM. Mới đây mình có tạo ra nhóm Hỗ trợ Server - Hosting & WordPress | Hỗ Trợ Xử Lý Mã Độc WordPress với mục đích gây dựng một cộng đồng nhỏ để mọi người trao đổi kinh nghiệm, kiến thức quản trị VPS. Các thủ thuật, mẹo vặt khi sử dụng VPS. Rất mong nhận được sự ủng hộ của các bạn.

BÀI VIẾT LIÊN QUAN

Hướng dẫn cài đặt UniTime với Docker trên...

19/03/2025

Hướng dẫn cài đặt n8n trên aaPanel

28/02/2025

Hướng dẫn xử lý mysql-bin trên aaPanel

09/09/2024

Thiết Lập Website Chạy Bằng IP Với SSL:...

03/06/2024

Sửa lỗi cài đặt MariaDB trên AAPANEL

02/06/2024

Hướng dẫn backup dữ liệu trên AAPANEL

05/10/2023

Danh sách ControlPanel quản lý VPS miễn phí...

28/07/2023

Sửa lỗi AttributeError: module ‘lib’ has no attribute...

08/05/2023

Hướng dẫn cài đặt ImunifyAV trên AAPANEL

06/05/2023

Cách cài đặt Brotli trên AAPanel để tăng...

24/02/2023
Author Box
Author Image

ĐỖ TRUNG QUÂN

Chuyên viên quản trị hệ thống.

Tư vấn & triển khai dịch vụ

VPS | Hosting | SSL | Mailserver | Website | Sửa lỗi WordPress

Bài viết của tác giả

Hosting/VPS khuyên dùng

Phổ Biến

  • Hướng dẫn tạo SSH Key trên macOS

  • Hướng dẫn sử dụng SSH Key

  • Hướng dẫn cài đặt v2board trên AAPANEL

  • Vấn đề IP Public liên tục bị thay đổi vì sao và cách khắc phục

  • Khắc phục lỗi không hiện hình ảnh và mô tả khi share link lên Facebook

  • Hướng dẫn kích hoạt Theme Flatsome mới nhất.

BẠN BÈ & ĐỐI TÁC

Thạch Phạm | CỔ Ý CONCEPT | Trương Quốc Cường | Đàm Trung Kiên | Web An Tâm | Phong Đinh | Học Mò | PHUNG.VN | Đăng Đạt

Bạn được quyền sao chép lại nội dung trên website Đỗ Trung Quân, miễn là có dẫn nguồn.

Hosting/VPS được tài trợ bởi AZDIGI - Nhà cung cấp Server Hosting tốt nhất hiện nay

AZDIGI - Nhà cung cấp Server Hosting tốt nhất hiện nay


Back To Top
Đỗ Trung Quân
  • HƯỚNG DẪN
  • LINUX
    • Linux Tricks
    • Distro Linux
      • CentOS/RedHat
      • CloudLinux
      • Ubuntu/Debian
      • AlmaLinux
    • WebServer
      • NGINX
      • Apache
      • LiteSpeed
    • Virtualization
    • Monitoring Tool
      • Zabbix
    • DevOPS
      • Ansible
      • Docker
      • Jenkins
      • AWS
    • Mail Server
    • VPN
  • CONTROL PANEL
    • cPanel
    • DirectAdmin
    • aaPanel
    • FastPanel
    • CyberPanel
    • Easypanel
    • VestaCP
    • CloudPanel
    • HestiaCP
    • Plesk
    • Script VPS
  • DNS
    • Domain
  • CMS
    • WordPress
    • Laravel
  • SECURITY
    • SSL
    • Firewall
  • DỊCH VỤHOT
  • WEB MẪUHOT