1. 程式人生 > >【Linux學習七】軟件安裝

【Linux學習七】軟件安裝

vmw arc 缺少 perl 指導 tar 編譯安裝 驗證 erl


環境
  虛擬機:VMware 10
  Linux版本:CentOS-6.5-x86_64
  客戶端:Xshell4
  FTP:Xftp4

一、編譯安裝
1.解壓 源碼文件是壓縮包 要先解壓
tar -zxvf tengine-2.1.0.tar.gz

2.進入解壓包 查看README文件 裏面有對軟件的介紹和安裝指導
3.查看./configure --help 看一下有哪些安裝參數,設定參數來安裝
4.安裝裝編譯器 檢查依賴:是否有對應的編譯器

[root@node1 tengine-2.1.0]# ./configure
checking for OS
+ Linux 2.6.32-431.el6.x86_64 x86_64
checking 
for C compiler ... not found ./configure: error: C compiler cc is not found

報錯:提示沒有cc編譯器
解決方案:yum install -y gcc 安裝gcc編譯器(GNU cc)


5.安裝依賴庫PCRE、OpenSSL
再次執行./configure,會提示缺少依賴庫
可以通過yum serch PCRE來查詢這個庫,
然後安裝yum install -y pcre-devel

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using 
--without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option. ./configure: error: SSL modules require the OpenSSL library. You can either do not enable the modules, or install
the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using --with-openssl=<path> option. [root@node1 tengine-2.1.0]# yum search PCRE Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.njupt.edu.cn * extras: mirrors.njupt.edu.cn * updates: mirrors.cqu.edu.cn =================================================== N/S Matched: PCRE =================================================== pcre-devel.i686 : Development files for pcre pcre-devel.x86_64 : Development files for pcre pcre-static.x86_64 : Static library for pcre pcre.x86_64 : Perl-compatible regular expression library pcre.i686 : Perl-compatible regular expression library Name and summary matches only, use "search all" for everything.

6.最後configure配置執行成功
首先做檢查依賴,最後生成MakeFile編譯文件

技術分享圖片

7.編譯:make


8.安裝:make install


9.訪問驗證
註意關閉防火墻:service iptables stop

技術分享圖片

二、rpm安裝:包

三、yum安裝:倉庫

【Linux學習七】軟件安裝