(+84) 236.3827111 ex. 402

Triển khai WordPress trên CentOS 7 - Phần 1


Đăng nhập và thực hiện bởi root user

1. Cài đặt Apache

- Mở cộng 80 và 443 trên Firewall

firewall-cmd --permanent --add-port=80/tcp

firewall-cmd --permanent --add-port=443/tcp

firewall-cmd --reload

- Cài đặt dịch vụ httpd

yum -y install httpd

- Khởi động Apache, cho phep dịch vụ tự start khi reboot

systemctl start httpd.service

systemctl enable httpd.service

-Kiểm tra Apache đã chạy hạy chưa, trên trình duyệt truy cập theo địa chỉ

http://your_server_IP_address/

CentOS 7 Apache default

2. Cài đặt MySQL (MariaDB)

- Cài đặt MariaDB

yum -y install mariadb-server mariadb

- Chạy dịch vụ MariaDB

systemctl start mariadb

systemctl enable mariadb.service

- Cấu hình

mysql_secure_installation

3. Cài đặt PHP

- Cài đặt PHP

yum -y install php php-mysql

- Khởi chạy dịch vụ

systemctl restart httpd.service

4. Cài đặt WordPress

- Tạo Database and User cho WordPress, đăng nhập user root của MySQL

mysql -u root -p

CREATE DATABASE wordpress;

CREATE USER wordpressuser@localhost IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';

FLUSH PRIVILEGES;

exit

Hoàn tất quá trình cấu hình WordPress và cài đặt MySQL.