• Subscribe to the RSS feed!
  • Subscribe by Email
  • home
  • blog
  • dev
  • Recent Posts

    • Xdebug is full of awesome
    • Creating a chat bot with PHP and Dbus
    • A year in review: 2011
    • Notes on shell scripting
    • Listening to Dbus signals with PHP
    • Configuring 2 monitors with xrandr
    • A quick note on Dojo’s data grids and dojox.data.HtmlStore
    • Communicating with Pidgin from PHP via D-Bus
    • Upgrading to Fedora 16
    • Contributing to Zend Framework 2
  • Recent Comments

    • Creating a chat bot with PHP and Dbus ~ Robert Basic on Communicating with Pidgin from PHP via D-Bus
    • A year in review: 2011 ~ Robert Basic on Announcing Hex
    • Anon on A quick note on Dojo’s data grids and dojox.data.HtmlStore
    • James on Communicating with Pidgin from PHP via D-Bus
    • A Zend Framework 2 EventManager use case ~ Robert Basic « Bookmarks on A Zend Framework 2 EventManager use case
    • Zend_Auth | Kerek egy ég alatt on Login example with Zend_Auth
    • Jowee on A Zend Framework 2 EventManager use case
    • Jurian Sluiman on A Zend Framework 2 EventManager use case
    • Robert on A Zend Framework 2 EventManager use case
    • Jurian Sluiman on A Zend Framework 2 EventManager use case
  • Tags

    about apache ape blog book comic community conference contributing dbus dojo events example facebook framework hack introduction lamp linux me mysql netbeans open source php pidgin plugin pyqt python random registration review script security setup shell signals site svn talk ubuntu web wordpress xdebug zend zend framework
  • Categories

    • Blablabla
    • Development
    • Free time
    • Places on the web
    • Programming
    • Software
  • Archives

    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • July 2011
    • May 2011
    • April 2011
    • March 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • July 2010
    • June 2010
    • April 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • August 2009
    • May 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
  • Find me on

    • DZone
    • Google Code
    • Google Reader
    • Last.fm
    • StumbleUpon
    • Twitter
    • Vimeo
  • Friends and Blogs

    • Andrew Taylor
    • Andy Sowards
    • Bojan Pejić
    • Eran Galperin
    • Graham Smith
    • Jani Hartikainen
    • Jasper Tandy
    • Matthew Turland
    • Matthew Weier O’Phinney
    • Miff
    • Miloš Ćuković
    • Nebojša Radović
    • Nemanja Avramović
    • Nemanja Tobić
    • Nikola Krajačić
    • Nikola Plejić
    • Pádraic Brady
    • Rob Allen
    • Swizec Teller
    • Vladimir Stanković
    • WeAreJustCreative
    • Željko Stevanović
  • I use

    • 960 Grid System
    • jQuery
    • Notepad++
    • Subversion
    • Trac
    • Vim
    • Zend Framework

LAMP and SVN on Ubuntu 8.10

by Robert Basic on November 24th, 2008

This post is a rewrite of one of my older posts, Ubuntu as a dev machine, but this time I’ll explain also how to setup a basic SVN besides the LAMP.

Ubuntu 8.10 was released bout a month ago and today I wasn’t in the mood of doing any coding so I decided to try out the new Ubuntu. Once again, I’m installing it under VirtualBox (VB), cause it seems that they still haven’t fixed the bug related to the rtl8187 chipset. Oh well…

Be sure to use VB v2.x.x. (v2.0.6. is the latest now), cause it’s recognizing the correct screen resolution, not like VB v.1.6.4, whit which I had to configure manually the xorg.conf file…

Setting up LAMP

Here are the commands:

sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
sudo apt-get install mysql-server
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
sudo /etc/init.d/apache2 restart
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

If mod_rewrite doesn’t work, do the following:

sudo gvim /etc/apache2/sites-available/default

And change AllowOverride None to AllowOverride All.

Setting up SVN

I’m not gonna explain how SVN works or the terms, this is just how to set it up. If you are not familiar with versioning and Subversion, read this book: Version Control with Subversion. It’s free, available for download and contains probably everything you need to know about SVN. Be sure to learn the commands like commit, import, export, checkout, add, info, etc…

There are 2 ways for setting up SVN: as an Apache module or to use svnserve which is designed for SVN. As I already have Apache installed, the best solution is to use Apache for SVN. It’s using a module called mod_dav_svn.

The setup presented here is very basic, it has no authentication and probably is insecure, but it’s good for my needs on localhost.

The commands:

sudo apt-get install subversion
sudo a2enmod dav
sudo /etc/init.d/apache2 restart
sudo apt-get install libapache2-svn
sudo /etc/init.d/apache2 restart

Now we have all packages installed, only the configuration left.

First, I create a folder called svn under the var folder:

sudo mkdir /var/svn

Now I need to create a folder under the svn folder where all my repositories will be:

sudo svnadmin create /var/svn/repos

We use the svnadmin create command to create the repository; mkdir is not good for this.

Next, open up the httpd.conf file and add the following lines to it:

<Location /repos>
    DAV svn
    SVNPath /var/svn/repos
</Location>

I’ve seen people creating a new user and group for SVN. I think (I haven’t looked into it detailed) that’s for the authentication stuff. I did a much simpler thing: I added the ownership over /var/svn to www-data (Apache user):

sudo chown -R www-data /var/svn

This is probably a big security hole, but again: I use it only on localhost so I can live with that.

We are now ready to import a project into SVN, i.e. to add a project to the repository:

svn import -m "First import to SVN" /import/from/here/project file:///var/svn/repos/project/trunk

To start working on that project we need to checkout it:

svn checkout http://localhost/repos/project/trunk /var/www/project

Now the “project” is under SVN which should ease the development process. Since I’m using SVN I have no more backups of projects all over the place; if something goes wrong I know it’s under SVN and I can revert to any older working version of my project.

Cheers!

Tags: apache, lamp, setup, subversion, svn, ubuntu, virtualbox.
Categories: Development, Programming, Software.
Subscribe to the feed.

Comments: 12

Grab the comments feed

  • Douglas Clifton

  • November 25th, 2008

Have you considered Git over Subversion? BTW, I love that quote graphic. ~d

  • Robert

  • November 26th, 2008

Hi Douglas!

No, not really. In a company I was working for, we used SVN, so I kinda stayed on it… What’s Git like? Better? Easier? :)

BTW, awesome site you got there, I spent like 4 hours lurking through your pages :)

Cheers!

  • Robert Basic’s Blog: LAMP and SVN on Ubuntu 8.10 : WebNetiques

  • November 26th, 2008

[...] this new post Robert Basic expands on an older post about installing LAMP on a Ubuntu system by tossing [...]

  • Robert Basic’s Blog: LAMP and SVN on Ubuntu 8.10 : Dragonfly Networks

  • November 26th, 2008

[...] this new post Robert Basic expands on an older post about installing LAMP on a Ubuntu system by tossing [...]

  • Federico

  • November 26th, 2008

To install LAMP:

$ sudo tasksel

And select LAMP server. More info: https://help.ubuntu.com/community/Tasksel

  • Jonathan Kushner

  • January 2nd, 2009

Great tutorial. I’ve handled this process a few times, but never came across a solution as straight forward and right to the point as yours. Cheers.

  • J Reynolds

  • January 8th, 2009

Great stuff, thanks ;)

  • Trac on Ubuntu ~ Robert Basic

  • January 27th, 2009

[...] anything, I want to say that my machine where I installed Trac has LAMP and SVN configured like this. So, this post is kinda the next part of that [...]

  • Découverte de la semaine | Blog d'un développeur multi-support

  • February 7th, 2009

[...] LAMP and SVN on Ubuntu 8.10 (robertbasic.com) Billet écrit dans : About me :) 07.02.2009 [...]

  • Anuvrat Singh » My Ubuntu Intrepid + LAMP

  • March 13th, 2009

[...] LAMP and SVN on Ubuntu 8.10 (robertbasic.com) [...]

  • Doug

  • March 23rd, 2009

I’m learning my way through Ubuntu thanks to posts like this. This tutorial was very helpful for me. Thanks.

  • Matty

  • September 1st, 2009

Thanks,I just installed LAMP on my ubuntu,and your tutorial help me a lot on setting SVN

Leave a Reply

 

Robert Basic © 2008 — 2012
Design & graphics by: Livia Radvanski — Lady L.
Coded by: Robert Basic
Home page last updated on November 30th, 2009.
Frameworks used: Zend Framework, jQuery, 960 Grid System
Blog is powered by Wordpress
Subscribe: Entries — RSS & Comments — RSS