Wednesday, March 17, 2010

Subversion installation

Install Subversion on CentOS

1. Install apache
yum -y install httpd mod_ssl
service httpd start
chkconfig httpd on

2. Install MySQL
yum -y install mysql-server mysql-devel
service mysqld start
chkconfig mysqld on

3.Config MySQL's root password
/usr/bin/mysqladmin -u root password 'password'
mysql -u root -p

4. Install php
yum install -y php php-mysql

5. Install perl Module
yum install -y perl*

6. Remove the built in subversion (If it is installed before during the OS installation)
yum erase subversion

7. Install subversion

cd /tmp/
mkdir subversion
cd subversion

wget http://summersoft.fay.ar.us/pub/subversion/1.4.6/rhel5/x86_64/mod_dav_svn-1.4.6-1.rhel5.x86_64.rpm
wget http://summersoft.fay.ar.us/pub/subversion/1.4.6/rhel5/x86_64/subversion-1.4.6-1.rhel5.x86_64.rpm
wget http://summersoft.fay.ar.us/pub/subversion/1.4.6/rhel5/x86_64/subversion-debuginfo-1.4.6-1.rhel5.x86_64.rpm
wget http://summersoft.fay.ar.us/pub/subversion/1.4.6/rhel5/x86_64/subversion-devel-1.4.6-1.rhel5.x86_64.rpm
wget http://summersoft.fay.ar.us/pub/subversion/1.4.6/rhel5/x86_64/subversion-perl-1.4.6-1.rhel5.x86_64.rpm
wget http://summersoft.fay.ar.us/pub/subversion/1.4.6/rhel5/x86_64/subversion-python-1.4.6-1.rhel5.x86_64.rpm
wget http://summersoft.fay.ar.us/pub/subversion/1.4.6/rhel5/x86_64/subversion-tools-1.4.6-1.rhel5.x86_64.rpm

yum install -y db4-devel expat-devel openldap-devel libneon.so.24 neon
rpm -Uvh *.rpm

8 Change subversion configuration
cd /etc/httpd/conf.d/
vi subversion.conf
# Needed to do Subversion Apache server.
LoadModule dav_svn_module     modules/mod_dav_svn.so

# Only needed if you decide to do "per-directory" access control.
LoadModule authz_svn_module   modules/mod_authz_svn.so

9. Change apache configuration

vi /etc/httpd/conf/httpd.conf

<Location /svn>

     DAV svn   

    SVNParentPath /var/www/svn

     AuthType Basic

     AuthName "Subversion repositories"

     AuthUserFile passwd

    Require valid-user    

</Location>

/etc/init.d/httpd restart

10 Change the permission of the subversion folder

mkdir /var/www/svn
cd /var/www/svn
svnadmin create repos
chown -R apache:apache  repos
svnadmin recover repos

service httpd restart

11 Stop firewall (If it is enabled)

Next enter the following three commands to disable firewall.
# service iptables save
# service iptables stop
# chkconfig iptables off

If you are using IPv6 firewall, enter:
# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables off

12 After setting up the software, start configuring the server for apache authentication and subversion. /etc/httpd/conf/passwd and /etc/httpd/conf/groups files. You make the passwd file with:

root> cd /etc/httpd/conf

root> htpasswd -cb passwd firstuser firstpasswd

root> htpasswd  -b passwd nextuser  nextpasswd

root> htpasswd  -b passwd thirduser thirdpasswd

The link of Subversion Server:

http://IP/svn/repos/

Install the Windows Client of subverison

TortoiseSVN

http://tortoisesvn.net/about

Print Friendly and PDF
Share/Bookmark

No comments:

Post a Comment