Tag Archives: Linux

Alternative’s to Cpanel: Webmin

I’m going to start a mini series of posts here called Alternatives to Cpanel, first you might ask why not Cpanel and its worth pointing out that Cpanel is arguably one of the most popular and most comprehensive control panel solutions for web hosting out there, it might not be good for some people or some use cases the first of which that comes off the top of my head is using Nginx (pronounce it Engine-X) instead of Apache. granted there are now plugins that allow you to run Nginx in front of Apache on Cpanel, both a paid and free option, both still don’t eliminate Apache completely like Litespeed can do (that’s perhaps content for another blog post)

Today I am going to talk about Webmin, I’m going to briefly recommend install instructions for Debian and talks about some of its strengths and weaknesses. Firstly I should point out that Webmin out of the box is not a web hosting control panel like Cpanel, if you want that level of functionality you need to install the Virtualmin addon package (GPL or paid) which totally extends Webmin into a hosting system. on its own Webmin allows you to just about tweak any setting on your Linux, Windows or even Mac computer – yes I did just say mac, I run it on my local mac to manage Apache vhosts rather than have to pay to use MAMP Pro.

If you have CentOS/Red Hat or Debian/Ubuntu, installing Webmin is actually pretty simple, the install instructions are here: Debian, CentOS, there is one caveat though regarding Debian install instructions, the developer recommends adding both mirror servers to your apt sources list, while there’s arguments for both sides I don’t recommend it purely due to the possibility of the mirrors becoming out of sync and potentially giving out of date information, CentOS and YUM handle this much much better by using the idea of a mirror list and it tests on the fly for the best mirror and uses that one unless there is a problem, as of yet Debian and APT don’t have such a feature. here are the quick Debian install instructions:

edit the /etc/apt/sources.list file on your system and add the lines :

deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

NOTE: I have used only one server despite the instructions saying add both, I would recommend testing the speed of each and picking the fastest for your needs

You should also fetch and install the GPG key with which the repository is signed, with the commands :

cd /root
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc

You will now be able to install with the commands :

apt-get update
apt-get install webmin

All dependencies should be resolved automatically and webmin installed with your root username and password being the default user.

once you have installed you will get a login screen like this if you navigate to yoursiteip:10000 in a browser

 

 

 

 

 

What webmin is really powerful with and what makes it brilliant for more advanced server administrators is that it generally parses config files on the fly and writes back to config files on the fly, it doesnt attempt to “take control” of config files like Cpanel and some other Control panel solutions do, which means if you make a command line edit, it will show up in webmin and vice versa, you wont end up fighting ping pong between the 2 if you want to make a change.

there are quite a lot of plugins for webmin as well and its possibly very likely that if it isnt in the core setup that there is possibly a module for that ftp server you use (like vsftpd) however at this time there isnt really a reliable nginx plugin available yet which is a shame because the 2 would go hand in hand with building a very lean production webserver we live in hope for it to mature though, initial work has been done here but needs someone to take it forward.

Another advantage of Webmin is that it runs its own mini-server (originally called miniserv.pl) now normally i wouldnt recommend spending extra resources if you can avoid it but in this case i make the exception purely because Webmin does use so little resources, and its also another way to access your server if you break ssh or something (note, breaking network settings breaks all services not just ssh!)

I use webmin on most servers i setup that aren’t cpanel purely because the firewall system CSF&LFD (another post another day) has a great webmin module which makes managing your firewall and brute force protection much much easier on non cpanel servers – CSF was originally written for cpanel but then they made it work generically on all linux systems and even wrote the webmin module.

one of the biggest pros of webmin is that its 100% free which is great if your building servers on a budget too

I’ll leave this post here for now, but I would love to hear your comments about Webmin, also I’d love to hear of recommendations for other alternatives to Cpanel

HOWTO: Upgrade Debian Lenny (5.0) to Debian Squeeze (6.0) on Rackspace Cloud Servers

I recently posted on how to update Debian for vps.net servers and its intricacies, I have since been able to document the process for Rackspace and this guide also works for Virtuozzo or OpenVZ VPS’ where you don’t have direct control over the kernel from your VPS so here goes.

strong>Disclaimer: please test this yourself first on a NON PRODUCTION SERVER. this may or may not work with other server providers but is specifically tailored to the Rackspace system, I do not guarantee its results outside of my tested system (Rackspace Cloud Server US DC from a stock Debian Lenny install).

I have found that on current Rackspace templates the archive key for squeeze has yet to be installed on the template so its best to start by updating the keyring to prevent GPG errors, I always recommend to start by running an apt-get update but this may not successfully complete so you may need to start with:

apt-get install debian-archive-keyring

you may also need to accept the GPG error temporarily, alternatively you can get the squeeze GPG key from https://ftp-master.debian.org/keys.html and adding it into apt by running:

wget https://ftp-master.debian.org/keys/archive-key-6.0.asc && apt-key add archive-key-6.0.asc

after this we can continue the step of updating our Debian install to Squeeze, to continue we must first update our sources.list file:

nano /etc/apt/sources.list

i recommend cleaning out the old list completely if this is a stock install otherwise replace the default Debian mirrors with:

deb http://ftp.uk.debian.org/debian/ squeeze main
deb-src http://ftp.uk.debian.org/debian/ squeeze main

deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

deb http://ftp.uk.debian.org/debian squeeze-updates main
deb-src http://ftp.uk.debian.org/debian squeeze-updates main

remembering to update the mirror URL’s to ones closer to you if not using the UK Rackspace cloud.

Update the package lists.

apt-get update

Install locales update (to stop lots of annoying Locales errors while upgrading).

apt-get install locales

Then the final upgrade.

apt-get dist-upgrade

When you are asked for options.

Change to dash – doesn’t matter which is chosen this can be whatever you prefer.

Chainload grub 2 – NO.

Change to dependency based sequencing (i selected both and its fine).

Restart services just hit enter.

Reboot for good luck (Isn’t actually needed because kernel is more up to date than Debian and not updated during the upgrade but better to eliminate issues ahead of crunch time).

reboot

Sit back and Enjoy!

HOWTO: Upgrade Debian Lenny (5.0) to Debian Squeeze (6.0) on VPS.net

Here are the working upgrade instructions from Lenny to Squeeze (Debian 6) on VPS.net.

Disclaimer: please test this yourself first on a NON PRODUCTION SERVER. this may or may not work with other server providers but is specifically tailored to the VPS.net system, I do not guarantee its results outside of my tested system (OnApp Cloud – LON-I from a stock Debian Lenny install).

UPDATE: VPS.net have now released Debian 6 templates on there clouds however upon testing this i have noted several issues with it and as such although it makes the install of debian 6 easier on VPS.net i am not however recommending using the Debian 6 templates that vps.net until they fix the bugs with them – the biggest problem so far is that you cant update the kernel without a fatal error which will occure everytime you use apt to run any updates (which you should be doing regularly), there are also issues with sub-optimal mirrors being selected and at least from what i can see wrong timezone by default in LON clouds. At this time because of the kernel update issue you cannot install ksplice and possibly any program that uses a shell script that interacts with apt for installing.

Other notes: Ksplice is known to work with Debian Squeeze, also despite having success on the older clouds (eg LON-C) I havent been able to document possible pitfalls with non OnApp based clouds therefore its recommended to first TEST your upgrade in any instance and/or migrate to the newer clouds if you can. I assume you can SSH in as root to your server and can handle basic file editing with nano (substitute your preferred text editor as neccesary)

Here goes:

Fully update your lenny system (recommended to avoid some possible gpg errors).

apt-get update && apt-get upgrade

I recommend rebooting here just as a safety measure.

reboot

Reconnect to your server then update your apt sources list.

nano /etc/apt/sources.list

Your sources list should look not to different to the following (for UK servers) update the references appropriately to get the closest mirrors to you:

deb http://ftp.uk.debian.org/debian/ squeeze main
deb-src http://ftp.uk.debian.org/debian/ squeeze main

deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

deb http://ftp.uk.debian.org/debian squeeze-updates main
deb-src http://ftp.uk.debian.org/debian squeeze-updates main

Update the package lists.

apt-get update

Install locales update (to stop lots of annoying errors while upgrading).

apt-get install locales

Update the kernel and install udev first.

apt-get install linux-image-`uname -r|sed 's,[^-]*-[^-]*-,,'` udev

WARNING: DO NOT REBOOT AFTER UPDATING THE KERNEL, CARRY ON WITH THIS GUIDE.

When asked for change to UUID’s – select NO

Now edit your /boot/grub/menu.lst and edit any reference of sda1 to xvda1 (should be 3 of them).

also edit your /etc/fstab file and change an references from sdaX to xvdaX  (should only be 2 items)

Then reboot again.

reboot

Reconnect to your server and check your kernel version.

uname -r

Should return something starting with 2.6.32 similar to:

2.6.32-5-xen-amd64

Then the final upgrade.

apt-get dist-upgrade

When you are asked for options.

Change to dash – doesnt matter which is chosen this can be whatever you prefer.

Chainload grub 2 – NO.

Change to dependancy based sequencing (i selected both and its fine).

Restart services just hit enter.

Reboot for good luck (isnt actually needed because kernel is already up to date but better to eliminate issues ahead of crunch time).

reboot

Sit back and Enjoy!