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 @ 2016-06-16 16:44  李照耀  阅读(204)  评论(0编辑  收藏  举报