博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
部署php
阅读量:6811 次
发布时间:2019-06-26

本文共 3759 字,大约阅读时间需要 12 分钟。

安装依赖

#解压PHP软件,进行编译安装,将程序安装到/application目录中,并且创建软链接#安装其它相关依赖程序---libmcrypt  wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repoyum -y install libmcrypt-devel mhash mcryptrpm -qa libmcrypt-devel mhash mcrypt   http://php.net/releases/yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel curl-devel -yyum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel -yrpm -qa zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel curl-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel

安装PHP软件程序

tar xf php-5.5.32.tar.gz    cd php-5.5.32           #----正式编译前也可以把这个软件安装上(libxslt*) ./configure --prefix=/application/php-5.5.32 \--with-mysql=mysqlnd \--with-pdo-mysql=mysqlnd \--with-freetype-dir \--with-jpeg-dir \--with-png-dir \--with-zlib \--with-libxml-dir=/usr \--enable-xml \--disable-rpath \--enable-bcmath \--enable-shmop \--enable-sysvsem \--enable-inline-optimization \--with-curl \--enable-mbregex \--enable-fpm \--enable-mbstring \--with-mcrypt \--with-gd \--enable-gd-native-ttf \--with-openssl \--with-mhash \--enable-pcntl \--enable-sockets \--with-xmlrpc \--enable-soap \--enable-short-tags \--enable-static \--with-xsl \--with-fpm-user=www \--with-fpm-group=www \--enable-ftp \--enable-opcache=no##提示 如下内容 即成功Generating filesconfigure: creating ./config.statuscreating main/internal_functions.ccreating main/internal_functions_cli.c+--------------------------------------------------------------------+| License:                                                           || This software is subject to the PHP License, available in this     || distribution in the file LICENSE.  By continuing this installation || process, you are bound by the terms of this license agreement.     || If you do not agree with the terms of this license, you must abort || the installation process at this point.                            |+--------------------------------------------------------------------+
[root@web01 php-5.5.32]# make install
[root@web01 php-5.5.32]# echo $?0
 
ln -s /application/mysql/lib/libmysqlclient.so.18 /usr/lib64/ #可以不创建 touch ext/phar/phar.phar make && make install ln -s /application/php-5.5.32/ /application/php#复制php.ini配置文件[root@web01 php-5.5.32]# cp /home/lewen/tools/php-5.5.32/php.ini-production  /application/php-5.5.32/lib/php.ini#复制php-fpm配置文件[root@web01 php-5.5.32]# cd /application/php-5.5.32/etc/[root@web01 etc]# ls pear.conf  php-fpm.conf.default[root@web01 etc]# cp php-fpm.conf.default php-fpm.conf[root@web01 etc]# lltotal 52-rw-r--r-- 1 root root  1332 Feb 27 22:53 pear.conf-rw-r--r-- 1 root root 22609 Feb 27 22:56 php-fpm.conf-rw-r--r-- 1 root root 22609 Feb 27 22:53 php-fpm.conf.default[root@web01 etc]# /application/php-5.5.32/sbin/php-fpm -t[27-Feb-2018 22:56:53] NOTICE: configuration file /application/php-5.5.32/etc/php-fpm.conf test is successful[root@web01 etc]# /application/php-5.5.32/sbin/php-fpm [root@web01 etc]# ss -lntup |grep 9000tcp    LISTEN     0      16384          127.0.0.1:9000                  *:*      users:(("php-fpm",129733,7),("php-fpm",129734,0),("php-fpm",129735,0))

 

LNMP搭建网站前的测试

测试nginx与php配合是否成功php与MySQL配合是否成功测试nginx与php配合是否成功server {        listen       80;        server_name  blog.etiantian.org;        root   html/blog;        index  index.php index.html index.htm;        location ~ .*\.(php|php5)?$ {            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            include       fastcgi.conf;        }}echo '
' >/application/nginx/html/blog/test_info.phpphp与MySQL配合是否成功test_mysql.php
#部署博客 https://cn.wordpress.org/wordpress-4.9.4-zh_CN.tar.gzchown -R www.www *

 

转载于:https://www.cnblogs.com/wenyule/articles/10494401.html

你可能感兴趣的文章
利用express启一个server服务
查看>>
C#对IE使用Proxy(代理)
查看>>
sign签名算法一致算法-.net、java、golang
查看>>
Node.js简介与架构
查看>>
Entity Framework 异常档案
查看>>
如何成功发布一个MSMQ的Windows服务
查看>>
EntLib 3.1学习笔记(5) : Exception Handling Application Block
查看>>
工厂模式 接口 封装 实例
查看>>
bzoj1061 志愿者招募
查看>>
p2093 [国家集训队]JZPFAR
查看>>
枚举当前打开的所有窗口
查看>>
【COCOS2DX-LUA 脚本开发之十二】Hybrid模式-利用AssetsManager实现在线更新脚本文件lua、js、图片等资源(免去平台审核周期)...
查看>>
GDI+中发生一般性错误的解决办法(转)
查看>>
【Selenium】1.介绍 Selenium
查看>>
wxpython仿写记事本
查看>>
MM 常用表
查看>>
XCode6自定义pch文件
查看>>
正则表达式--简单记忆一
查看>>
字符数组的ss.toString()和new String(ss)的问题
查看>>
CentOS上安装多版本Python问题
查看>>