Linux下安装PHP
2015-11-03 14:56
435 查看
检查:
whereis zlib
1.2.7-13
whereis libpng
1.5.13
whereis freetype
2.4.11
whereis jpeg
安装插件:
tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=/usr/local/zlib
make
make install
tar -zxvf libpng-1.6.17.tar.gz
cd libpng-1.6.17
-- mv ./scripts/makefile.linux ./makefile
./configure --prefix=/usr/local/png
make
make install
tar -zxvf freetype-2.5.5.tar.gz
cd freetype-2.5.5
./configure --prefix=/usr/local/freetype
make
make install
tar -zxvf jpegsrc.v9a.tar.gz
cd jpeg-9a
./configure --prefix=/usr/local/jpeg --enable-shared
make
make test
make install
tar -zxvf libgd-2.1.1.tar.gz
cd libgd-2.1.1
./configure --prefix=/usr/local/gd --with-png=/usr/local/png --with-jpeg=/usr/local/jpeg --with-freetype=/usr/local/freetype
make
make install
tar -zxvf libgd-2.1.0.tar.gz
cd libgd-2.1.0
安装php:
tar -zxvf php-5.6.10.tar.gz
cd php-5.6.10
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=~/software/php/libxml2 --with-config-file-path=/usr/local/lib
./configure --prefix=/usr/local/php --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs
./configure --prefix=/usr/local/php --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-png --with-jpeg --with-freetype-dir=/usr/local/freetype
./configure --prefix=/usr/local/php --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-gd=/usr/local/gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-png-dir=/usr/local/png --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype
./configure --prefix=/usr/local/php --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-png-dir=/usr/local/png --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype
./configure --prefix=/usr/local/php --enable-mbstring --disable-fileinfo --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-png-dir=/usr/local/png --with-jpeg-dir=/usr/local/jpeg
--with-freetype-dir=/usr/local/freetype
make
make install
sudo cp php.ini-development /usr/local/php/lib/php.ini
OK!
参考:
/article/1411271.html
/article/4813850.html
添加GD库:
http://blog.chinaunix.net/uid-22914802-id-1765554.html
检查:
whereis zlib
1.2.7-13
whereis libpng
1.5.13
whereis freetype
2.4.11
whereis jpeg
安装插件:
tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=/usr/local/zlib
make
make install
tar -zxvf libpng-1.6.17.tar.gz
cd libpng-1.6.17
-- mv ./scripts/makefile.linux ./makefile
./configure --prefix=/usr/local/png
make
make install
tar -zxvf freetype-2.5.5.tar.gz
cd freetype-2.5.5
./configure --prefix=/usr/local/freetype
make
make install
tar -zxvf jpegsrc.v9a.tar.gz
cd jpeg-9a
./configure --prefix=/usr/local/jpeg --enable-shared
make
make test
make install
tar -zxvf libgd-2.1.1.tar.gz
cd libgd-2.1.1
./configure --prefix=/usr/local/gd --with-png=/usr/local/png --with-jpeg=/usr/local/jpeg --with-freetype=/usr/local/freetype
make
make install
tar -zxvf libgd-2.1.0.tar.gz
cd libgd-2.1.0
安装php:
tar -zxvf php-5.6.10.tar.gz
cd php-5.6.10
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=~/software/php/libxml2 --with-config-file-path=/usr/local/lib
./configure --prefix=/usr/local/php --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs
./configure --prefix=/usr/local/php --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-png --with-jpeg --with-freetype-dir=/usr/local/freetype
./configure --prefix=/usr/local/php --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-gd=/usr/local/gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-png-dir=/usr/local/png --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype
./configure --prefix=/usr/local/php --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-png-dir=/usr/local/png --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype
./configure --prefix=/usr/local/php --enable-mbstring --disable-fileinfo --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-png-dir=/usr/local/png --with-jpeg-dir=/usr/local/jpeg
--with-freetype-dir=/usr/local/freetype
make
make install
sudo cp php.ini-development /usr/local/php/lib/php.ini
OK!
参考:
/article/1411271.html
/article/4813850.html
添加GD库:
http://blog.chinaunix.net/uid-22914802-id-1765554.html
相关文章推荐
- Linux查看CPU和内存使用情况
- linux下的c语言五子棋
- linux(centos)搭建SVN服务器
- Linux内存cached释放
- CentOS 7 下使用 Firewall
- CentOS安装mysql数据库
- Linux下查看CPU信息[/proc/cpuinfo]
- 【鸟哥的linux私房菜-学习笔记】文件的格式化与相关处理
- 安装配置Linux ftp服务及用IE访问Linux ftp
- 安装配置Linux ftp服务及用IE访问Linux ftp
- 用qt编译Android应用(windows和Linux)
- How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x
- Linux源代码目录分析
- Linux系统编程之fcntl使用
- linux内核的生成过程, vmlinux调试分析
- linux学习路线
- centos7上搭建jenkins环境
- 若为自由故——重返 Linux 世界
- linux修改字符集
- linux命令:find