CentOS6.8 LAMP
1 安装Apache yum -y install httpd # 设置开机启动chkconfig --list httpd查看 chkconfig httpd on # 进入配置文件进行如下修改 vi /etc/httpd/conf/httpd.conf ServerName localhost:80 DirectoryIndexindex.html index.php index.htm service httpd restart 2 安装MySQL wget https://repo.mysql.com//mysql57-community-release-el6-9.noarch.rpm rpm mysql57-community-release-el6-9.noarch.rpm yum install mysql-community-server service mysqld start # mysql临时密码保存位置:/var/log/mysqld.log chkconfig mysqld on mysql -uroot -p set password for 用户名@localhost = password('新密码'); 3 安装PHP # 安装依赖包 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel