How to Set Up SVN SSH on CentOS
By William Garmany, eHow Contributor
Read more: How to Set Up SVN SSH on CentOS | eHow.com http://www.ehow.com/how_8613916_set-up-svn-ssh-centos.html#ixzz2B1wAAx8E
Instructions
- 1
Click "Applications," "Accessories," "Terminal" to open a terminal in CentOS. Enter superuser mode by typing "su" and pressing "Enter." Type your admin password and press "Enter" again.
- 2
Type "yum install subversion" to automatically download and install subversion and any required dependencies. This can take some time depending on which dependencies you already have installed on your system. When complete, yum will tell you what applications have been installed and that it is done.
How do I install ssh under RHEL / SL (Scientific Linux) / CentOS / Fedora Linux?Type the following yum command to install ssh client and server:#
yum
-y install openssh-server openssh-clientsStart and enable sshd server: # chkconfig sshd on |
- 3
Type "mkdir /var/svn/repos" to create the repository in. Type the command "svnadmin create /var/subversion/repos/mycodes" and change to the directory with "cd /var/subversion/repos/mycodes/conf."
- 4
Edit the file svnserve.conf by typing "vi svnserve.conf" into terminal. Add "anon-access = none" and "auth-access = write" to the file. Save and close.
- 5
Create an SVN group by typing "groupadd svn" into terminal. Make the group owners of the repo directory with "chown -R :svn /var/subversion/repos/" and set the permissions with "chmod -R 775 /var/subversion/repos/." Add users to the group with "usermod -a -G svn (user id)."
- 6
Give access to the folder to everyone in the group by typing "vi" and entering the following information into text editor:
#!/bin/sh
# set the umask so files are group-wriable
umask 002
# call the 'real' svnserve, also passing in the default repo location
exec /usr/bin/svnserve-daemon "$@" -r /var/svn/repos
Save the file as "/usr/local/bin/svnwrapper.sh."
- 7
Type "cd usr/bin" and "chmod 755 /usr/local/bin/svnwrapper.sh" to allow access to the file. Change the name of snvserve to work with your system by typing "mv svnserve svnserve-daemon" into terminal. Create a symbolic link to the original snvserve with "ln -s /usr/local/bin/svnwrapper.sh svnserve" typed into terminal.
- 8
Create the needed directories and import the code by typing "mkdir code," "mkdir code/trunk," "mkdir code/tags," "mkdir code/branches" and run the code with "svn import code svn+ssh://USERNAME@SERVER/my_code -m 'inital import'" and delete the no longer needed folders with "rm -rf code." Your system is now set up.
Read more: How to Set Up SVN SSH on CentOS | eHow.com http://www.ehow.com/how_8613916_set-up-svn-ssh-centos.html#ixzz2B1vyyVT3
No comments:
Post a Comment