Subversion Server installation manual under Linux

Source: Internet
Author: User

Subversion Server installation manual under Linux

Install the Linux version based on: Red Hat Enterprise Linux Server release 6.3.

A ready-to-install package.

(1) Download apache:httpd-2.2.23.tar.gz

(2) Download Subverson.

Http://subversion.tigris.org/downloads/subversion-1.6.12.tar.gz

Http://subversion.tigris.org/downloads/subversion-deps-1.6.12.tar.gz

Two-Installation

Installation sequence is required, first install Apache, and then install Subversion.

1 Installing Apache

Upload the installation compression pack [httpd-2.2.23.tar.gz] to the Linux environment/usr/local/below.

[Email protected]/]# cd/usr/local/

[Email protected]/]# tar zxfhttpd-2.2.23.tar.gz

[Email protected]/]# cd/usr/local/httpd-2.2.23

[[email protected]/]# configure-prefix=/usr/local/apache-enable-dav-enable-so && make && make install

2 launch Apache, install error-free after entering

#cd/usr/local/apache/bin

#./apachectl Start

If the prompt fails to start, the port is occupied: #vi/usr/local/apche/conf/http.conf

Found it

#Listen 12.34.56.78:80
Listen 80

Modify the 80 to its own port number. ---If you start successfully, you do not have to modify the port number.

Restart Apache, client input address http://172.18.49.180/

Page Show

It works! Indicates that the installation was successful.

3 Installing SVN

Copy the installation compression pack [subversion-1.6.12.tar.gz] and [subversion-deps-1.6.12.tar.gz] to the Linux environment/usr/local/below.

[Email protected]/]# cd/usr/local/

[Email protected]/]# tar zxf subversion-1.6.12.tar.gz

[Email protected]/]# tar zxf subversion-deps-1.6.12.tar.gz

(The installation package decompression, after extracting the installation folder [subversion-1.6.12], two files will be extracted to the same folder)

[Email protected] local]# cd/usr/local/subversion-1.6.12

[Email protected] subversion-1.6.12]# RM-RF Apr

[[email protected] subversion-1.6.12]# rm-rf apr-util (delete the APR and Apr-util folder from Subversion, as you can with Apache)

[Email protected] subversion-1.6.12]# cd/usr/local/subversion-1.6.12

[[Email protected]]#

./configure-prefix=/usr/local/subversion-with-apxs=/usr/local/apache/bin/apxs-with-apr=/usr/local/apache/bin/ Apr-1-config-with-apr-util=/usr/local/apache/bin/apu-1-config

[[Email protected]]#

Make

[[Email protected]]#

Make install

[Email protected] subversion-1.6.12]# Svnserve--version
Error during installation: "Cannot find–lexpat", need to install expat-2.0.1.tar.gz.

However, the #svnserve--version display version is not 1.6, but 1.4 (the old version) illustrates the previous version of SVN that was installed.

Workaround #vi

/etc/profile

At the end of the fill

#set Svnpath

Export Path=/usr/local/subversion1.6/bin: $PATH

Export PATH

Save exit.

Perform #scource/ect/profile

Re-execute #svnserve--version--ok

4 Check if SVN is compatible with Apache

# Find out if the following two lines are added in Files/usr/local/apache/conf/httpd.conf and/etc/httpd/conf/httpd.conf, respectively:

LoadModule Dav_svn_module modules/mod_dav_svn.so

LoadModule Authz_svn_module modules/mod_authz_svn.so

And see if there are any mod_dav_svn.so under/usr/local/apache/modules,

and mod_authz_svn.so files, some words will copy these two files to/etc/httpd/modules below.

If not in http.conf, add these two lines of code.

If there are no mod_dav_svn.so and mod_authz_svn.so, the SVN installation error is indicated. Follow the steps to reload.

Configure Svn+apache

1 Creating an SVN library

(1) Create SVN Special Account # Useradd POCSVN

(2) Create SVN repository directory #mkdir/home/pocsvn/project

(3) Create SVN repository # svnadmin Create/home/pocsvn/project/poc

(4) Modify the Catalog project directory owner to POCSVN users:

#chown-R Pocsvn:pocsvn/home/pocsvn/project

and add Permissions chmod 755/home/pocsvn/project

2 Configuring SVN-dependent Apache

(1) using root user # vi/usr/local/apache/conf/httpd.conf and/etc/httpd/conf/httpd.conf will

LoadModule Dav_svn_module modules/mod_dav_svn.so

LoadModule Authz_svn_module modules/mod_authz_svn.so

Requires load above module

(2) Find

User Apache

Group Apache

Revision changed to

User POCSVN

Group POCSVN

(3) Add at the end of the file

<Location/svn>

DAV SVN

Svnparentpath/home/pocsvn/project-----The root directory of the SVN repository

AuthType Basic

AuthName "Welcome to CJYBT"-----The browser when landing the message. Write casually

authuserfile/home/pocsvn/project/passwd

---user's password information

Authzsvnaccessfile/home/pocsvn/project/poc/conf/authz

---The Conf directory that points to the SVN repository Authz

Require Valid-user

--("Require Valid-user" tells Apache that all users in the Authfile can access it.) If it is not, only the first user can access the new library)

</Location>

(4) Generate passwd file

#htpasswd-B/home/pocsvn/project/passwd Hello hello123

---generate passwd file under/home/pocsvn/project/, user name is Hello, password is hello123

#htpasswd-B/home/pocsvn/project/passwd Hello2 hello123

---Add the user name Hello in the/home/pocsvn/project/passwd file, password is hello123

(5) Edit User rights file Authz

#vi/home/pocsvn/project/poc/conf/authz

[Groups]--Indicates group settings

admin = Hello--Indicates that members of the admin group have hello, if you want to configure more than one, separated by commas

Develop = Hello2--Indicates that members of develop group have Hello2, if you want to configure more than one, separated by commas

[poc:/]--represents access rights under the root directory of the warehouse POC

Hello = rw--poc Warehouse Hello user has read and write permissions

Hello2 = R--POC Warehouse Hello2 user has read-only permission

@admin = rw--Indicates that members of the group admin have read and write access

@develop = R--Indicates that members of the group POC have read-only permissions

[/]--Indicates the root directory of all warehouses

* = R--Indicates read access for all users

---when editing authz, all lines must be written to the head, not indentation, or error.

(5) Modify permissions

chmod 755/home/pocsvn/project/passwd

Chown-r pocsvn:pocsvn/home/pocsvn/project/passwd

(6) Start SVN

Switch to POCSVN user #svnserve-D--listen-port 8888-r/home/pocsvn/project

-d means running in daemon (background run)

-r specifies that the root directory is/home/pocsvn/project

--listen-port 8888--Indicates listening on port 8888

Check svn for no start

Ps-ef|grep Svnserve or Ps-ef|grep 8888

(7) Restart Apache and switch back to root. Launch Apache

(8) Client access: Http://ip:81/svn/poc The login window is configured successfully.

--If prompted after logging in 403 or inaccessible. Configure the permissions to be incorrect, reconfigure the permissions under the following command.

Chcon-r-h-t httpd_sys_content_t <svn root directory, the test for this article is:

Chcon–r–h–t Httpd_sys_content_t/home/pocsvn/project

At this point, SVN and Apache combined with the SVN configuration is built.

If you need to change your account password through a client, you need to add two files in the/var/www/cgi-bin directory:

Svnpass.cgi and Svnpass.ini. You can then change your password by visiting the following Web page: http://172.18.49.180/cgi-bin/svnpass.cgi

Content of Svnpass.ini:

I have a lot of problems with the installation process. Summarized as follows

1 launch Apache error httpd:syntax error on line 111 Of/usr/local/apache2/conf/httpd.conf:cannot load/usr/local/apache2/modules /mod_dav_svn.so

Into server:/usr/local/subversion/lib/libsvn_subr-1.so.0:undefined symbol:apr_hash_clear

WORKAROUND: Reinstall Apache, pay attention to adding parameters

Command #./configure--prefix=/usr/local/apache2/--enable-dav--enable-so

The--enable-dav--enable-so parameter is mandatory, and you can add additional parameters depending on your needs.

--enable-dav enable Davweb support, is the Subversion+apache combination required, missing words, in the run Apache will appear undefined symbol:dav_register_provider error

--APR and Apr-util are generally installed in the httpd installation package, subversion installation will use to APR and Par-util, if the current system is not, it is best to install

2 after re-turning Apache. Subversion must be re-installed, and the SVN reset is done, and make install prompts for an error message.

You can do # make clean first, and then in #make, #make install

It is best to install it at once, but there are many problems in reloading.

3 Apr and Apr-util have problems.

Online data in SVN and Apache integration is a separate install APR, and Apr-util, these two in Apache have. Remove the subvision that comes with it.

Subversion Server installation manual under Linux

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.