|
1.1.1 解决PHP软件的依赖关系 安装基本的依赖包
yum install zlib-devellibxml2-devel libjpeg-devellibjpeg-turbo-devel libiconv-devel -y
yum install freetype-devellibpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel -y
rpm -qa z
lib-devel libxml2-devel libjpeg-devellibjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel gd-devellibcurl-devel libxslt-devel 防报错,所以编译安装
libiconv软件安装
mkdir -p /home/oldboy/tools
[root@web02 init.d]# cd /home/oldboy/tools/[root@web02 tools]# lltotal 338200drwxr-xr-x 22 root root 4096 May 22 11:17 libiconv-1.14-rw-r--r-- 1 root root 4984397 May 22 08:38 libiconv-1.14.tar.gz
#wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz 下载软件
[root@web02 tools]# tar xf libiconv-1.14.tar.gz
[root@web02 tools]# cd libiconv-1.14[root@web02 libiconv-1.14]# ./configure --prefix=/usr/local/libiconv[root@web02 libiconv-1.14]# make[root@web02 libiconv-1.14]# make install
[root@web02 libiconv-1.14]# cd ../[root@web02 tools]# #wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
[root@web02 tools]# yum -y install libmcrypt-devel mhash mcrypt[root@web02 tools]# rpm -qa libmcrypt-devel mhash mcryptmhash-0.9.9.9-3.el6.x86_64libmcrypt-devel-2.5.8-9.el6.x86_64mcrypt-2.6.8-10.el6.x86_64
1.1.2 下载解压PHP软件
[root@web02 tools]# tar xf php-5.5.32.tar.gz
[root@web02 tools]# cd php-5.5.32
[root@web02 tools]# ./configure \
--prefix=/application/php-5.5.32 \
--with-mysql=/application/mysql/ \
--with-pdo-mysql=mysqlnd \
--with-iconv-dir=/usr/local/libiconv \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib \
--with-libxml-dir=/usr \
--enable-xml \
--disable-rpath \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--enable-mbregex \
--enable-fpm \
--enable-mbstring \
--with-mcrypt \
--with-gd \
--enable-gd-native-ttf \
--with-openssl \
--with-mhash \
--enable-pcntl \
--enable-sockets \
--with-xmlrpc \
--enable-soap \
--enable-short-tags \
--enable-static \
--with-xsl \
--with-fpm-user=www \
--with-fpm-group=www \
--enable-ftp \
--enable-opcache=no
#Generating files
#configure: creating ./config.status
#creating main/internal_functions.c
#creating main/internal_functions_cli.c
#+--------------------------------------------------------------------+
#| License: |
#| This software is subject to the PHP License, available in this |
#| distribution in the file LICENSE. By continuing this installation |
#| process, you are bound by the terms of this license agreement. |
#| If you do not agree with the terms of this license, you must abort |
#| the installation process at this point. |
#+--------------------------------------------------------------------+
#
#Thank you for using PHP.
出现此界面说明配置工作就没有问题了
##防报错 关键
ln -s /application/mysql/lib/libmysqlclient.so.18 /usr/lib64/
touch ext/phar/phar.phar
make 开始编译
make install [root@web02 blog]# curl blog.etiantian.org/test_mysql.phpmysql successful by oldboy ! |
|
|
|
|
|
|