centos6.5 系统-搭建lamp(php7)环境--(yum在线安装)

一篇很好的配置文档,转载到这里防止自己以后找不到,原文地址centos6.5 系统-搭建lamp(php7)环境--(yum在线安装)

  1. 查看当前服务器的版本
#方法1
cat /etc/redhat-release
#方法2
rpm -q centos-release</pre>
  1. 安装apache
#一键安装apache
yum install httpd

#启动apche
 /etc/init.d/httpd start                     #方法1 
service httpd start                         #方法2

#设置apache开机自动启动
chkconfig --levels 235 httpd on </pre>
  1. 安装php7.1
#更新yum源(默认yum源中无php7)
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

#安装php及常用的拓展模块
yum -y install php71w php71w-mysql php71w-mbstring php71w-mcrypt php71w-gd php71w-imap php71w-ldap php71w-odbc php71w-pear php71w-xml php71w-xmlrpc php71w-pdo

#查看php安装了那些拓展模块
php -m

#安装其他你需要的拓展模块
yum -y install php71w-xxx
  1. 安装mysql5.5
#查询是否安装了mysql,默认是安装了mysql-libs的5.1版本的。需卸载
rpm -qa|grep mysql
rpm -e mysql-libs --nodeps       #不检测依赖性

#增加两个新的repo源
rpm -Uvh http://mirror.steadfast.net/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

#检测源是否安装成功
yum --enablerepo=remi,remi-test list mysql mysql-server

#安装mysql5.5
yum -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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 一、LAMP环境的介绍 1.LAMP环境的重要性 思索许久,最终还是决定写一篇详细的LAMP的源码编译安装的实验文...
    endmoon阅读 7,643评论 4 26
  • 步骤1:Centos6.5的安装、设置、升级 在此处用的是Centos6.5,毕竟有80%左右的PHP项目都是在C...
    Laragh阅读 2,615评论 0 0
  • 源码准备 由于本文搭建LAMP环境使用的是源码安装,在安装过程中需要使用到许多的软件安装包,因此在安装过程中应该首...
    littlexjing阅读 3,677评论 0 1
  • 此文为转载自CentOS 7.3下配置 Apache2.4 + MySQL5.7 + PHP7.1.8,侵删。 前...
    我活蹦乱跳呢阅读 2,817评论 1 1
  • 一周的时间很快就过去了,我也非常不舍。或许通过这个活动更能知道自己想找怎样的人,想怎样的做自己。更能好好地思考。生...
    _柯小小阅读 2,312评论 0 0

友情链接更多精彩内容