下面我们开始编译安装PHP5.4.33
首先下载源码包到用户目录下, 下载PHP5.4.33
也可以使用命令行下载:
wget http://kr1.php.net/get/php-5.4.33.tar.bz2/from/this/mirror -O php-5.4.33.tar.bz2
tar -jxvf php-5.4.33.tar.bz2
安装php需要的一些包
yum -y install libmcrypt libmcrypt-devel bzip2-devel libxml2 libxml2-devel libcurl.x86_64 libcurl-devel.x86_64
[root@diguojin ~]
[root@diguojin php-5.4.33]
--with-mysql= /usr/local/mysql-5 .5.40/ \
--with-openssl= /usr/local/openssl-1 .0.1i/ \
--with-mysqli= /usr/local/mysql-5 .5.40 /bin/mysql_config \
--with-freetype- dir \
--with-jpeg- dir \
--with-png- dir \
--with-zlib \
--with-libxml- dir \
--with-apxs2= /usr/local/httpd24/bin/apxs \
--with-mcrypt \
--with-config- file -path= /etc \
--with-config- file -scan- dir = /etc/php .d \
--with-bz2 \
-- enable -xml \
-- enable -sockets \
-- enable -maintainer-zts \
-- enable -mbstring
[root@diguojin php-5.4.33]
vim /etc/httpd24/httpd .conf
添加如下两行
AddType application /x-httpd-php .php
AddType application /x-httpd-php-source .phps
定位至DirectoryIndex index.html
修改为
DirectoryIndex index.php index.html
(责任编辑:IT) |