Install Svn in Redhat Enterprise Linux 3

Source: Internet
Author: User
Tags openssl version

I have referenced several articles and summarized the problems I encountered as follows:

 

References:

Http://www.yoyotown.com /? P = 422

Http://blog.zjol.com.cn /? Uid-1222-action-viewspace-itemid-599186

 

The following operations are performed as root, and the operations are performed as svnroot.

 

1. download the file (http://subversion.tigris.org /)
Two packages in total
Subversion-1.4.6.tar.gz
Subversion-deps-1.4.6.tar.gz

 

2. Extract
Tar-xzvf subversion-1.4.6.tar.gz
Tar-xzvf subversion-deps-1.4.6.tar.gz

 

3. Configuration

. /Configure -- With-apxs =/usr/local/Apache/bin/apxs -- prefix =/usr/local/Subversion -- With-Apr =/usr/local/Apache --- apr-util =/usr/local/Apache -- With-SSL -- With-zlib =/usr/lib -- enable-maintainer-Mode

 

4. Compile and install
Make
Make install

 

5. Added svnroot users and svnroot groups.
Useradd svnroot. After executing this command, we can see that svnroot users and groups are generated. For details, see the/etc/passwd and/etc/group files.

6. As svnroot

Su svnroot

 

7. Create a repository "test"
/Usr/local/subverison/bin/svnadmin create/home/svnroot/Repository/test

 

8. Check if there are more files. If yes, it indicates that the Subversion is successfully installed.
CD/home/svnroot/Repository/test
Ls-l

 

9. Only the svnroot user can access this directory.

Chmod 700/home/svnroot/Repository

 

10. Su root as root

 

11. Change Apache configuration

(1) Change the users and groups started by Apache. Otherwise, Apache does not have the permission to read/home/svnroot/Repository.

User nobody
Group #-1
Change the preceding content:
User svnroot
Group svnroot

 

(2) vi/usr/local/apache2/CONF/httpd. conf
If Apache is installed first, there should be the following two lines of code:
Loadmodule dav_svn_module modules/mod_dav_svn.so
Loadmodule authz_svn_module modules/mod_authz_svn.so

If not, add

 

Add the following:

<Location/SVN>
Dav SVN
Svnparentpath/home/svnroot/Repository // SVN parent directory
Authzsvnaccessfile/home/svnroot/Repository/authz. conf // permission configuration file
Authtype basic // set the connection type
Authname "subversion. login" // connection box prompt
Authuserfile/home/svnroot/Repository/AuthFile // user configuration file
Require valid-user // which authentication is used
</Location>
// AuthFile is created through "htpasswd [-C]/home/svnroot/Repository/AuthFile Username Password"
// "Require valid-user" tells Apache that all users in AuthFile can access Apache. Without it, only the first user can access the new database.

 

12. permission management

1) Add users
Htpasswd [-C]/home/svnroot/Repository/AuthFile haha
// Use-C to create a new user file when setting the user for the first time. Press enter and enter the user password.
Htpasswd AuthFile username (add new user)

2) Permission assignment
VI/home/svnroot/Repository/authz. conf
[Test:/] // indicates the access permission under the root directory of the test warehouse.
Wooin = RW // The test warehouse wooin user has read and write permissions
Bao = r // test repository Bao users have read permission
[Test2: //] // access permission under the root directory of the Test2 Repository
Wooin = r // The wooin user has only the read permission in the root directory of the Test2 repository.
Bao = // The Bao user does not have any permissions under the root directory of the Test2 repository.
[/] // This indicates that it is in the root directory of all warehouses
* = R // This indicates that all users have the read permission.
# [Groups] // This indicates group settings
# Svn1-developers = wooin, Bao // This represents a member of a group
# Svn2-developers = wooin
# [Svn1:/]
# @ Svn1-developers = RW // if you add the @ symbol above, it indicates this is a group permission setting

 

13. Restart Apache after completing the preceding settings.

/Usr/local/Apache/bin/apachectl restart

 

Then you can access http: // localhost/SVN/test.

 

14. Environment Variables

VI/etc/profile. d/SVN. Sh

Add

Export Path = $ path:/usr/local/subversion/bin

 

15. Some Problems

(1) Note: During Apache compilation, you must add at least the -- enable-Dav -- enable-so -- enable-maintainer-mode option. Otherwise, after installing SVN and starting Apache, the following error is reported:

Httpd: syntax error on line 58 of/usr/local/apache2/CONF/httpd. conf: cannot load/usr/local/apache2/modules/mod_dav_svn.so into server:/usr/local/apache2/modules/mod_dav_svn.so: Undefined Symbol: dav_register_provider

 

(2) You don't have permission to access/SVN/test/on this server appears

This may be because users and groups running Apache do not have the permission to access/SVN/test/. Just change it in httpd. conf.

 

(3) An error occurs when installing svn-1.5.0 or above in rhel3:

In file encoded ded from buckets/ssl_buckets.c: 46:
/Usr/include/OpenSSL/SSL. h: 909: syntax error before "kssl_ctx"
/Usr/include/OpenSSL/SSL. h: 931: syntax error before '} 'token
Make [1]: *** [buckets/ssl_buckets.lo] Error 1
Make [1]: Leaving directory '/usr/local/subversion-1.5.5/serf'
Make: *** [External-All] Error 1

 

This is because the OpenSSL version is too low. Just upgrade it.

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.