CentOS FAQ

The Take 2 Hosting User FAQ includes answers to many frequently asked questions as well as links to valuable information you may find useful while utilizing our services.

Please note that many of the links provided in this FAQ are not directly hosted by Take 2 Hosting.

Table of Contents

A Local CentOS Mirror

Take 2 Hosting, Inc. is a proud supporter of the Linux community and provides a public http mirror of the complete CentOS 5 distribution. You may directly use that mirror at http://centos.take2hosting.com . This is the quickest, easiest and most secure way to update software on you Take 2 Hosting server. If you are preparing virtual private servers, you can install directly from this mirror with the CentOS boot.iso.

Installing the Webmin Control Panel

If you would like to administer your server using a browser-based control panel you may install Webmin, as a free alternative to cPanel or Plesk. To install webmin using the yum repoisotory system, log in to your system via SSH as the 'root' user and run the following commands:

----
echo "[Webmin]" > /etc/yum.repos.d/webmin.repo

echo "name=Webmin Distribution Neutral" >> /etc/yum.repos.d/webmin.repo

echo "#baseurl=http://download.webmin.com/download/yum" >> /etc/yum.repos.d/webmin.repo

echo "mirrorlist=http://download.webmin.com/download/yum/mirrorlist" >> /etc/yum.repos.d/webmin.repo

echo "enabled=1" >> /etc/yum.repos.d/webmin.repo

cd /tmp

wget http://www.webmin.com/jcameron-key.asc

rpm --import jcameron-key.asc

yum -y install webmin
----

After that you may then connect to port 10000 on your server: http://YOUR_IP_ADDRESS:10000/ and log in with the root user and your root password.

Virtualization

If you would like to run virtual servers by using Xen you will have to install some packages and change your kernel boot options on your dedicated server.
yum -y install xen 

After installing the Xen kernel, you must remove the word 'noapic' from your GRUB boot configuration. The configuration file can be found at /boot/grub/grub.conf . When Xen boots, it does not use the standard serial console, so you will not have normal serial console access under Xen. To gain Xen console access, you must add 'com1=38400,8n1' to the kernel line in your /boot/grub/grub.conf . After saving the configuration change, you must reboot the server. Then run

virt-install

If you would like to install Microsoft Windows server under Xen we have provided a FAQ here to help you.

If you would like to run virtual servers by using KVM, you must install a few packages.
yum install kvm kmod-kvm qemu
modprobe -v kvm-intel

To create a simple domain with CentOS 5.8 that is 10 GB of disk and 512 MB of memory over VNC:
mkdir /vm
wget http://centos.take2hosting.com/5.8/os/i386/images/boot.iso -O /tmp/boot.iso
qemu-img create -f qcow2 /vm/vdiskCentos5.8.img 10G
qemu-system-x86_64 -hda  /vm/vdiskCentos5.8.img -cdrom /tmp/boot.iso -boot d  -m 512 -vnc 0:0

To connect to your virtual server, point VNC to your server IP address. Please note that VNC is not encrypted and thus not secure.

Configuring Additional IP Addresses

If you have ordered additional IP addresses then you need to configure them on your server. Please configure all of your additional IPs at the time they are assigned to you.

Start by creating the file /etc/sysconfig/network-scripts/ifcfg-eth0:0 and the contents will read:
DEVICE=eth0:0
BOOTPROTO=static
IPADDR=YOUR NEW IP ADDRESS
NETMASK=255.255.255.255
ONBOOT=yes

Then, as root, run
/sbin/ifup eth0:0

Repeat that process for each additional IP address you have to configure, incrementing the :0 number each time. For instance, your second additional IP would be in the "ifcfg-eth0:1" file and the DEVICE= line would read "DEVICE=eth0:1". Your third additional IP would be eth0:2 and so on.

Additional IPs for VPS Use

When additional IP addresses are ordered after your server has been provisioned, the new IP addresses are routed directly to the primary IP on your server. There is no additional gateway interface added to the network.

If you wish to use your additional IP addresses as primary IPs for VPSes then you must first use the new IPs to create a "local network". This will require that you use three of the new IP addresses administratively (the first IP, the second IP, and the last IP from the new set of IP addresses).

The first IP and last IP of the block require no configuration. The second IP will be used as your gateway interface and will be bound as a virtual interface on the host OS.

By way of example; let's assume you just ordered 16 additional IP addresses (CIDR /28 network) and were given the 10.0.0.16 - 10.0.0.31 IP address range. Your first IP (10.0.0.16) would be your "network address". Your last IP (10.0.0.31) would be your "broadcast address".

Your second IP (10.0.0.17) will be your gateway address for your VPSes. You will need to bind that IP to your host OS. Instructions for binding an additional IP to the host OS can be found at the Configuring Additional IP Addresses link.

There is one change you need to make in those instructions and that is the value used for the netmask.

If you ordered 4 IP addresses then use 255.255.255.252 as the netmask.

If you ordered 8 IP addresses then use 255.255.255.248 as the netmask.

If you ordered 16 IP addresses then use 255.255.255.240 as the netmask.

If you ordered 32 IP addresses then use 255.255.255.224 as the netmask.

Once you configure the gateway address it should be pingable. You may use the other available IP addresses (10.0.0.18 - 10.0.0.30 in our example) for your VPSes. Each VPS will use the second IP (10.0.0.17) as it's gateway address and the appropriate netmask (255.255.255.240 in our example of 16 IPs).

Using YUM for Updates to Software

We highly recommend using YUM for software updates and ease of use.
To update your server's software to the latest security patch level from the Take 2 Hosting mirror, as root, run:
  yum -y -c http://centos.take2hosting.com/take2hosting.repo update

Some YUM resources

Some Basic Documentation for CentOS 5