Install necessary software

Categories: Ubuntu; Tags: dash, bash, aliases;

In order to configure your network adapter with the static ip provided, you have to modify the following file:

vi /etc/network/interfaces

And add/modify the following lines:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
        address YOUR.EXTENAL.IP.ADDRESS
        netmask 255.255.255.0
        gateway YOUR.GATEWAY

Setup you host name:

vi /etc/hosts

Sould contain:

127.0.0.1 localhost 
YOUR.EXTERNAL.IP.ADDRESS   subdomain.yourdomain.com   subdomain

Setup the hostname:

echo "subdomain" > /etc/hostname
hostname -F /etc/hostname

Reconfigure Dash:

dpkg-reconfigure dash

When asked to "Install dash as /bin/sh?", answer No. Add the following line to your .bashrc. I added it to both the root and the jdoe user.

vi ~/.bashrc
export PS1='\[\033[0;35m\]\h\[\033[0;33m\] \w\[\033[00m\]: '

Also you can add the following aliases in order to speed things up:

alias free="free -m"
alias update="sudo aptitude update"
alias install="sudo aptitude install"
alias upgrade="sudo aptitude safe-upgrade"
alias remove="sudo aptitude remove"

Make the changes permanent with:

source ~/.bashrc

I repeat, the conficuration above is for the root user. You can copy the file to whatever user you have:

cp ~/.bashrc /home/jdoe/

The next step is to install updates. Make sure that all your lines for universe repositories are uncommented in your /etc/apt/sources.list file After that

apt-get update && apt-get upgrade

Install a few programs:

apt-get -y install vim-nox htop binutils cpp flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl m4 libpcre3 libpcre3-dev libpopt-dev lynx make perl perl-modules openssl unzip zip autoconf gnu-standards automake libtool bison build-essential zlib1g-dev ntp ntpdate autotools-dev g++ bc subversion psmisc libssl-dev

Also update your sever's time zone:

dpkg-reconfigure tzdata
update-locale

You can now safely reboot your server. You are prepared for the next step.


Books

NginX HTTP Server

The book includes detailed instructions for each of the processes it describes: downloading and installing the application, configuring and using modules, and much more. It provides a step-by-step tutorial to replace your existing web server with Nginx. With commented configuration sections and in-depth module descriptions, you will be able to make the most of the performance potential offered by Nginx.

Source: Packt Publishing

Google AdSense

Affiliates