JAVA和Nginx 教程大全

网站首页 > 精选教程 正文

nginx-安装与启动

wys521 2024-09-06 04:20:14 精选教程 25 ℃ 0 评论

1、nginx版本说明(登录nginx官网点击右侧download)

  • Mainline version 开发版
  • Stable version 稳定版----change是版本更新说明
  • Legacy version 历史稳定版
  • Source code 源代码
  • Per-Built Packages 通过系统的方式安装(yum、apt)-----推荐

2、安装

  • yum list | grep nginx
  • 复制官网yum源,只下稳定版,修改baseurl中的变量,检查修改后的地址是否能访问
  • yum info nginx 查看yum源中nginx版本
  • yum install nginx 安装nginx
  • yum upgrade/update nginx 升级nginx
  • yum remove nginx 卸载nginx
  • nginx -V 查看nginx的安装版本

注:安装说明如下

  • yum list installed | grep nginx 查找已经安装的服务
  • rpm -qa | grep nginx 查找安装包名称
  • rpm -ql 包名 查看安装路径信息

3、启停服务

nginx -t -c /etc/nginx/nginx.conf 检查配置文件语法,出现successful

service nginx start/stop/status 启停服务方法一

nginx -s reload -c /etc/nginx/nginx.conf 启停服务方法二

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表