系統:centos6.6 64位
依賴包安裝順序依次為:openssl、zlib、pcre, 然後安裝nginx包
下一步,編譯安裝
openssl :
[root@localhost] tar zxvf openssl-fips-2.0.9.tar.gz
[root@localhost] cd openssl-fips-2.0.9
[root@localhost] ./config && make && make install
pcre:
[root@localhost] tar zxvf pcre-8.36.tar.gz
[root@localhost] cd pcre-8.36
[root@localhost] ./configure && make && make install
zlib:
[root@localhost]tar zxvf zlib-1.2.8.tar.gz
[root@localhost] cd zlib-1.2.8
[root@localhost] ./configure && make && make install
最後安裝nginx
[root@localhost]tar zxvf nginx-1.8.0.tar.gz
[root@localhost] cd nginx-1.8.0
[root@localhost] ./configure && make && make install
安裝完成後,可啟動nginx:
啟動命令:/usr/local/nginx/sbin/nginx
發現報錯了:
error while loading shared libraries: libpcre.so.1: cannot open shared object file: no such file or directory
經網上查詢,這是linux的通病
[root@localhost nginx]# sbin/nginx
sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: no such file or directory
[root@localhost nginx]# error while loading shared libraries: libpcre.so.1: cannot open shared object file: no such file or directory
[root@localhost nginx]# whereis libpcre.so.1
libpcre.so: /lib64/libpcre.so.0 /usr/local/lib/libpcre.so /usr/local/lib/libpcre.so.1
[root@localhost nginx]# ln -s /usr/local/lib/libpcre.so.1 /lib64
[root@localhost nginx]# sbin/nginx
先找到libpcre.so.1所在位置,然後做個軟鏈結就可以了。
檢視是否已啟動:
通過瀏覽器訪問:
看到這個就說明nginx安裝並啟動成功。
ps:
Linux下Keepalived 安裝與配置
keepalived 安裝與配置 一 環境說明 1 作業系統核心版本 2.6.9 78.elsmp 2 keepalived 軟體版本 keepalived 1.1.20.tar.gz 二 環境配置 1 主keepalived 伺服器ip 位址 192.168.111.223 2 備keepaliv...
supervisor和Nginx安裝與配置
gugoo雲之summary sudo apt get purge remove nginx sudo apt get autoremove dpkg get selections grep nginx 將羅列出與nginx相關的軟體,如nginx common一併刪除 sudo apt get p...
Sphinx 在 Linux 下的安裝與基本配置
sphinx 官網 wget files sphinx 2.2.10 release.tar.gz 解壓壓縮包 tar zxvf sphinx 2.2.10 release.tar.gz cd sphinx 2.2.10 release找到 mysql 的安裝目錄,我的是在 usr bin mysq...