您的位置:新葡亰496net > 电脑系统 > 新葡亰496net:安装一键Lnmp失败,framework安装与使

新葡亰496net:安装一键Lnmp失败,framework安装与使

发布时间:2019-08-10 22:27编辑:电脑系统浏览(69)

      背景
      
      前面把树莓派装上了CentOS 7,趁着国庆放假回来赶紧把服务端环境搭起来,为了方便就准备用一键lnmp快速部署一个,结果死活安装不成功...
      
      报错
      
      按照以往的经验进行安装,在我的小树莓派上安装实在是慢,毕竟需要编译,CPU不给力只能慢慢的等待编译完成,吃个午饭回来发现似乎已经完成了,然而却失败了,报错信息如下

    CentOS 7 for ARM 安装一键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
    

      经过漫长的编译,终于.....
      
      编译完成了,但是...

     ------------------------------------------- 
    |    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官方下载了32位的so文件放进去发现依然不行,尝试重新安装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跑在ARM上会不会出问题,希望能够改进...

    7 for ARM 安装一键Lnmp失败,centoslnmp 背景 前面把树莓派装上了CentOS 7,趁着国庆放假回来赶紧把服务端环境搭起来,为了方便就准备用...

    1.准备工作 1.1 一台腾讯云服务器2核CPU 2G内存的Linux CentOS 7.2(谢谢小杨同学@erchoc) 1.2 预装lnmp一键安装包环境,官方地址:lnmp一键安装包 (如不会使用请查看此链接) 2.安装swo...

    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.
    

     

     

        PHP安装失败了,报错不要紧,再来一次看下啥问题,使用./upgrade.sh脚本可以重新安装,然而继续报错

    1.准备工作

    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.
    

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

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

      发现
      
      仔细查看安装日志,发现了关键信息

    新葡亰496net 1

    新葡亰496net 2

    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一键安装包 (如不会使用请查看此链接)

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

      这里有个error,说是“请安装libcurl”,奇怪了,我在VPS上安装的时候咋没碰到这个问题呢,难道是CentOS for 树莓派版本阉割了这个玩意?
      
      解决
      
      按照错误提示安装,尝试使用yum直接装,然而包管理器里面并没有发现这个东西,找到官网上直接下载编译安装

    新葡亰496net 3

    新葡亰496net 4

         CentOS 编译SVNdocx

    2.安装swoole

    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
    
    pecl install swoole
    
    pecl install swoole
    

      经过漫长的编译终于编译安装成功了
      
      继续尝试安装PHP,这回算是正常进行编译PHP了

    刚安装完就发现zan framework需要swoole的1.8.5-stable版本,框架作者说明如下:

    刚安装完就发现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
    

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

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

      经过漫长的编译,终于.....
      
      编译完成了,但是...

    但是swoole1.9.11-stable版已经安装好了
    新葡亰496net 5

    但是swoole1.9.11-stable版已经安装好了
    新葡亰496net 6

     ------------------------------------------- 
    |    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 ======
    

    没事,我们卸载它

    没事,我们卸载它

    似乎还是有些问题,不过问题不大,看起来像是某个扩展丢了,到这个目录查看下到底有没有这个东西

    新葡亰496net 7

    新葡亰496net 8

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

    安装1.8.5版本,就用

    安装1.8.5版本,就用

      发现是有这个东西,真是神奇,通过搜索发现lnmp论坛上还真有人遇到过这个问题,帖子地址
      
      后记
      
      重新从zend官方下载了32位的so文件放进去发现依然不行,尝试重新安装PHP的默认版本5.4.45,现在还在编译...
      
    新葡亰496net:安装一键Lnmp失败,framework安装与使用。  更新
      
      经过一番波折终于搞定了,编译完PHP之后发现还是失败了,错误信息如下

    pecl install swoole-1.8.5-stable
    
    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
    

    安装时报错

    安装时报错

    没错,继续报错,根据提示来

    新葡亰496net 9怎么办,查看帮助文档

    新葡亰496net 10怎么办,查看帮助文档

    $ 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
    
    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
    

    新葡亰496net 11于是继续探索猫腻

    新葡亰496net 12于是继续探索猫腻

    OK,终于搞定了,真是曲折啊,估计lnmp作者没有测试过lnmp跑在ARM上会不会出问题,希望能够改进...

    pecl help install
    
    pecl help install
    

    新葡亰496net 13stability状态(stable|beta|alpha)是不能跟版本号放在一起,这很好理解哈,那行我们继续

    新葡亰496net 14stability状态(stable|beta|alpha)是不能跟版本号放在一起,这很好理解哈,那行我们继续

    pecl install swoole-1.8.5
    
    pecl install swoole-1.8.5
    

    安装成功了。

    安装成功了。

     

     

    重启php-fpm

    重启php-fpm

    lnmp php-fpm reload
    
    lnmp php-fpm reload
    

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

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

    <?php 
        phpinfo();
        exit;
    ?>
    
    <?php 
        phpinfo();
        exit;
    ?>
    

    搜索swoole字符串

    搜索swoole字符串

    新葡亰496net 15小诀窍:如下查看当前php加载的ini配置文件信息?

    新葡亰496net 16小诀窍:如下查看当前php加载的ini配置文件信息?

    php --ini
    
    php --ini
    

    咦,笔者发现zan framework竟然建议启用swoole的3个configure参数,什么?

    咦,笔者发现zan framework竟然建议启用swoole的3个configure参数,什么?

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

    那pecl有没有对应的途径可以帮我们快速指定configure参数呢?

    那pecl有没有对应的途径可以帮我们快速指定configure参数呢?

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

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

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

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

    下面就是PHP的C扩展通用编译流程了

    下面就是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参数
    
    #解压
    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参数
    

    报错了

    报错了

    新葡亰496net 17搜索一下hiredis是什么鬼?

    新葡亰496net 18搜索一下hiredis是什么鬼?

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

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

    我们下载它并直接make&&make install

    我们下载它并直接make&&make install

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

    再次进入swoole源码目录继续未完成的编译过程

    再次进入swoole源码目录继续未完成的编译过程

    make -j2 && make install
    
    make -j2 && make install
    

    安装成功

    安装成功

    新葡亰496net 19

    新葡亰496net 20

    但是php -m查看继续报错

    但是php -m查看继续报错

    新葡亰496net 21目测是hiredis编译生成的libhiredis.so.0.13这个库文件没有找到导致的。

    新葡亰496net 22目测是hiredis编译生成的libhiredis.so.0.13这个库文件没有找到导致的。

    看这个

    看这个

    新葡亰496net 23

    新葡亰496net 24

    cat /etc/ld.so.conf #想知道什么是什么吗,自己搜索一下吧,内容较多
    报错以后做如下操作
    1.修改/etc/ld.so.conf加上
    
    然后进入hiredis文件目录执行命令 ldconfig
    2./etc/php.ini做如下调整
    
    3.如果/etc/php.d里面也存在sockets.ini就去掉
    
    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仓库版本应该比较新,可以直接使用

    忽然想起来,我现在安装的操作系统是CentOS7.2 64bit,那么对应的yum仓库版本应该比较新,可以直接使用

    yum install hiredis-devel hiredis
    
    yum install hiredis-devel hiredis
    

    接下来在php.ini文件加入一行"extension=swoole.so"即可,继续php -m,成功了,接着可以重启php-fpm(lnmp php-fpm reload)了。

    接下来在php.ini文件加入一行"extension=swoole.so"即可,继续php -m,成功了,接着可以重启php-fpm(lnmp php-fpm reload)了。

    来源:PHPAsk 作者:Kemin(Kemin)

    来源:PHPAsk 作者:Kemin(Kemin)

     

     

     

     

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

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

    本文由新葡亰496net发布于电脑系统,转载请注明出处:新葡亰496net:安装一键Lnmp失败,framework安装与使

    关键词: