Linux--安装Nginx

https://www.cnblogs.com/kaid/p/7640723.html

###安装Nginx
安装在全局

  • 支持库安装命令:sudo yum -y install slib zlib-devel openssl openssl-devel pcre pcre-devel
  • 下载:wget http://nginx.org/download/nginx-1.2.7.tar.gz
  • 编译:./configure --prefix=/usr/local/webserver/nginx
  • 命令:make
  • 命令:make install
  • 设置Nginx路径:vim ~/.bash_profile
    #Setting Nginx Path PATH=$PATH:/usr/local/webserver/nginx/sbin export PATH
  • 查看版本:/usr/local/webserver/nginx/sbin/nginx -v
  • 配置Nginx:vim /usr/local/webserver/nginx/conf/nginx.conf
  • 打开Nginx:/usr/local/webserver/nginx/sbin/nginx
  • 关闭Nginx:/usr/local/webserver/nginx/sbin/nginx -s stop
  • 重启Nginx:/usr/local/webserver/nginx/sbin/nginx -s reopen
  • 重新载入配置文件:/usr/local/webserver/nginx/sbin/nginx -s reload
  • 查看Nginx线程:ps -ef | grep nginx
  • 重加载发生错误:/usr/local/webserver/nginx/sbin/nginx -c/usr/local/webserver/nginx/conf/nginx.conf

###安装requirements.txt

  • 虚拟空间里安装命令:pip install -r requirements.txt

遇到问题

问题一:
Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid" failed(2:No such file or directory)
https://www.cnblogs.com/iloverain/p/9428630.html

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页