Ubuntu 12.04 Desktop as Ubuntu 12.04 Server With GUI has the advantage of using your Ubuntu Laptop or desktop to use it as Web Server, Accessing Remotely. There are differences between Ubuntu 12.04 Desktop and Server Edition, just like we pointed in a generalized article. Apart from installing web softwares like WordPress easily to test on your laptop or desktop, you can use it for the purpose of Private Cloud, it is becoming Bare Metal in that case; you can actually run a real Web Server to serve webpages or access your Ubuntu 12.04 Desktop as Ubuntu 12.04 Server With GUI as like we did the basically reverse process on a Ubuntu 12.04 Server. A bit knowledge of UNIX is needed for using Ubuntu 12.04 Desktop as Ubuntu 12.04 Server as basically few software packages, tweaking the system rightly can serve your dual purpose of using Ubuntu 12.04 Desktop as Ubuntu 12.04 Server With GUI.
Ubuntu 12.04 Desktop as Ubuntu 12.04 Server With GUI : Preface
The easiest way would be to use a fresh Ubuntu 12.04 Server Edition on your computer and configure it to use as desktop locally. But that is really not practical for the most as no one virtually will use as a serious server. This way to use Ubuntu 12.04 Desktop as Ubuntu 12.04 Server is also important to the new Ubuntu users who has upgraded their computer from Windows Operating System.
Ubuntu 12.04 Desktop as Ubuntu 12.04 Server With GUI : Steps
Before you are going to use your Ubuntu 12.04 Desktop as Ubuntu 12.04 Server, take a backup of all files and folders. This is important in case you make a mess. If you are really new, get a printout of this webpage to start working with Ubuntu 12.04 Desktop as Ubuntu 12.04 Server.
Our target for this guide for Ubuntu 12.04 Desktop as Ubuntu 12.04 Server with GUI are :
- Making your Desktop or Laptop an OpenSSH server so that you can connect from anywhere in this World through HTTP or SSH.
- Making the computer more secure by passwords, firewall etc.
- Installing basic LAMP stack. LAMP is Linux, Apache, PHP, MySQL.
- Basically we are not removing ubuntu-desktop.
Warning : Do not try to emulate this process of converting normally used Windows 7, Windows XP based desktop or Laptop with WAMP plus Cygwin. You will be hacked within few days because of file cross platform mismatched permissions.
You can check the official tech specs of a Server version :
Let us get started. First open the terminal by going to Applications > Accessories > Terminal and type :
sudo apt-get update
Then either manually open the sources.list file located at /etc/apt/sources.list or edit inside your console. The screenshot is of a remote server’s sources.lit file, but basic thing is, uncomment (remove the # and space) some lines to make them active and save the file :
Again do an update :
sudo apt-get update
And normally restart you computer. Run this :
sudo apt-get install linux-headers-server linux-image-server linux-server
Install Apache :
sudo apt-get install apache2
And other components :
sudo apt-get install php5 libapache2-mod-php5
And other MySQL components :
sudo apt-get install httpd php mysql mysql-server php-mysql
Restart Apache :
sudo /etc/init.d/apache2 restart
Create a test file to test :
sudo gedit /var/www/foo.php
gedit will open and add this code :
<?php phpinfo(); ?>
Now bind the local IP :
gksudo gedit /etc/mysql/my.cnf
Add this line or edit :
bind-address = 127.0.0.1
Setup MySQL and PHP (one by one) :
mysql -u root
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('changthistopassword');
Now, install :
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
Edit this file :
gksudo gedit /etc/php5/apache2/php.ini
Find this like and remove the semi colon :
Restart Apache again :
sudo /etc/init.d/apache2 restart
Normally, if everything is right, if you open your browser to point towards :
It should open an bluish colored informative table. Now install OpenSSH :
sudo apt-get install openssh-server
Setting up SSH is a big chapter, please see this guide :
Start ssh :
Ubuntu 12.04 Desktop as Ubuntu 12.04 Server With GUI : Specific Setup
The first important point is, you do not have an IP that you can actually access through internet. You can use your other computer or a Tablet PC to test for next steps.
Package Manager controls the entry or restriction to outside world. You basically need a VPN or if you have a router you can configure the IP address. That will expose the www folder to public. And with SSH you can login to your Ubuntu desktop. Now, it becomes up to you how you will configure and use your Ubuntu. If you want to use it as VNC Remote Desktop, follow the later part of this guide. If you want to install WordPress, follow this guide from the sub header ‘The actual command steps to install WordPress on Rackspace Cloud Server‘.
Usually there is no need to use a DNS and Domain Name. Use OpenDNS and BIND the IP to assign your computer’s location properly. With DNS you can actually use any domain name you want to configure.
In case server Edition, you will get a primitive GUI to install, you have to install desktop to work in that case. Basic is the same and basically not so difficult that no one can do. Error might arrive like with gnome, do a search to fix it.
Follow the Author of this article :