centos6.8 using Apache to build SVN services

Source: Internet
Author: User

Server environment:

The script is as follows:

#!/bin/Bashyum Install wget-YMV/etc/etc/yum.repos.d/*. Repo/tmpwget-o/etc/yum.repos.d/centos-base.repoHttp://mirrors.aliyun.com/repo/Centos-6.repoWget-o/etc/yum.repos.d/epel.repoHttp://mirrors.aliyun.com/repo/epel-6.repoYum clean allchkconfig iptables off/etc/init.d/iptables stopsed-i '/selinux/s/enforcing/disabled/'/etc/selinux/ Configsetenforce 0sed-i ' #UseDNS yes/usedns no/g '/etc/ssh/sshd_configecho ' ntpdate ntp1.aliyun.com '
Ntpdate Ntp1.aliyun.comecho '*/5* * * * */usr/sbin/ntpdate ntp1.aliyun.com'>>/var/spool/cron/rootchmod -/var/spool/cron/Rootyum Install httpd httpd-devel Subversion MOD_DAV_SVN Ntpdate-Yecho"Start creating directories and configuration Files"mkdir-p/etc/subversion && cd/etc/subversion && Touch svn-authz.conf svn-Userecho"To start creating a version library"mkdir-p/home/svndata && chown-r apache.apache/home/svndata && svnadmin Create/home/svndata/department_ Server && chown-r apache.apache/home/svndata/Department_serverecho"Start configuration file"Cat<<eof >/etc/subversion/svn-Authz.conf[groups]admin=Liuhuihuangmygirl=wangchenyan[/]liuhuihuang=RW* =R EOFif[$?-eq0];then Echo"Configure Success"Fiecho"start backing up the subversion.conf configuration file and emptying the configuration file"CP/etc/httpd/conf.d/subversion.conf/etc/httpd/conf.d/subversion.conf.bak &&true>/etc/httpd/conf.d/Subversion.confecho"start writing a new configuration file"Cat<<eof >/etc/httpd/conf.d/subversion.conf<Location/svn>DAV svn svnlistparentpath on Svnparentpath/home/svndata authtype Basic authname"Welcome to Xl-svn Server"Authzsvnaccessfile/etc/subversion/svn-authz.conf AuthUserFile/etc/subversion/svn-User Require Valid-User</Location>EOFif[$?-eq0];then Echo"Configure Success"Fiecho"write config file to http.conf"Echo"LoadModule dav_svn_module modules/mod_dav_svn.so">>/etc/httpd/conf/Httpd.confecho"LoadModule authz_svn_module modules/mod_authz_svn.so">>/etc/httpd/conf/httpd.confsed-I.'s/#ServerName www.example.com:80/ServerName localhost:80/g'/etc/httpd/conf/httpd.conf Echo"start the httpd service"/etc/init.d/httpd Startif[$?-eq0];then Echo"SVN service Setup is complete, please visit Http:ip/svn/department_server"fi

Tip: The repository path is/home/svndata, and the Permissions profile path is/ETC/HTTPD/CONF.D for the/etc/subversion/svn_authz.conf,subversion configuration file.

centos6.8 using Apache to build SVN services

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.