Code revision control is very crucial part of development. It ensures you know who has changed which files and you are able to rollback to older versions in case new changes are breaking your website page or entire project. There are few options for you if you are looking into setting up code revision control. My preferred option is Subversion. Subversion is an open-source revision control system which is becoming more and more popular every day. It is very easy to install and setup your project under Subversion. If you want detailed instructions, please see the Subversion Book. They do a great job explaining what revision control is, what are the different types of revision control are out there, detailed instructions on installing subversion, doing administrator tasks, etc. Here are instructions on how to set up Subversion under CentOS. Same instructions apply to most linux distributions.Â
YUM InstallÂ
Easiest way to install subversion is via “yum” by typing:
yum install subversion
Once install is done, confirm it by typing “svn” at the prompt and you should get:
Type 'svn help' for usage.
At this point you can skip to “Setting up Subversion repository” part.
SOURCE Install
Obtain source from: Subversion. At the time of writing, latest (1.4.3) version can be obtain from this link: http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz
tar zxf subversion*
cd subversion*
./configure
make && make install
after everything goes well, type svn at the prompt and you should get:
Type 'svn help' for usage.
Setting up Subversion repository
adduser svnusers
mkdir repos/branches -p
mkdir repos/trunk -p
mkdir repos/tags -p
mkdir /svn
svnadmin create /svn/demorepo
svn import --message "Initial set up" repos file:///svn/demorepo
cd /svn/demorepo
chown .svnusers . -R
chmod 775 * -R
chmod +s db
Thats all there is to it to setup Subversion repository. At this point, you should add any users you want to have access to the repository by adding them to “svnusers” group.
————————————-
DISCLAIMER: Please be smart and use code found on internet carefully. Make backups often. And yeah.. last but not least.. I am not responsible for any damage caused by this posting. Use at your own risk.