yum install gcc gcc-c++ gcc-g77 yum install make 文件放到/usr/local/src/下全部解压 for file in *.tar.gz; do tar -zxvf "${file}"; done
注:执行上面的语句之后的解压就不用再执行了
安装libxml2最新库文件
1 2 3
tar zxvf libxml2-2.9.0.tar.gz cd libxml2-2.9.0 ./configure --prefix=/usr/local/libxml2
安装zlib最新库文件
1 2 3
tar zxvf zlib.1.2.7.tar.gz cd ../zlib.1.2.7 ./configure
安装libpng最新库文件
1 2 3 4 5 6 7 8 9 10 11 12
tar zxvf libpng-1.5.14.tar.gz cd ../libpng-1.5.14
在./configure --prefix=/usr/local/libpng这步最后会提示:configure: error: ZLib not installed 解决方法如下: 进入zlib的源文件目录,执行命令 make clean,清除zlib; 重新配置 ./configure,后面不要接--prefix参数;
make && make install; 进入libpng目录,执行命令 ./configure --prefix=/usr/local/libpng; make && make install;
安装libmcrypt最新库文件
1 2 3 4 5 6 7
//tar zxvf libmcrypt-2.5.8.tar.gz cd ../libmcrypt-2.5.8 ./configure --prefix=/usr/local/libmcrypt 安装完成libmcrypt库以后,不同的linux系统版本有可能还要安装一下libltdl库。 cd /usr/local/src/libmcrypt-2.5.8/libltdl ./configure --enable-ltdl-install make && make install
1、卸载apr、apr-util yum remove apr apr-util 下载安装: http://apr.apache.org/download.cgi apr-1.4.6.tar.gz cd ../apr-1.4.6 ./configure –prefix=/usr/local/apr-httpd/ && make && make install
下载安装: http://apr.apache.org/download.cgi apr-util-1.5.1.tar.gz cd ../apr-util-1.5.1 ./configure –prefix=/usr/local/apr-util-httpd/ –with-apr=/usr/local/apr-httpd/ && make && make install
scripts/mysql_install_db –basedir=/usr/local/mysql –datadir=/usr/local/mysql/data –user=mysql 出现了 [root@localhost mysql-5.6.14]# service mysql restart ERROR! MySQL server PID file could not be found! Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
在日志中出现了如下错误:
Can’t open and lock privilege tables: Table ‘mysql.user’ doesn’t exist
错误 make: [ext/gd/gd.lo] error /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c: In function ‘_php_image_output_ctx’: /usr/local/src/php-5.4.3/ext/gd/gd_ctx.c:153: error: ‘gdIOCtx’ has no member named ‘data’ make: [ext/gd/gd.lo] Error 1 解决 vi <gd_dir>/include/gd_io.h void (gd_free) (struct gdIOCtx ); 加void (*data); } gdIOCtx;
我的GD安装在/usr/local/gd2目录下,所以是#vi vi /usr/local/gd/include/gd_io.h libltdl.so.3: cannot open shared object file: No such file or directory make: *** [ext/phar/phar.php] Error 127 解决方法: ln -s /usr/local/lib/libltdl.so.3 /usr/lib/libltdl.so.3 cd /usr/local/libpng/lib/ ls libpng15.a libpng15.so libpng15.so.15.10.0 libpng.la pkgconfig libpng15.la libpng15.so.15 libpng.a libpng.so 可以看到libpng15.so.15 然后修改/etc/ld.so.conf 文件:vi /etc/ld.so.conf 在第一行下面追加/usr/local/libpng/lib这个路径。
然后重新编译安装即可。
1 2 3 4 5 6 7
cp php.ini-development /usr/local/php/etc/php.ini
vi /usr/local/php/etc/php.ini 修改 date.timezone ="PRC"