Install SVN on linux and import it (personal practice)
The original SVN server was deployed on windowsPC. As the leader requested, svn should be set up on the linux server and imported. Therefore, this operation is performed.
First, you need to download the required package from the official website. My package is 1.6.16, and the maximum package is 1.9 ,:
Http://subversion.tigris.org/downloads/subversion-1.6.16.tar.gz
Http://subversion.tigris.org/downloads/subversion-deps-1.6.16.tar.gz
At the same time, check some included service packages
Rpm-q apr-util sqlite
If not
Then install:./configure -- prefix =/data/svn -- with-openssl =/usr/include/openssl -- without-berkeley-db
Edit the/etc/ld. so. conf file
Vi/etc/ld. so. conf
Add the following line of code
/Usr/local/lib
Then make clean
Make
Make install
Create an environment variable: vi/etc/profile
SVNPATH = $ PATH:/data/subversion/bin
Export SVNPATH
Check whether the installation is successful: svn -- version
/Data/svn/svnserve -- version
Next, create a user and a directory.
Useradd-d/home/svnroot
Passwd svnroot
Mkdir/data/repository
Chown-R svnroot. svnroot/data/repository
Chmod-R 755/data/repository
Cd/data/subversion/bin
Create a repository directory
./Svnadmin create/data/repository
Several folders can be found.
Modify svnserve. conf in conf as follows:
anon-access = none auth-access = write
Now you can start svn.
svnserve -d -r /data/svn/
You can change it to start the service:
Create a file named svn in the/etc/rc. d/init. d/directory.
Set the permission to 755: chmod 755/etc/rc. d/init. d/svn.
Edit svn file: vi/etc/rc. d/init. d/svn
#!/bin/bash SVN_HOME=/data/svn if [ ! -f /data/svn/bin/svnserve" ] then echo "svnserver startup: cannot start" exit fi case "$1" in start) echo "Starting svnserve..." /data/svn/bin/svnserve -d -r $SVN_HOME echo "Finished!" ;; stop) echo "Stoping svnserve..." killall svnserve echo "Finished!" ;; restart) $0 stop $0 start ;; *) echo "Usage: svn { start | stop | restart } " exit 1 esac