Linux Install SVN server (yum mode)

Source: Internet
Author: User

Yum-y Install Subversion

Mkdir-p/mnt/vdb1/data/svn/repo

Svnadmin Create/mnt/vdb1/data/svn/repo

[email protected] data]# LL

Drwxr-xr-x root root 4096 Feb 9 12:20 code

Drwxr-xr-x 6 root root 4096 Jan 23:01 downloads

Drwxr-xr-x 4 root root 4096 Jan 01:25 soft

Drwxr-xr-x 3 root root 4096 Mar 07:58 svn

[Email protected] data]# CD svn/repo/

[email protected] repo]# LL

Total 24

Drwxr-xr-x 2 root root 4096 Mar 07:59 conf

Drwxr-sr-x 6 root root 4096 Mar 07:59 db

-r--r--r--1 root root 2 Mar 07:59 format

Drwxr-xr-x 2 root root 4096 Mar 07:59 hooks

Drwxr-xr-x 2 root root 4096 Mar 07:59 locks

-rw-r--r--1 root root 229 Mar 07:59 README.txt

[Email protected] repo]#

[Email protected] repo]#

[Email protected] repo]# vim conf/

Authz passwd svnserve.conf

svnserve-d-r/mnt/vdb1/data/svn/repo --listen-port=3690

[Email protected] repo]# Ps-ef | grep SVN

Root 5744 1 0 08:15? 00:00:00 svnserve-d-r/mnt/vdb1/data/svn/repo--listen-port=3690

Root 5746 5590 0 08:16 pts/0 00:00:00 grep--color=auto svn

[Email protected] repo]#

1. See if Yum is installed
Enter Yum in the terminal if it is already installed, the Yum parameter will be displayed
If it is not installed, it will prompt yum not to install or invalid command ...

2. Install SVN
yum-y Install Subversion The following appears, indicating that the installation is complete. 3. Create a directory and configure

Build the Repository Directory
Mkdir-p/data/svn/repo

Configuration

Svnadmin Create /data/svn/repo

After executing the above command, automatically establish the Repo test library, View/data/svn/repo folder discovery contains Conf, db,format,hooks, locks, README.txt and other files, stating that an SVN repository has been established.

4. User Password passwd configuration

[Email protected] password]# cd/data/svn/repos/conf
[Email protected] conf]# vim passwd
Modify passwd to the following:

[Users]
# Harry = Harryssecret
# sally = Sallyssecret

Hello=123

User name = password

So we set up a hello user, 123 password

All of the above statements must be shelf written, the left cannot be blank, or an error will occur.

5. Permission Control Authz Configuration

[Email protected] conf]# VI Authz
The goal is to set which users can access which directories, append the following to the Authz file:

#设置 [/] represents all resources under the root directory or written as [repl:/]
[/]

Hello = RW

This means that Hello users have read and write access to all directories under the Repo Test library, but can also be qualified.
If you use it yourself, read it directly.

All of the above statements must be shelf written, the left cannot be blank, or an error will occur.

6. Service svnserve.conf Configuration

[Email protected] conf]# vim svnserve.conf

Append the following content:

[General]
#匿名访问的权限, can be read,write,none, default is read
Anon-access=none
#使授权用户有写权限
Auth-access=write
#密码数据库的路径
password-db=passwd
#访问控制文件
Authz-db=authz
#认证命名空间, Subversion is displayed in the authentication prompt and is used as a keyword in the credential cache

Realm=/data/svn/repositories

All of the above statements must be shelf written, the left cannot be blank, or an error will occur.

7. Start the SVN serviceSee if the SVN service is started Ps-ef|grep SVNIf you do not start, execute the following command: svnserve-d-R /data/svn/repo--listen-port=3690   8. Open Port/sbin/iptables-i input-p TCP--dport 3690-j accept/etc/rc.d/init.d/iptables save/etc/init.d/iptables Restart/etc/ini T.d/iptables status 9. Access SVN://IP Address The port defaults to 3690, Enter a configured user name and password.

Note: You must not SVN://IP address/repo here, otherwise you cannot access it.

Linux Install SVN server (yum mode)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.