[WordOps] – Cài đặt Wordops và website wordpress
Để cài đặt WordOps và có một website wordpress hoàn chỉnh, bạn cần trải qua 3 phần như sau.
Phần 1: Cài đặt WordOps
Trước khi cài đặt WordOps, VPS của bạn phải hoàn toàn mới, chưa cài đặt bất kỳ demon nào cả. Việc cài đặt rất đơn giản, chỉ cần một lệnh sau:
wget -qO wo wops.cc && sudo bash wo
[email protected]:~# wget -qO wo wops.cc && sudo bash wo Welcome to WordOps install/update script v3.11.4 Installing wo dependencies [OK] Installing WordOps [OK] Running post-install steps [OK] WordOps (wo) require an username & and an email address to configure Git (used to save server configurations) Your informations will ONLY be stored locally Enter your name: Enter your email: Synchronizing wo database, please wait... WordOps (wo) installed successfully To enable bash-completion, just use the command: bash -l To install WordOps recommended stacks, you can use the command: wo stack install To create a first WordPress site, you can use the command: wo site create site.tld --wp WordOps Documentation : https://docs.wordops.net WordOps Community Forum : https://community.wordops.net WordOps Community Chat : https://chat.wordops.net Give WordOps a GitHub star : https://github.com/WordOps/WordOps/
Nếu bạn muốn biết được công đoạn cài chi tiết như thế nào có thể xem trực tiếp tại đây.
Phần 2: Cài đặt WordOps Stack
wo stack install
Lệnh này sẽ cài đặt các thành phần sau:
Gói | Kiểu | Ý nghĩa |
---|---|---|
Nginx | APT package | WordOps web server |
PHP 7.2 | APT package | PHP7.2-FPM |
MariaDB 10.3 | APT package | Open-source version of MySQL |
WP-CLI | Binary | The WordPress command-line tool |
Composer | Binary | PHP packages manager |
MySQLTuner | Binary | Command-line tool to tune MySQL |
Fail2ban | APT package | Authentication bruteforce protection |
phpMyAdmin | Web App | MySQL server web interface |
Adminer | Web App | lightweight phpMyAdmin alternative |
OpcacheGUI | Web App | web interface for Opcache monitoring |
Netdata | Binary | Monitoring suite |
Anemometer | Web App | MySQL Slow Query Monitor |
WordOps dashboard | Web App | Bootstrap template for WordOps backend |
eXtplorer | Web App | Web File manager |
cheat.sh | Binary | Command-line Linux cheatsheet |
Sendmail | APT package | Sendmail MTA |
Sau khi cài đặt xong Nginx, WordOps sẽ cho bạn thông tin truy cập vào backend WordOps, và thông tin này bạn có thể tìm lại rất dễ dàng bằng lệnh:
wo secure --auth
Sau khi có thông tin truy cập, bạn nhập trên trình duyệt: https://YOUR.SERVER.IP:22222, có thể bạn sẽ gặp cảnh báo SSL, bạn cứ nhấn tiếp tục để truy cập.
![[WordOps] - Cài đặt Wordops và website wordpress 6 wordops 22222](https://thanhtam.works/wp-content/uploads/2020/04/wordops-22222.png)
Phần 3: Cài đặt website WordPress
wo site create site.tld --wp
Mặc định cài đặt website thì phiên bản PHP mặc định là 7.2.
Để cài thêm một số yêu cầu khác thì bạn sẽ cần thêm thông số tương ứng:
- Nginx fastcgi_cache:
--wpfc
- Redis cache:
--wpredis
- SSL Let’s Encrypt:
--le
- PHP 7.3:
--php73
Sau khi cài đặt xong website bạn có thể xem lại các thông tin về website bằng lệnh:
[email protected]:~# wo site info domain.com Information about domain.com (domain): Nginx configuration wp basic (enabled) PHP Version 7.2 SSL disabled access_log /var/www/domain.com/logs/access.log error_log /var/www/domain.com/logs/error.log Webroot /var/www/domain.com DB_NAME domain_com_L2Zl0SPD DB_USER domain DB_PASS kNu3ZPMQdMXVZ64j3qpWE4S
Chúc các bạn thành công.