首页 > 编程知识 正文

linux离线安装nginx,linux下nginx安装配置

时间:2023-05-04 19:53:03 阅读:13937 作者:3675

在linux上安装nginx 1,下载并解压缩nginx稳定版wget http://nginx.org/download/nginx-1.16.1.tar.gz2 突出显示. vim目录cp -r contrib/vim/* ~/.vim/#,编译参数.configure --help | more #编译./configure checkingforoslinux2.6. 32-431.el6.x86 _ 64 x86 _ 64 checkingforccompiler . not found解析:运行以下命令: yum-y f自动标记错误为./configure : error : thehttprewritemodulerequiresthepcrelibrary .解析: yum-yinstalllopensslolory make : * * * noruletomaketarget ` build ',needed by `default'. Stop .解析:在nginx目录中运行./command-prefix=/usr/--user=nginx--group=nginx- with-http _ stub _ status _ module --with-http _ gzip _ static _ module _-- with-pcre _-- with-htth-HTT IC prefix指定的目录中包含CD/usr/local/nnnix ls-ltotal 16 drwxr-xr-x2 root root 4096 jul 91:37 confdrwxr-xr-x2 root root 4096 jul 91:37 htmldrwxr-xr-x2 root root 4096 037sbin#nginx服务器主程序[ root @ localhost sbin ] # ls/usr/local/nginx/sbin/nging nginx 3,开放linux外部访问的端口号80 iptables-I输入- ptcp-- dport 80-j accept 4,nginx服务启动操作1:默认配置文件启动CD/usr/local/nginx/nginx指定配置文件启动[ roooo 查看nginx-c/usr/local/nginx/conf/nginx.conf 23360帮助信息. nginx安装配置[ root @ izwz 95 N2 hxc DH 4x6vicjmgzsbin ] #./1.16.1可以查找builtbygcc4.8. 520150623 ()的配置协议:-- prefix=/usr/local/nginx3:-t配置文件正确./nginx-t nginx usr/local/nginx/conf/nginx.confsyntaxisoknginx : configuration file/usr/local/nginx/conf

[ root @ localhost/] # PS-ef|grepnginxroot 31632643014336008 tty 10033600336000 mannginxroot 54271014:50? 0:00336000 nginx : masterprocessnginxnginx 54285427014336050? 0336000336000 nginx :00 workerprocessroot 55322746014336052 pts/00033600336000 grep-- color=auto nginx http://www.Sina

1.首先输入命令 ps -ef | grep nginx检查一下nginx服务是否在运行。

查看Nginx相关文档: where is nginx [ root @ localhost/] # whereisnginxnginx :/usr/sbin/nginx/usr/lib 64/nginx/etc/nging 查找nginx.3pm.gzfind相关文件[ root @ localhost/] # find/- name nginx/usr/lib 64 ] usr/share/nginx/usr/sbin/nnn

2.停止Nginx服务

[root@localhost /]# 解决yum remove nginx依赖关系====================================================================: nginx-all-modules noarch 13:1 601.12.2-3.el7 @ epel 24k nginx-mod-http-perl x86 _ 641:1.12.2-3.el7 @ epel 54k nginx-mod-3 24k nginx 86 _ 641:1.12.2-3.el7 @ epel7====================

原文地址: nginx安装- https://www.cn blogs.com/zhoujun 007/p/13273311.html,https://www.cn blogs.com/boon ya/p/790799799

卸载nginx-https://www.Jian Shu.com/p/C1 ce 9e C5 FB 2

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。