Cara Install Nginx di Centos 5 dan 6

 
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
View Mode
Views:

465


Replies:0

Flag Cara Install Nginx di Centos 5 dan 6

[Image: 8469793_557x190.gif]

Tutorial cara install nginx webserver pada centos 5 dan centos 6

Add repo
Untuk centOS 5
rpm -Uvh http://nginx.org/packages/centos/5/noarch/RPMS/nginx-release-centos-5-0.el5.ngx.noarch.rpm
Untuk CentOS 6
rpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
Install Nginx via yum
yum install nginx
Contoh config nginx (/etc/nginx/nginx.conf)

Spoiler :
user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    gzip  on;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types      text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
    server_tokens off;

    include /etc/nginx/conf.d/*.conf;
}

Jalankan nginx webserver (start nginx)
service nginx start
[Image: cara-install-nginx-pada-centos.png]

Untuk stop atau restart nginx:
service nginx stop
service nginx restart

Autostart Nginx
chkconfig nginx on


maaf kalo tutor berantakan Sedih Banget Nangis


sourcenya di
Spoiler :
http://jadoel.info/2013/10/cara-install-nginx-di-centos-5-dan-6/
(This post was last modified: 10-05-2014 07:54 PM by aryo.)
kampoeng