linux安装nginx make && make install报错解决
程序员文章站
2022-04-19 10:35:36
报错:make: *** No rule to make target `build', needed by `default'. Stop.解决:跟新yum:yun update删除原先解压的nginx重新解压一份添加依赖的库:yum install -y gcc pcre pcre-devel openssl openssl-devel gd gd-devel参数编译:./configure --prefix=/data/nginx-1.16.1 --user=nginx --g...
报错:
make: *** No rule to make target `build', needed by `default'. Stop.
解决:
跟新yum:
yun update
删除原先解压的nginx重新解压一份
添加依赖的库:
yum install -y gcc pcre pcre-devel openssl openssl-devel gd gd-devel
参数编译:
./configure --prefix=/data/nginx-1.16.1 --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module
添加用户:
useradd nginx -M -s /sbin/nologin
编译:
make && make install
软连接:
ln -s /data/nginx-1.16.1 /data/nginx
测试nginx配置文件是否正常
/data/nginx/sbin/nginx -t
启动nginx:
/data/nginx/sbin/nginx ##确定nginx服务
netstat -lntup |grep nginx ## 检查进程是否正常
curl http://localhost ## 确认结果
nginx配置文件:
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
本文地址:https://blog.****.net/weixin_47632905/article/details/107332854
推荐阅读
-
安装redis 执行make命令时报错解决方法
-
linux安装nginx make && make install报错解决
-
linux编译内核make menuconfig报错Unable to find the ncurses libraries解决办法
-
荐 nginx安装,make install报错: cannot create regular file启动报错find: “/lost+found”: 权限不够/opt/module/p
-
php编译安装报错:make: *** [sapi/cli/php] Error 1 问题的解决办法
-
安装swoole出现make报错的原因与解决方法
-
linux 安装php扩展 make报错
-
更新yum源解决:centos7 安装 Redis ,make编译报错,安装gcc 提示:没有可用软件包 gcc
-
linux 安装php扩展 make报错
-
安装redis 执行make命令时报错解决方法