Main Content

Upgrading our training systems to all the current stable versions

Archive - Originally posted on "The Horse's Mouth" - 2014-04-07 20:20:03 - Graham Ellis

Programming languages are the eye of the storm in software development - the calm in the midst of the gales, an area where changes are gradual and gentle. It really needs to be that way, for who wants to pay for development of code when it's going to have a short shelf life?

And so developers write code that's leading edge code and algorithms, but with languages that are merely modern rather than leading edge or bleeding edge. Code needs to work rather than be too clever to work. So I find myself only difting of late into Python 3 courses and still doing a lot of Python 2, and Perl 6 still sits on the horizon.

But operating systems march on, and the version we've been running on our laptops has been getting long in the tooth, grey in the hair, and has started to have bad breath. Still a fine operting system, but it's embarrassing when it tells your delegates it's rather out of date. So I'm taking the opportunity of few days clear of customer facing work to upgrade the underlying Linux release to the most recent "Long Term Support" version on our training systems, and install recent versions of the laguages and servers we teach on them too. A useful exercise, and I'm logging it here so that I can refer back to procedures later and clarify versions and options used for our delegates. But the log will be in a summary form - you'll be able to follow it if you've been through our Linux training ;-) ... or very likely if you've not as well.

Release is Ubuntu 12.04.2, install from USB stick (from Pen Drive)
Other software to be added - Rails, CodeIgniter, Django

 0. Set up distribution on pen drive
   http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/
   http://www.pendrivelinux.com/creating-an-ubuntu-live-usb-from-cd/
 
 1. Backup old trainee account
 
 2. Install from pen drive ...
   SD4 for main OS
   Main disc for boot
   final slice for swap
   no network
   account Graham Ellis / Trainee / abc123
 
 3. Enable networking
 
 4. Install langauges (perl 5.14.2
 and python 2.7.3 and gcc 4.6.3 already present)
   sudo apt-get install lua5.2
   sudo apt-get install ruby1.9.1
   sudo apt-get install php5-cli
   sudo apt-get install python3-mimimal
   sudo apt-get install tk8.5
   sudo apt-get install expect
   sudo apt-get install rakudo
   sudo apt-get install openjdk-7-jdk
 
 5. Install a default set of servers
   sudo apt-get install apache2-mpm-prefork
   sudo apt-get install mysql-server-core-5.5
   sudo apt-get install mysql-client-core-5.5
   sudo apt-get install openssh-server
 for PHP build ...
   sudo apt-get install libxml2-dev
   
 6. Download
   httpd-2.2.27.tar.gz
   httpd-2.4.9.tar.gz
   php-5.5.11.tar.gz
   apache-tomcat-8.0.5.tar.gz
   apache-tomcat-7.0.53.tar.gz
 and from www.wellho.net
   latmjdemo.war
   data.xyz.tgz
   trainee.tgz
 (All these in downloads.tgz on the pen drive)
 
 7. Set up root account ((and test)) and add a reference local directory
   sudo passwd root
   su -
   mkdir /usr/ref
   exit
 
 8. Test base installs / set up a reference set
   cd
   mkdir ref
   cd ref
 
 8a) - httpd
   tar xzf ../Downoads/httpd-2.2.27.tar.gz
   cd httpd-2.2.27
   ./configure --prefix=/usr/ref/apache2 --enable-rewrite --enable-so --enable-proxy --enable-proxy-http --enable-proxy-balancer --enable-proxy-ajp --enable-dav --enable-info
   make
 as root
   make install
   cd /usr/ref/apache2/conf and change to port 81
   cd ../bin
   ./apachectl start
 from a browser
   visit localhost:81
 and when tested, as root
   ./apachectl stop
 
 8b) - php
   tar xzf ../Downloads/php-5.5.11.tar.gz
   cd php-5.5.11
   ./configure --prefix=/usr/ref --with-apxs2=/usr/ref/apache2/bin/apxs --with-mysql --with-mysqli
   make
 as root
   make install
   cp /home/trainee/ref/php-5.5.11/php.ini-development /usr/ref/lib/php.ini
 check that httpd config file contains
   LoadModule php5_module modules/libphp5.so
 and that it maps php files
   <FilesMatch "\.php[0-9]?$">
   SetHandler application/x-httpd-php
   </FilesMatch>
 
 At /usr/ref/apache2/htdocs/test.php add
   <?php phpinf0(); ?>
 
   cd /usr/ref/apache2/bin
   ./apachectl start
 from a browser
   visit localhost:81/test.php
 and when tested, as root
   ./apachectl stop
 
 8c) Tomcat
 as root
   cd /usr/ref
   tar xzf ~trainee/Downloads/apache-tomcat-7.0.53.tar.gz
   ln -s apache-tomcat-7.0.53/ tomcat
   cd tomcat
   ./bin/startup.sh
 from a browser
   visit localost:8080


Guadalajara completed today ... Albany, Caerphilly, Edinburgh, Frankfurt, Helsinki and Manticore to be completed tomorrow. Dharhan has disc drive issues; Brugges a cracked screen (and I will probably leave it as a "control" system. Izmir and Juneau (our old internal staff systems - smart blue covers rather than smart yellow ones) may also be brought into the fold, and we have a spare system to install too; I'll probably rename Manticore into the "places I have trained" series - poetic license and I'll call in Kintbury, which is near enough to Newbury and the final machine need to start with an "L" - it's going to have to be called "Liverpool"!