nginx 服務搭建

下載並安裝

下載地址

[root@root ~]# wget http://nginx.org/download/nginx-1.9.9.tar.gz
[root@root ~]# tar -zxvf nginx-1.9.9.tar.gz
[root@root ~]# cd nginx-1.9.9
[root@root nginx-1.9.9]# ./configure --with-http_ssl_module --with-http_gzip_static_module
[root@root nginx-1.9.9]# make
[root@root nginx-1.9.9]# make install

配置

[root@root ~]# vi /usr/local/nginx/conf/nginx.conf
配置端口號、IP、項目目錄、默認文件
server {
    listen       8891;
    server_name  localhost;

    location / {
        root   /apply/test;
        index  index.html index.htm;
    }
}

啓動

[root@root ~]# /usr/local/nginx/sbin/nginx

重啓

[root@root ~]# /usr/local/nginx/sbin/nginx -s reload

問題

make: *** No rule to make target build', needed bydefault’. Stop.

yum update
yum install -y gcc pcre pcre-devel openssl openssl-devel gd gd-devel
./configure 
make && make install
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章