Ubuntu Web Server from scratch, free web hosting (LAMP, FTP, Webmin, PHPMyAdmin, SSH)
This tutorial is about installing Web server on Ubuntu server 12.04 on a Virtual machine.
Getting and installing Ubuntu 12.04 Server (would be a command line):
Step 1: Go to http://www.ubuntu.com/download
Step 2: Download Server 12.04 LTS (32 bit or 64 bit)
Step 3: Install this on Virtual box or VMware. (See how to install OS image as Virtual Machine)
Browse to the location where you have saved your ios image. Then click NEXT.
Step 4: Go to virtual machine Network setting and choose BRIDGE ADAPTER to have internet access.
Start the virtual machine and choose the needed settings for your Ubuntu server.
Language and Keyboard settings. Give in Hostname, Password and other details.
Step 5: Choose the needed server configuration to be configured when installing the server.
Give in the MYSQL root user password, and then continue.
Once the installation is complete the machine will reboot.
LAMP stands for Linux, Apache, MySql and PHP. Linux is the operating system, Apache is the webserver , MySql holds the database system and PHP has lots of nice features for writing codes that can change the execute of server like login forms etc.
Once the Server is booted up it would prompt for user name and password.
A detailed step by step installation of Ubuntu server can be found in the below link (for starters)
Test the Ubuntu LAMP server:
Open up the browser of a local machine and type in the IP address of the machine.
Testing Open SSH Server:
This can be accessed with the help of an application called “Putty”
(Download it from : http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html )
Give in you server IP address and the hit Open.
You can hit enter notifying that you trust the connection.
Now we are in SSH at port 22.
WEBMIN allows in accessing our server remotely and it gives us a GUI interface to effectively interact with the server.
Step 1: Installing additional packages.
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
Step 2: You need to download webmin deb package using the following command
Step 3: Install downloaded package using the following command
sudo dpkg -i webmin_1.580_all.deb
This will install webmin now you need to access https://ubuntu-serverip:10000
Ubuntu in particular don’t allow logins by the root user by default. However, the user created at system installation time can use sudo to switch to root. Webmin will allow any user who has this sudo capability to login with full root privileges.
Once you logged in you should see similar to the following screen
The File manager feature helps in access the file structure of the hard drive.
In the folder /var /www/ index.html
You can edit the file with edit button on the top.
The webmin enables us to effectively control the server with GUI interface.
PHPmyadmin: Thishelps us to control the MySql database with a GUI interface.
sudo apt-get install phpmyadmin
Hit OK to continue.
Step 2: Acces phpmyadmin
Now you need to access 192.168.0.108/phpmyadmin
Enter username and password.
Installing proFTPD using webmin:
On the webmin control panel ,
You need to choose the Un-used Modules à ProFTPD module
Click on the link ro install proFTPD
The above is the ProFTPD server interface, Click on the Default server link to mak it a default FTP server
Thus the FTP server is setup and we can login to it. We can use FileZilla FTP client to login to the server.
This is how we configure a Ububtu 12.04 server for web service.