首先安装LAMP环境,包括了Apache, MySQL和PHP。这里面还有可道云作为可选项目。
CentOS7上的安装命令,现在暂时不支持CentOS8.
yum -y install wget screen git git clone https://github.com/teddysun/lamp.git cd lamp chmod 755 *.sh screen -S lamp ./lamp.sh
安装wordpress或相关的网站软件,目标文件夹为 /data/www/default
先在 /data/www/创建个文件夹并解压软件
tar -xvf file.tar //解压 tar包 tar -xzvf file.tar.gz //解压tar.gz tar -xjvf file.tar.bz2 //解压 tar.bz2 tar -xZvf file.tar.Z //解压tar.Z unrar e file.rar //解压rar unzip file.zip //解压zip
更改用户和用户组,并赋予相关权限
[root@localhost www]# chown -R apache:apache /data/www/wordpress/ [root@localhost www]# chmod -R 755 /data/www//wordpress/
然后将文件夹移动到/data/www/default
[root@localhost www]# mv ./wordpress/ ./default/
最后登录主页,通常是192.168.x.x/wordpress。然后会引导到安装界面
原文:https://www.cnblogs.com/panxk/p/12616904.html