How to Build an Ubuntu Server (16.04)
You can use other Linux operating systems. The commands will differ but the essence is the same.
Operating System : Ubuntu Server 14.04
How to Build an Ubuntu Middleware Server
Your server infrastructure can be based either on titanium and silicon, or it could be a virtual machine. Your virtual machine can be
- cloud based – like on the Amazon EC2 Cloud
- virtual machine based – using Oracle VirtualBox or VMWare
Below is a good base script for any Ubuntu middleware server.
Middleware Base
The middleware components are based on high quality, robust, open source technologies. If you use paid technology you’ll need to worry about keys for apt-get and other unnecessary complexities. Pay for support and timely updates – don’t pay for software.
- the Apache2 Web Server
- a SSH client and server
- EMACS (the Lucid Version)
- the Open Java (JDK and JRE)
- an Unzip Utility
Refresh Your Apt-Get Cache
You do this to ensure you have the most up to date repository index.
sudo apt-get update
Installation Script
sudo apt-get –assume-yes –quiet install unzip
sudo apt-get –assume-yes –quiet install emacs24-lucid
sudo apt-get –assume-yes –quiet install openssh-client
sudo apt-get –assume-yes –quiet install openssh-server
To Install Java 8 Visit this Page
sudo apt-get –assume-yes –quiet install openjdk-7-jre
sudo apt-get –assume-yes –quiet install openjdk-7-jdk
sudo apt-get –assume-yes –quiet install apache2
How to Talk to Your Server
It is best to use your server’s hostname when communicating with it. If need be – the IP address should work too but DHCP can change it thus creating apparently random failures. If you are using VirtualBox (with the Bridged Adapter setting) you can discover your new server’s IP Address with this command
ifconfig
How to Test Your New Installation
Now to test your installation
- apache2 – navigate with browser to http://<<server-hostname>>/ – to see the Apache2 default page
- ssh – use Putty or MobaXTerm to ssh into your <<server-hostname>> (you need username/password)
- emacs – startup emacs from your client machine
Running in Headless Mode
If running VirtualBox you can run your server in headless mode (in the background). You then just ssh into it.
Do run in headless mode because that is the way to connect to cloud servers. Get the practise in early.