LAMP实现wordpress站点搭建实验
原创
©著作权归作者所有:来自51CTO博客作者lww_51CTO的原创作品,请联系作者获取转载授权,否则将追究法律责任
Centos8部署LAMP+wordpress
安装程序
dnf -y install httpd php php-json php-mysqlnd mariadb-server
systemctl enable --now httpd mariadb
echo "<?php phpinfo(); ?>" > /var/www/html/index.php
查看PHP测试页:浏览器输入172.16.10.12/index.php
数据库配置
mysql
MariaDB [(none)]> create database wordpress;
MariaDB [(none)]> grant all on wordpress.* to wordpress@'localhost' identified by 'linweiwei';
MariaDB [(none)]> flush privileges;
Wordpress部署
上传已经下载好的安装包,或去官网下载https://cn.wordpress.org/
tar xf wordpress-5.9-zh_cn.tar.gz
mv wordpress/* /var/www/html/
chown -R apache.apache /var/www/html/ #apache默认使用账户,根据生产情况可调整
#浏览器访问
http://LAMP服务器地址/wordpress