Trong khuôn khổ việc tìm hiểu và sử dụng APACHE, NGINX bước đầu mình sẽ dựng trước một blog wordpress trên server CentOS. Việc cài đặt sẽ thực hiện trên máy ảo CentOS dựng trên máy cá nhân của mình. Vừa rồi hệ thống bắt buộc sử dụng proxy để ra ngoài Internt nên mình bị chững lại để giải quyết. Giải pháp đã được cập nhật tại bài này.
Step 1: Installing Remi Repository on CentOS
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Step 2: Config using default php 7
yum install yum-utils yum-config-manager --disable remi-php54 yum-config-manager --enable remi-php73
Step 3: Install LAMP: Linux, Apache, Mariadb (No using MySQL), PHP
# yum install httpd mariadb mariadb-server php php-common php-mysql php-gd php-xml php-mbstring php-mcrypt # systemctl start mariadb # mysql_secure_installation # systemctl enable mariadb # systemctl start httpd # systemctl enable httpd
Step 4: Create database for Worpress.
mysql -u root -p CREATE DATABASE wordpress; CREATE USER [email protected] IDENTIFIED BY "secure_password"; GRANT ALL ON wordpress.* TO [email protected]; FLUSH PRIVILEGES; exit;
Step 5: Prepare for install Worpress
Go to http://wordpress.org, download last version Worpress
Using terminal go to folder downloaded:
cd /home/pktuy/download tar -xvzf wordpress.version.tar.gz -C /var/www/html chown -R apache /var/www/html/wordpress
Step 6:(maybe not) Creating Apache Virtual Host for WordPress
vim /etc/httpd/conf/httpd.conf
Add line:
<-VirtualHost *:80-> ServerAdmin [email protected] DocumentRoot /var/www/html/wordpress ServerName tecminttest.com ServerAlias www.tecminttest.com ErrorLog /var/log/httpd/tecminttest-error-log CustomLog /var/log/httpd/tecminttest-acces-log common </VirtualHost->
Restart apache:
systemctl restart httpd
Step 7: Install blog WordPress
Access htt://localhost and next…