To install svn in linux, follow these steps: 1. download the latest src package of subversion and apache 2. create a user: svnroot. the following operations are not particularly described as root user operations # groupaddsvn # us...
To install svn in linux, follow these steps: 1. download the latest src package of subversion and apache 2. create a user: svnroot. the following operations are not specifically described as root user operations # groupadd svn # useradd svnroot-g svn # passwd svn www.2cto.com 3. compile and install httpd: // decompress the apache2 installation package # tar xvzf httpd-2.2.3.tar.tar // enter the decompressed Directory # cd httpd-2.2.3 // Configure apache installation #. /configure -- enable-dav -- enable-so -- prefix =/usr/local/apache2/# make // install # make install // start apache service #/usr/local/apache2 /bin/apa Chectl start // open the browser http: // localhost/if there is a test page "It works! "The installation is successful.
4. install Subversion # Note: If subversion1.6.x is installed, install sqlite first. download sqlite and decompress it. copy the sqlite3.c file to the sqlite-amalgamation folder under subversion. if the sqlite-amalgamation folder does not exist, create one manually. // Unzip the SubVersion installation package # tar-xvzf Subversion-1.4.0.tar.gz // enter the decompressed Directory # cd Subversion-1.4.0 // Configure the subversion installation #. /configure -- prefix =/usr/local/subversion -- with-ssl -- enable-maintainer-mode -- with-apxs =/usr/local/apache2/bin/apxs -- with-apr =/usr/local/apache2 -- with-apr-util =/usr/local/apache2 -- with-zlib =/usr/local/zlib #. /configure -- prefix =/usr/local/subversion -- with-ssl -- enable-maintainer-mode -- with-apxs =/usr/local/apache2.2.6/bin/apxs -- with-apr =/usr/local/apache2.2.6 -- with-apr-util =/usr/local/apache2.2.6 www.2cto.com: configure: error: subversion requires zlib needs to Download wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/zlib-devel-1.2.3-4.el5.x86_64.rpm Install the rpm-I zlib-devel-1.2.3-4.el5.x86_64.rpm. if the apxs module in the/usr/local/apache2/bin/directory does not exist, then this module last year :#. /configure -- prefix =/usr/local/subversion -- with-ssl -- enable-maintainer-mode -- with-apr =/usr/local/apache2 -- with-apr-util =/ usr/local/apache2 -- with-zlib =/usr/local/zlib # make // installation # make install // directory where the library file is created (svnroot performs the following operations) # mkdir/home/svnroot/repository // create a repository "test" #/usr/local/subversion/bin/svnadmin create/home/svnroot/repository/test // check whether svn is used installation successful #/usr/local/subversion/bin/svnadmin -- version // do not allow others to have permission to this directory # chmod 700/home/svnroot/repository (svnroot user operation ended) 5. modify the Apache configuration file # vi/usr/local/apache2/conf/httpd. conf // find the following statement. if not, add LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so // add www.2cto.com DAV svn SVNParentPath/home/svnroot/repository // svn parent directory AuthzSVNAccessFile/home/svnroot/repository/authz. conf // permission configuration file AuthType Basic // connection type setting AuthName "Subversion. zoneyump "// The Connection Box prompts AuthUserFile/home/svnroot/repository/authfile // authentication used by the user configuration file Require valid-user // 6. permission management 1) add the user #/usr/local/apache2/bin/htpasswd/home/svnroot/repository/authfile username (add a new user and you don't need to use-c ), use this command to change the user password #/usr/local/apache2/bin/htpasswd-c/home/svnroot/repository/authfile user name/-c to create a new user user files. Press enter and enter the user password to add the New password: psbsa2f1fxxx 2) permission allocation # vi/home/svnroot/repository/authz. conf [groups] admin = useradmindevteamcs = useradmin, user1, user2 // A user group is defined here. // Admin and devteamcs are custom user groups [/] // all users of all projects have read permission, admin users have read and write permissions @ admin = rw * = r www.2cto.com [test:/] // for the test project, @ devteamcs = rw // in/usr/local/apache2/conf/httpd. in the conf file, find the two lines in the File: User daemon Group daemon // change daemon to svnroot, and change the Group accordingly, run the apache process as svnroot // after modification, the User svnrootGroup svn // restart apache #/usr/local/apache2/bin/apachectl restart to access http: // localhost/svn/test. now you need to authenticate and you will be able to see the information after verification.
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