1、查看当前服务器的版本
#方法1cat /etc/redhat-release#方法2rpm -q centos-release
2、安装apache
#一键安装apacheyum install httpd#启动apche/etc/init.d/httpd start ????????????????????#方法1 service httpd start ????????????????????????#方法2#设置apache开机自动启动chkconfig --levels 235 httpd on
3、安装php7
#更新yum源(默认yum源中无php7)rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm ?#安装php及常用的拓展模块yum -y install php70w php70w-mysql php70w-mbstring php70w-mcrypt php70w-gd php70w-imap php70w-ldap php70w-odbc php70w-pear php70w-xml php70w-xmlrpc php70w-pdo#查看php安装了那些拓展模块php -m#安装其他你需要的拓展模块yum -y install php70w-xxx
4、安装mysql5.5
#查询是否安装了mysql,默认是安装了mysql-libs的5.1版本的。需卸载rpm -qa|grep mysqlrpm -e mysql-libs --nodeps ??????#不检测依赖性#增加两个新的repo源rpm -Uvh http://mirror.steadfast.net/epel/6/i386/epel-release-6-8.noarch.rpmrpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm#检测源是否安装成功yum --enablerepo=remi,remi-test list mysql mysql-server#安装mysql5.5yum -y --enablerepo=remi,remi-test install mysql mysql-server#启动mysql/etc/init.d/mysqld start#将mysql设置为开机自动启动chkconfig --levels 345 mysqld on#设置mysql的root密码/usr/bin/mysql_secure_installation
centos6.5 系统-搭建lamp(php7)环境--(yum在线安装)
原文地址:https://www.cnblogs.com/yangxiaochu/p/8302225.html