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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值