Home > Backend Development > PHP Tutorial > 安装zabbix安装php

安装zabbix安装php

WBOY
Release: 2016-06-20 12:49:04
Original
1753 people have browsed it

1,安装php可通过官网进行下(wget http://www.php.net/get/php-5.5.0.tar.bz2/from/jp1.php.net/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


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template