Linux版本 Centos7.6
安装Apache服务器
yum -y install httpd临时关闭防火墙和selinux
systemctl stop firewalld
setenforce 0
详细
安装设置Mysql数据库
vim /etc/yum.repos.d/MariaDB.repo [mariadb] name = MariaDB baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.1/centos7-amd64/ gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB gpgcheck=1 rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDByum -y install MariaDB-server MariaDB-clientsystemctl start mariadbmysql_secure_installation #配置命令(先退出数据库),设置完root密码,一路回车mysql -uroot -prootuse mysql;grant all privileges on *.* to 'root'@'%' identified by 'root'; #授权远程访问flush privileges;安装PHP(7.x)
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmyum makecacheyum -y install php70w* --skip-brokenservice httpd restartphp -v转载于:https://www.cnblogs.com/wintrysec/p/11328081.html