Update any Pre-Installed Sofware :

Code: 
 yum clean all
    yum -y update glibc\*
    yum -y update yum\* rpm\* python\*
    yum clean all
    yum -y update
Secure /tmp

Code: 
rm -rf /tmp
    mkdir /tmp
    mount -t tmpfs -o rw,noexec,nosuid tmpfs /tmp
    chmod 1777 /tmp
Code: 
rm -rf /var/tmp
    ln -s /tmp /var/tmp
Code: 
Install NSD
Code: 
wget http://www.nlnetlabs.nl/downloads/nsd/nsd-3.2.8.tar.gz

    tar xzvf nsd-3.2.8.tar.gz
    cd nsd-3.2.8
    ./configure
    make
    make install
==============================
Code: 
groupadd nsd
    useradd -g nsd -s /sbin/nologin -M nsd
=============================

Code: 
mkdir /var/run/nsd
    chown -R nsd:nsd /var/run/nsd/
    chown -R nsd:nsd /var/db/nsd/
    mkdir /etc/nsd/master
    mkdir /etc/nsd/slave
    chown -R nsd:nsd /etc/nsd/
    cp -R $CUR_DIR/config/nsd/* /etc/nsd/
    cd /etc/sysconfig/
    mv $CUR_DIR/sysconfig/nsd nsd
    cd /etc/init.d/
    mv $CUR_DIR/init/nsd nsd
    chmod +x /etc/init.d/nsd
    chkconfig --levels 235 nsd on
    /etc/init.d/nsd start
Install NT
Code: 
 yum -y install ntp
        chkconfig --levels 235 ntpd on
        ntpdate pool.ntp.org
        /etc/init.d/ntpd star
Now We install Nginx.
Code: 
/sbin/service httpd stop
      chkconfig httpd off
Code: 
http://nginx.org/download/nginx-1.0.2.tar.gz
Code: 
tar xvfz nginx-1.0.2.tar.gz
    cd nginx-1.02
    ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module
    make
    make install
Code: 
groupadd nginx
    useradd -g nginx -d /home/nginx -s /sbin/nologin nginx
    mkdir /home/nginx/domains
    mkdir -p /home/nginx/domains/demo.com/{public,private,log,backup}
    cp -R $CUR_DIR/htdocs/demo.com/* /home/nginx/domains/demo.com/public
    chown -R nginx:nginx /home/nginx
    cp -R $CUR_DIR/htdocs/default/* /usr/local/nginx/html
    rm -rf $CUR_DIR/htdocs
    mkdir /usr/local/nginx/conf/conf.d/
    cp -R $CUR_DIR/config/nginx/* /usr/local/nginx/conf/
    cd /etc/init.d/
    mv $CUR_DIR/init/nginx nginx
    chmod +x nginx
    ./nginx start
    chkconfig --levels 235 nginx on
Install PHP

Code: 
Yum install php
Install MYSQL

Code: 
 yum -y install mysql mysql-devel mysql-server
    mv $CUR_DIR/config/mysql/my.cnf /etc/my.cnf

    chkconfig --levels 235 mysqld on
    /etc/init.d/mysqld start
Code: 
mysql_secure_installation
Install SendMail

Code: 
yum -y install sendmail mailx
    chkconfig --levels 235 sendmail on
    /etc/init.d/sendmail start
And Done! , You have now install a nice little Nginx WebServer
Dom Reviewed by Dom on . [TUT]How to install Nginx Web Server ~ Domenic Edition Update any Pre-Installed Sofware : yum clean all yum -y update glibc\* yum -y update yum\* rpm\* python\* yum clean all yum -y updateSecure /tmp rm -rf /tmp mkdir /tmp Rating: 5