Wednesday, December 19, 2007

Bug Tracking using Mylyn and Trac

You will need to be using the Eclipse IDE in order to use the Mylyn Plugin.

The mylyn plugin can be found at http://www.eclipse.org/mylyn/.

Follow the installation instructions that are appropriate for your version of Eclipse.

I use 'FastViews' a lot when developing in Eclipse, so after installation of the mylyn plugin I add a new fastview for both 'Task Repositories' and 'Task Lists'.

For those who don't know what a fastview is it is a button on a toolbar normally on the side or bottom of the eclipse window which enables a pop up to be displayed.

Once you have your fast views working then open the 'Task Repository' fastview and right click and create a new repository. You will then need to paste the url of your Trac Installation. In my case this looks something like https://www.***.com/trac/***/nameofproject. Then enter your username and password should your Trac Installation require this. Then click validate settings.

To Create a Task
So how do you get your tasks to appear in the task list? You should now be able to now go to your fastview called 'Task List' just type an asterisk into the 'find' text box in the task list and hit enter.

To Add a Task
You should now be able to now go to your fastview called 'Task List' and right click and create a new task and select the repository you want your task stored in.

NOTE:If you find that your task opens up in a Trac webpage it is likely your Trac Installation does not have the XML-RPC plugin which is required for the Mylyn to use its internal Bug Frontend. You should be able to install the plugin to your Trac Installation easy enough and once you have done this, go back to the fastview titled 'Task Repositories' select you repository and under additional settings select XML-RPC as the access type. When you add a Task now you should be using the Mylyn bug Reporting Tools rather than the webpage.


Happy Bug Tracking.

Amazon S3 useful commands with S3Sync

If you are using Amazon's S3 service for Simple Storage (offsite backups) in conjunction with the S3Sync Project then there are some simple commands that may be of benefit to you

From the command line browse to the directory that hold the file s3cmd.rb

To list all available buckets type
./s3cmd.rb listbuckets


To create a bucket
./s3cmd.rb createbucket BucketName


To list all files within a bucket
./s3cmd.rb list BucketName


To list all files within a key
./s3cmd.rb list BucketName:Key


To drill down into folders in a bucket
./s3cmd.rb list BucketName:Key/folder1/folder2


To copy a directory from a bucket to your local computer
./s3sync.rb -r BucketName:Key/folder/subfolder /somedirectory

Thursday, November 8, 2007

SQLite Browser

I have been looking for a good SQLite Browser and came across this firefox plugin. Makes creating and viewing your SQLite databases straightforward enough

https://addons.mozilla.org/en-US/firefox/addon/5817

Saturday, October 6, 2007

Create a Virtual Server with Apache, VMWare and Blue Dragon

This is a brief guide to creating a VMWare Server that runs Centos Linux, PHP, MySQL, BlueDragon on Apache. It also briefly shows how you can run this so that the files being served in apache are running from a windows machine, which makes it perfect for a testing environment.

To begin

Download Centos5 from ThoughtPolice (www.thoughtpolice.co.uk) and unzip the VMWare image file

Load the file in VMWare Player

Once loaded log in username:root password:thoughtpolice
enter 'yum install apache2' (installs apache)
enter 'yum install mysql-server' (installs mysql server)
enter 'yum install php-mysql' (installs the plug ins for php and mysql'
enter 'system-config-securitylevel' (open port for apache www)

Create and share a windows directory called www and create a user on the windows machine called 'linux' with a password of 'linux'

On the virtual server enter 'mkdir /mnt/www' (creates a directory which you will mount the windows share on)

Then enter 'vi /etc/fstab' and add the line at the bottom of the file by pressing '*' then 'a' and adding //192.168.79.1/www /mnt/www rw,user=linux,password=linux 0 0 (the ip address at the front of this line is the ipaddress of the windows computer)

after this enter 'mount /mnt/www' this should mount successfully, if not you may want to check any firewall settings on the windows machine to make sure it will allow access from the ip address of the vmware server. You can check the ip address on a linux computer by entering (ifconfig)

Download the BlueDragon Script from www.newatlanta.com

Copy in the BlueDragon script to install into the windows shared directory you created
browse to the directory you created earlier on the linux machine 'cd /mnt/www' then copy the Blue Dragon script onto the Linux Machine 'cp bluedragonscript /home' make sure the blue dragon script has execute rights 'chmod +x bluedragonscriptname'

Browse to the home directory 'cd /home' and run the script 'sh bluedragonscript'

Accept all the defaults and make sure you select Apache as the option of webserver

Automatic Startup of BlueDragon 'ln -s /etc/rc.d/init.d/BlueDragon_Server /etc/rc.d/rc3.d/K95bluedragon' and 'ln -s /etc/rc.d/init.d/BlueDragon_Server /etc/rc.d/rc3.d/S95bluedragon'

Create a directory for apache conf files 'mkdir /mnt/www/conf' this is where we will hold .conf files for virtual hosting

Give apache access to your folder 'chgrp -R apache /mnt/www'

Start mysql /etc/init.d/mysqld restart

Set a password for mysql '/usr/bin/mysqladmin -u root password 'password'

Make sure mysql starts on bootup 'chkconfig mysqld on'

Make sure apache starts on bootup 'chkconfig httpd on'

Make sure you download the mysql jar odbc connector file from the mysql website. This needs to be copied into the bluedragon lib directory (/usr/local/NewAtlanata/BlueDragon_Server_70/lib) (make sure the correct permissions exist for this file), you can download it into the windows directory and copy it across from the virtual server.

Download phpMyAdmin from http://www.phpmyadmin.net/home_page/downloads.php copy it across into the directory /var/www/html on the virtual server. Then rename the folder to phpMyAdmin.

Should then be able to browse to this at http://ipaddressofvmaware/phpMyAdmin

The username should be root and the password as password as we set above.

Tuesday, August 28, 2007

Guide : Mount a linux directory from windows

From windows right click on the folder you want to share with your VMWare Web Server and share this as 'www' you will want to create a user and password within windows, I normally run with the username as 'linux' and password as 'linux'

NOTE: NTFS drives are only read only when mounted from Linux, alternatively create a FAT partition and use this so that you can write files to your windows machine from Linux.

Open up your fstab file in linux

'vi /etc/fstab'

then press '*' then 'a' to start editing

add a line at the bottom as follows

share a directory including a username and password for the user

//192.168.79.1/www /mnt/www cifs rw,user=linux,password=linux 0 0

Guide : Change hosts file in windows

Browse to

c:/windows/system32/drivers/etc


open in notepad/wordpad

hosts


add under 127.0.0.1 localhost

ipaddressofvmwareserver webserver(or name of development domain)


reboot windows for changes to take affect

Tuesday, August 21, 2007

T3G Sierra 580 Wireless Card connecting with Ubuntu 7.04

This guide is for users of Ubuntu Feisty Fawn 7.04 on the Telecom New Zealand network

first plug in your Sierra Wireless 580 T3G Data Card
then install kppp
sudo apt-get install kppp

then start kppp
kppp

click on configure and add a new account call it 'telecom', add the phone number as '#777' and the authentication as 'PAP'.

Then add a new modem call it 'telecom' and select '/dev/tty/USB0'.
You are now ready to connect the username is 'mobile@jamamobile' (same for all users) and the password is 'telecom'(same for all users) and click on connect

Saturday, August 18, 2007

Connect to a remote NFS Server

Enter the following commands on the server you want to share
sudo gedit /etc/exports

Then enter the following replacing the ipaddress I have below with your own, you can remove the last digits of your ipadress an replace with a 0 for anyone to access from that ip range
/pathtoshare 172.16.197.0/255.255.255.0(ro,sync)

Reload the Exports File
sudo exportfs -r

On the client machine set up a directory up to mount to
sudo mkdir /mnt/www

Then edit your fstab file
sudo gedit /etc/fstab

and add
172.16.197.1:/pathtoshareremote /pathtosharelocal nfs rsize=8192,wsize=8192,timeo=14,intr

Friday, August 17, 2007

Guide : Installing Skype on Ubuntu Feisty

sudo gedit /etc/apt/sources.list

add the following line
deb http://download.skype.com/linux/repos/debian/ stable non-free

sudo apt-get update

sudo apt-get install skype

Guide : Install VMWare Server on Ubuntu Feisty

sudo gedit /etc/apt/sources.list

add the line

deb http://archive.canonical.com/ubuntu feisty-commercial main

sudo apt-get update

sudo apt-get install vmware-server vmware-tools-kernel-modules

Wednesday, August 8, 2007

Guide : Ubuntu and Backing up to Amazon S3

I have been looking for a good method to back up to Amazon's S3 service. I have used the 'S3 Firefox Organizer' although this seems a bit cumbersome at times and does not give much feedback.

I have since installed s3sync

you need to have ruby installed as well as openssl-ruby, so using aptget I installed these

sudo apt-get install ruby

sudo apt-get install libopenssl-ruby


Extract s3sync somewhere on your computer and then create a file in this directory called s3config.yml and put your key and secret key that you have obtained from Amazon in this file, there is an example file in the directory to help out here.

You will need to create a bucket (somewhere to save your files) on your AmazonS3 Service so browse to the newly extracted folder and run the commands below to list the buckets in your account and also create a bucket

s3cmd.rb listbuckets

s3cmd.rb createbucket BucketName


You can then backup to AmazonS3 service with a command such as

s3sync.rb -r directory bucketname:nameofbackup


There are some other useful commands which can be obtained in the readme files.

Wednesday, August 1, 2007

Guide : Starting Eclipse using a different Java Version

The following shortcuts are on Ubuntu Feisty

Create a shortcut with the path as follows

/usr/bin/eclipse -vm /usr/lib/jvm/java-6-sun-1.6.0.00/jre/bin/java


or in the eclipse.ini file add the following

-vm
/usr/lib/jvm/java-6-sun-1.6.0.00/jre/bin/java

Saturday, July 28, 2007

Guide : VMWare Share Folders with Windows from Ubuntu

Make sure Samba is installed on Ubuntu
sudo apt-get install samba

Create a new Samba User
sudo smbpasswd -a USERNAME

Then edit the samba configuration file
sudo gedit /etc/samba/smb.conf

Then add the following to the bottom of the file

security = user
[NAMEOFSHARE]
path = DIRECTORYPATH
valid users =USERNAMEAS ABOVE
read only = No
create mask = 0777
directory mask = 0777

Then restart Samba
sudo /etc/init.d/samba restart

Then you need to configure the network connection of the VMWare instance, so edit the settings of the VMWare instance, I had the Ethernet Connection set as NAT.

It is then just a matter of starting windows, open 'My Network' and then the 'Entire Network' and you should see the share available for use.

Wednesday, July 25, 2007

Guide : MySQL Importing and Exporting

Importing a SQL File from the command line
mysql -u USER -p DBNAME < FILENAME.sql

Exporting a SQL File from the command line
mysql -u USER -p DBNAME > FILENAME.sql