Archive

Archive for the ‘server’ Category

Restoring readline capabilities of Ubuntu’s 9.10 (Karmic Koala) MySQL client

December 24th, 2009 3 comments

I recently updated to the newest version, 9.10 AKA Karmic Koala and I love it. It’s fast and everything works perfectly. Or nearly everything…

Read more…

Configuring a shared repository in Bazaar for users with no shell access

November 5th, 2009 2 comments

One of the things that stumbled me the most about bazaar is that it does not have a own authentication method. Users can access repositories through ssh, sftp, etc. While this is very usefull if everyone working on the repo has shell access to the server, it does not allow “virtual users” the way svn does. Well, not out of the box anyway… There’s always a workaround. This post tries to explain how to configure Bazaar in the centralized model and set user level permissions to the working directory.

Read more…

Categories: bzr Tags: , , , , ,

Restore / uncompress a plesk backup file using terminal

November 2nd, 2009 No comments

Today I was had to move a few web sites from one server to another. As I did not have ssh or ftp access to it, the only way to do it was through Plesk. As I don’t have experience using Plesk, I did not know that Plesk’s built in File Explorer can only be used to manage your web site’s files within the server, but it does not let you download those files. So, looking around Plesk’s admin interface I found the backup feature. That looked promissing, so I clicked on it and it brought me to another page called “Backup Manager”. This page allows you to set up periodic or one time backups. Backups can be saved in Plesk’s local repository or in an external FTP server. So I set up all the FTP details and start the backup. Once the backup finished I tried to open it on a linux box and file-roller gave an error when it tried to extract it. A `file` showed that the file was indeed in gzip format.

Read more…

Categories: Plesk Tags: , , , , , ,

Ignored files in Bazaar in a Symfony project

October 23rd, 2009 5 comments

Recently, I’ve been doing a few projects using Symfony PHP framework and Bazaar for version control. One of the great features of Symfony is that it generates base classes automatically to interact with the database from a pre-defined schema file. While this is a great feature, every time the schema gets changed, Symfony regenerates all the files thus flagging them as modified in Bazaar. To avoid committing those files all the time, I created a .bzrignore file to ignore them and leave my repository nice and clean.

Read more…

Categories: bzr, php, symfony Tags: , , , , , ,

PureFTP + MySQL with pure-uploadscript functionallity

June 25th, 2009 2 comments

First lets install pureftpd using apt-get:

Install pureftpd with the MySQL backend:

apt-get install pure-ftpd-mysql

Read more…

Using apache’s RedirectMatch instead of ServerAlias to avoid content duplication

May 18th, 2009 4 comments

Most web sites I do have many domains but want all those domains to point to the “main domain” www.domain.com. My first solution was to put Apaches’s directive ServerAlias in the site’s virtual host configuration. This lead to content duplication since domain.com and domain.net and www.domain.com are two different web sites for the rest of the world. To avoid this problem the only solution I’ve found was to create two different virtual hosts and set Apache’s Redirect directive. The first VirtualHost will hold all the domains aliases and redirect permanently (301) to the “main domain”

Read more…

Categories: apache Tags: ,

Get unix timestamp in bash

May 9th, 2009 6 comments

I’m posting this since I always forget it…

date +%s

More info: http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/

Categories: date/time Tags: , ,

Keeping directories in sync with unison

May 9th, 2009 3 comments

As opposed to rsync, unison is a two way file synchronizer. Similar to MySQL’s master to master replication. To set it up in Ubuntu (Intrepid) keep on reading…

Read more…

Categories: mysql, php, server, sync, Uncategorized Tags: , , ,

Make svnserve load on startup (Ubuntu)

April 25th, 2009 2 comments

Make svnserve load on startup:

First create a new script on init.d

vi /etc/init.d/svnserve

Read more…

Categories: svn Tags: , ,

Set new logrotate tasks to rotate apache logs in non-standard directories

April 23rd, 2009 6 comments

I prefer compressing old logs to save space. Edit logrotate.conf

vi /etc/logrotate.conf

Read more…

Categories: logrotate Tags: , , , ,