CentOS 7 for ARM 安裝一鍵Lnmp失敗

来源:http://www.cnblogs.com/linzenews/archive/2017/06/13/7000824.html
-Advertisement-
Play Games

背景前面把樹莓派裝上了CentOS 7,趁著國慶放假回來趕緊把服務端環境搭起來,為了方便就準備用一鍵lnmp快速部署一個,結果死活安裝不成功... ...


  背景
  
  前面把樹莓派裝上了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 http://www.gooln.com/document/19937.html

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

似乎還是有些問題,不過問題不大,看起來像是某個擴展丟了,到這個目錄查看下到底有沒有這個東西

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

  發現是有這個東西,真是神奇,通過搜索發現lnmp論壇上還真有人遇到過這個問題,帖子地址 http://bbs.vpser.net/thread-12810-1-1.html,作者說是系統dns的問題,應該是下載回來的東西損壞了,先不管,可以直接在php.ini裡面註釋掉這個,也或者直接去下載完整的重新放進去就可以了。
  
  後記
  
  重新從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!
[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

沒錯,繼續報錯,根據提示來

$ 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上會不會出問題,希望能夠改進...


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 1. Aggregate Aggregate即聚合操作。直接上代碼: acc即(0,0),number即data,seqOp將data的值累加到Tuple的第一個元素,將data的個數累加到Tuple的第二個元素。由於沒有分區,所以combOp是不起作用的,這個例子裡面即使分區了,combOp起作用 ...
  • 為什麼Oracle 查詢出來的數據會產生亂碼? 安裝的資料庫和客戶端編碼編碼不一致就會產生亂碼,要想解決此問題改一下客戶端的編碼即可 1. select * from table; 如果是這種問題則解決的辦法有許多,以下這種是比較通用一點的方法 1.查字元集編碼 select * from v$nl ...
  • 本文主要參考 http://hadoop.apache.org/docs/r2.8.0/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html 主要內容是對該文章的翻譯,部分內容參考其他的網路文章。 1.簡介 hadoop分散式文件系統(HDFS)是一個分散式 ...
  • 伺服器重啟後,資料庫登錄信息為空 錯誤信息: (Not logged on) - PL/SQL Developer Initialization errorCould not initialize "D:\app\Administrator\product\11.2.0\dbhome_1\bin\o ...
  • 1 背景概述 在大多數的開發項目中,尤其是集成項目,都會有涉及到數據分析部分的工作,數據分析多數是各種圖表的展現和交互(所謂數據可視化),數據分析的展現速度直接影響著用戶的體驗,而且絕大多數管理系統(MES、PDM/PLM、ERP、SCM、OA、HR等等)的數據都存儲在資料庫中,資料庫相關的性能優化 ...
  • 大數據時代來臨,信息化建設對企業的生存發展的重要作用越發凸顯,如何跨越信息孤島,打破部門之間的聯動壁壘,實現以大數據分析與應用為前提,成為企業提高市場競爭能力和應變能力成為關鍵所在。企業迫求“實用快上” 信息孤島無可迴避博為軟體與企業合作時發現,幾乎所有企業都會因為信息化建設缺乏總體規劃,往往以實現 ...
  • Nginx配置文件結構 nginx配置文件由指令(directive)組成,指令分為兩種形式,簡單指令和區塊指令。 一條簡單指令由指令名、參數和結尾的分號(;)組成,例如: listen 80 backlog 4096; ,其中“listen”是指令名,“80”、“backlog”、“4096”都是 ...
  • 1:準備一個最少16G的U盤在這個https://sourceforge.net/projects/usbwriter/files/latest/download網址下載並製作U盤引導程式。 2:去官網下載CentOS的安裝程式,下載地址為http://ftp.sjtu.edu.cn/centos/ ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...