Installing Virtualmin GPL using install script on Debian Etch
Last Updated on Tuesday, 02 February 2010 23:44 Written by Joe Aldeguer Thursday, 08 January 2009 15:52
| Article Index |
|---|
| Installing Virtualmin GPL using install script on Debian Etch |
| Installing additional packages |
| Running install script |
| Connecting to Webmin |
| Change webmin admin account |
| All Pages |
Wouldn't it be nice if you could have complete control of your own web server and not have to pay for hosting fees or expensive server licenses. Have you ever wondered what would it take to run your own web server? If you possess a DIY type personality and not afraid of providing your own tech support this guide is for you. If your're still not convince what a free web based virtual hosting can do you can kick the tires here, so to speak.
On a newly installed Debian Etch server I will install Virtualmin GPL using the automated install script. Preparations before using install script:
Disclaimer: There is absolutely no guarantee this will work for you. Created for author's personal use.
Note: Words in italic are commands that need to be typed at shell prompt.
vi /etc/apt/sources.list
Comment out # deb CDROM:
apt-get update
Later on after running Virtualmin's automated install script this will be the contents of sources.list.
deb http://ftp.us.debian.org/debian/ etch main
deb-src http://ftp.us.debian.org/debian/ etch main
deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib
deb http://software.virtualmin.com/gpl/debian/ virtualmin-etch main
Installing packages:
apt-get install binutils cpp fetchmail flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb4.3-dev libpcre3 libpopt-dev linux-kernel-headers lynx m4 make ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev autoconf automake1.9 libtool bison autotools-dev g++
apt-get install ssh vim
Change SSH server listening port to something else other than the default 22. This will at least stop most of the automated password guessing programs.
vi /etc/ssh/sshd_config
Port 3232 (Make sure to pick some unused port number to use.)
Restart SSH
/etc/init.d/ssh restart
netstat –vat –c
Output should show ssh server is now listening at port 3232
SSH now to server on port 3232
ssh –l root 123.123.123.123 –p 3232
(As a security measure I will disallow root logins via SSH after I’m done setting up the server.)
Answer yes when asked “Are you sure you want to continue connecting (yes/no)?
We're now logged in as root as indicated by the # sign after the hostname.
Begin installation of Virtualmin GPL
From the Virtualmin download page download the install script to.
cd /usr/local/src
wget http://software.virtualmin.com/gpl/scripts/install.sh
chmod +x install.sh
Before running the script I’ll ran a snapshot on the virtual server I’m working on so can I restore if something goes wrong. (If you haven’t tried VMware ESXi free version you definitely are missing out!)
./install.sh
Message comes up asking if you are using the supported OS which we are. Click yes.
The install process does take time be patient…….
If you're worried the spinner is just stuck not doing anything open another terminal and ssh into the box then run the top command. You'll see some activity related to the install process. Just wait until you get the message Succeeded.
No errors at this point we'll proceed with installation.
netstat -vat -c -n
Webmin should be listening on its default port 10000 (Should be change to something else after logging in webmin to increase security including restricting which IPs to allow connections to Webmin following this how-to.)
Now connect to Webmin to check out what got installed by the install script.
https://123.123.123.123:10000 (Use the port number you changed it to instead)
Click okay when security certificate pops up, add exception if using Firefox, get certificate, confirm exception. Too many steps I prefered the old way Firefox handled security certificates.
Login in as user root. Afterwards I'll rename the Webmin root account to something else not easily guessed I hope.
We're now at Virtualmin's control panel. Click on Re-check and refresh configuration, no errors comes up proceed next. Message indicates MySQL Database root account does not have a password.
Click on MySQL Database module link. Put in new password.
Time to change Webmin root account (This is different from the root account of the system found in /etc/passwd, do not delete this.) Go to Webmin | Webmin | Webmin Users | Click on root | scroll down | Click Clone | Put in new username | Logout | Log back in using new Webmin administrator account | delete root account. (Don't use common names or words found in dictionary not even other languages for the Webmin root account. Use combination of numbers, letters uppercase, lower case, special keyboard characters. You have done this for the root password too, right?)
apt-get update
Do an upgrade
apt-get upgrade (Done to make sure we have the latest security updates installed.)
I will also enable Virtualmin's update package check daily to make sure I get notified whenever there is an updated package available. Go to System Information | Virtualmin packages.
I will install additional packages not installed by the install script.
apt-get install php5-curl php5-dev php5-gd php5-idn php5-imagick php5-imap php5-json php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-odbc unixodbc unixodbc-dev unixodbc-bin aspell-en imagemagick make g++
When ask "continue installing libc-client without Maidir support?" answer (yes)
Note: I ran into an issue where e-mails were getting stucked in queue. I checked the MX and DNS records all was correct, even tried to send e-mail using telnet to verify the system accepts e-mail for a domain user. The solutions was on a Debian system, Spamassassin when installed using apt-get is set to disabled by default. I had to go into /etc/default/spamassassin to enable it. I also came across an error where the command being fed to procmail wasn't working due to a syntax error, it was written as (/usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME.) There was no space between procmail and -wrapper. After making the correction mail got delivered correctly.
I read off the Virtualmin forum the suggestion to run ClamAV using clamdscan since clamscan consumes a lot of CPU. Go to Virtulamin | Email Messages | Spam and Virus Scanning.
Newer Virtualmin GPL versions will now inform you of new updates when available.
The latest addition now allows you to configure the Virtualmin host based on function be it a web, email, database server using the available CPU and Memory found on the server. It even allows you to skip the auto configuration. Very cool!
The post install will also prompt you to enter the root password for the MySQL database. I prefer to use a different password than the one use by root account of the server.
To help fight spam Virtualmin GPL will even provide a way to install Postgrey.

After you click Install Postgrey Now, the installation will proceed. At the end of the installation script an error comes up "Failed to install" I went ahead and click "Enable Greylisting" anyway since I knew postgrey has already been installed earlier by Virtualmin. Upon clicking this, the process will configure Postfix to use greylisting.
I wanted to make sure that Postgrey is indeed running on port 6000. Checking the mail.log confirms it does.
I also like to make sure the time on my server is synchronized with an atomic clock. Go to Webmin | Hardware | Time server sync tab. Here is a good link to get a list of time server's closest to you. Create a sync schedule.
If you get an error saying ntpdate is not installed. This can be easily remedied.
apt-get install ntpdate
The developers of Virtualmin are constantly releasing improvements or fixes. Download the newest version from here. To install the new version go to Webmin | Webmin Configuration | Install | Choose from uploaded file | click Choose File | browse to where you downloaded the new version | click Install Module.
Browse to location where new version of Virtualmin was downloaded.
Install success.
Done. What are you waiting for go create a virtual site to host using the best free web hosting control panel on the Internet!
Once you start having web sites to hosts it would be a a good idea to have a copy of the backup data created by Virtualmin off site. I use Veeam FastSCP to get this done.
If you find this useful please leave me a comment. I'd like to know if I missed anything so I can improve the guide. Thank you.
References used:
http://www.virtualmin.com/documentation/
http://www200.pair.com/mecham/spam/
http://www.howtoforge.com/perfect_setup_debian_etch
blackhole@aldeguer.us






























COMMENTS: (Abusing this comment form with spam would be the most effective way to have your IP, network or country blocked!)