当前位置:Gxlcms > PHP教程 > 安装zabbix安装php

安装zabbix安装php

时间:2021-07-01 10:21:17 帮助过:26人阅读

1,安装php可通过官网进行下(wget http://www.php.com/get/php-5.5.0.tar.bz2/from/jp1.php.com/mirror)。


2,安装相关的依赖包,确保安装之前有安装gd,png,curl,xml等等lib开发库可以使用yum进行安装。

[root@localhost conf]# yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y


3,编译安装PHP 5.5

[root@localhost install]# tar -xvf php-5.5.28.tar.bz2

[root@localhost install]# cd php-5.5.28

[root@localhost install]# ./configure --prefix=/usr/local/php \

--with-config-file-path=/usr/local/php/etc --with-bz2 --with-curl \

--enable-ftp --enable-sockets --disable-ipv6 --with-gd \

--with-jpeg-dir=/usr/local --with-png-dir=/usr/local \

--with-freetype-dir=/usr/local --enable-gd-native-ttf \

--with-iconv-dir=/usr/local --enable-mbstring --enable-calendar \

--with-gettext --with-libxml-dir=/usr/local --with-zlib \

--with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd \

--enable-dom --enable-xml --enable-fpm --with-libdir=lib64 --enable-bcmath


[root@localhost install]#make

[root@localhost install]# make install


4,配置php


[root@localhost install]cp php.ini-production /usr/local/php/etc/php.ini

[root@localhost install]cd /usr/locat/php/etc/

[root@localhost etc]# cp php-fpm.conf.default php-fpm.conf


5,查看该服务是否启动:

[root@localhost sbin]# netstat -lnt|grep 9000

tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN

人气教程排行