RSS

Tag Archive | "sysadmin"

Multiple project Trac set-up

Thursday, January 3, 2008

0 Comments

I’ve already installed Trac and I now want to be able to set-up multiple projects with the minimum of fuss. My requirements are: Not having to mess with the Apache configuration every time I add a new project because I don’t want to have to restart apache Make some simple modifications to the stanadard trac.ini so that, for [...]

Continue reading...

Subversion over ssh

Wednesday, January 2, 2008

0 Comments

My background task over the Christmas holidays was to ensure that I had the ability to give read/write access to a subversion repository situated on a machine within our corporate network so that staff or external contractors can access it via the interweb but without me needing to open up additional ports on our firewall. The [...]

Continue reading...

MySQL replication

Sunday, December 30, 2007

1 Comment

More brain dumping, this time after setting up MySQL on my test server to replicate offsite as the data on there is becoming important. To start with both machines are running fully updated and upgraded Debian Etch and MySQL 5 as a Debian package with identical copies of the MySQL databases in /var/lib/mysql/. On the master I: I [...]

Continue reading...

Search and replace multiple files with sed

Sunday, December 30, 2007

0 Comments

Ok, if you ‘do’ linux then you’ll probably already know this one. I did, kinda, but had to Google to remind myself of the exact chain of commands. So here I am writing it down so it’s easier to find next time. In my case I had a load of apache conf files where I needed [...]

Continue reading...

Move multiple subversion repositories

Thursday, December 20, 2007

0 Comments

Need to move multiple subversion repositories? Well I just finished putting a simple how-to together which details the steps I took when moving our 30+ svn projects from one server to another. It went really smoothly and took about a quarter of the time I was expecting it to. Anyway, here it is. Related: Creating a subversion repository Automating subversion repository [...]

Continue reading...

Removing DOS linebreaks from your files using Vim

Monday, December 3, 2007

3 Comments

This morning I’m debugging an issue on a script that gets cronned every minute. I’ve a shell open on the server and the file in question open using Vim and I notice each line has a trailing ^M…. Aargh the dreaded DOS linebreak. Dusting off my rusty vim-foo I simply do a search and replace using [...]

Continue reading...

Flush the qmail queue

Monday, December 4, 2006

0 Comments

My secondary mail server (that runs qmail) had a load of email queued up today that I needed to flush. Googling comes back with people saying run qmail with daemontools then you can use on of the nice qmailctl scripts to do a ‘doqueue’. Needless to say I’m not running with daemontools (my primary is), [...]

Continue reading...

Nightmare MySQL migration

Wednesday, September 13, 2006

1 Comment

I’ve been migrating a large number of websites over from one server to another, always an enjoyable task. So I get to the last one, copy the database over and do the normal mysql import along the lines of: [code]mysql -ufoo -pbar database_name < database_name.sql[/code] Errors++ Turns out the Donke^H^H^H^HDeveloper who built the application didn't care about things like [...]

Continue reading...

Excluding folders when creating a tarball

Wednesday, September 13, 2006

0 Comments

When creating a tarball, to exclude folders one simply uses the –exclude= flag: For example to tar up the contents of /var/log but to exclude /var/log/apache & /var/log/mail/ tar -jcvf logfiles.tar.bz2 /var/log/* --exclude=/var/log/apache/* --exclude=/var/log/mail/* Just in case you didn’t already know then the ‘j’ flag in the ‘jcvf’ tells tar to use bzip2 compression.

Continue reading...

ssh logins without a password

Friday, April 28, 2006

0 Comments

Share ssh keys: client: [code]cd ssh-keygen -t rsa[/code] the copy ~/.ssh/id_rsa.pub over to server server: [code]mkdir .ssh cat id_rsa.pub >> .ssh/authorized_keys[/code] Job done

Continue reading...