安裝nginx出現的問題

  1. 問題一
  • 初始化的時候,提示沒有這個文件
[root@localhost src]# ./configure --prefix=/usr/local/nginx
-bash: ./configure: 沒有那個文件或目錄
  • 解決方法:
    • 由於目錄路徑錯了,致使沒法初始化,須要切換到nginx-1.12.1目錄下初始化
[root@localhost src]# cd nginx-1.12.1
[root@localhost nginx-1.12.1]#
  1. 問題二
初始化的時候,遇到的
checking for C compiler ... not found

./configure: error: C compiler cc is not found
  • 解決辦法:
    • 安裝包yum -y install gcc
  1. 問題三
初始化的時候,遇到的
./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.
  • 解決辦法:
    • 安裝包yum install -y pcre-deve
    • 安裝包yum install -y openssl openssl-devel

  • 初始化成功的標誌
Configuration summary
  + using system PCRE library
  + OpenSSL library is not used
  + using system zlib library
相關文章
相關標籤/搜索