Tag Archives: Linux

Set up symfony 1.2 on Debian/Ubuntu

Posted on in Development, How-Tos, Linux, Server

Just wanted to give symfony a try and ran into some issues to set it up the way I wanted. Therefore I’d like to note the required steps.

First, install symfony via PEAR.

pear channel-discover pear.symfony-project.com
pear install symfony/symfony-1.2.4

This sould install symfony and make the symfony executable available in your PATH.

~$ symfony -V
symfony version 1.2.4 (/usr/share/php/symfony)

Create a directory for your vhost and create a new project.

mkdir /var/www/myproject
cd /var/www/myproject
symfony generate:project myproject

Create an example application in your project.

symfony generate:app frontend

Link the symfony resources to the project’s document root.

cd web
ln -s /usr/share/php/data/symfony/web/sf/

This should get you up and running with symfony. You just need to configure your server for the vhost. For personal preference, I’d like to have my document root directory named public instead of web. The following steps are needed to achive this.

Rename the document root directory.

mv web public

Add this line to config/ProjectConfiguration.class.php:

public function setup()
{
    $this->setWebDir($this->getRootDir() . '/public');

    // for compatibility / remove and enable only the plugins you want
    $this->enableAllPluginsExcept(array('sfDoctrinePlugin', 'sfCompat10Plugin')$
}

Debootstrap a Ubuntu Hardy DomU on a Debian Etch Xen Dom0

Posted on in How-Tos, Linux, Server

Lately, I wanted set up a Ubuntu Hardy DomU on an existing Debian Etch Dom0 box. Usually, setting up Debian-based DomUs is very simple with xen-create-image and debootstrap (there are tons of tutorials out there dealing with this topic), but unfortunately Etch’s version of debootstrap doesn’t support Ubuntu Hardy. I spent a surprisingly long time on searching the net until I found a solution for this problem on a french site: Installer et configurer Xen sur Debian 4.0 Etch (it’s a complete howto for Xen on Debian Etch, but it deals with the Hardy part too). The author created a backport of the debootstrap package, which enables you to debootstrap Hardy.

First, you have to create the hardy.d directory (symlink) for xen-tools.

$ cd /usr/lib/xen-tools
$ ln -s ubuntu.d hardy.d

There’s a debian repository holding the backport package, however I got problems to use that repository on an amd64 box, so I downloaded and installed the package manually.

$ wget http://falcon.landure.fr/pool/etch/debootstrap/debootstrap_1.0.10_all.deb
$ dpkg -i debootstrap_1.0.10_all.deb

Now you should be able to debootstrap a Hardy DomU.

$ xen-create-image
--hostname=hardy
--ip=xxx.xxx.xxx.xxx
--size=5Gb
--memory=256Mb
--dist=hardy
--mirror=http://archive.ubuntu.com/ubuntu/