Setting up Cpanel over Centos 6 minimal

Set up networking:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

hit “i” to insert text.

Make the file look like this:

DEVICE=”eth0″
HWADDR=”leave the same”
NM_CONTROLLED=”yes”
ONBOOT=”yes”
IPADDR=66.249.*.*
BOOTPROTO=none
NETMASK=255.255.255.*
GATEWAY=66.249.*.*
DNS1=66.249.*.*
DNS2=66.249.*.*
DNS3=66.249.*.*
USRCTL=yes

Then click the esc key
Then click control :
Then type x and hit enter to save.
Then restart your nic card:

/etc/init.d/network restart or service network restart

Then download some stuff:

yum groupinstall base

Then install Cpanel and so on:

cpanel
mkdir /home/cpins
cd /home/cpins
wget http://layer1.cpanel.net/latest sh latest

csf
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

cd /home
wget http://www.ndchost.com/cpanel-whm/plugins/cleanbackups/download.php
sh latest-cleanbackups

wget http://www.ndchost.com/cpanel-whm/plugins/accountdnscheck/download.php
sh latest-accountdnscheck

3 Ways to Try Out Linux, For a Windows User

linux windows

One of the arguments I often hear from people who are trying to use linux for the first time is that they are not sure if they can switch back to their original choice of OS (usually windows), if they are not satisfied with their experience with linux. These are usually the people who are not as tech savy or previously had bad experience while trying to install linux which resulted in destroying their windows installation. With each iteration of windows OS Microsoft has made it less friendlier for linux to be installed along with windows.

Linux is all about choices, and I believe the users should have the choice to switch back and forth into whatever OS they want to. And in order to do so we have to make this experience for new users as friendly and as non-destructive to their experience as possible. And hopefully when they see the true power and the convenience they get from Linux experience, they will make the full switch themselves.

1) Cygwin: Cygwin lets you run powerful linux applications under windows environment, without having to install the whole OS. This is possible with the help of cygwin1.dll, which acts as a Linux API emulation layer. The programs themselves need to be recompiled to run under cygwin. There are a large number of application available for you to run under cygwin. This is a great way for you to get your toes wet with Linux environment and try out some of the more common linux applications out there. Don’t be fooled by my description; but cygwin itself is very powerful and widely used by many serious developers working under windows environment.

You can read more about Cygwin and download it from it’s website: http://www.cygwin.com/

2) Virtualization: Virtualization puts some spice to your computer experience, and with the help of seamless virtual machine setup (read my how-to), you will have a hard time justifying installing linux in a separate partition or even ever having to reboot to your linux partition. There are currently two leading OS vitualization application out there: Commercial application VMware, and freeware and my favorite Virtualbox. Virtualization has come a long way from it’s early days, its support for external devices like USB, wifi, DVD are better than ever before. But Virtual OS is not for everyone. You will will need some decent memory and CPU power to appreciate the true strength of virtualization. Even with all it’s its features and performance there is still a lot to be desired in terms of graphics and speed. VirtualOS is right for you if you find yourself using linux not as often. For more information, check out VirtualBox and VMware.

Here is an image of Seamless virtualbox setup where firefox is running under windows and Linux setup separately at the same time:

(click for larger image)

Another form of virtual linux installation that is quickly gaining popularity among virtual linux users are virtual desktops with coLinux (Cooperative Linux) kernel. What sets these virtual machines apart from traditional virtual installation is it’s speed, which runs almost as good as a native installation; as it get full control of host machine hardware. Cooperative Virtual Machine (CVM) is a rather new development and is not as widely adopted or used by the linux community, yet. You can find a small list of linux distro using coLinux kernel, here. I have personally used Ulteo, and it works great; it is a plug and play Ubuntu-derived coLinux distribution that provides hundreds applications out of the box, has very easy installation and works on XP and Vista (32-bit only). Check out ulteo for yourself, here.

Here is Ulteo in action:

3) Wubi: Wubi stands for (Windows-based Ubuntu Installer). I swear by wubi and highly recommend to new users thinking about using linux with minimum risks. With Wubi, you get to install a full-featured linux distro (this case Ubuntu), inside a windows partition, without loosing any performance and risking your system by creating a separate partition. Wubi works so great that it performs as good as a native linux installation. Wubi also gets full access to graphics card which lets you use compiz-fusion functionality, and other third party devices which is not always possible with virtual machines. To remove a wubi based linux system, you would uninstall it the same way you would uninstall any windows application. From my experience, installing with wubi is much faster than installing in a separate partition. The only drawback with wubi-based system is that since it’s installed on top of a NT file system, over time performance might degrade because of fragmentation; which you can improve by defragmenting your linux file system.

Installing Wubi:

Uninstalling Wubi:

Hopefully this will help you make the switch to linux, without the fear of loosing anything. Linux can be a great alternative to your primary OS, and these are some great ways to try it and compare it yourself.

Getting started with the CentOS 4.4 Single Server CD

Centos

Recently I needed to set up a server with all the usual server components — Web, mail, and file sharing. It needed to be rock-solid and reliable. I didn’t want to download 4GB of software from the Net, so I turned to CentOS’ Single Server CD.

CentOS, which stands for Community ENTerprise Operating System, is an enterprise-focused Linux distribution built from the freely available sources (under the GPL and similar licenses) from Red Hat. CentOS 4 is based on Red Hat Enterprise Linux 4 and supports the x86 (i586 and i686), x86_64 (AMD64 and Intel EMT64), IA64, Alpha, and S390 and S390x architectures.

The Single Server CD contains most of the items required for a basic server set up, but without a GUI. It’s great for those who want a functional install quickly. Also, since there is no memory-hungry GUI, you can run a basic server with just 128MB of RAM, though of course you will need more if you need to deploy large databases.

Centos Server Installation

Installing Single Server CD is straightforward, especially if you have installed other Linux distributions. You need to download the Single Server CD from a local mirror, burn it to a disc, and boot your server from that CD.

Even though the Single Server CD doesn’t contain a GUI, the installation process uses a graphical interface, which means it’s easy to install. Follow the on-screen instructions and the install should be effortless. Tip: If your server doesn’t contain any other data and you are happy to have all the disks reformatted, use the “automatically partition” option when it comes to the Disk Partitioning Setup, as this will save you lots of time.

I suggest disabling SELinux and turning off the firewall, especially if your server is secure inside your local LAN. You can change the firewall settings later if you like with the system-config-securitylevel command.

You can safely choose to install the default software packages. This will give you a basic CentOS system with Web, mail, and FTP servers, DNS, and Windows file sharing via Samba. On a modern machine you should be able to have the server installed in less than 20 minutes.

Not all the packages on the CD are installed. For instance, if you require PostgreSQL, you’ll have to install it later from the disc. To install PostgreSQL, mount the CD-ROM (mount /media/cdrom) and use yum to install the client libraries and the server:

yum localinstall /media/cdrom/CentOS/RPMS/postgresql-7*
yum localinstall /media/cdrom/CentOS/RPMS/postgresql-server-7*

PHP 5 and MySQL 5

The strength of CentOS is its reliability and stability. It is built around proven packages and doesn’t rely on bleeding-edge software. However, there is a disadvantage to this, namely that some of the newest software isn’t installed. The most critical omissions, in my opinion, are PHP 5 and MySQL 5, but these packages are available through the CentOS Plus Repository.

By default CentOS 4.4 comes with PHP 4.3.9. To upgrade to PHP 5, make sure your server is connected to the Internet and run the command:

yum –enablerepo=centosplus upgrade php*

The same goes for MySQL. The default in CentOS 4.4 is MySQL 4.1.20. To upgrade to 5, use the following commands:

yum –enablerepo=centosplus upgrade mysql*
yum –enablerepo=centosplus install mysql-server-5*

Simple administration

Since CentOS 4.4 Single Server CD doesn’t come with a GUI, you need to do all your configuration via the command line. Here are few keys commands and files to help you configure your server.

To start and stop a service use:

service XYZ start
service XYZ stop

Where XYZ is the service name, e.g. postgresql.

To configure the networking run:

netconfig

To configure a printer run:

system-config-printer

By default there are several system services that are not started at boot time, including the Web server and the MySQL server. To ensure that the essential services are started at boot time, run the following commands:

chkconfig –levels 235 httpd on
chkconfig –levels 235 mysql on
chkconfig –levels 235 smb on
chkconfig –levels 235 vsftpd on

If you need POP3 and IMAP services, you need to configure the dovecot daemon. By default, the dovecot daemon provides only IMAP services. If you also want POP3 you must edit /etc/dovecot.conf and put in the line:

protocols = imap imaps pop3 pop3s

Dovecot isn’t started by default either (but is installed as one of the standard packages). To make sure it is started at boot time, type:

chkconfig –levels 235 dovecot on

Once you have everything configured correctly, reboot, not because Linux needs it, but just to be sure that everything comes up and runs as expected.

Conclusion
CentOS is a reliable and robust Linux distribution, and the Single Server CD version is close to perfect for anyone looking for a simple but yet functional server distribution without having to download four or five CDs from the net.

How to set up Centos a 4.4 (4.x) Server

This is a detailed description about how to set up a CentOS 4.4 based server that offers all services needed by ISPs and hosters (web server (SSL-capable), mail server (with SMTP-AUTH and TLS!), DNS server, FTP server, MySQL server, POP3/IMAP, Quota, Firewall, etc.). This tutorial is written for the 32-bit version of CentOS 4.4, but should apply to the 64-bit version with very little modifications as well.

It will use the following software:
Web Server: Apache 2.0.x
Database Server: MySQL 4.1
Mail Server: Postfix (easier to configure than sendmail; has a shorter history of security holes than sendmail)
DNS Server: BIND9 (chrooted!)
FTP Server: proftpd
POP3/IMAP server: dovecot
Webalizer for web site statistics
In the end you should have a system that works reliably.

This is not the only way of setting up such a system. There are many ways of achieving this goal but this is a common way. Requirements

To install such a system you will need the following: Download the 4 CentOS 4.4 CD iso images from a mirror near you (the list of mirrors can be found here: http://www.centos.org/modules/tinycontent/index.php?id=13). You can also find it and other Centos versions at Download Spot You will need a internet connection.

 

 
1 Install Centos Boot from your CentOS 4.4 CD
(CD 1).
Centos
It can take a long time to test the installation media so we skip this
test here: Centos
The welcome screen of the CentOS installer appears. Click on Next: Centos
Choose your language next: Centos
Select your keyboard layout:Centos
We want to install a server so we choose Server here:Centos
Next we do the partitioning. Select Automatically partition unless you
are a advanced user. This will give you a small /boot partition and a
large / partition which is fine for our purposes (I use 1 gig for / 1
gig for /temp 8 gigs for /usr 8 gigs for /var 2 gigs for SWAP and split
the rest with /home and /backup:Centos
I’m installing CentOS 4.4 on a fresh system, so I answer Yes
to the question Would you like to initialize this drive, erasing ALL DATA.Centos
Select Remove all partitions on this system.Centos
We want to remove all Linux partitions, so we answer Yes to the following
question:Centos
The installer presents you an overview of our new partitions. Click
on Next:Centos
Now the boot loader GRUB will be installed. You can leave the default
settings unchanged and click on Next:Centos
On to the network settings. The default setting here is to configure
the network interfaces with DHCP, but we are installing a server, so static
IP addresses are not a bad idea… Click on the Edit button at the top
right. In the window that pops up uncheck Configure using DHCP and give
your network card a static IP address (in this tutorial I’m using the
IP address 192.168.0.100 for demonstration purposes):CentosCentos
Set the hostname manually, e.g. dwhs500.dwhs.net, and enter a gateway
(e.g. 192.168.0.1) and up to three DNS servers (e.g. 145.253.2.75, 193.174.32.18,
and 194.25.0.60) Contact your data center, isp, or set up dns servers
for this:Centos
The default firewall does more harm then good. I would disable it completely
and bypass the warning. There is much better after market firewalls like
csf for free.Centos
Click on Proceed:Centos
Select the default language for the system and add further languages,
if necessary:Centos
Choose your time zone:Centos
Give root a password (do not lose this VERY IMPORTANT):Centos
Now we are to select the package groups we want to install. Select Editors,
Text Based Internet, Server Configuration Tools, Web Server, Mail Server,
DNS Name Server, FTP Server, MySQL Database, Development Tools, Administration
Tools and System Tools and click on Next:Centos
The installer tells you which CDs it will need to install the selected
packagesCentosCentos
The installation begins. This will take a few minutes:Centos
Finally, the installation is complete, and you can remove your CD from
the computer and reboot it:Centos