Wednesday, 19 September 2012

Installing Request Tracker in Ubuntu Lucid (10.04)

Request tracker is free web and email-based bug tracking and trouble ticketing system. This is quick guide to installing it.


Before you start it's a good idea to have a few things in place, like the database engine, the mail transfer agent, and the web server. Or, in plain speak, MySQL, Postfix, and Apache.

Note: I've chosen to use only software available in the repositories. That way, everyone is starting on the same page. 

Get up to date. This is useful to install security patches, and updates to your current system.

sudo apt-get update
sudo apt-get upgrade

Install the database mysql, with the perl interface

sudo apt-get install mysql-server libdbd-mysql-perl

Set a root password – make a note of this!
Install Mail Transfer Agent

sudo apt-get install postfix

Choose "Internet Site" in the install dialogue
Install these packages rt3.8-apache2 and rt3.8-db-mysql 

sudo apt-get install rt3.8-apache2 rt3.8-db-mysql request-tracker3.8 rt3.8-clients

Select to allow dbconfig auto thingy to manage your database
Enter your database password when requested
Backup the file default under sites-available 

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.bak

Edit the file default under sites-available 

sudo nano /etc/apache2/sites-available/default

Scroll to the bottom of the file, and add the following just before </VirtualHost> 

Include /etc/request-tracker3.8/apache2-modperl2.conf
RedirectMatch ^/$ /rt
</VirtualHost>

Add the module to apache, and restart 

sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

Now you are ready to logon
Go to 'http://yourdomain.co.uk/rt' using

User: root
Password: password

Please note, that your not ready for production yet, that is just a bare bones installation. I recommend that you kick the tyres before you go live!

Please feel free to leave any comments and suggestions - Thanks

Tuesday, 5 April 2011

The world still turns

A few things have changed in the past few months - Most of my open source projects that I wished to entertain in my previous job - (I got a new job by the way, mo' money mo' servers!) - had been stonewalled  snow balled or super expensive proprietary methods employed instead. Well, I've moved on - and I wish to get back on track! I'll be merging all my blogs into one - The Solo System Admin

(note to self, make the link above work)

I guess the next thing to do, will be to relaunch - So I guess I'll be off work on that. Feel free to subscribe, and I crave your comments!

Thursday, 13 January 2011

Bacula - Building from source

I like Bacula! - I'm no expert, but I am trying to become one. I'm getting my head around how this project works, and this blog entry will help me, and others.

Just to note, I am running CentOS 5.5 64 bit edition, and 32 bit edition

It's pretty neat when you think about it. It does what it says on the tin. Once configured, Bacula goes about backing up all your data without you noticing. Nice.

The first hurdle is compiling it. This is my experience, (well, one of them) - (Disclaimer: I must make it clear, that I read through a number of sites, and have just put down my notes in this guide that I took from those sites, as well as my own knowledge.

I have to compile my own RPMS so that I can have the latest code, and because I'm running CentOS, which doesn't have 5.0.3

So, first start by installing all the prerequisites:

# sudo yum install mysql-devel rpm-build libX11-devel libXext-devel GConf2-devel freetype-devel libtermcap-devel shadow-utils gcc gcc-c++ make autoconf glibc glibc-devel ncurses ncurses-devel perl  readline-devel libstdc++-devel zlib-devel openssl-devel libacl-devel pkgconfig tcp_wrappers openssl-devel fontconfig-devel libpng-devel openssl fontconfig libgcc libpng libstdc++ zli

Now you should have no problems later on. You need a build environment. I usually create a user called "builder" on the target machine.

# sudo useradd builder
# su builder

And now I can build packages in a safe environment, as a non privileged user. Mr Builder, needs to have a build environment.

# echo "%_topdir /home/${USER}/redhat/" > ~/.rpmmacros
# mkdir -p ~/redhat/{BUILD,RPMS/{i386,i686,noarch},SOURCES,SPECS,SRPMS}

And voila - build environment. Now, at this point, you are ready to build, but to build we need sources. The sources can be found on sourceforge. At the time of writing this was the latests source could be found http://sourceforge.net/projects/bacula/files/rpms/5.0.3/ From here, you need to download

# cd /tmp
# wget http://sourceforge.net/projects/bacula/files/rpms/5.0.3/bacula-5.0.3-1.src.rpm/download
# wget http://sourceforge.net/projects/bacula/files/rpms/5.0.3/bacula-bat-5.0.3-2.src.rpm/download
# wget http://sourceforge.net/projects/bacula/files/rpms/5.0.3/bacula-docs-5.0.3-1.src.rpm/download
# wget http://sourceforge.net/projects/bacula/files/rpms/5.0.3/bacula-mtx-5.0.3-1.src.rpm/download

Now we can begin:

# rpmbuild --rebuild --define "_vendor redhat" --define "build_mysql 1" --define "build_centos5 1" ./bacula-5.0.3-1.src.rpm

# rpmbuild --rebuild --define "_vendor redhat" --define "build_mysql 1" --define "build_centos5 1" ./bacula-bat-5.0.3-2.src.rpm

# pmbuild --rebuild --define "_vendor redhat" --define "build_mysql 1" --define "build_centos5 1" ./bacula-docs-5.0.3-1.src.rpm

# rpmbuild --rebuild --define "_vendor redhat" --define "build_mysql 1" --define "build_centos5 1" ./bacula-mtx-5.0.3-1.src.rpm


This will create the RPMS, in the following directory,

/home/builder/redhat/RPMS/

which has seperate folders for x86_64 i386, and i686, pick the right one for your system, (I built on a x86_64 system, so I found the RPMS there). I'm 70% sure that there is a way to compile for all architectures at the same time, or at least on the same machine, I'm looking into that, and I'll update in due course.

Well, feel free to comment, and point out my mistakes and I'll update :)

Sunday, 9 January 2011

Smooth Sailing with CentOS

My brand new server arrived in the office 2 weeks ago, along with my new hard drives, 4 1.5TB disks, ready to go into a RAID 10 configuration. I had a few problems getting CentOS installed onto the box, the PERC H200 controller needed to have it's firmware updated, which meant having to install windows 2003 just to run the utilities, (because someone at the dell factory... forgot!)

It didn't take long to install windows, (I have acronis enterprise edition, took about 15 minutes) and update the firmware, and install CentOS. So far so good!

I install CentOS with no extra packages, and try and be as bare bones as possible, just as a general rule.

I run a combination of windows and linux desktops for personal use in and around the office, and I use SSH across all platforms. One windows, I use a client called Tunnilier, it's fast and has support for port forwarding, x-11 forwarding, using keys for SSH login, sftp built in, it's pretty neat. I would advise all linux fanatics who find themselves having to live on windows, to get this client!

As I do with all new installs of CentOS,
yum install -y && reboot
A bit risky, I know, but if it breaks now before it enters testing, then I find that much better, than breaking in production. All the packages update, and I install my favorite combo for virtualisation and managing that virtualisation
yum install xen virt-manager xauth -y
I would not generally advise people to use the -y switch when it comes to installing stuff, unless your very sure you know what packages are coming your way. Basically, for me, I've done this install a good few times, but every sys admin should take their own advice!

These are my my first blog posts, so if they are not complete, or if I should edit them, feel free to comment.

Friday, 7 January 2011

Day One!

Not sure what to call this, so I called it Day One. It's not really day one, been in this position for a long time, but it's day one for this blog.

Currently, I have a whole bunch of servers up and running doing the following:

3 Domain Controllers, 2 DNS servers , 3 Exchange Servers, a PPTP Server, a File Server, an Application Server and a Terminal Server.

These guys are all currently hosted over a mixture of five virtualisation servers, running either XEN, on Centos, or VMware ESX Servers.

While this is a pretty sweet setup - I've decided to 'rotate' my servers. During the installation and setup of this site, it was pretty adhoc. Applications installed and removed, systems configured with more resources than needed. I want to clean up the domain, to make it as efficient as possible.

I've got hold of a new machine - Which will serve as the starting point to allow me install my 'perfect' network. This is just my opinion, and I would welcome input along the way. (If anyone reads this!)

So, my first decision -
What will be the base for my new server?
I pick Centos, so that I can use xen to host the new machines of the domain. Reason? I've been using it for years, and I know it, and I can get it up and running pretty quickly. Feel free to comment if you feel otherwise :)

Well, I got to get cracking, so I'll see you on the other side.