Install Webmin
To install webmin in Ubuntu 12.04 using the AWS EC2 Free Tier, you need to open the terminal and add the following repository:
1- Edit /etc/apt/sources.list file
root@ubuntu:~# sudo nano /etc/apt/sources.list
2- Add the following lines
deb http://download.webmin.com/download/repository sarge contrib deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
Save and exit the file
3- Now you need to import GPG key
root@ubuntu:~# sudo wget http://www.webmin.com/jcameron-key.asc
root@ubuntu:~# sudo apt-key add jcameron-key.asc
4- Update the source list
root@ubuntu:~# sudo apt-get update
5- Now install webmin
root@ubuntu:~# sudo apt-get install webmin
Now the server can be administered using any login with sudo privileges at https://amazon-elastic-ip:10000. Remember to use https instead of http and to hit port 10000. If you are running the server locally, you are done. However, if you are setting this up on an Amazon EC2 instance, you still have another step.
If setting up an EC2 instance, the root does not have a login. When connecting to the instance via Putty or Amazon’s SSH Java command line client, authentication is accomplished using an authorization file. This means there are no user logins with sudo privileges on the server with a password.
Now you MUST change the ROOT password for Webmin with the included perl script in order to be able to login:
root@ubuntu:~# sudo /usr/share/webmin/changepass.pl /etc/webmin root NEW-PASSWORD-HERE
-----------------------------
Install Virtualmin
Virtualmin module in Debian Package format (for Debian and Ubuntu Linux) :
root@ubuntu:~# sudo wget http://download.webmin.com/download/virtualmin/webmin-virtual-server_4.00.gpl_all.deb
root@ubuntu:~# sudo dpkg -i webmin-virtual-server_4.00.gpl_all.deb
-----------------------------
Configure Virtualmin
Virtualmin is now installed but needs to be configured. First we need to install apache2-suexec-custom. You need this so virtualmin can change apache's default directory to /home
root@ubuntu:~# sudo apt-get install apache2-suexec-custom
root@ubuntu:~# cd /etc/apache2/suexec
root@ubuntu:~# sudo /etc/apache2/suexec# nano www-data
replace the line "/var/www" with "/home" (without "" ). hit control-x then y then enter
root@ubuntu: sudo /etc/apache2/suexec# apache2ctl restart
Now to access webmin open your browser and enter:
https://amazon-elastic-ip:10000/
Next we need to set the MySQL root password in webmin. if you click on Servers > MySQL Database Server on the left hand side and enter 'root' for the login and your mysql password.
Remember this is not your linux password, it's your mysql password that you set when installing LAMP.
Next we need to turn on some apache modules. Goto to Servers > Apache Webserver. You will see a 3 tabs click on 'Global configuration' and then lastly click on 'Configure Apache Module'. Now you are going to want to make sure you check 'actions', 'suexec', and 'rewrite' and click 'Enable Selected Modules'.
Now you are ready to Create a New Virtual Server to host your website!
------------
4 comments:
You're a lifesaver, thanks for the info. Saved me a lot of time!
Webmin on AWS instance, fantastic. Great tip, thank you.
Thank you, in the /etc/apt/sources.list file I used this,
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
still unable to access webmin https://aws_e_ip:10000/
Post a Comment