Sunday, January 19, 2014

Install Webmin on Ubuntu 13.04 - easy



Install Webmin
Installing the Debian package is simple. First we need to add the official Webmin repository to our list of software packages:
$ sudo nano /etc/apt/sources.list
Add the following line to the bottom of the file:

deb http://download.webmin.com/download/repository sarge contrib
This adds the Webmin Debian repository to your package list. 
Now we need to add Webmin author Jamie Cameron’s public key to our keyring. Do this from your home directory:
$ wget http://www.webmin.com/jcameron-key.asc 

you will get the message like 

2012-04-29 01:34:19 (41.4 MB/s) - `jcameron-key.asc' saved [1320/1320]

 
$ sudo apt-key add ~/jcameron-key.asc 

Now we can install Webmin from the repo we added:
$ sudo apt-get update
Then install Webmin by
$ sudo apt-get install webmin

Press Y to the message an then Webmin will  download and install. Now you can access through port 10000. For example https://103.247.238.198:10000/. Remember if you have fire wall you have to open the port 10000. Mind the safety of you server as well.

 


How to install PostgreSQL 9.2 on Ubuntu 13.04


Installation

The default repository of Ubuntu 13.04 is now not supporting PostgreSQL 9.2 and I got lot of help request, so following is the solution.

To install use the command line and type:

sudo nano /etc/apt/sources.list.d/pgdg.list

Then add the following line.

deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main

Press Ctrl X the y to save and exit.

This will add the PostgreSQL repo for Ubuntu 12.04 into Ubuntu 13.04.

Now Add PGP key by executing:

wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add –

Then run the following apt commands:

sudo apt-get update

sudo apt-get install postgresql-common -t raring

sudo apt-get install postgresql-9.2

Administration
PGAdmin III is a handy GUI for PostgreSQL, it is essential to beginners. But this will not run on server (i.e. Ubuntu Server 13.04 but can run on Ubuntu desktop 13.04). To install it, type at the command line:

sudo apt-get install pgadmin3

You may also use the Synaptic package manager from the System>Administration menu to install these packages.

Basic Server Setup

To start off, we need to change the PostgreSQL postgres user password; we will not be able to access the server otherwise. As the “postgres” Linux user, we will execute the psql command.

In a terminal, type:

sudo -u postgres psql postgres

Set a password for the "postgres" database role using the command:

\password postgres

and give your password when prompted. The password text will be hidden from the console for security purposes.

Type Control+D to exit the posgreSQL prompt.

Create database

To create the first database, which we will call "mydb", simply type:

 sudo -u postgres createdb mydb