一、PHP5安装
PHP,是英文超文本预处理语言Hypertext Preprocessor的缩写。PHP 是一种 HTML 内嵌式的语言,是一种在服务器端执行的嵌入HTML文档的脚本语言。官网:www.php.net
1、下载并解压源码安装包
[root@zlinux bin]# cd /usr/local/src/
[root@zlinux src]# wget http://cn2.php.net/distributions/php-5.6.30.tar.bz2
[root@zlinux src]# tar jxf php-5.6.30.tar.bz2
2、配置安装
[root@zlinux src]# cd php-5.6.30/
[root@zlinux php-5.6.30]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif