Centos linux php扩展安装步骤
2015-04-22 22:58
281 查看
使用phpinfo()函数输出PHP信息,然后找到Configuration File (php.ini)
apachectl 其设计意图是帮助管理员控制Apache httpd后台守护进程的功能。
Centos linux php扩展安装步骤
1 首先进入到php源码包中
cd /opt/php-5.1.2/ext/zlib
2 在zlib文件夹下产生configure文件 (php安装目录/opt/php/)
/opt/php/bin/phpize
3 配置编译
./configure --with-php-config=/opt/php/bin/php-config --with-zlib
make && make install
4 在/opt/php/lib/php/extensions下产生一个zlib.so文件
5 确定 php.ini文件中的extension_dir=/opt/php/lib/php/extensions 跟 extension=zlib.so
6 重新编译 php
安装gd库扩展。
我的php是解压在 /home/web/php-5.4/
可以直接进入这个目录
cd /home/web/php-5.4/
然后重新配置php,配置是想保留原有配置的基础上新增gd库,
原有的配置可能很多人安装就忘了,没关系,这个可以在phpinfo()的Configure Command 中看到
'./configure' '--prefix=/home/web/php-5.4/' '--with-apxs2=/home/web/apache/bin/apxs' '--with-mysql=/usr' '--with-config-file-path=/home/web/php-5.4/' '--enable-mbstring'
改成linux 命令
./configure --prefix=/home/web/php-5.4/ --with-apxs2=/home/web/apache/bin/apxs --with-mysql=/usr --with-config-file-path=/home/web/php-5.4/ --enable-mbstring --with-gd --with-curl
configure执行成功的话可以看到Thank you for using PHP.
执行
make
make install
重启apache完成。
apachectl 其设计意图是帮助管理员控制Apache httpd后台守护进程的功能。
Centos linux php扩展安装步骤
1 首先进入到php源码包中
cd /opt/php-5.1.2/ext/zlib
2 在zlib文件夹下产生configure文件 (php安装目录/opt/php/)
/opt/php/bin/phpize
3 配置编译
./configure --with-php-config=/opt/php/bin/php-config --with-zlib
make && make install
4 在/opt/php/lib/php/extensions下产生一个zlib.so文件
5 确定 php.ini文件中的extension_dir=/opt/php/lib/php/extensions 跟 extension=zlib.so
6 重新编译 php
安装gd库扩展。
我的php是解压在 /home/web/php-5.4/
可以直接进入这个目录
cd /home/web/php-5.4/
然后重新配置php,配置是想保留原有配置的基础上新增gd库,
原有的配置可能很多人安装就忘了,没关系,这个可以在phpinfo()的Configure Command 中看到
'./configure' '--prefix=/home/web/php-5.4/' '--with-apxs2=/home/web/apache/bin/apxs' '--with-mysql=/usr' '--with-config-file-path=/home/web/php-5.4/' '--enable-mbstring'
改成linux 命令
./configure --prefix=/home/web/php-5.4/ --with-apxs2=/home/web/apache/bin/apxs --with-mysql=/usr --with-config-file-path=/home/web/php-5.4/ --enable-mbstring --with-gd --with-curl
configure执行成功的话可以看到Thank you for using PHP.
执行
make
make install
重启apache完成。
相关文章推荐
- Centos 6.5下PHP 5.3安装ffmpeg扩展的步骤详解
- php安装dblib扩展,连接mssql的具体步骤
- centos系统为php安装memcached扩展步骤
- php redis扩展安装步骤
- PHP 安装扩展步骤
- centos系统为php安装memcached扩展步骤
- PHP之PDO_MYSQL扩展安装步骤
- PHP安装sqlsrv和memcache扩展步骤
- PHP安装Redis扩展的操作步骤(Windows操作系统下)
- 【原】用PHP搭建基于swoole扩展的socket服务(附PHP扩展的安装步骤及Linux/shell在线手册)
- PHP Memcache扩展安装配置步骤
- centos系统为php安装memcached扩展步骤
- php安装扩展步骤(redis)
- PHP安装sqlsrv扩展步骤,PHP如何连接上SQL
- PHP之PDO_MYSQL扩展安装步骤(转)
- MongoDb、Mongodb php扩展 安装步骤及相关知识
- PHP之——PDO_MYSQL扩展安装步骤
- php安装扩展mysqli的实现步骤及报错解决办法
- PHP安装memcache扩展接口步骤
- CentOS下安装PHP的AMQP扩展方法和步骤