I have this little web project I've been maintaining for a long time now and decided that it will make a good learning environment for my daughter to do some web development.
So I want both of us to be able to work on it side by side and decided to set up local SVN repository on a desktop machine. This way we can do the work on laptops in the comfort of our living room.
The objective are:
1 - set up svn repo
2 - import an existing project into the repo with the help of NetBeans (that's what we'll be using as an html editor)
3 - Check out the project
These 3 links were crucial in their guidance of this little project:
The only prerequisite here is that you have to have SVN installed.
To get started, set up a directory where you'd like to have your repository
For example, I set up mine like so from the command line:
$ svnadmin create /Users/some_user_name/work/web/SVN-REP... navigate to the repository folder:
$ cd /Users/some_user_name/work/web/SVN-REP... create a directory for the project
$ mkdir SundanceStables
... that's all as far as setting up a local svn repo is concerned. This is ready to be used from the command line if you like
Next I did initial import of the project following prompts in NetBeans
But that's only half the fun! Next we'll need to make repo available over the network and that's where playing a little with Apache configuration comes into play.
... changing ownership will make the repo accessible in the browser:
$ sudo chown -R www:www /Users/some_user_name/work/web/SVN-REP
Create svn.conf file in /etc/apache2/svn.conf
LoadModule dav_svn_module /usr/libexec/apache2/mod_dav_svn.so <location /sundancestables > DAV svn SVNPath /Users/some_user_name/work/SVN-REP </location >... save the file and restart apache
$ sudo apachectl restart... to make sure I got the syntax correct I run
$ sudo apachectl configtestI initially had some errors and searching the error message in google led to a speedy fix.
Once all was set, went to Chrom and entered
and there was my project in the repository
Finally I was able to switch over to my laptop, fired up NetBeans and checkout the project.
One last thing left is to guide my daughter through the install of svn and NetBeans on her laptop and we'll be on our way!
Last but not least
this is not a secure set up by any means!
If you need authentication, it's up to you from here on. If you visit the 3rd link from the beginning of this post, at the bottom of the page/thread you will find a link that will point you in the right direction. So we have working toy set up for a toy summer project.
Post a Comment