Integrated installation of apache and svn in CentOS

Source: Internet
Author: User
Routing cdapr-1.3.6./configure -- prefix/usr/local/aprmake & amp; makeinstallcd..www.2cto.com ####### security
Apache and svn integrated installation under CentOS ####### install apr ######### tar zxvf apr-1.3.6. tar. gzcd apr-1.3.6. /configure -- prefix =/usr/local/aprmake & make installcd .. www.2cto.com ####### install apr-util ####### tar zxvf apr-util-1.3.8. tar. gzcd apr-util-1.3.8. /configure -- with-apr =/usr/local/aprmake & make installcd .. ######## If apache has been installed, you need to re-compile and install apache ####### tar zxvf httpd-2.2.9. tar. gzcd httpd-2.2.9 www.2cto.com. /Configure -- prefix =/usr/local/apache2 -- enable-so -- enable-rewrite -- enable-dav -- enable-maintainer-mode -- with-apr =/usr/local/apr /bin/apr-1-config -- with-apr-util =/usr/local/apr/bin/apu-1-configmake & make installcd .. ####### installing subversion takes a long time. please wait ######## tar zxvf subversion-1.6.3. tar. subversion-deps-1.6.3. tar. gzcd subversion-1.6.3. /configure -- prefix =/usr/loc Al/subversion -- with-apxs =/usr/local/apache2/bin/apxs -- with-apr =/usr/local/apr/bin/apr-1-config -- with-apr-util = /usr/local/apr/bin/apu-1-configmake & make installcd .. when making ,. after configure, make. the following problem occurs:/usr/bin/ld: cannot find-lexpat collect2: ld returned 1 exit status make: * ** [subversion/svn] Error 1 www.2cto.com should be missing the-lexpat library file. Solution: yum install expat-devel manually configure svn: 1. add svnroot users and svn user groups, and create the svn version Library Directory useradd svnroot;/* Add svnroot users */groupadd svn;/* Add svn User Group */usermod-a-G svn svnroot; /* Add the svnroot user to the svn User Group */mkdir/home/svnroot mkdir/data chown-R root: svn/home/svnroot/data chmod-R g + rws/home/svnroot/data/* Grant read and write permissions to the svn group, you can change the corresponding permissions */chmod-R o-rwx/home/svnroot/data/* as needed to delete the read, write, and execute permissions of other irrelevant personnel, by default, other users may have the read permission */www.2cto. Com mkdir-pv/home/svnroot/datachown-R daemon/home/svnroot/data/* because apache has no permission to access the svn repository in the thread user, the two belong to different users. In this example, apache belongs to the daemon owner, while the svn repository belongs to the svn owner */chmod-R 755/home/svnroot/data 2. create the svn version Library/usr/local/subversion/bin/svnadmin create -- fs-type fsfs/home/svnroot/data/project1 3. create an access control file/usr/local/apache2/bin/htpasswd-c/home/svnroot/data/passwd wanghaihan # add the user name to-c for the first time, enter the password twice/usr/local/apache2/bin/h Tpasswd/home/svnroot/data/passwd test1 4. create a local project control file cd/home/svnroot/datavi authz www.2cto.com [groups] admin = wanghaihan, test1 [project1: /] @ admin = rw cat/usr/local/apache2/conf/httpd. conf | grep svn: LoadModule dav_svn_module modules/mod_dav_svn.soLoadModule authz_svn_module modules/mod_authz_svn.so indicates that the installation is successful. Add vi/usr/local/apache2/conf/httpd. conf www.2cto.com DAV svn SVNParentPath/home/svnroot/data AuthType Basic AuthName "Subversion" AuthUserFile/home/svnroot/data/passwd AuthzSVNAccessFile/home/svnroot/data/authz Require ID-user 5. restart apache/usr/local/apache2/bin/apachectl restart www.2cto.com to access your svn project (which can be accessed by using the client tool checkout or a browser): http: // ip/svn/project1 or svn co http: // ip/svn/project1 Note: When uploading files, you may receive the following error message: Permission deniedsvn: commit failed (details follow): svn: Can't create directory '/home/svnroot/data/project1/db/txn-current-lock': Permission denied or: command: submission error: submission failed (details are as follows): Error: Can't open file '/home/svnroot/data/pro Ject1/db/txn-current-lock': Permission denied complete! : Www.2cto.com this is because apache does not have the permission to access the svn repository in the thread user. The two belong to different users. In this example, apache belongs to the daemon owner, while the svn repository belongs to the svn owner.
Solution: chown-R daemon/home/svnroot/data chmod-R 755/home/svnroot/data restart apache:/usr/local/apache2/bin/apachectl restart
 
Related Article

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.