Glen Mazza's Weblog Sunday October 07, 2012

My Ubuntu post-installation tasks

Updated December 2015.

The below lists my post-installation tasks for Ubuntu Linux. Once or twice a year I find myself needing to re-install Ubuntu, so I find maintaining a checklist that I update each time helps me go through the process more quickly. I've found that by keeping a new hard drive separated into three or four partitions (operating system, swap space, applications and data either together or split) --I can minimize the effect of an OS reinstallation, namely that just the OS partition needs to be wiped clean and reinstalled and my other two partitions will be usable as before. (Separating the application and data partitions has the additional benefit in that one may only need to back up the data partition.) Some files in the operating system partition, however, need to be re-configured after a re-install so the application partition can be working again, and I've made notes below where I've found that occurring.

I've found it too clumsy and hard to maintain a dual-boot (Windows and Ubuntu) hard drive, so I keep each on a separate SSD hard drive and swap out Ubuntu for the relatively infrequent times I need Windows. In turn, either SSD drive can be swapped between my faster desktop and slower laptop, so I can work from the former at home and switch to the latter when travelling.

The below files I keep on the data partition in a restoreFiles separate folder, to be re-inserted into the OS partition after an OS reinstall:

  • My .ssh key for GitHub
  • My PGP key for Apache
  • An export of my Thunderbird email filters, created by the Message Filter import/export plugin
  • .sh utility scripts to I use to run applications
  • Konversation IRC configuration files (konversationrc and konversation.notifyrc) located in ~/.kde/share/config.
  • Personal HTML home page containing frequently used links
  • Maven settings.xml file
  • .gitignore_global file and .subversion folder, located in the home folder
  • Within Tomcat, the JDBC drivers, the JavaMail JAR, and TightBlog and JSPWiki properties files in the lib folder and the Tomcat server.xml file.

Post-Ubuntu install Configuration Steps:

  1. Update Ubuntu with the latest from the 'Net: sudo apt-get update && sudo apt-get upgrade or via Software Updater.
  2. Install Skype, make sure it works using the Skype Echo/Sound Test Service
  3. Install HP LaserJet drivers
  4. Using Ubuntu Disks application, check mount point locations of the partitions created:
    • Not at desired mount point location (/work for me)? See here.
    • Not automatically mounted at startup? (check on subsequent boots) See here.
    • Check ownership of non-OS partition: ls -la from / folder, if root:root, change to login account (sudo chown -r gmazza:gmazza work).
  5. Configure Thunderbird:
    1. Add your mail account(s), and once done, pick desired default SMTP server.
    2. If you have mail filters, install the Message Filter Import/Export add-on. Import the previous message filters file and confirm the filters route to the correct mail folders.
    3. If you've saved your local mail files in a non-default location, right-click on Local folders, Settings, and change the directory to that location.
    4. If needed, create the signature lines for your email accounts.
  6. Files from the list at the top that need copying to home folder:
    • .ssh folder
    • .gnupg folder
    • .bashrc folder
    • .subversion folder
    • .gitignore_global file
    • Any custom .sh files used to start applications
  7. Applications that need re-installing:
    • sudo apt-get install git
    • sudo apt-get install subversion
    • sudo apt-get install dolphin
    • sudo apt-get install konversation
    • Reconfigure Konversation IRC client: Start konversation to create the ~/.kde/share/config folder automatically, then move konversationrc and konversation.notifyrc files to that folder
    • Install Google Chrome
  8. Set Firefox, Google Chrome to default home page.
  9. Install GitHub-Dark theme from
  10. gedit changes:
    1. On the Edit->Preferences page, Disable gedit's backup copy option
    2. and set the tab width to 4 spaces, inserting spaces for tabs.
    3. Configure gedit to work well with Dolphin
  11. Create a Terminal profile (File->New Profile) named "HasTitle", based on the default profile. On Title and Command page, "When terminal commands set their own titles" item, set to "Keep initial title". This allows scripts which open multiple terminal tabs to have their tab titles kept.
  12. Switch Dolphin to details view (Menu item View -> Adjust View Properties), and have it always use gedit to open text files (in Dolphin, right-click a text file, "Open With...Other", and then select to always use Gedit.)

Development Application installation:

  1. Install Oracle JDK along with unlimited encryption
  2. Java plugin for Firefox: follow here and here to simlink to the Java version you downloaded, and test via this link.
  3. Install Tomcat (and configure tomcat-users.xml file)-- test it will start with script. Move the TightBlog-specific configuration files over.
  4. Install Maven, replace the $MAVEN_HOME/conf/settings.xml with that from the restoreFiles directory.
  5. Install IntelliJ IDEA
  6. Install Derby
  7. Install SquirrelSQL (need to run java -jar), and in its lib folder add any desired JDBC JARs.
  8. Update the ~/.bashrc file to include paths to the above applications and other desired configuration. Then run source ~/.bashrc for the new values to take effect for the current terminal window. The below is what I add to the end of the default .bashrc file:
    export JAVA_HOME=~/work/jdk1.8.0_65
    export CATALINA_HOME=~/work/apache-tomcat-8.0.30
    export MAVEN_HOME=~/work/apache-maven-3.3.9
    export DERBY_HOME=~/work/db-derby-
    export SQUIRREL_HOME=~/work/squirrel-sql-3.7
    export IDEA_HOME=~/work/idea-IC-143.1184.17
    export JAVA_OPTS="-Xmx2048M"
    export CATALINA_OPTS=" -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n"
    # add common exclude filters to grep
    alias grep='grep --color=auto --exclude-dir={.svn,target,.idea} --exclude='*.iml''
    # for grep, switch from hard-to-read magenta to bright yellow (use fn=33 for dull yellow)
    # see:
    export GREP_COLORS="ms=01;31:mc=01;31:sl=:cx=:fn=01;33:ln=32:bn=32:se=36"
    # (MacOS only) Show current git branch at command-line
    if [ -f $(brew --prefix)/etc/bash_completion ]; then
      . $(brew --prefix)/etc/bash_completion
    export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\]\w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '

Source code download (need write access for these URLs):

  1. Apache CXF: svn co cxf
  2. Tightblog: git clone
  3. Jersey samples converted to CXF: git clone
  4. Blog samples: git clone

Posted by Glen Mazza in Other at 07:00AM Oct 07, 2012 | Comments[0]

Post a Comment:

« April 2023
Sun Mon Tue Wed Thu Fri Sat
About Me
Java Software Engineer
TightBlog project maintainer
Arlington, Virginia USA
glen.mazza at pm dot me
GitHub profile for Glen Mazza at Stack Overflow, Q&A for professional and enthusiast programmers
Blog Search

Blog article index
About Blog
Blog software: TightBlog 3.7.2
Application Server: Tomcat
Database: MySQL
Hosted on: Linode
SSL Certificate: Let's Encrypt
Installation Instructions