安装php
升级rpm
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
查看php的rpm是否升级成功
yum search php71w
安装php以及相关扩展
yum install php71w php71w-fpm php71w-cli php71w-common php71w-devel php71w-gd php71w-pdo php71w-mysql php71w-mbstring php71w-bcmath
开启服务
service php-fpm start
安装mysql
安装
yum localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpmyum install mysql-community-server
开启mysql
service mysqld start
查看mysql安装后root账号临时生成的密码
grep 'temporary password' /var/log/mysqld.log
登录mysql
mysql -uroot -p
修改密码
ALTER USER 'root'@'localhost' IDENTIFIED BY '此处填写你的新密码';
修改root用户可远程登录
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '你刚刚修改的新密码' WITH GRANT OPTION;
刷新配置文件,使其生效
flush privileges;
安装apache
yum install httpd -y
参考