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

Upgrade from CentOS 7

Take2Hosting does not currently have any CentOS 7 alternatives readily available, but CentOS can be upgraded to AlmaLinux 8 via the ELevate process detailed at https://wiki.almalinux.org/elevate/ELevate-quickstart-guide.html

We can upgrade the OS to Alma or Rocky upon request at server order time. Please open a ticket listing the server and desired OS.
Note that Type 1 Servers (Intel Xeon 3200) cannot upgrade due to incompatibility with the newer kernel.
You can also upgrade yourself using the steps in the link above.

To simplify the process, here is the process in 2 steps:
Paste the following into the SSH terminal
sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://el7.repo.almalinux.org/centos/CentOS-Base.repo; yum -y update; yum check-update; yum clean all; reboot

Once this goes through and the server has rebooted, run the following:
sudo yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm; sudo yum install -y leapp-upgrade leapp-data-almalinux; sudo leapp preupgrade; sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True; sudo leapp upgrade; reboot

This process will likely take an hour or more.

Running updates after CentOS EoL

With the official CentOS Repository offline, you must add a 3rd party mirror of the repository.

With new server orders, we will run updates using the AlmaLinux mirror, enabled with the following line:
sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://el7.repo.almalinux.org/centos/CentOS-Base.repo

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.

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.

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