1.单节点安装Wordpress

1.1 安装LAMP组件

mount /dev/cdrom /media/CentOS/
yum install httpd mariadb-server php -y

1.2 下载Wordpress

wget https://cn.wordpress.org/wordpress-5.1.11-zh_CN.tar.gz
tar xzvf wordpress-5.1.11-zh_CN.tar.gz
#启动apache服务
systemctl enable --now httpd
firewall-cmd --add-service=http
firewall-cmd --add-service=http permanent
#拷贝网站代码到apache根
cp wordpress/* /var/www/html/. -r
#安装php mysql扩展
yum install php-mysqlnd -y

1.3 创建数据库并授权

systemctl enable --now mariadb
mysql_secure_installation
mysql -uroot -pcentos
MariaDB [(none)]> grant all on wordpress.* to 'wordpress'@'localhost' identified by 'centos';
MariaDB [(none)]> flush privileges;

1.4 通过浏览器访问wordpress启动安装

http://192.168.99.201
创建wp-config.php

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );
/** MySQL database username */
define( 'DB_USER', 'wordpress' );
/** MySQL database password */
define( 'DB_PASSWORD', 'centos' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

1.5 解决附件无法上传问题

[root@web01 html]# chown apache:apache /var/www/html/wp-content/ -R

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值