nginx安装

新服务器需要安装nginx服务 本来查了一堆资料

好像可以直接yum源安装 先看看yum源中nginx的服务

复制代码
[root@VM_211_186_centos nginx]# yum info nginx
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Installed Packages
Name        : nginx
Arch        : x86_64
Epoch       : 1
Version     : 1.6.3
Release     : 8.el7
Size        : 1.4 M
Repo        : installed
From repo   : epel
Summary     : A high performance web server and reverse proxy server
URL         : http://nginx.org/
License     : BSD
Description : Nginx is a web server and a reverse proxy server for HTTP, SMTP, POP3 and
            : IMAP protocols, with a strong focus on high concurrency, performance and low
            : memory usage.
复制代码

结果centos直接一句话 

yum install nginx 
service nginx start

安装一下

然后看版本

[root@VM_211_186_centos nginx]# nginx -v
nginx version: nginx/1.6.3

 安装成功后查看nginx的访问日志的位置 默认在/var/log/nginx/下面

[root@VM_211_186_centos nginx]# ls -al /var/log/nginx
total 20
drwx------   2 nginx nginx 4096 Jun 16 15:57 .
drwxr-xr-x. 10 root  root  4096 Jun 16 15:57 ..
-rw-r--r--   1 root  root  4447 Jun 16 16:44 access.log
-rw-r--r--   1 root  root   218 Jun 16 16:04 error.log

 

posted @   李照耀  阅读(205)  评论(0编辑  收藏  举报
编辑推荐:
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
点击右上角即可分享
微信分享提示