How to Install lighttpd with Fastcgi on CentOS 6.3

This post will cover the step to install lighttpd with Fastcgi on CentOS 6.3. lighttpd is a secure, fast, compliant, and very flexible web-server that has been optimized for high-performance environments. It has a very low memory footprint compared to other webservers and takes care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make lighttpd the perfect webserver-software for every server that suffers load problems.

Run the following command to install using yum :

[root@centos63 ~]# yum install lighttpd lighttpd-fastcgi -y

Example :

[root@centos63 ~]# yum install lighttpd lighttpd-fastcgi -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirror1.ku.ac.th
 * epel: mirror.nus.edu.sg
 * extras: mirror.issp.co.th
 * updates: mirror1.ku.ac.th
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package lighttpd.i686 0:1.4.31-1.el6 will be installed
---> Package lighttpd-fastcgi.i686 0:1.4.31-1.el6 will be installed
--> Processing Dependency: spawn-fcgi for package: lighttpd-fastcgi-1.4.31-1.el6.i686
--> Running transaction check
---> Package spawn-fcgi.i686 0:1.6.3-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                       Arch              Version                    Repository         Size
====================================================================================================
Installing:
 lighttpd                      i686              1.4.31-1.el6               epel              296 k
 lighttpd-fastcgi              i686              1.4.31-1.el6               epel               45 k
Installing for dependencies:
 spawn-fcgi                    i686              1.6.3-1.el6                epel               16 k

Transaction Summary
====================================================================================================
Install       3 Package(s)

Total download size: 357 k
Installed size: 808 k
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 357 k
(1/3): lighttpd-1.4.31-1.el6.i686.rpm                                        | 296 kB     00:02
(2/3): lighttpd-fastcgi-1.4.31-1.el6.i686.rpm                                |  45 kB     00:00
(3/3): spawn-fcgi-1.6.3-1.el6.i686.rpm                                       |  16 kB     00:00
----------------------------------------------------------------------------------------------------
Total                                                               112 kB/s | 357 kB     00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : lighttpd-1.4.31-1.el6.i686                                                       1/3
  Installing : spawn-fcgi-1.6.3-1.el6.i686                                                      2/3
  Installing : lighttpd-fastcgi-1.4.31-1.el6.i686                                               3/3
  Verifying  : lighttpd-fastcgi-1.4.31-1.el6.i686                                               1/3
  Verifying  : spawn-fcgi-1.6.3-1.el6.i686                                                      2/3
  Verifying  : lighttpd-1.4.31-1.el6.i686                                                       3/3

Installed:
  lighttpd.i686 0:1.4.31-1.el6                 lighttpd-fastcgi.i686 0:1.4.31-1.el6

Dependency Installed:
  spawn-fcgi.i686 0:1.6.3-1.el6

Complete!

To start lighttpd, run the following command :

[root@centos63 ~]# /etc/init.d/lighttpd start

To stop lighttpd, run the following command :

[root@centos63 ~]# /etc/init.d/lighttpd stop

How to Install php-mcrypt on CentOS 6.3

mcrypt exension for PHP is necessary if we want to use cookie based authentication with phpymyadmin. In default CentOS 6.3 yum repository or in CentOS 6.3 installation CD/DVD, php-mcrypt exension are not included. To install php-mcrypt on CentOS 6.3, we have to use third party yum repository. Follow this steps :

1. Download epel repository :

[root@centos62 ~]# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
[root@centos62 ~]# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6

2. Install epel repository :

[root@centos62 ~]# rpm --import RPM-GPG-KEY-EPEL-6
[root@centos62 ~]# rpm -i epel-release-6-7.noarch.rpm

3. Simply run the following command to install php-mcrypt :

[root@centos63 ~]# yum install php-mcrypt -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirror1.ku.ac.th
 * epel: mirrors.ispros.com.bd
 * extras: mirror.issp.co.th
 * updates: mirror1.ku.ac.th
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.i686 0:5.3.3-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                   Arch                Version                    Repository           Size
====================================================================================================
Installing:
 php-mcrypt                i686                5.3.3-1.el6                epel                 18 k

Transaction Summary
====================================================================================================
Install       1 Package(s)

Total download size: 18 k
Installed size: 38 k
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 18 k
php-mcrypt-5.3.3-1.el6.i686.rpm                                              |  18 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-mcrypt-5.3.3-1.el6.i686                                                      1/1
  Verifying  : php-mcrypt-5.3.3-1.el6.i686                                                      1/1

Installed:
  php-mcrypt.i686 0:5.3.3-1.el6

Complete!

How to Remove Squid on CentOS 6.3

Squid service plays two main roles which mainly act as a caching proxy server between the user and the web. Second role, squid also regularly used as a content accelerator, or reverse proxy, intercepting requests to a server and using a cached version of the page to serve the request.

To remove squid service, execute the following command :

[root@centos63 ~]# yum remove squid -y

Examples :

[root@centos63 ~]# yum remove squid -y
Loaded plugins: fastestmirror, presto
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package squid.i686 7:3.1.10-1.el6_2.4 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package         Arch           Version                       Repository                       Size
====================================================================================================
Removing:
 squid           i686           7:3.1.10-1.el6_2.4            @CentOS6.3-Repository           5.7 M

Transaction Summary
====================================================================================================
Remove        1 Package(s)

Installed size: 5.7 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : 7:squid-3.1.10-1.el6_2.4.i686                                                    1/1
  Verifying  : 7:squid-3.1.10-1.el6_2.4.i686                                                    1/1

Removed:
  squid.i686 7:3.1.10-1.el6_2.4

Complete!

How to Install Squid on CentOS 6.3

This post cover the simple steps to install Squid on CentOS 6.3. Squid service plays two main roles which mainly act as a caching proxy server between the user and the web. Second role, squid also regularly used as a content accelerator, or reverse proxy, intercepting requests to a server and using a cached version of the page to serve the request. Execute the following command to install squid :

[root@centos63 ~]# yum install squid -y

Example :

[root@centos63 ~]# yum install squid -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirror1.ku.ac.th
 * extras: mirror.yourconnect.com
 * updates: mirror1.ku.ac.th
CentOS6.3-Repository                                                         | 4.0 kB     00:00 ...
CentOS6.3-Repository/primary_db                                              | 3.5 MB     00:00 ...
base                                                                         | 3.7 kB     00:00
base/primary_db                                                              | 3.5 MB     00:31
extras                                                                       | 3.0 kB     00:00
extras/primary_db                                                            | 6.4 kB     00:00
updates                                                                      | 3.5 kB     00:00
updates/primary_db                                                           | 2.2 MB     00:19
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package squid.i686 7:3.1.10-1.el6_2.4 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package         Arch           Version                        Repository                      Size
====================================================================================================
Installing:
 squid           i686           7:3.1.10-1.el6_2.4             CentOS6.3-Repository           1.7 M

Transaction Summary
====================================================================================================
Install       1 Package(s)

Total download size: 1.7 M
Installed size: 5.7 M
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 1.7 M
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : 7:squid-3.1.10-1.el6_2.4.i686                                                    1/1
  Verifying  : 7:squid-3.1.10-1.el6_2.4.i686                                                    1/1

Installed:
  squid.i686 7:3.1.10-1.el6_2.4

Complete!

Start Squid :

[root@centos63 ~]# service squid start
Starting squid: .                                          [  OK  ]

Check Squid status :

[root@centos63 ~]# service squid status
squid (pid  11806) is running...

How to Install and Configure Iptables Firewall on CentOS 6.3

This post covers the steps to install and configure iptables on linux CentOS 6.3 server. Iptables is a packet filtering firewall package in linux. It used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. Iptables interfaces to the Linux netfilter module to perform filtering of network packets.

1. To install iptables, simply run the following command :

[root@centos63 ~]# yum install iptables -y

2. Check iptables installed package and Version :

[root@centos63 ~]# rpm -qa | grep iptables
iptables-ipv6-1.4.7-5.1.el6_2.i686
iptables-1.4.7-5.1.el6_2.i686
[root@centos63 ~]# iptables --version
iptables v1.4.7

3. Check iptables status :

[root@centos63 ~]# /etc/init.d/iptables status
iptables: Firewall is not running.

or

[root@centos63 ~]# service iptables status
iptables: Firewall is not running.

4. Start and stop iptables :

Start :

[root@centos63 ~]# service iptables start
iptables: Applying firewall rules:                         [  OK  ]

Stop :

[root@centos63 ~]# service iptables stop
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]

5. To set iptables start at boot :

[root@centos63 ~]# chkconfig iptables on

6. Display Default Iptables rules:

[root@centos63 ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

7. Display current opened port :

[root@centos63 ~]# netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:46915               0.0.0.0:*                   LISTEN      1170/rpc.statd
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      1538/mysqld
tcp        0      0 127.0.0.1:3310              0.0.0.0:*                   LISTEN      1406/clamd
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1152/rpcbind
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1390/sshd
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1629/master
tcp        0      0 :::111                      :::*                        LISTEN      1152/rpcbind
tcp        0      0 :::59988                    :::*                        LISTEN      1170/rpc.statd
tcp        0      0 :::22                       :::*                        LISTEN      1390/sshd
tcp        0      0 ::1:25                      :::*                        LISTEN      1629/master
udp        0      0 0.0.0.0:59738               0.0.0.0:*                               1170/rpc.statd
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               1152/rpcbind
udp        0      0 192.168.1.54:123            0.0.0.0:*                               1398/ntpd
udp        0      0 127.0.0.1:123               0.0.0.0:*                               1398/ntpd
udp        0      0 0.0.0.0:123                 0.0.0.0:*                               1398/ntpd
udp        0      0 0.0.0.0:903                 0.0.0.0:*                               1152/rpcbind
udp        0      0 0.0.0.0:922                 0.0.0.0:*                               1170/rpc.statd
udp        0      0 :::50667                    :::*                                    1170/rpc.statd
udp        0      0 :::111                      :::*                                    1152/rpcbind
udp        0      0 fe80::20c:29ff:fe1b:b39c:123 :::*                                    1398/ntpd
udp        0      0 ::1:123                     :::*                                    1398/ntpd
udp        0      0 :::123                      :::*                                    1398/ntpd
udp        0      0 :::903                      :::*                                    1152/rpcbind

8. Modify original Iptables configuration file :

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Please note that two rules has been added in the iptables firewall rules :

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

How to Add Webtatic Repository on CentOS 6.3

This post covers the steps on how to setup additional yum repository using Webtatic. Webtatic yum repository is a repository containing updated web-related packages for CentOS and Redhat Enterprise Linux (RHEL). Webtatic goals are to provide CentOS/RHEL administrators with the latest stable minor releases of web development/hosting software, which are not provided in CentOS/RHEL distribution minor releases. It’s also serve as an additional installation option for some of Webtatic’s projects.

RHEL 6/ CentOS 6 for i386
RHEL 6/ CentOS 6 for x86_64

1.Download the webtatic-release package :

[root@centos63 ~]# wget http://repo.webtatic.com/yum/el6/i386/webtatic-release-6-2.noarch.rpm

Example :

[root@centos63 ~]# wget http://repo.webtatic.com/yum/el6/i386/webtatic-release-6-2.noarch.rpm
--2012-08-13 23:42:08--  http://repo.webtatic.com/yum/el6/i386/webtatic-release-6-2.noarch.rpm
Resolving repo.webtatic.com... 184.22.117.192
Connecting to repo.webtatic.com|184.22.117.192|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11576 (11K) [application/x-redhat-package-manager]
Saving to: âwebtatic-release-6-2.noarch.rpmâ

100%[==========================================================>] 11,576      15.7K/s   in 0.7s

2012-08-13 23:42:10 (15.7 KB/s) - âwebtatic-release-6-2.noarch.rpmâ

2. Download or directly import webtatic-andy GPG key :

[root@centos63 ~]# rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy

3. Do verification on the webtatic-release package that you have downloaded :

[root@centos63 ~]# rpm -K webtatic-release-6-2.noarch.rpm
webtatic-release-6-2.noarch.rpm: (sha1) dsa sha1 md5 gpg OK

4. Install Webtatic Repository :

[root@centos63 ~]# rpm -Uvh webtatic-release-6-2.noarch.rpm
Preparing...                ########################################### [100%]
   1:webtatic-release       ########################################### [100%]

5. How you can use Webtatic repository to install, update the packages :

[root@centos63 ~]# yum --enablerepo=webtatic install [rpm package]

Examples :

[root@centos63 ~]# yum --enablerepo=webtatic install postfix -y

How to Add Remi Yum Repository on CentOS 6.3

This post cover the steps to install remi repository on linux CentOS 6.3 server. There are several 3rd party repositories for CentOS 6 server. One of the popular one is remi repository. The Remi repository is a repository containing updated PHP and MySQL packages and is maintained by Remi.

1. Import the RPM-GPG-KEY key and

[root@centos63 ~]# rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi

2. Download remi rpm package :

[root@centos63 ~]# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Examples :

[root@centos63 ~]# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
--2012-08-10 00:04:32--  http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Resolving rpms.famillecollet.com... 88.191.74.232, 2a01:e0b:1:74:2e0:f4ff:fe1b:b827
Connecting to rpms.famillecollet.com|88.191.74.232|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5292 (5.2K) [application/x-rpm]
Saving to: âremi-release-6.rpmâ

100%[==========================================================>] 5,292       --.-K/s   in 0.02s

2012-08-10 00:04:33 (280 KB/s) - âremi-release-6.rpmâ

3. Install remi rpm package :

[root@centos63 ~]# rpm -ivh remi-release-6.rpm
Preparing...                ########################################### [100%]
   1:remi-release           ########################################### [100%]

4. Start install using Yum :

[root@centos63 ~]# yum install --enablerepo=remi httpd

How to Remove Webmin from Linux CentOS/RHEL

This article covers the steps on how to uninstall or remove webmin software on linux CentOS and Redhat enterprise Linux (RHEL) and tested work well in any older or newer version such as CentOS 5, CentOS 6, CentOS 7, RHEL 5, RHEL 6, and RHEL 7.

Doing a checking for current version of webmin will help you to identify and remove specific webmin package along with the name and version of the package easily. Webmin is an open source program that enables system administration and system configuration through a web interface that is useful for new system administrators. With Webmin, the system administrators can administer user accounts, DNS, file sharing and perform system configuration.

This article describes three alternative ways to uninstall or remove webmin software in CentOS or RHEL, but the choice of how to uninstall depend on how the installation has been done in the beginning.

1. Stop Webmin :

[root@centos6 ~]# service webmin stop
Stopping Webmin server in /usr/libexec/webmin

2. Check Webmin version that has been installed and configured :

[root@centos6 ~]# rpm -qa | grep webmin
webmin-1.590-1.noarch

3. Remove webmin using “rpm -e” command (Option 1):

[root@centos6 ~]# rpm -e webmin-1.590-1.noarch

or

4. Remove using “yum remove” command (Option 2):

[root@centos6 ~]# yum remove webmin

or

5. Remove using “/etc/webmin/uninstall.sh” command (Option 3):

[root@centos6 ~]# /etc/webmin/uninstall.sh

Example :

[root@centos6 ~]# /etc/webmin/uninstall.sh
Are you sure you want to uninstall Webmin? (y/n) : y

Stopping Webmin server in /software/webmin
Running uninstall scripts ..
Subroutine list_servers redefined at /software/webmin/servers/servers-lib.pl line 92.
Subroutine list_servers_sorted redefined at /software/webmin/servers/servers-lib.pl line 111.
Subroutine get_server redefined at /software/webmin/servers/servers-lib.pl line 143.
Subroutine save_server redefined at /software/webmin/servers/servers-lib.pl line 158.
Subroutine delete_server redefined at /software/webmin/servers/servers-lib.pl line 175.
Subroutine can_use_server redefined at /software/webmin/servers/servers-lib.pl line 188.
Subroutine list_all_groups redefined at /software/webmin/servers/servers-lib.pl line 208.
Subroutine logged_in redefined at /software/webmin/servers/servers-lib.pl line 278.
Subroutine get_server_types redefined at /software/webmin/servers/servers-lib.pl line 303.
Subroutine this_server redefined at /software/webmin/servers/servers-lib.pl line 313.
Subroutine get_my_address redefined at /software/webmin/servers/servers-lib.pl line 332.
Subroutine address_to_broadcast redefined at /software/webmin/servers/servers-lib.pl line 361.
Subroutine test_server redefined at /software/webmin/servers/servers-lib.pl line 375.
Subroutine find_cron_job redefined at /software/webmin/servers/servers-lib.pl line 394.
Subroutine find_servers redefined at /software/webmin/servers/servers-lib.pl line 407.
Deleting /software/webmin ..
Deleting /etc/webmin ..
Done!

How to Install and Configure Bind 9 DNS on CentOS 6.3

bindThis post covers the steps on how to install Bind DNS server on CentOS 6.3. Bind is the most popular software and the most widely used Domain Name System (DNS) software on the Internet for providing DNS services. The name BIND stands for “Berkeley Internet Name Domain” and it’s an implementation of the DNS protocols.

1. To install Bind 9 on linux CentOS 6.3 server, run the following command :

[root@centos63 ~]# yum install bind -y

Examples :

[root@centos63 ~]# yum install bind -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: ossm.utm.my
 * extras: ossm.utm.my
 * updates: ossm.utm.my
CentOS6.3-Repository                                                         | 4.0 kB     00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind.i686 32:9.8.2-0.10.rc1.el6_3.2 will be installed
--> Processing Dependency: portreserve for package: 32:bind-9.8.2-0.10.rc1.el6_3.2.i686
--> Running transaction check
---> Package portreserve.i686 0:0.0.4-9.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package            Arch        Version                           Repository                   Size
====================================================================================================
Installing:
 bind               i686        32:9.8.2-0.10.rc1.el6_3.2         updates                     4.0 M
Installing for dependencies:
 portreserve        i686        0.0.4-9.el6                       CentOS6.3-Repository         22 k

Transaction Summary
====================================================================================================
Install       2 Package(s)

Total download size: 4.0 M
Installed size: 7.2 M
Downloading Packages:
Setting up and reading Presto delta metadata
updates/prestodelta                                                          | 104 kB     00:00
Processing delta metadata
Package(s) data still to download: 4.0 M
(1/2): bind-9.8.2-0.10.rc1.el6_3.2.i686.rpm                                  | 4.0 MB     00:43
----------------------------------------------------------------------------------------------------
Total                                                                93 kB/s | 4.0 MB     00:43
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : portreserve-0.0.4-9.el6.i686                                                     1/2
  Installing : 32:bind-9.8.2-0.10.rc1.el6_3.2.i686                                              2/2
  Verifying  : portreserve-0.0.4-9.el6.i686                                                     1/2
  Verifying  : 32:bind-9.8.2-0.10.rc1.el6_3.2.i686                                              2/2

Installed:
  bind.i686 32:9.8.2-0.10.rc1.el6_3.2

Dependency Installed:
  portreserve.i686 0:0.0.4-9.el6

Complete!

2. Setup and configure zone with the name of example.local :

[root@centos63 ~]# vi /var/named/example.local

Add zone record as below :


;
;       Addresses and other host information.
;
$TTL 86400
@       IN      SOA     example.local. hostmaster.example.local. (
                               2012080701      ; Serial
                               43200      ; Refresh
                               3600       ; Retry
                               3600000    ; Expire
                               2592000 )  ; Minimum

;       Define the nameservers and the mail servers

               IN      NS      ns.example.local.
               IN      A       192.168.1.54
               IN      MX      10 mail.example.local.

mail            IN      A       192.168.1.51
ns              IN      A       192.168.1.54
www             IN      A       192.168.1.54

3. Add example.local zone below to named.conf. This is main configuration file for bind dns server.

Modify named.conf :

[root@centos63 ~]# vi /etc/named.conf

Add the following :

zone "example.local" {
    type master;
    file "/var/named/example.local";
};

Full named.conf configuration file :

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
        listen-on port 53 { 127.0.0.1; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { localhost; };
        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";

        managed-keys-directory "/var/named/dynamic";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "example.local" {
    type master;
    file "/var/named/example.local";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

4. start Named service :

[root@centos63 ~]# /etc/init.d/named start
Generating /etc/rndc.key:                                  [  OK  ]
Starting named:                                            [  OK  ]

5. If you want to restart and check the named status, execute the following :

[root@centos63 ~]# /etc/init.d/named restart
Stopping named: .                                          [  OK  ]
Starting named:                                            [  OK  ]
[root@centos63 ~]# /etc/init.d/named status
version: 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2
CPUs found: 1
worker threads: 1
number of zones: 20
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
named (pid  2405) is running...

6. For extra checking, verify mx record whether working or not :

[root@centos63 ~]# host -t mx example.local
example.local mail is handled by 10 mail.example.local.

How to Install nslookup on CentOS 6.3

nslookup is part of the bind-utils package. Please note that the host, dig and nslookup are also part of the bind utilities. Without bind-utils package installed, you will get the following error when you try to nslookup any domain:

[root@centos63 ~]# nslookup
-bash: nslookup: command not found.3

To install the nslookup in CentOS 6.3, simply run this command :

[root@centos63 ~]# yum install bind-utils -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: ossm.utm.my
 * extras: ossm.utm.my
 * updates: ossm.utm.my
CentOS6.3-Repository                                                         | 4.0 kB     00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind-utils.i686 32:9.8.2-0.10.rc1.el6_3.2 will be installed
--> Processing Dependency: bind-libs = 32:9.8.2-0.10.rc1.el6_3.2 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: liblwres.so.80 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: libisccfg.so.82 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: libisccc.so.80 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: libisc.so.83 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: libdns.so.81 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: libbind9.so.80 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Running transaction check
---> Package bind-libs.i686 32:9.8.2-0.10.rc1.el6_3.2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package              Arch           Version                                Repository         Size
====================================================================================================
Installing:
 bind-utils           i686           32:9.8.2-0.10.rc1.el6_3.2              updates           180 k
Installing for dependencies:
 bind-libs            i686           32:9.8.2-0.10.rc1.el6_3.2              updates           882 k

Transaction Summary
====================================================================================================
Install       2 Package(s)

Total download size: 1.0 M
Installed size: 2.7 M
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 1.0 M
(1/2): bind-libs-9.8.2-0.10.rc1.el6_3.2.i686.rpm                             | 882 kB     00:09
(2/2): bind-utils-9.8.2-0.10.rc1.el6_3.2.i686.rpm                            | 180 kB     00:01
----------------------------------------------------------------------------------------------------
Total                                                                97 kB/s | 1.0 MB     00:10
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 32:bind-libs-9.8.2-0.10.rc1.el6_3.2.i686                                         1/2
  Installing : 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686                                        2/2
  Verifying  : 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686                                        1/2
  Verifying  : 32:bind-libs-9.8.2-0.10.rc1.el6_3.2.i686                                         2/2

Installed:
  bind-utils.i686 32:9.8.2-0.10.rc1.el6_3.2

Dependency Installed:
  bind-libs.i686 32:9.8.2-0.10.rc1.el6_3.2

Complete!

Now you can start use nslookup:

[root@centos63 ~]# nslookup
> www.google.com
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
www.google.com  canonical name = www.l.google.com.
Name:   www.l.google.com
Address: 209.85.175.147
Name:   www.l.google.com
Address: 209.85.175.103
Name:   www.l.google.com
Address: 209.85.175.104
Name:   www.l.google.com
Address: 209.85.175.105
Name:   www.l.google.com
Address: 209.85.175.106
Name:   www.l.google.com
Address: 209.85.175.99

How to Setup Webmin 1.590-1 on CentOS 6.3 using RPM

webminWebmin is a web-based interface for system administration for Linux. By using webmin at the browser, you can setup user accounts, Apache, DNS, file sharing and much more. This post covers the steps to setup Webmin 1.590-1 on CentOS 6.3 using RPM.

1. Download Webmin :

[root@centos63 ~]# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.590-1.noarch.rpm

Examples :

[root@centos63 ~]# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.590-1.noarch.rpm
--2012-08-02 22:49:07--  http://prdownloads.sourceforge.net/webadmin/webmin-1.590-1.noarch.rpm
Resolving prdownloads.sourceforge.net... 216.34.181.59
Connecting to prdownloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/webadmin/webmin/1.590/webmin-1.590-1.noarch.rpm [following]
--2012-08-02 22:49:08--  http://downloads.sourceforge.net/project/webadmin/webmin/1.590/webmin-1.590-1.noarch.rpm
Resolving downloads.sourceforge.net... 216.34.181.59
Reusing existing connection to prdownloads.sourceforge.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http://cdnetworks-kr-2.dl.sourceforge.net/project/webadmin/webmin/1.590/webmin-1.590-1.noarch.rpm [following]
--2012-08-02 22:49:08--  http://cdnetworks-kr-2.dl.sourceforge.net/project/webadmin/webmin/1.590/webmin-1.590-1.noarch.rpm
Resolving cdnetworks-kr-2.dl.sourceforge.net... 211.39.135.163
Connecting to cdnetworks-kr-2.dl.sourceforge.net|211.39.135.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18926818 (18M) [application/x-rpm]
Saving to: âwebmin-1.590-1.noarch.rpmâ

100%[==========================================================>] 18,926,818  72.2K/s   in 6m 28s

2012-08-02 22:55:37 (47.7 KB/s) - âwebmin-1.590-1.noarch.rpmâ

2. Add the GPG Key :

[root@centos63 ~]# rpm --import http://www.webmin.com/jcameron-key.as

3. Install webmin :

[root@centos63 ~]# rpm -Uvh webmin-1.590-1.noarch.rpm
Preparing...                ########################################### [100%]
Operating system is CentOS Linux
   1:webmin                 ########################################### [100%]
Webmin install complete. You can now login to http://centos63.ehowstuff.local:10000/
as root with your root password.

4. Start webmin service and check webmin status :

[root@centos63 ~]# /etc/init.d/webmin start
[root@centos63 ~]# /etc/init.d/webmin status
Webmin (pid 2676) is running

5. Configure webmin service to start at boot :

[root@centos63 ~]# chkconfig webmin on

6. Login the webmin web interface :

http://youripaddress:10000

Google Chrome 21 is out

google chromeGoogle Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier. Google Chrome version 21.0.1180.60 (21.0.1180.57 for Mac and Linux) is out, fixing 15 security vulnerabilities in the search giant’s browser. Strictly from a security perspective, you should upgrade as soon as possible and download the latest version of Chrome directly from google.com/chrome.

Download Latest Google Chrome

google Chrome

Security fixes and rewards:

Please see the Chromium security page for more detail. Note that the referenced bugs may be kept private until a majority of our users are up to date with the fix.

  • [Linux only] [125225] Medium CVE-2012-2846: Cross-process interference in renderers. Credit to Google Chrome Security Team (Julien Tinnes).
  • [127522] Low CVE-2012-2847: Missing re-prompt to user upon excessive downloads. Credit to Matt Austin of Aspect Security.
  • [127525] Medium CVE-2012-2848: Overly broad file access granted after drag+drop. Credit to Matt Austin of Aspect Security.
  • [128163] Low CVE-2012-2849: Off-by-one read in GIF decoder. Credit to Atte Kettunen of OUSPG.
  • [130251] [130592] [130611] [131068] [131237] [131252] [131621] [131690] [132860] Medium CVE-2012-2850: Various lower severity issues in the PDF viewer. Credit to Mateusz Jurczyk of Google Security Team, with contributions by Gynvael Coldwind of Google Security Team.
  • [132585] [132694] [132861] High CVE-2012-2851: Integer overflows in PDF viewer. Credit to Mateusz Jurczyk of Google Security Team, with contributions by Gynvael Coldwind of Google Security Team.
  • [134028] High CVE-2012-2852: Use-after-free with bad object linkage in PDF. Credit to Alexey Samsonov of Google.
  • [134101] Medium CVE-2012-2853: webRequest can interfere with the Chrome Web Store. Credit to Trev of Adblock.
  • [134519] Low CVE-2012-2854: Leak of pointer values to WebUI renderers. Credit to Nasko Oskov of the Chromium development community.
  • [134888] High CVE-2012-2855: Use-after-free in PDF viewer. Credit to Mateusz Jurczyk of Google Security Team, with contributions by Gynvael Coldwind of Google Security Team.
  • [134954] [135264] High CVE-2012-2856: Out-of-bounds writes in PDF viewer. Credit to Mateusz Jurczyk of Google Security Team, with contributions by Gynvael Coldwind of Google Security Team.
  • [$1000] [136235] High CVE-2012-2857: Use-after-free in CSS DOM. Credit to Arthur Gerkis.
  • [$1000] [136894] High CVE-2012-2858: Buffer overflow in WebP decoder. Credit to Jüri Aedla.
  • [Linux only] [137541] Critical CVE-2012-2859: Crash in tab handling. Credit to Jeff Roberts of Google Security Team.
  • [137671] Medium CVE-2012-2860: Out-of-bounds access when clicking in date picker. Credit to Chamal de Silva.

For Chrome 21, Google paid security researchers a grand total $2,000 in rewards as part of its bug bounty program. This payout is smaller than usual since Google found most of the vulnerabilities this time, using its own AddressSanitizer tool.

Still, Mountain View recently quintupled its maximum bug bounty to $20,000. The company has so far received about 800 qualifying vulnerability reports that span across the hundreds of Google-developed services, as well as the software written by 50 or so firms it has acquired. In just over a year, the program has paid out around $460,000 to roughly 200 individuals.

For the record, Google Chrome 20 was released just five weeks ago (and then updated again three weeks ago). At the time, I expected Chrome 21 to be released “sometime in August.” It turns out I was off by a day.

Click here for full Story