1 基础环境配置
1.1 最新版本的PHP编译安装
http://blog.51cto.com/cmdschool/2046062
1.2 LNMP环境部署
http://blog.51cto.com/cmdschool/1962061
注:PHP部分的rpm包不用安装配置
2 部署WordPress
2.1 添加WordPress需要的额外模块
cd ~/php-7.1.12 ./configure --bindir=/usr/sbin/ --sbindir=/usr/sbin/ --sysconfdir=/etc/ --libdir=/usr/lib64/ --mandir=/usr/share/man/ --includedir=/usr/include/ --with-fpm-user=apache --with-fpm-group=apache --enable-fpm --with-mysqli --with-zlib=/usr/
2.2 编译并安装
make make install | tee install.log
2.3 下载WordPress
cd ~ wget https://wordpress.org/latest.tar.gz -O wordpress-4.9.1.tar.gz
注:最新版本的下载地址请参阅,
https://wordpress.org/download/
2.4 部署源代码
tar -xf wordpress-4.9.1.tar.gz mv wordpress/* /var/www/www.cmdschool.org/ chown root:apache -R /var/www/www.cmdschool.org/ chmod 775 -R /var/www/www.cmdschool.org/
2.5 创建数据库
mysql -uroot -p create database wordpress character set utf8; grant all privileges on wordpress.* to 'wordpress'@'localhost' identified by 'wordpresspwd'; grant all privileges on wordpress.* to 'wordpress'@'127.0.0.1' identified by 'wordpresspwd'; flush privileges;
2.6 登录并根据向导连接数据库
O(∩_∩)O哈哈~,界面操作自己领悟哈!
2.7 登录管理后台
2.8 安装主题
2.8.1 安装解压工具
yum install -y unzip
2.8.2 下载主题
cd ~ wget https://downloads.wordpress.org/theme/imnews.1.12.zip
注:选择主题,请访问如下链接,
2.8.3 解压主题
unzip imnews.1.12.zip
2.8.4 部署主题
cp -a imnews /var/www/www.cmdschool.org/wp-content/themes/ chown apache:apache -R /var/www/www.cmdschool.org/wp-content/themes/imnews/ chmod 775 -R /var/www/www.cmdschool.org/wp-content/themes/imnews/
注:经过以上操作,后台管理即可单击激活主题
时间: 2024-10-09 17:12:51