This is a short an easy guide on how to setup Virtualmin GPL on CentOS 5.

The Very first thing you want to do when you get your server is to secure your SSH.

As soon as you have your IP address and password for your VPS/Dedicated Server, login via SSH:

From another unix system:

ssh [email protected]

or from windows use putty:

simply put in your server ip and click connect

Login as: root

Password: use the password you got from your provider for your server

Now that you are  logged in to the server, immediately change your root password

passwd

Now we can move on to the rest of the server setup:

##

Note: For security it would be better to implement a firewall (See: How to: CentOS 5 and Virtualmin Firewall Init Script

) and secure SSH (See: How to: CentOS Virtualmin secure SSH

) before you continue , but as this is written more for people who need Virtualmin to manage this would be a bit of a challenge and I will leave it out in this guide.

###

I always use vim as an editor: if you don`t have VIM installed you can always use nano or vi .

To install VIM on CentOS 5 run:

yum install vim-X11 vim-common vim-enhanced vim-minimal

###

1. Setup the Hostname:

Edit: /etc/hostname

vim /etc/hostname

add:

server1.example.com

Edit: /etc/hosts

vim /etc/hosts

Add:

x.x.x.x server1.example.com server1

Should look something like this in the end:

127.0.0.1 localhost.localdomain localhost
x.x.x.x	server1.example.com server1

Edit: /etc/sysconfig/network

vim /etc/sysconfig/network

Make sure it contains your hostname:

NETWORKING=yes
NETWORKING_IPV6=no
GATEWAY=x.x.x.x
HOSTNAME=example.com

2. Verify Hostnames:

Check that  hostname is valid:

hostname --fqdn

It should return your the hostname you set.

##

If you still have hostname problems after a system restart see my post CentOS VPS Hostname resets or changes after restart

##

3. Now we have to make sure SELINUX is Disabled

Edit /etc/selinux/config:

vim /etc/selinux/config

and change the SELINUX line to:

SELINUX=disabled

Then to disable SELINUX on runtime lets run the command:

setenforce 0

it should return  – setenforce: SELinux is disabled

4. Update your system:

yum update

5. Make sure Perl is installed:

yum install perl

6. Install Virtualmin:

Install wget so we can download the Virtualmin install script:

yum install wget

Get the Install script:

wget http://software.virtualmin.com/gpl/scripts/install.sh

Run the install script:

sh install.sh

or

/bin/sh install.sh

 

When the installation has finished simply use your browser to navigate to the Virtualmin control panel to check if its working:

https://server1.example.com:10000

or

https://x.x.x.x:10000   ##  where x.x.x.x is you server IP

 

Check out my

How to: Virtualmin Post-Installation Wizard

How to: CentOS 5 and Virtualmin Firewall Init Script

How to: CentOS Virtualmin secure SSH

as well as Server hardening and Basic Setup guides that follow:

 

How to Setup Virtualmin on CentOS 5
Tagged on:                                                         

Leave a Reply

Your email address will not be published. Required fields are marked *

8 thoughts on “How to Setup Virtualmin on CentOS 5