Centos compiler installs Apache subversion-1.9.7 + httpd 2.4.32

Source: Internet
Author: User
Tags sqlite svn update version control system

SVN is the abbreviation for Subversion and is an open source version control system.

First, download and install subversion necessary source files

  1. Apache

    wget http://mirrors.shu.edu.cn/apache/httpd/httpd-2.4.32.tar.gz

  2. Subversion

    wget http://mirrors.hust.edu.cn/apache/subversion/subversion-1.9.7.tar.gz

  3. Apr Source Package

    wget http://mirror.bit.edu.cn/apache//apr/apr-1.6.3.tar.gz

  4. Apr-util Source Package

    wget http://mirror.bit.edu.cn/apache//apr/apr-util-1.6.1.tar.gz

  5. Serf Source Package

    wget http://mirrors.shu.edu.cn/apache/serf/serf-1.3.9.tar.bz2

  6. SCons Source Package

    wget https://sourceforge.net/projects/scons/files/scons/2.5.1/scons-2.5.1.tar.gz

  7. OpenSSL source Package

    wget https://www.openssl.org/source/openssl-1.1.1-pre4.tar.gz

  8. Sqlite-amalgamation Source Package

    wget http://www.sqlite.org/2018/sqlite-autoconf-3230000.tar.gz

Ii. installation of necessary dependencies

1, yum-y install zlib zlib-devel OpenSSL openssl-devel python*

III. Installation of APR

Tar xvf apr-1.6.3.tar.gzcd apr-1.6.3mkdir/usr/local/apr./configure--prefix=/usr/local/aprmake && make Install

Iv. installation of Apr-util

Tar xvf apr-util-1.6.1.tar.gzcd apr-util-1.6.1mkdir/usr/local/apr-util./configure--prefix=/usr/local/apr-util-- With-apr=/usr/local/aprmake && make Install


V. Installation of SCons

Tar xvf scons-2.5.1.tar.gzcd scons-2.5.1mkdir/usr/local/sconspython setup.py Install--prefix=/usr/local/scons

Vi. installation of Serf

Tar xvf serf-1.3.9.tar.bz2cd serf-1.3.9mkdir/usr/local/serf/usr/local/scons prefix=/usr/local/serf APR=/usr/local/ Apr apu=/usr/local/apr-util/usr/local/scons installcp/usr/local/serf/lib/libserf-1.so*/usr/local/lib/

Vii. installation of OpenSSL

Tar xvf openssl-1.1.1-pre4.tar.gzcd openssl-1.1.1-pre4./config--prefix=/usr/local/opensll-1.1.1make && make Install

Eight, install SQLite

Tar xvf sqlite-autoconf-3230000.tar.gz cd sqlite-autoconf-3230000./configure--prefix=/usr/local/sqlitemkdir/usr/ Local/sqlitemake-j ' grep processor/proc/cpuinfo | Wc-l ' && make install


Ix. installation of httpd

Useradd-r-d/app/website-s/sbin/nologin Apache//app/website represents the default path of the site, if not specified, the default is/var/www/htmltar XVF httpd-2.4.32 . TAR.GZCD httpd-2.4.32./configure--prefix=/usr/local/httpd-2.4.32--enable-so--enable-ssl--enable-cgi-- Enable-rewrite--with-zlib--with-pcre--enable-modules=most--enable-mpms-shared=all--with-mpm=prefork-- with-openssl=/usr/local/opensll-1.1.1--WITH-APR=/USR/LOCAL/APR--with-apr-util=/usr/local/apr-utilvim/usr/local /httpd-2.4.32/conf/httpd.conf//modify Default User and home page user Apachegroup apacheloadmodule dav_module modules/mod_dav.so//cancel this line comment

X. Installation of Subversion

TAR-XVF subversion-1.9.7.tar.gzcd subversion-1.9.7./configure--prefix=/usr/local/subversion-1.9.7--with-apr=/usr /LOCAL/APR--with-apr-util=/usr/local/apr-util--with-zlib=/usr/local/zlib--with-serf=/usr/local/serf/-- Enable-mod-activation--with-apache-libexecdir=/usr/local/httpd-2.4.32/modules/make-j ' grep processor/proc/ Cpuinfo | Wc-l ' && make install//automatically arranges multithreaded compilation according to CPU core echo "Export Path=/usr/local/subversion-1.9.7/bin: $PATH" >>/etc /PROFILESOURCE/ETC/PROFILESVN Help

If the following information appears

Svn:error while loading shared libraries:libserf-1.so.1:cannot open Shared object File:no such file or director
Cd/etc/ld.so.conf.d/vi user-libs.conf to add/usr/local/serf/libldconfig to the directory where we copy serf files.

Xi. Creating an SVN repository

Mkdir-p/data/repossvnadmin Create/data/reposcd/data/repos

12. Directory Structure

Total dosage 24drwxr-xr-x. 2 root root 4096 April 3 17:59 confdrwxr-sr-x. 6 root root 4096 April 3 17:32 db-r--r--r--. 1 root root 2 April 3 17:32 formatdrwxr-xr-x. 2 root root 4096 April 3 17:32 hooksdrwxr-xr-x. 2 root root 4096 April 3 17:32 locks-rw-r--r--. 1 root root 229 April 3 17:32 README.txt

13. Start off SVN service
A single machine can start multiple SVN services and modify different port numbers.

svnserve-d-r/data/repos--listen-port 3690ps-ef|grep svnnetstat-ln|grep 3690killall svnserve

14. Set Up SVN service boot

Method One:

To modify the/etc/rc.d/rc.local file, add the following command

/usr/local/subversion-1.9.7/svn/bin/svnserve-d-r/data/repos--listen-port 3690

Method Two:
Create the SVN file in the/etc/init.d/directory and set permissions 755, as shown in the code below

#!/bin/bash# centos can be managed with the following command Svn: service svn start (restart/stop) svn_home=/data/reposif  [ ! -f  "/usr/local/subversion-1.9.7/svn/bin/svnserve"  ]then     echo  "Svnserver startup: cannot start"     exitficase  "$"  in     start)         echo  "starting  Svnserve ... "        /usr/local/subversion-1.9.7/svn/bin/svnserve  -d --listen-port 3690 -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 1esac

Implementation of SVN code warehouse synchronization with Web line

SVN Code Warehouse Directory/DATA/REPOS/WWW1

Web on-line catalog/DATA/WWWROOT/WWW1

1, first checkout a copy

SVN Co SVN://192.168.1.254/WWW1/DATA/WWWROOT/WWW1

2. Modify Directory Permissions

CD/DATA/REPOS/WWW1/HOOKSCP Post-commit.tmpl POST-COMMITVI Post-commit

3. Create a synchronization script

CD/DATA/REPOS/WWW1/HOOKSCP Post-commit.tmpl POST-COMMITVI Post-commit

Add the following code

Export. UTF-8SVN=/USR/LOCAL/SUBVERSION-1.9.7/SVN/BINWEB=/DATA/WWWROOT/WWW1$SVN update $WEB--username test--password 123456chown-r 766 $WEB
chmod 755 Post-commit


Centos compiler installs Apache subversion-1.9.7 + httpd 2.4.32

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.