Zhixian's Tech Blog

2015-10-23

Setup Ubuntu (Trusty Tahr) for development

Filed under: development, ubuntu — Tags: , , , , — Zhixian @ 11:18:10 am

This blog post is on my setting up another Ubuntu Server VM.
This time I want a VM that has the common software development applications pre-installed.
As such most of the steps are similar to what I did in a previous blog post.
So on this blog post, I will start from the screen where I can select pre-packaged software.

image

Although, I was not really sure I really need the DNS server and print server, I thought “Ah well. Might as well.”
So they are included.

Setup MySql

First thing to setup is to assign a password for MySql server “root” account.
Note: You may have notice that background color have changed from purple to blue.
This was because I typed the wrong confirmation password when setting the password.

image

 

image

Setup E-mail

 

image

 

image

 

image

 

image

2015-10-15

Connecting to OpenSSH server using MobaXterm

Filed under: computing, ubuntu — Tags: , , , , , — Zhixian @ 14:19:10 pm

This blog post covers connecting to the openssh server installed on Ubuntu server using MobaXterm.

Testing OpenSSH

I want to connect to the openssh server.
For this purpose, I use MobaXterm from Mobatek (http://mobaxterm.mobatek.net/).
This is a terminal application with a few other tools built-in.
It has a professional edition which cost money and a home edition that is free.
For our local development purpose, the free edition is fine.

Alternatively, there’s the putty-series (http://www.putty.org/) of applications.

The remainder of this session assumes you are using MobaXterm.

After you start up MobaXterm, you may see a window like the below.
Click on the Session button on the menu.
This will open the Session Settings dialog.

image

On the Session Settings dialog, click on the SSH button on the top menu.

image

Under the Basic SSH settings tab, enter the name of the remote host.
Click the OK button to connect to the server.

image

After you clicked OK, MobaXterm will start your session on a new tab.
You should see your usual login prompt.
You should be able to login to your account as usual.

image

File transfer using SFTP

You can transfer files from your Windows machine to your Ubuntu machine using SFTP (Secure-FTP).
One the tools built-in the MobaXterm client is a SFTP client.
Click on the SFTP tab to display the directory and files in the directory.

image

To transfer files, simple drag and drop the files that you want to transfer in the area showing files in specified directory.

Ubuntu Server Initial Setup

Filed under: computing, ubuntu — Tags: , , , , , — Zhixian @ 13:29:10 pm

After you have installed your Ubuntu server, you may want to do some initial setup.
Specifically, you may want to add a another account.

Adding user account

Adding users can be done using the command adduser. In the below command-line, I am creating a developer account call ‘developer’.

$ sudo adduser developer

image

After you have create the user account, it might be useful to add the account to the ‘sudo’ group so that the account can make use of the ‘sudo’ command. To do so,

$ sudo addgroup developer sudo

image

You can check which groups an account belongs to using the ‘groups’ command:

$ groups developer

image

2015-10-11

Setting up Ubuntu 14.04 Server on VirtualBox

Filed under: computing, ubuntu — Tags: , , , , — Zhixian @ 17:15:10 pm

This is a blog post that describes my setup of Ubuntu Server 14.04 (Trusty Tahr) on VirtualBox.
I intended to use this server for local software development.

Selected Software Package Description
OpenSSH server Needed for remote secure shell sessions
LAMP Linux Apache MySql PHP development stack
PostgreSQL database Best open-source database
Samba file server File sharing
Skipped Software Packages Description
DNS server Don’t really think I need it
Mail server I will describe this in a later blog post
Print server Don’t really think I need it
Tomcat Java Server Not sure if I want to use this;

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

 

image

2015-01-05

Install nunit on Ubuntu

Filed under: computing — Tags: , , — Zhixian @ 23:34:01 pm

To install nunit on Ubuntu, start a terminal session and execute the following command:

sudo apt-get install nunit nunit-console nunit-gui

zhixian@SARA: ~_200

After installation has complete, you can run nunit by executing the following command in the terminal session:

nunit-gui

for the user-friendly graphical interface or alternatively,

nunit-console

for the nunit console.

2015-01-04

How to install xsp4 onto Ubuntu

Filed under: computing — Tags: , , — Zhixian @ 09:14:01 am

I just realise that the mono-complete does not include the xsp4 package.
This package is needed if you intend to debug web applications using MonoDevelop.

sudo apt-get install mono-xsp4

zhixian@SARA: ~_196

After the installation process has complete, you may see a message stating that you have an incomplete debian.webapp.

zhixian@SARA: ~_199

To remedy this, install asp.net-examples by running the below command:

sudo apt-get install asp.net-examples

zhixian@SARA: ~_198

2015-01-03

Installing Postgresql using installer from EnterpriseDB on Ubuntu

Filed under: computing — Tags: , , , , , , , — Zhixian @ 17:23:01 pm

This blog post describes installing Postgresql 9.4 and pgAdmin III 1.20.0 using the installer provided by EnterpriseDB.

Background (Or lessons learnt)

I recently installed a copy of Postgresql on Ubuntu based on instructions from the official web site (http://www.postgresql.org/download/linux/ubuntu/).
Unfortunately, the copy of pgAdmin III (a graphical UI to manage Postgresql databases) is outdated.
The version of Postgresql installed was 9.4 but the version of pgAdmin installed was 1.18.1 which has warnings issued when I connect to the database.

pgAdmin III_168

So I decide to do the next best thing mentioned in the page – use the installer from EnterpriseDB in hopes that they have packaged the latest copy of pgAdmin III.

PostgreSQL: Linux downloads (Ubuntu) - Google Chrome_171

Assumptions

I assumed you know how to start a terminal session and execute commands in it.

Summary of Steps

  1. Download Installer
  2. Making Installer executable
  3. Execute the Installer

Download Installer

Clicking the download link in the previous screen shot will bring me to the EnterpriseDB’s Postgresql install download page (http://www.enterprisedb.com/products-services-training/pgdownload).

Because I’m running the 64-bit version of Ubuntu, I clicked on the “Linux x86-64” button to download the installer.

Download PostgreSQL | EnterpriseDB - Google Chrome_172

After you clicked the button, you will be brought to a thank-you page.
Wait for the download to complete.

Thank you for downloading PostgreSQL! | EnterpriseDB - Google Chrome_173

After the download has complete, your download folder should look like the below.

Downloads_174

Making Installer executable

By default, the downloaded file is not executable by double-clicking it.
Attempts to do so, will result in the below dialog:

Untitled window_175

Click on the No button to close the dialog.

To make the downloaded file executable:

1. Start a terminal session and navigate to folder where you saved the downloaded installer.

zhixian@SARA: ~-Downloads_176

2. Run the following command. Replace the text in bold if necessary if you are not using Ubuntu 64-bit.

chmod +x ./postgresql-9.4.0-1-linux-x64.run

zhixian@SARA: ~-Downloads_177

Execute the installer

Now you can execute the installer. From the terminal session, run the following command start the installation wizard:

sudo ./postgresql-9.4.0-1-linux-x64.run

zhixian@SARA: ~-Downloads_180

You will see the welcome screen of the installation wizard.
Click on Next button to proceed to the next step of the installation wizard.

Setup (as superuser)_181

The installation wizard should prompt you for the location to install Postgresql.
Click on Next button to accept the default and proceed to the next step of the installation wizard.

Setup (as superuser)_182

The installation wizard will now prompt you for the directory to store data for Postgresql.
Click on Next button to accept the default and proceed to the next step of the installation wizard.

Setup (as superuser)_183

The installation wizard will now prompt you for a password to the postgres account.
This account is use for starting Postgresql.
Enter your desired password for this account.
Click on Next button to accept the default and proceed to the next step of the installation wizard.

Setup (as superuser)_184

The installation process will then prompt you for a port number that Postgresql will use to host the database server.
Click on Next button to accept the default and proceed to the next step of the installation wizard.

Note The default port that Postgresql use is 5432. However, this port is all in used by the first instance of Postgresql that I installed previously the installation wizard picked the next available port 5433. I accepted the defaults in the screen shot below planning to uninstall the first instance of Postgres and then reconfigure this instance of Postgresql to use port 5432.

Setup (as superuser)_185

The installation wizard will now prompt you for the locale that your database will use.
Click on Next button to accept the default and proceed to the next step of the installation wizard.

Setup (as superuser)_186

The installation will now declare that it has all the information need to install Postgresql.
Click on Next button to accept the default and proceed with installing Postgresql.

Setup (as superuser)_187

The installation wizard will start to install Postgresql.
Wait for the installation process to complete.

Setup (as superuser)_188

After the installation process has complete, you will see the below screen.
Click on Finish button to exit the installer.

Note If you not need to download and install additional software, uncheck the option to start Stack Builder at exit.

Setup (as superuser)_189

After you exit the installation wizard, you should be able to see the Postgresql that you just installed from the desktop menu.

Workspace 1_195

Note If you do not see the menu item, you may need to re-login or restart your system.

The pgadmin installed should be version 1.20 and should work fine with Postgresql 9.4.

2014-12-31

How to Install Postgresql onto Ubuntu (Trusty Tahr)

Filed under: computing — Tags: , , , , , — Zhixian @ 00:08:12 am

This blog post describes how I install Postgresql 9.4 onto Ubuntu.

You may want to following this blog post, Installing Postgresql using installer from EnterpriseDB on Ubuntu instead.
The below blog post will install latest version of Postgresql at this time of writing (version 9.4).
Unfortunately, the graphical interface tool installed pgAdmin III that is installed with this set of instructions uses an older version of pgAdmin III (version 1.18.1 at this time of writing).
This version does not support Postgresql 9.4.

Summary

  1. Create Repository List File
  2. Import Signing Key
  3. Update apt-get
  4. Install Postgresql
  5. Install Additional Modules

Create Repository List File

Create the repository list file using the following command:

echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list

zhixian@SARA: ~_161

Import Signing Key

Import signing key for Postgresql by running the following command:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

zhixian@SARA: ~_162

Update apt-get

Run the following command to update your apt-get.

sudo apt-get update

zhixian@SARA: ~_163

Install Postgresql

Run the following command:

sudo apt-get install postgresql-9.4

zhixian@SARA: ~_164

Install Additional Modules

The installation above is quite bare-bones. It does not provide a graphical tool or development libraries.
To add them, run the following command:

sudo apt-get install postgresql-contrib-9.4 pgadmin3 libpq-dev postgresql-server-dev-9.4

postgresql-contrib-9.4 – additional supplied modules
libpq-dev – libraries and headers for C language frontend development
postgresql-server-dev-9.4 – libraries and headers for C language backend development
pgadmin3 – pgAdmin III graphical administration utility

zhixian@SARA: ~_165

After installation have complete, you can find the graphical tool under Applications > Programming > pgAdmin III from the desktop menu.

Workspace 1_166

Reference

Linux downloads (Ubuntu) (http://www.postgresql.org/download/linux/ubuntu/)

2014-12-30

How to install MonoDevelop on Ubuntu

Filed under: computing — Tags: , , — Zhixian @ 23:33:12 pm

This blog post describes how I install MonoDevelop onto Ubuntu.

Summary

  1. Add Mono Project Signing Key
  2. Add Package Repository
  3. Install MonoDevelop
  4. Reference

Add Mono Project Signing Key

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

zhixian@SARA: ~_156

Add Package Repository

echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list

zhixian@SARA: ~_157

Install MonoDevelop

sudo apt-get install monodevelop

zhixian@SARA: ~_158

After installation have complete, you should be able to find MonoDevelop under Applications > Programming > MonoDevelop from the desktop menu.

Workspace 1_160

Reference

Install MonoDevelop on Linux (http://www.monodevelop.com/download/linux/)

2014-12-28

How to install Mono on Ubuntu

Filed under: web application development — Tags: , , , , , — Zhixian @ 01:29:12 am

This blog post describes my installation steps to get Mono running on my Ubuntu.

I will write another blog post on testing this installation.

Assumptions

  1. You have Apache HTTP Server installed
  2. You know how to start a terminal session and run commands there.

Summary

  1. Add Mono Project GPG signing key
  2. Add Mono Package Repository
  3. Add mod_mono Repository
  4. Update package cache
  5. Install Mono
  6. Install mod_mono
  7. Enable mod_mono
  8. Reference

Mono Project GPG signing key

This step adds the GPG signing key to your key-ring.
This signing key is used to make sure the installed files are valid.
To add the key to your key ring, start a terminal session and run the following command:

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

zhixian@SARA: ~_120

Add Mono Package Repository

This step add the Mono package repository into apt-get list of available package repositories.
Enter the following command at the command-line of the terminal session:

echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list

zhixian@SARA: ~_121

Add mod_mono Repository

This step adds the repository for mod_mono to apt-get list of available package repositories.
mod_mono is use by Apache HTTP server to interpret .NET web pages.
To add the repository, run the following command at the command-line:

echo “deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main” | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list

zhixian@SARA: ~_124

Update package cache

To update the apt-get package cache to use the repositories that you just added, run the following command at the command-line:

apt-get update

zhixian@SARA: ~_125

Install Mono

To install the complete Mono package enter the following at the command-line:

sudo apt-get install mono-complete

zhixian@SARA: ~_126

After the initial listing of the packages that will be installed, you will be given a prompt asking if you would like to proceed install Mono. Enter “Y” to proceed with the installation process.

zhixian@SARA: ~_127

zhixian@SARA: ~_128

Install mod_mono

Run the following command to add mod_mono:

sudo apt-get install libapache2-mod-mono

zhixian@SARA: ~_129

You might see an error exit status at the end of the installation process.
This is due to some configuration issue in the installation process.
I’m not too sure what exactly is the issue but it seems fine to ignore it.

zhixian@SARA: ~_131

Enable mod_mono

mod_mono is enabled by running the following command:

sudo a2enmod mod_mono

zhixian@SARA: ~_133

Reference

http://www.mono-project.com/docs/getting-started/install/linux/

https://help.ubuntu.com/community/ModMono

Older Posts »

Create a free website or blog at WordPress.com.