install and configure subversion
来源:互联网 发布:JavaScript字符串分割 编辑:程序博客网 时间:2024/05/23 21:54
Step 1: Install subversion
[root@server ~]# yum -y install subversion
Step 2: Create a username under which the subversion daemon will run and set a password for it
sudo yum install subversion
sudo /usr/sbin/useradd svn
sudo passwd svn
su – svn
cd ~
mkdir repositories
cd repositories
svnadmin create myproject
ll myproject
-rw-rw-r– 1 svn svn 229 Nov 21 16:58 README.txt
drwxrwxr-x 2 svn svn 1024 Nov 21 16:58 conf
drwxrwsr-x 6 svn svn 1024 Nov 21 16:58 db
-r–r–r– 1 svn svn 2 Nov 21 16:58 format
drwxrwxr-x 2 svn svn 1024 Nov 21 16:58 hooks
drwxrwxr-x 2 svn svn 1024 Nov 21 16:58 locks
You need to edit “myproject/conf/svnserve.conf” and uncomment the following lines:
auth-access = write
password-db = passwd
and edit the password file “myproject/conf/passwd” adding a new user and password. Note that the password is stored in plain text. In the following example we have a user called “john” whose password is “foobar123”:
[users]
john = foobar123
And finally, as the svn user, start the subversion daemon like so:
svnserve -d -r /home/svn/repositories
Connect to svn://svn@hostname/myproject
[root@server ~]# /usr/sbin/useradd -m -d /home/svn svn[root@server ~]# passwd svn
Step 3: Login as the newly created username
[root@server ~]# su - svn[svn@server ~]$
Step 4: Create a directory named repositories (where you will create all the subversion projects) and access it
[svn@server ~]$ mkdir repositories[svn@server ~]$ cd repositories
Step 5: Create a project and list the contents of the newly created project (I chose to name mine “coolproject”)
[svn@server repositories]$ svnadmin create coolproject[svn@server repositories]$ ls -lh coolproject/ total 32K drwxrwxr-x 2 svn svn 4.0K Feb 27 17:42 conf drwxrwsr-x 6 svn svn 4.0K Feb 27 17:42 db -r--r--r-- 1 svn svn 2 Feb 27 17:42 format drwxrwxr-x 2 svn svn 4.0K Feb 27 17:42 hooks drwxrwxr-x 2 svn svn 4.0K Feb 27 17:42 locks -rw-rw-r-- 1 svn svn 229 Feb 27 17:42 README.txt
Step 6: Now it’s needed to enable write access and let subversion know which file is used to store credentials, for this we need to edit coolproject/conf/svnserve.conf and uncomment the following options:
auth-access = writepassword-db = passwd
[svn@server repositories]$ sed -i 's/# auth-access = write/auth-access = write/' coolproject/conf/svnserve.conf[svn@server repositories]$ sed -i 's/# password-db = passwd/password-db = passwd/' coolproject/conf/svnserve.conf
Step 7: Add the desired username and password to coolproject/conf/passwd file (make sure you replaceyourusername and somepassword with the desired username and password)
[svn@server repositories]$ echo "yourusername = somepassword" >> coolproject/conf/passwd
Step 8: You can now start the subversion server using the following command
[svn@server repositories]$ svnserve -d -r /home/svn/repositories
Step 9: If for any reason you want to stop the subversion server (for example you want to create a new project and you need to restart it) use the following command to do so
[svn@server repositories]$ killall -9 svnserver
Congratulations! You have successfully installed and configuredsubversion on a RHEL/CentOS system, you may now connect to svn://svn@se.rv.er.ip/coolproject and begin working on your project!
- install and configure subversion
- Install and Configure git
- Install and Configure ASM
- install and configure postgresql
- docker install and configure
- ubuntu QT install and configure
- [CI]Install and Configure Hudson
- [Linux]Install And Configure Trac
- Kamailio (OpenSER) install and configure
- fontconfig configure compile and install
- install subversion and trac under windows
- How to install and configure bugzilla
- How To: Install and Configure GitWeb
- [MySQL]Install and Configure MySQL in Ubuntu
- Install and Configure Edge Transport Role
- Install and Configure JRebel for MyEclipse
- Howto Install and Configure VTK on Ubuntu
- Howto Install and Configure QtCreator on Ubuntu
- typedef void (*sighandler_t)(int);类型说明
- hibernate映射many-to-many
- 《C语言解惑》源码笔记摘录(Updating)
- kd树搜索
- 摘-标准C++中的string类的用法总结
- install and configure subversion
- Git详解之六 Git工具
- Ubuntu常见问题
- [七]java作业
- 计算机组成常见笔试、面试题总结
- Linux下文件操作的常用命令
- Maven的本地仓库配置
- 反转二叉树
- Git详解之七 自定义Git