本文共 1370 字,大约阅读时间需要 4 分钟。
1、yum -y install bzip2-devel openssl openssl-devel libxml2-devel
2、yum -y install epel-release 3、yum -y install libmcrypt-devel4、tar xf php-5.4.26.tar.bz25、cd php-5.4.266、 ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl \--with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir \--with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-sockets\--with-apxs2=/usr/local/apache/bin/apxs --with-mcrypt --with-config-file-path=/etc \--with-config-file-scan-dir=/etc/php.d --with-bz2 --enable-maintainer-zts7、make8、make test9、make install10、cp php.ini-production /etc/php.ini11、vim /etc/httpd/httpd.conf定位AddType,新增两行AddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps定位至DirectoryIndex index.html 修改为 DirectoryIndex index.php index.html12、cd /usr/local/apache/htdocs/13、vim index.php编辑:<?phpphpinfo();?>14、systemctl restart httpd15、打开浏览器,输入IP地址,看看是否显示PHP的详细信息16、没问题之后接着配置phpMyAdmin17、yum -y install unzip18、unzip phpMyAdmin-3.4.10.1-all-languages.zip19、mv phpMyAdmin-3.4.10.1-all-languages /usr/local/apache/htdocs/admin20、cd /usr/local/apache/htdocs/admin21、cp config.sample.inc.php config.inc.php22、systemctl restart httpd23、打开浏览器输入:IP/admin24、接着在显示的页面中输入你数据库的账号及密码,即可登入到数据啦~转载于:https://blog.51cto.com/12276015/2400340