分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 网页技术

zabbix_Linux安装php5.6.31

发布时间:2023-09-06 01:25责任编辑:胡小海关键词:Linux

Linux安装php5.6.31

注意:

1、yum  repolist查看显示repo仓库列表,并显示软件包数量

或者使用yum makecache

一、安装php

1、安装php5.6.31依赖包

yum –y install gcc make gd-devel libjpeg-devel libpng-devel libxml2-develbzip2-devel libcurl-devel

(注意:如果提示错误

                            650) this.width=650;" width="554" height="34" src="https://s5.51cto.com/oss/201711/15/cbf036efff64bdce6810110aed273006.png" style="background:url("/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" title="1.png" />

需要手动敲,哈哈…)

#yum –y install freetype-devel

#./configure --prefix=/usr/local/php-5.6.31  --with-config-file-path=/usr/local/php-5.5.0/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-bcmath650) this.width=650;" width="554" height="315" src="https://s2.51cto.com/oss/201711/15/0fca36198c0be0187a0eaa3e9b039680.png" style="background:url("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" title="2.png" />

安装结束提示信息,

#make

650) this.width=650;" width="554" height="146" src="https://s3.51cto.com/oss/201711/15/07552b561119edd5454d9defe9b821b1.png" style="background:url("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" title="3.png" />

#make  install

650) this.width=650;" width="554" height="275" src="https://s5.51cto.com/oss/201711/15/ef197da524fef6f78fe556d24e5f0704.png" style="background:url("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" title="4.png" />

2、配置php

(1)拷贝配置文件

# cp php.ini-production /usr/local/php-5.6.31/etc/php.ini

# cp/usr/local/php-5.6.31/etc/php-fpm.conf.default/usr/local/php-5.6.31/etc/php-fpm.conf

(2)启动php-fpm

# /usr/local/php-5.6.31/sbin/php-fpm

如果没有报错,表示正常,也可以通过端口判断是否启动,

# netstat -anp|grep 9000

650) this.width=650;" width="554" height="27" src="https://s4.51cto.com/oss/201711/15/bed60ed928c41e8550d771e5b3ebfa80.png" style="background:url("/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" title="5.png" />

注意:如果更改php配置文件,只能先kill掉所有php服务,然后启动php-fpm。

如:查看php-fpm服务

# netstat -anp|grep php-fpm

3、重启php服务

(1)查看后台是否有php服务运行

#ps –ef |grep php|grep –v grep

(2)kill进程

#kill -9 进程号

(3)直接杀死进程

# killall -9 php-fpm或者

#pkill -9 php-fpm


本文出自 “向ITAT看齐” 博客,请务必保留此出处http://zhangshuai2010.blog.51cto.com/1511867/1981889

zabbix_Linux安装php5.6.31

原文地址:http://zhangshuai2010.blog.51cto.com/1511867/1981889

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved