脚本宝典收集整理的这篇文章主要介绍了centos6.6学习笔记:安装PHP5.5,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
rpm -Uvh https://dl.FedoraPRoject.org/pub/EPEL/ePEl-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.weBTatic.COM/yum/el6/latest.rpm
一、安装apache
yum install httpd #根据提示,输入Y安装即可成功安装
/etc/inIT.d/httpd start #启动Apache
Apache启动可能出现的问题:
httpd:httpd: Could not reliably determine the server's fully qualif domain name, using ::1 for ServerName
解决办法:
vi /etc/httpd/conf/httpd.conf #编辑
ServerName www.example.com:80 #去掉前面的注释
:wq! #保存退出
chkconfig httpd on #设为开机启动
/etc/init.d/httpd restart #重启Apache
二、安装MySQL
1、安装MySQL
yum install mysql mysql-server #询问是否要安装,输入Y即可自动安装,直到安装完成
/etc/init.d/mysqld start #启动MySQL
chkconfig mysqld on #设为开机启动
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf #拷贝配置文件(注意:如果/etc目录下面默认有一个my.cnf,直接覆盖即可)
2、为root账户设置密码
mysql_secure_installation
回车,根据提示输入Y
输入2次密码,回车
根据提示一路输入Y
最后出现:Thanks for using MySQL!
MySql密码设置完成,重新启动 MySQL:
/etc/init.d/mysqld restart #重启
/etc/init.d/mysqld stop #停止
/etc/init.d/mysqld start #启动
rpm -qa|grep php
2.删除之前安装的phP版本
remove php-common #注意查询的php版本
3.查看php版本列表
yum list php*
5.安装php及相关软件
yum install php55w.x86_64 php55w-FPM.x86_64 php55w-mysql.x86_64 php55w-gd.x86_64 libjpeg* php55w-ldap.x86_64 php55w-odbc.x86_64 php55w-pear.noArch php55w-XMl.x86_64 php55w-xMLrpc.x86_64 php55w-mbstring.x86_64 php55w-bcmath.x86_64 php-mhash
以上是脚本宝典为你收集整理的centos6.6学习笔记:安装PHP5.5全部内容,希望文章能够帮你解决centos6.6学习笔记:安装PHP5.5所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。