CentOS 中安装nginx

前端之家收集整理的这篇文章主要介绍了CentOS 中安装nginx前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

 

 1:使用yum安装Nginx,安装Nginx

[[email protected] //]# rpm -Uvh http://Nginx.org/packages/centos/6/noarch/RPMS/Nginx-release-centos-6-0.el6.ngx.noarch.rpm

 

[[email protected] //]# rpm -Uvh http://Nginx.org/packages/centos/6/noarch/RPMS/Nginx-release-centos-6-0.el6.ngx.noarch.rpm
Retrieving http://Nginx.org/packages/centos/6/noarch/RPMS/Nginx-release-centos-6-0.el6.ngx.noarch.rpm
warning: /var/tmp/rpm-tmp.vs8gI4: Header V4 RSA/SHA1 Signature,key ID 7bd9bf62: NOKEY
Preparing...                ########################################### [100%]
   1:Nginx-release-centos   ########################################### [100%]

 

 

2.使用下面命令安装Nginx

[[email protected] //]# yum -y install Nginx
[@L_403_3@ //]# yum -y install Nginx
已加载插件:fastestmirror,refresh-packagekit,security
设置安装进程
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirrors.aliyun.com
base                                                                                              | 3.7 kB     00:00     
extras                                                                                            | 3.4 kB     00:00     
Nginx                                                                                             | 2.9 kB     00:00     
Nginx/primary_db                                                                                  |  45 kB     00:00     
updates                                                                                           | 3.4 kB     00:00     
解决依赖关系
--> 执行事务检查
---> Package Nginx.x86_64 0:1.14.2-1.el6.ngx will be 安装
--> 完成依赖关系计算

依赖关系解决

=========================================================================================================================
 软件包                   架构                      版本                                  仓库                      大小
=========================================================================================================================
正在安装:
 Nginx                    x86_64                    1.14.2-1.el6.ngx                      Nginx                    957 k

事务概要
=========================================================================================================================
Install       1 Package(s)

总下载量:957 k
Installed size: 2.6 M
下载软件包:
Nginx-1.14.2-1.el6.ngx.x86_64.rpm                                                                 | 957 kB     02:17     
运行 rpm_check_debug 
执行事务测试
事务测试成功
执行事务
Warning: RPMDB altered outside of yum.
  正在安装   : Nginx-1.14.2-1.el6.ngx.x86_64                                                                         1/1 
----------------------------------------------------------------------

Thanks for using Nginx!

Please find the official documentation for Nginx here:
* http://Nginx.org/en/docs/

Please subscribe to Nginx-announce mailing list to get
the most important news about Nginx:
* http://Nginx.org/en/support.html

Commercial subscriptions for Nginx are available on:
* http://Nginx.com/products/

----------------------------------------------------------------------
  Verifying  : Nginx-1.14.2-1.el6.ngx.x86_64                                                                         1/1 

已安装:
  Nginx.x86_64 0:1.14.2-1.el6.ngx                                                                                        

完毕!

 

 

3:启动Nginx

[[email protected] //]# service Nginx start
正在启动 Nginx:                                           [确定]
[[email protected] //]# 

 

4.浏览器查看一下

http://localhost/

 

分享图片

猜你在找的CentOS相关文章