Home >Operation and Maintenance >Linux Operation and Maintenance >CentOS 7 for ARM fails to install one-click Lnmp
Background
Previously, I installed CentOS 7 on the Raspberry Pi. I took advantage of the National Day holiday to quickly set up the server environment. For convenience, I prepared to use one-click lnmp to quickly deploy one, but the installation failed. Success...
Error report
I installed it according to my past experience. The installation on my small Raspberry Pi was really slow. After all, it needed to be compiled. The CPU was not powerful and I could only wait slowly. The compilation was completed. I came back from lunch and found that it seemed to be completed, but it failed. The error message was as follows
============================== Check install ============================== Checking ... Nginx: OK MariaDB: OK Error: PHP install failed. Sorry, Failed to install LNMP! Please visit feedback errors and logs. You can download /root/lnmp-install.log from your server,and upload lnmp-install.log to LNMP Forum.
PHP installation failed. It doesn’t matter if the error is reported. Try it again to see what the problem is. Use The ./upgrade.sh script can be reinstalled, but it continues to report errors
+-------------------------------------------+ | Manager for LNMP, Written by Licess | +-------------------------------------------+ | | +-------------------------------------------+ 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.
Found
Carefully checked the installation log and found the key information
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.
There is an error here, saying "Please install libcurl". It's strange. Why didn't I encounter this problem when I installed it on the VPS? Could it be that the CentOS for Raspberry Pi version has castrated this thing?
Solution
Install according to the error prompts and try to use yum to install directly. However, this thing is not found in the package manager. Find the official website and directly download, compile and install
CentOS compilation 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
After a long compilation, the compilation and installation was finally successful
Continue to try to install PHP, this time it is normal to compile 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
After a long compilation, finally...
The compilation is completed, but...
+-------------------------------------------+ | Manager for LNMP, Written by Licess | +-------------------------------------------+ | | +-------------------------------------------+ 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 ======
It seems that there are still some problems, but the problem It’s not big. It looks like a certain extension is missing. Go to this directory to see if there is such a thing.
[root@rpi2 ~]# ls /usr/local/zend/ ZendGuardLoader.so
I found out that there is such a thing. It’s really amazing. I found the lnmp forum through searching. Someone actually encountered this problem online. The author of the post address said it was a system DNS problem. It should be that the downloaded stuff is damaged. Ignore it for now. You can comment out this directly in php.ini, or you can download the complete file directly. Just put it back in.
Postscript
I re-downloaded the 32-bit so file from the zend official website and found that it still doesn’t work. I tried to reinstall the default version of PHP 5.4.45, and it is still compiling...
UPDATE
After some twists and turns, I finally got it done. After compiling PHP, I found that it still failed. The error message is as follows
+-------------------------------------------+ | Manager for LNMP, Written by Licess | +-------------------------------------------+ | | +-------------------------------------------+ 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 | +-------------------------------------------+ | | +-------------------------------------------+ 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
Yes, continue to report the error, follow the prompts
$ 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 | +-------------------------------------------+ | | +-------------------------------------------+ 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
Still report the error, continue
$ cd .. $ ls log $ sudo mkdir run $ sudo lnmp restart +-------------------------------------------+ | Manager for LNMP, Written by Licess | +-------------------------------------------+ | | +-------------------------------------------+ 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, finally got it, what a twist, It is estimated that the author of lnmp has not tested whether there will be any problems with lnmp running on ARM. I hope it can be improved...
The above is the detailed content of CentOS 7 for ARM fails to install one-click Lnmp. For more information, please follow other related articles on the PHP Chinese website!