Integrate apache installation and configuration with subversion (SVN) in Linux
Source: Internet
Author: User
Linux subversion (SVN) integrated apache installation and configuration of the installation environment is: opensuse12.1 required installation package: httpd-2.4.3.tar.gzsubversion-1.7.6.tar.gzopenssl-1.0.1c.tar.gzneon-0.2...
Linux subversion (SVN) integrated apache installation and configuration of this installation environment is: opensuse12.1 required installation package: httpd-2.4.3.tar.gz subversion-1.7.6.tar.gz openssl-1.0.1c.tar.gz neon-0.29.6.tar.gz Note: Where the red font identification is required, the blue font marks some extension packages or dependent packages (to be tested and downloaded for installation) www.2cto.com currently I am using a common user to install, not the first part of the root user: install ①. install apache: 1. tar-zxvf httpd-2.4.3.tar.gz 2. cd httpd-2.4.3/3. /configure-nable-ssl -- enable-maintainer-mode -- prefix =/usr/local/apache2 -- enable-MoD-shared = all 4. make 5. sudo make install note: If apache is installed in step 1. /configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/ First install the pcre-8.20.tar.gz package, the installation steps are as follows: I: tar-zxvf pcre-8.20.tar.gz ii: cd pcre-8.20/iii :. /configure iV: make V: sudo make install www.2cto.com after installation, continue to reinstall apache, first return to the apache source directory httpd-2.4.3 folder, and then from step 1 but re-compile the installation. www.2cto.com ②: install subversion (SVN): 1. tar-zxvf subversion-1.7.6.tar.gz note: Here is a neon, it is used to the neon-0.29.6.tar.gz package, the package is decompressed to form the folder neon-0.29.6, and then copy the folder to the root directory of the source code of the extracted SVN, and rename it to neon 2. cd subversion -1.7.6 3 .. /configure -- prefix =/usr/local/subversion -- with-apxs =/usr/local/apache2/bin/apxs -- with-ssl 4. make 5. sudo make install now, SVN has been installed, first add the directory/usr/local/subversion/bin to the environment variable PATH, and then use the command svn -- version, if the following information is displayed, SVN is successfully installed: www.2cto.com svn, version 1.7.6 (r1370777) compiled on Oct 13, 2012: 15: 31 Copyright All rights reserved (C) Apache Software Foundation. This software contains contributions from many people. Please check the file NOTICE for more information. Subversion is open source software. See http://subversion.apache.org/ Site. You can use the following version library access module: * ra_neon: The module that uses neon to access the version library through the WebDAV protocol. -"Http" solution-"https" solution * ra_svn: The module that uses the svn network protocol to access the version Library. -Use Cyrus SASL authentication-handle the "svn" scheme * ra_local: the version library module that accesses the local disk. -"File" solution ③: install openssl 1. tar-zxvf openssl-1.0.1c.tar.gz 2. cd openssl-1.0.1c 3 .. /configure 4. make 5. sudo make install Part 2: Check ①: Check whether svn has been added to apache to view/usr/local/apache2/conf/httpd. whether LoadModule dav_svn_module modules/mod_dav_svn.so is added to the conf file. if not, manually add it. ② enable apache, go to the bin directory of apache, and execute sudo. /apachectl start is opened in the browser. http: // localhost: Check whether apache runs normally. Part 3: integration ①: create SVN repository # Create folder $ mkdir-p/home/my Svn # run the command to create a version database and specify the data storage as FSFS. if you want to specify the database as Berkeley DB, replace fsfs with bdb $ svnadmin create -- fs-type fsfs/home/mysvn ②: There are two ways to integrate apache and subversion www.2cto.com Subversion servers, first, it can be used as a module of Apache 2.0 to communicate with the outside world using the WebDAV/DeltaV protocol. In addition, it can also use the small server program svnserve that comes with Subversion. Run http in/usr/local/apache2/conf/httpd. conf and add: DAV svn SVNPath/home/mysvn Enter the URL http: // localhost/svn/repository/in the server browser. at this time, you will see the reversion0 interface, indicating that the repository is ready to work. Tips: If you cannot see it at this time, check the preceding steps carefully. if they are correct, check your httpd. in the conf configuration file, check whether the port for apache to call svn is occupied, because the web service in linux occupies port 80, and apache calls port 80 by default. ③: User addition and permission settings www.2cto.com 1. user addition: because subversion is integrated with apache, user Addition Management and permission settings are both apache tasks. Log on to/urs/local/apaceh2/bin and add the user ### first time: create a file with-c # htpasswd-c/etc/svn-auth-file harry New password: * ***** Re-type new password: ***** Adding password for user harry # htpasswd/etc/svn-auth-file sally New password: * ****** Re-type new password: ******* Adding password for user sally 2. add www.2cto.com in/usr/local/apache2/conf/httpd. conf: DAV svn SVNPath/home/mysvn AuthType Basic AuthName "Subversion repository" AuthUserFile/etc/svn-auth-file Require valid-user After you restart Apache, if someone wants to access the SVN server, the system will ask him to enter the user name and password. Only the username and password of Sally or Harry can be entered to modify and access the archives. The permission is set in svn-auth-file, such as the repository rpo. There are two directories, p1 and p2, and user a and B # User, B can only read the directory under the rpo directory, and has no permission to write [rpo: \] a = r B = r www.2cto.com # User a has the read/write function for p1, user B can only read [doc:/p1] a = rw B = r tips: note that the user will inherit the permissions of the parent directory. Be careful with the settings and do not conflict with each other. In this case, you only need to enter the correct user name and password to log on. if you cannot access it, see the following description: tips: Check whether your user has the permission to view files, run the command # chown-R apache. apache/path/to/file ④: Add user group and User Group permission settings as follows: [groups] Ppc = a, B, c Symbian = d, e, f www.2cto.com: add the @ flag before the user group permission setting, which indicates that the permissions for all members in the group are the same as those for [doc:/] @ symbian = r
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