Month: November 2012

  • Installing suPHP on CentOS

    Installing suPHP in centOS. Download the suPHP package first thru terminal. wget http://www.suphp.org/download/suphp-0.7.1.tar.gz then extract it. tar -zxvf suphp-0.7.1.tar.gz cd suphp-0.7.1.tar.gz yum install gcc gcc-c++ httpd-devel yum install make ./configure –with-apr=/usr/bin/apr-1-config –with-apache-user=apache –prefix=/usr make && make install vi /etc/httpd/conf/httpd.conf Add below line LoadModule suphp_module modules/mod_suphp.so Add below line in the <Directory /> section of your…

  • Host multiple domain name in a Virtual Host.

    1. You may need to install apache in your CentOS box. yum install httpd 2. Edit the httpd.conf file. vi /etc/httpd/conf/httpd.conf Below is my customize httpd.conf which host two websites (siteone.com and sitetwo.com). Listen *:80 <VirtualHost 192.168.2.124:80> ServerAdmin test@webserverpage.com ServerName siteone.com ServerAlias www.siteone.com DocumentRoot /var/www/html/siteone DirectoryIndex index.html index.pl index.php DocumentRoot /var/www/html/siteone ScriptAlias /cgi-bin/ /var/www/html/siteone/cgi-bin/ <Directory…

  • Install & Configure the BIND DNS Server

      Install & Configure the BIND DNS Server Install BIND 1. Make sure you have internet connectivity and install the BIND DNS server. [root@centos#]yum install bind 2. Set your DNS server setting to resolve to your loopback interface. Edit the configuration of you interface. [root@centos#]vi /etc/sysconfig/network-scripts/ifcfg-eth0 # Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ DEVICE=eth0 NM_CONTROLLED=”no” DNS1=127.0.0.1…

  • How to create a symbolic link in CentOS

    This is an example on how to link the files from the current directory to /etc folder. /bin/ln -sf myfile.conf /etc/myfile.com

  • Apache (httpd) is not working on external IP address after fresh install of CentOS.

    By default port 80 is not added in the accepted of the builtin firewall/iptables of CentOS. Below is the default content of the ip tables. /***************************************************************/ # Generated by iptables-save v1.3.5 on Thu Nov 22 14:43:27 2012 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [4076:351018] :RH-Firewall-1-INPUT – [0:0] -A INPUT -j RH-Firewall-1-INPUT -A…

  • How to install a Desktop Environment in Centos Server

    Type the command below to the terminal. $ yum groupinstall -y ‘X Window System’ $ yum groupinstall -y ‘Desktop’ after installation you may need to type the command below to switch from CLI to GUI $ startx

  • Creating Virtual NIC in Centos

    Type this to the terminal cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0 Change the values to your desired IP address which is in different subnet. It should look like this [root@choi ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:FD:78:BE inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fefd:78be/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:469 errors:0 dropped:0 overruns:0 frame:0 TX…

  • Installing LAMP server in Centos

    Installing LAMP in CentOS Installing MySQL 5.0 Type the commands below to the terminal. -yum install mysql mysql-server -chkconfig –levels 235 mysqld on

  • Configure Static IP Address in CENTOS

    /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static BROADCAST=192.168.2.255 HWADDR=00:00:00:00:00:00 IPADDR=192.168.2.123 IPV6ADDR=192.168.2.123/64 IPV6INIT=yes DNS1=8.8.8.8 NETMASK=255.255.255.0 NETWORK=192.168.2.0 ONBOOT=yes then restart the service /etc/init.d/network restart

  • Change HOSTNAME in CENTOS

    NETWORKING=yes NETWORKING_IPV6=yes HOSTNAME=centos ~ ~ ~ ~ ~ ~ “/etc/sysconfig/network” Update the record then reboot