天天看點

LAMP環境下部署WordPress應用

實戰任:通過lamp平台搭建一個 wordpress網站系統,背景使用mysql資料庫,并且使用phpmyadmin管理資料庫。

[root@linux tool]# wget https://github.com/hmsjy2017/download-wordpress/blob/master/wordpress-4.9.4-zh_cn.tar.gz

[root@linux tool]# cp wordpress-4.9.4-zh_cn.tar.gz  /usr/local/apache2/htdocs/

[root@linux htdocs]# tar   zxvf  wordpress-4.9.4-zh_cn.tar.gz 

[root@linux htdocs]# cd wordpress

[root@linux htdocs]# ll

總用量 19628

-rw-r--r--.  1 root   root        62 2月   4 11:46 index.html

-rw-r--r--.  1 root   root        20 2月   4 14:23 index.php

-rw-r--r--.  1 root   root       249 2月   4 10:35 mysqli.php

-rw-r--r--.  1 root   root       249 2月   4 10:35 pdomysql.php

-rw-r--r--.  1 root   root        20 2月   4 14:24 phpinfot.php

drwxr-xr-x. 12 root   root      4096 2月   5 10:04 phpmyadmin

-rw-r--r--.  1 root   root  11496288 2月   5 10:01 phpmyadmin-4.7.9-all-languages.zip

drwxr-xr-x.  5 nobody 65534     4096 2月   6 2018 wordpress

-rw-r--r--.  1 root   root   8565525 2月   5 10:36 wordpress-4.9.4.tar.gz

[root@linux htdocs]# chown -r www:www  wordpress

-rw-r--r--.  1 root root       62 2月   4 11:46 index.html

-rw-r--r--.  1 root root       20 2月   4 14:23 index.php

-rw-r--r--.  1 root root      249 2月   4 10:35 mysqli.php

-rw-r--r--.  1 root root      249 2月   4 10:35 pdomysql.php

-rw-r--r--.  1 root root       20 2月   4 14:24 phpinfot.php

drwxr-xr-x. 12 root root     4096 2月   5 10:04 phpmyadmin

-rw-r--r--.  1 root root 11496288 2月   5 10:01 phpmyadmin-4.7.9-all-languages.zip

drwxr-xr-x.  5 www  www      4096 2月   6 2018 wordpress

-rw-r--r--.  1 root root  9082696 2月   5 10:52 wordpress-4.9.4-zh_cn.tar.gz

user daemon

group daemon

user www

group www

[root@linux htdocs]# mysql -uroot -p

  mysql> create database cmsdb;

query ok, 1 row affected (0.00 sec)

mysql> grant all on cmsdb.* to 'wpuser' identified by 'wppassword';

query ok, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;

query ok, 0 rows affected (0.00 sec)

http://172.16.100.60:8080/wordpress/

LAMP環境下部署WordPress應用
LAMP環境下部署WordPress應用

操作技巧:資料庫主機: localhost 修改成127.0.0.1

LAMP環境下部署WordPress應用
LAMP環境下部署WordPress應用
LAMP環境下部署WordPress應用
LAMP環境下部署WordPress應用

繼續閱讀