home / guides / blog-example
# Blog Example

## Lithium

Please follow the general installation and setup instructions in the [Lithium Core Installation Guide](http://rad-dev.org/lithium/wiki/guides/installation).

## Application

Checkout the ```lithium_examples``` project and move, link or copy the blog application from the subdirectory of the checked out project to a web accessible folder.

{{{
cd ~ // or to anywhere else you want to install
git clone code@rad-dev.org:lithium_examples.git
ln -s lithium_examples/blog /var/www/blog
}}}

Edit the application's ```config/bootstrap.php``` file to adjust the ```LITHIUM_LIBRARY_PATH``` constant. Check if you can see the Lithium welcome page when visiting ```http://localhost/blog``` (or an equivalent url).

## Database

Since the blog uses doctrine as it's ORM we need to install this library, too. Installing the doctrine ORM is as easy as dropping a svn checkout in the libraries directory. 

{{{
cd ~ // or to anywhere else you want to install
svn co http://svn.doctrine-project.org/tags/1.1.4 lithium/libraries/doctrine
}}}

Edit the application's ```config/connections.php``` file to specify which database user and password should be used to establish the connection to the database. Setup your db, by using the li3 tool. After doing that browse to ```http://localhost/blog/posts```.

{{{
cd /var/www/blog
li3 doctrine create_db
li3 doctrine create_tables
}}}