背景
  
  前边把树莓派装上了CentOS
7,趁着国庆放假回到赶紧把服务端环境搭起来,为了便利就准备用一键lnmp火速铺排一个,结果死活安装不成功…
  
  报错
  
  根据以往的经验举办设置,在自个儿的小树莓派上安装实在是慢,终究必要编写翻译,CPU不给力只好慢慢的守候编写翻译达成,吃个午饭回来发现就好像早就做到了,然则却难倒了,报错消息如下

CentOS 7 for A福睿斯M 安装一键Lnmp战败,centoslnmp

  背景
  
  后面把树莓派装上了CentOS
7,趁着国庆放假回到赶紧把服务端环境搭起来,为了便于就准备用一键lnmp神速安顿三个,结果死活安装不成功…
  
  报错
  
  遵照未来的阅历进行设置,在笔者的小树莓派上安装实在是慢,毕竟供给编写翻译,CPU不给力只可以慢慢的等待编写翻译完毕,吃个午饭回来发现如同已经到位了,然则却难倒了,报错音信如下

============================== Check install ==============================
Checking ...
Nginx: OK
MariaDB: OK
Error: PHP install failed.
Sorry, Failed to install LNMP!
Please visit http://bbs.vpser.net/forum-25-1.html feedback errors and logs.
You can download /root/lnmp-install.log from your server,and upload lnmp-install.log to LNMP Forum.

   
PHP安装退步了,报错不妨,再来二遍放下啥难题,使用./upgrade.sh脚本能够重新安装,但是一而再报错

+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL.... SUCCESS! 
/bin/lnmp: line 27: /etc/init.d/php-fpm: No such file or directory
======== upgrade php failed ======
upgrade php log: /root/upgrade_lnmp_php.log
You upload upgrade_lnmp_php.log to LNMP Forum for help.

  发现
  
  仔细查看安装日志,发现了主要新闻

configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.

  那里有个error,说是“请安装libcurl”,奇怪了,作者在VPS上设置的时候咋没碰着那些难点吧,难道是CentOS
for 树莓派版本阉割了这家伙?
  
  解决
  
  根据不当提醒安装,尝试使用yum直接装,可是包管理器里面并从未发觉那些东西,找到官网上一向下载编写翻译安装

     CentOS 编译SVNdocx

wget https://curl.haxx.se/download/curl-7.50.3.tar.gz
tar zvxf curl-7.50.3.tar.gz
cd curl-7.50.3
./configure --enable-shared
make
make install

  经过长时间的编写翻译终于编写翻译安装成功了
  
  继续品尝安装PHP,那回终柳盈瑄常开始展览编写翻译PHP了

Generating files
configure: creating ./config.status
creating main/internal_functions.c
creating 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.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/fpm/php-fpm.conf
config.status: creating sapi/fpm/init.d.php-fpm
config.status: creating sapi/fpm/php-fpm.service
config.status: creating sapi/fpm/php-fpm.8
config.status: creating sapi/fpm/status.html
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands

  经过长期的编写翻译,终于…..
  
设置一键Lnmp退步,framework安装与运用。  编写翻译完结了,可是…

+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL...... SUCCESS! 
Starting php-fpm Failed loading /usr/local/zend/ZendGuardLoader.so:  /usr/local/zend/ZendGuardLoader.so: cannot open shared object file: No such file or directory
 done
======== upgrade php completed ======

就像依旧略微标题,可是难点十分小,看起来像是有个别扩大丢了,到这些目录查看下到底有没有其一东西

[[email protected] ~]# ls /usr/local/zend/                   
ZendGuardLoader.so

  发现是有这么些事物,真是神奇,通过查找发现lnmp论坛上还真有人境遇过这一个难题,帖子地址

  
  后记
  
  重新从zend官方下载了三十几人的so文件放进去发现如故10分,尝试重新安装PHP的暗许版本5.4.45,未来还在编写翻译…
澳门金沙国际 ,  
  更新
  
  经过一番波折终于消除了,编写翻译完PHP之后发现照旧败退了,错误音讯如下

+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://www.gooln.com              |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm /etc/init.d/php-fpm:行57: /usr/local/php/sbin/php-fpm: 没有那个文件或目录
 failed
======== upgrade php failed ======
upgrade php log: /root/upgrade_lnmp_php.log
You upload upgrade_lnmp_php.log to LNMP Forum for help.
显示的是找不到php-fpm这个文件,于是我想查找下这个文件在哪
$ whereis php-fpm
php-fpm: /usr/bin/php-fpm /usr/sbin/php-fpm /etc/php-fpm.conf /etc/php-fpm.d /usr/share/man/man8/php-fpm.8.gz
通过查找发现确实不在那个目录下面,这个简单,直接从/usr/sbin下面把php-fpm复制过去就好了

$ cd /usr/local/php/
$ ls
etc  php-fpm
$ sudo mkdir sbin
$ sudo mv php-fpm sbin/
$ lnmp restart
Error: You must be root to run this script!
[[email protected] php]$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://www.gooln.com              |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm [01-Jan-1970 13:18:55] ERROR: failed to open error_log (/usr/local/php/var/log/php-fpm.log): No such file or directory (2)
[01-Jan-1970 13:18:55] ERROR: failed to post process the configuration
[01-Jan-1970 13:18:55] ERROR: FPM initialization failed
 failed

正确,继续报错,依照提醒来

$ cd /usr/local/php/
$ sudo mkdir var
$ cd var/
$ sudo mkdir log
$ cd log/
$ ls
$ sudo touch php-fpm.log
$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm [01-Jan-1970 13:20:18] ERROR: Unable to create the PID file (/usr/local/php/var/run/php-fpm.pid).: No such file or directory (2)
[01-Jan-1970 13:20:18] ERROR: FPM initialization failed
 failed

依然报错,继续

$ cd ..
$ ls
log
$ sudo mkdir run
$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm  done

OK,终于化解了,真是波折啊,猜测lnmp笔者没有测试过lnmp跑在A君越M上会不会出难题,希望能够改良…

7 for A逍客M 安装一键Lnmp退步,centoslnmp
背景 后面把树莓派装上了CentOS
7,趁着国庆放假回来赶紧把服务端环境搭起来,为了便于就准备用…

  背景
  
  前边把树莓派装上了CentOS
7,趁着国庆放假回到赶紧把服务端环境搭起来,为了有利于就准备用一键lnmp急速安插3个,结果死活安装不成功…
  
  报错
  
  依照未来的经历进行安装,在自身的小树莓派上设置实在是慢,究竟需求编译,CPU不给力只好稳步的等候编写翻译完毕,吃个午饭回来发现仿佛已经到位了,可是却难倒了,报错音讯如下

1.准备干活 1.1 一台腾讯云服务器2核CPU+2G内部存款和储蓄器的Linux CentOS
7.2(多谢小杨同学@erchoc) 1.2
预装lnmp一键安装包环境,官方地址:lnmp一键安装包 (如不会选取请查看此链接)
2.安装swo…

============================== Check install ==============================
Checking ...
Nginx: OK
MariaDB: OK
Error: PHP install failed.
Sorry, Failed to install LNMP!
Please visit http://bbs.vpser.net/forum-25-1.html feedback errors and logs.
You can download /root/lnmp-install.log from your server,and upload lnmp-install.log to LNMP Forum.
============================== Check install ==============================
Checking ...
Nginx: OK
MariaDB: OK
Error: PHP install failed.
Sorry, Failed to install LNMP!
Please visit http://bbs.vpser.net/forum-25-1.html feedback errors and logs.
You can download /root/lnmp-install.log from your server,and upload lnmp-install.log to LNMP Forum.

 

   
PHP安装战败了,报错无妨,再来1遍看下啥难点,使用./upgrade.sh脚本能够重新安装,然则几次三番报错

   
PHP安装退步了,报错不要紧,再来一遍看下啥难题,使用./upgrade.sh脚本能够重新安装,但是一连报错

1.预备干活

+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL.... SUCCESS! 
/bin/lnmp: line 27: /etc/init.d/php-fpm: No such file or directory
======== upgrade php failed ======
upgrade php log: /root/upgrade_lnmp_php.log
You upload upgrade_lnmp_php.log to LNMP Forum for help.
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL.... SUCCESS! 
/bin/lnmp: line 27: /etc/init.d/php-fpm: No such file or directory
======== upgrade php failed ======
upgrade php log: /root/upgrade_lnmp_php.log
You upload upgrade_lnmp_php.log to LNMP Forum for help.

1.1 一台腾讯云服务器2核CPU+2G内部存款和储蓄器的Linux CentOS
7.2(谢谢小杨同学@erchoc)

  发现
  
  仔细查看安装日志,发现了主要音信

  发现
  
  仔细查看安装日志,发现了主要音信

澳门金沙国际 1

configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.

1.2
预装lnmp一键安装包环境,官方地址:lnmp一键安装包 (如不会选用请查看此链接)

  这里有个error,说是“请安装libcurl”,奇怪了,小编在VPS上设置的时候咋没蒙受这几个题材吗,难道是CentOS
for 树莓派版本阉割了这厮?
  
  解决
  
  遵照不当提醒安装,尝试使用yum直接装,但是包管理器里面并不曾发现这么些事物,找到官网上一向下载编写翻译安装

  那里有个error,说是“请安装libcurl”,奇怪了,作者在VPS上安装的时候咋没境遇这几个难点呢,难道是CentOS
for 树莓派版本阉割了那个东西?
  
  解决
  
  遵照不当提示安装,尝试使用yum直接装,不过包管理器里面并从未意识那一个东西,找到官网上直接下载编译安装

澳门金沙国际 2

     CentOS 编译SVNdocx

     CentOS 编译SVNdocx

2.安装swoole

wget https://curl.haxx.se/download/curl-7.50.3.tar.gz
tar zvxf curl-7.50.3.tar.gz
cd curl-7.50.3
./configure --enable-shared
make
make install
wget https://curl.haxx.se/download/curl-7.50.3.tar.gz
tar zvxf curl-7.50.3.tar.gz
cd curl-7.50.3
./configure --enable-shared
make
make install
pecl install swoole

  经过长时间的编译终于编写翻译安装成功了
  
  继续品尝安装PHP,那回终李樯常开始展览编写翻译PHP了

  经过短期的编写翻译终于编写翻译安装成功了
  
  继续品尝安装PHP,那回终李有贞常实行编写翻译PHP了

刚安装完就意识zan
framework须求swoole的1.8.5-stable版本,框架小编表明如下:

Generating files
configure: creating ./config.status
creating main/internal_functions.c
creating 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.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/fpm/php-fpm.conf
config.status: creating sapi/fpm/init.d.php-fpm
config.status: creating sapi/fpm/php-fpm.service
config.status: creating sapi/fpm/php-fpm.8
config.status: creating sapi/fpm/status.html
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
Generating files
configure: creating ./config.status
creating main/internal_functions.c
creating 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.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/fpm/php-fpm.conf
config.status: creating sapi/fpm/init.d.php-fpm
config.status: creating sapi/fpm/php-fpm.service
config.status: creating sapi/fpm/php-fpm.8
config.status: creating sapi/fpm/status.html
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands

Zan 基于 swoole-1.8.5-stable 版本创设,因
Swoole 更高版本 MySQL Query API 大幅度改变,请勿使用更高版本。

  经过长时间的编写翻译,终于…..
  
  编写翻译完结了,不过…

  经过短期的编写翻译,终于…..
  
  编写翻译完结了,可是…

不过swoole1.9.11-stable版已经设置好了
澳门金沙国际 3

+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL...... SUCCESS! 
Starting php-fpm Failed loading /usr/local/zend/ZendGuardLoader.so:  /usr/local/zend/ZendGuardLoader.so: cannot open shared object file: No such file or directory
 done
======== upgrade php completed ======
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL...... SUCCESS! 
Starting php-fpm Failed loading /usr/local/zend/ZendGuardLoader.so:  /usr/local/zend/ZendGuardLoader.so: cannot open shared object file: No such file or directory
 done
======== upgrade php completed ======

悠闲,大家卸载它

犹如照旧多少标题,然则难点一点都不大,看起来像是有个别扩展丢了,到那一个目录查看下到底有没有那一个事物

犹如依然稍微标题,可是难题十分小,看起来像是某些扩大丢了,到这几个目录查看下到底有没有这些事物

澳门金沙国际 4

[root@rpi2 ~]# ls /usr/local/zend/                   
ZendGuardLoader.so
[root@rpi2 ~]# ls /usr/local/zend/                   
ZendGuardLoader.so

安装1.8.5版本,就用

  发现是有其一东西,真是神奇,通过寻找发现lnmp论坛上还真有人遭遇过这几个标题,帖子地址

  
  后记
  
  重新从zend官方下载了三贰十位的so文件放进去发现照旧13分,尝试重新安装PHP的默许版本5.4.45,未来还在编译…
  
  更新
  
  经过一番曲折终于化解了,编写翻译完PHP之后察觉照旧败退了,错误新闻如下

  发现是有那一个事物,真是神奇,通过查找发现lnmp论坛上还真有人际遇过那一个题目,帖子地址

  
  后记
  
  重新从zend官方下载了叁13位的so文件放进去发现依旧丰盛,尝试重新安装PHP的暗许版本5.4.45,现在还在编写翻译…
  
  更新
  
  经过一番波折终于解决了,编写翻译完PHP之后发现依然败退了,错误新闻如下

pecl install swoole-1.8.5-stable
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://www.gooln.com              |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm /etc/init.d/php-fpm:行57: /usr/local/php/sbin/php-fpm: 没有那个文件或目录
 failed
======== upgrade php failed ======
upgrade php log: /root/upgrade_lnmp_php.log
You upload upgrade_lnmp_php.log to LNMP Forum for help.
显示的是找不到php-fpm这个文件,于是我想查找下这个文件在哪
$ whereis php-fpm
php-fpm: /usr/bin/php-fpm /usr/sbin/php-fpm /etc/php-fpm.conf /etc/php-fpm.d /usr/share/man/man8/php-fpm.8.gz
通过查找发现确实不在那个目录下面,这个简单,直接从/usr/sbin下面把php-fpm复制过去就好了

$ cd /usr/local/php/
$ ls
etc  php-fpm
$ sudo mkdir sbin
$ sudo mv php-fpm sbin/
$ lnmp restart
Error: You must be root to run this script!
[kbdancerrpi@rpi2 php]$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://www.gooln.com              |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm [01-Jan-1970 13:18:55] ERROR: failed to open error_log (/usr/local/php/var/log/php-fpm.log): No such file or directory (2)
[01-Jan-1970 13:18:55] ERROR: failed to post process the configuration
[01-Jan-1970 13:18:55] ERROR: FPM initialization failed
 failed
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://www.gooln.com              |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm /etc/init.d/php-fpm:行57: /usr/local/php/sbin/php-fpm: 没有那个文件或目录
 failed
======== upgrade php failed ======
upgrade php log: /root/upgrade_lnmp_php.log
You upload upgrade_lnmp_php.log to LNMP Forum for help.
显示的是找不到php-fpm这个文件,于是我想查找下这个文件在哪
$ whereis php-fpm
php-fpm: /usr/bin/php-fpm /usr/sbin/php-fpm /etc/php-fpm.conf /etc/php-fpm.d /usr/share/man/man8/php-fpm.8.gz
通过查找发现确实不在那个目录下面,这个简单,直接从/usr/sbin下面把php-fpm复制过去就好了

$ cd /usr/local/php/
$ ls
etc  php-fpm
$ sudo mkdir sbin
$ sudo mv php-fpm sbin/
$ lnmp restart
Error: You must be root to run this script!
[kbdancerrpi@rpi2 php]$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://www.gooln.com              |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm [01-Jan-1970 13:18:55] ERROR: failed to open error_log (/usr/local/php/var/log/php-fpm.log): No such file or directory (2)
[01-Jan-1970 13:18:55] ERROR: failed to post process the configuration
[01-Jan-1970 13:18:55] ERROR: FPM initialization failed
 failed

设置时报错

没错,继续报错,依据提醒来

不错,继续报错,依照提醒来

澳门金沙国际 5怎么做,查看扶助文书档案

$ cd /usr/local/php/
$ sudo mkdir var
$ cd var/
$ sudo mkdir log
$ cd log/
$ ls
$ sudo touch php-fpm.log
$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm [01-Jan-1970 13:20:18] ERROR: Unable to create the PID file (/usr/local/php/var/run/php-fpm.pid).: No such file or directory (2)
[01-Jan-1970 13:20:18] ERROR: FPM initialization failed
 failed
$ cd /usr/local/php/
$ sudo mkdir var
$ cd var/
$ sudo mkdir log
$ cd log/
$ ls
$ sudo touch php-fpm.log
$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm [01-Jan-1970 13:20:18] ERROR: Unable to create the PID file (/usr/local/php/var/run/php-fpm.pid).: No such file or directory (2)
[01-Jan-1970 13:20:18] ERROR: FPM initialization failed
 failed
pecl -h

一如既往报错,继续

还是报错,继续

观看上面那个

$ cd ..
$ ls
log
$ sudo mkdir run
$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm  done
$ cd ..
$ ls
log
$ sudo mkdir run
$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm  done

澳门金沙国际 6于是继续探索猫腻

OK,终于消除了,真是波折啊,估量lnmp作者没有测试过lnmp跑在A卡宴M上会不会出难点,希望能够改良…

OK,终于解决了,真是波折啊,揣度lnmp小编没有测试过lnmp跑在A帕杰罗M上会不会出标题,希望能够改良…

pecl help install

澳门金沙国际 7stability状态(stable|beta|阿尔法)是不可能跟版本号放在一块儿,那很好领会哈,那行大家继续

pecl install swoole-1.8.5

安装成功了。

 

重启php-fpm

lnmp php-fpm reload

在web可访问的根目录加入index.php,并编写代码

<?php 
    phpinfo();
    exit;
?>

搜索swoole字符串

澳门金沙国际 8小秘诀:如下查看当前php加载的ini配置文件音讯?

php --ini

啊,我发现zan framework竟然提议启用swoole的2个configure参数,什么?

./configure  --enable-async-mysql --enable-async-httpclient --enable-sockets --enable-async-redis

那pecl有没有照应的路子得以帮大家一点也不慢钦赐configure参数呢?

# 笔者也没找到,如果同学们这里有好办法可以给我发邮件(820467790@qq.com),求指教。

那么还等什么吧?赶紧下载swoole-1.8.5源码压缩包吗。

cd ~/download && wget https://github.com/swoole/swoole-src/archive/swoole-1.8.5-stable.tar.gz

上面正是PHP的C扩张通用编写翻译流程了

#解压
tar xzvf swoole-1.8.5-stable.tar.gz
cd swoole-src-swoole-1.8.5-stable #这是解压出来的目录名
#对了,先卸载刚才安装的swoole
pecl uninstall swoole
#phpize 为configure准备环境,phpize是什么,看这里:http://php.net/manual/zh/install.pecl.phpize.php
phpize 
#开始configure,下面的php-config的路径一定要指定
(先把mysql扩展去掉,安装php56w-mysqlnd扩展)
./configure --with-php-config=/usr/local/php/bin/php-config --enable-async-mysql --enable-async-httpclient --enable-sockets --enable-async-redis
#编译并安装
make -j2 && make install #笔者主机是2核CPU,故启用-j2参数

报错了

澳门金沙国际 9查找一下hiredis是什么样鬼?

找到了,链接地址: C
client,要求redis 版本>1.2)

大家下载它并一向make&&make install

git clone https://github.com/redis/hiredis.git
make && make install 

重复进入swoole源码目录继续未到位的编写翻译进度

make -j2 && make install

安装成功

澳门金沙国际 10

而是php -m查看继续报错

澳门金沙国际 11目测是hiredis编写翻译生成的libhiredis.so.0.13那个库文件并未找到导致的。

看这个

澳门金沙国际 12

cat /etc/ld.so.conf #想知道什么是什么吗,自己搜索一下吧,内容较多
报错以后做如下操作
1.修改/etc/ld.so.conf加上

然后进入hiredis文件目录执行命令 ldconfig
2./etc/php.ini做如下调整

3.如果/etc/php.d里面也存在sockets.ini就去掉

 

 

 

 

 

 

爆冷门想起来,小编未来设置的操作系统是CentOS7.2
64bit,那么相应的yum仓库版本应该比较新,可以直接动用

yum install hiredis-devel hiredis

接下去在php.ini文件参预一行”extension=swoole.so”即可,继续php
-m,成功了,接着能够重启php-fpm(lnmp php-fpm reload)了。

来源:PHPAsk 作者:Kemin(Kemin)

 

 

参考项 链接
zan framework官方快速上手指南 http://zanphp.io/guide
swoole http://www.swoole.com/

相关文章