1. Installation steps of SVN in Linux environment
1.1 Download the SVN source file package
1. You need to download 2 file packages . The installation environment is Centos , so use the command to download directly:
1. wget http://subversion.tigris.org/downloads/subversion-1.6.1.tar.gz
2. wget http://subversion.tigris.org/downloads/subversion-deps-1.6.1.tar.gz
2. The downloaded file information is as follows:
1.2 Compile and install
1. Unzip the file ( the operation directory is in /usr/local/svn)
1. tar –zxvf subversion-1.6.1.tar.gz
2. tar –zxvf subversion-deps-1.6.1.tar.gz
The decompressed directory is as follows:
2. Compile and install
Execute the following commands in sequence ( note that the last step will be time-consuming )
1. cd subversion-1.6.1
2. ./configure –prefix=/usr/local/svn/
3. make && make install
4. echo "export PATH=$PATH:/usr/local/svn/bin/">> /etc/profile
5. source /etc/profile
6.
1.3 Verify the installation result
1. Svnadmin --help
2.
The following image is displayed to indicate success:
1.4 Create a warehouse
1. Create a svn directory
mkdir /usr/local/svn/svnroot
2. Create a warehouse
svnadmin create /usr/local/svn/svnroot
After the creation is successful, the following figure is shown:
3. Modify the configuration file
To modify the configuration file, you need to delete all the content comments marked in the above figure.
anon-access = read read -only for unauthorized users , if anonymous login is not allowed , it can be modified to none
auth-access=write Authorized user writable
password-db=passwd password file
authz-db=authz access account file
4. Modify the authz file
In the above configuration file , 4 groups are configured , namely admin, devserver, devandroid, devios
I have configured 3 directories 1111, 2222, 3333 under the directory
For people in the devserver group, 1111 has read and write permissions on the directory, 2222 has only read permissions, and 3333 has no read and write permissions .
1.5 Start the service
1. Execute the following script to start the svn service
- svnserve –p –r /usr/local/svn/svnroot
2. Verify that the service is started successfully
- netstat -anpl |grep svn
1.6 Connection verification
Use another machine to verify whether the SVN server can be accessed normally .
1. Access address: svn://192.168.11.21 (192.168.11.21 is the svn server ip address )
2. Verify all read permissions of the root directory, as shown in the figure below, a total of three directories 1111 2222 3333
3. Verify the read and write permissions of 1111 and successfully create the test directory under the 1111 directory
4. Verify the read permission of 2222 , no write permission, it can be read normally but the file creation fails
5. Verify the permissions of 3333 , and the error message is garbled
2. Possible problems
2.1 configure: error: no acceptable C compilerfound in $PATH
1. This problem is that the compilation package of gcc is missing
2. Resolve version
yum install gcc