Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centos下更新nginx 到最新版本 #7

Open
liwan11123123 opened this issue Jun 18, 2019 · 0 comments
Open

centos下更新nginx 到最新版本 #7

liwan11123123 opened this issue Jun 18, 2019 · 0 comments

Comments

@liwan11123123
Copy link
Owner

centos下更新nginx 到最新版本

首先,nginx.repo在yum repo目录中创建一个新文件。
vim /etc/yum.repos.d/nginx.repo

接下来,给它以下内容:

[nginx] 
name=nginx repo  
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/  
gpgcheck=0  
enabled=1  

保存文件,然后关闭nginx服务(如果之前nginx不在系统上则不必要)
sudo service nginx stop

现在,再次运行yum update命令(或者install如果先前nginx不在系统上)
sudo yum update nginx

它现在应该让您更新到最新版本!安装新版本后,立即启动nginx。
sudo service nginx start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant