Install SVN under Linux (encoding-based approach)

Source: Internet
Author: User
Tags install openssl openssl svn collabnet

SVN is what, I believe can see the students here should not have this problem, crap not much to say, start:

1. Create a Directory

mkdir/home/svn/

2. Get the source files required to install SVN (SVN's official URL is http://subversion.tigris.org)

wget http://subversion.tigris.org/downloads/subversion-1.6.1.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.1.tar.gz

2. Decompression

Tar zvxf subversion-1.6.1.tar.gz

Tar zvxf subversion-1.6.1.tar.gz

The above two compressed files are extracted and placed under the same file subversion-1.6.1

3, installation (here only by default configure)

At this point we run the./configure and will find that the error has been reproduced:

No acceptable C compiler found in $PATH

is because we are missing the C build environment. Here we use Yum to install gcc (C compiler, it seems to support java,c#)

Yum Install gcc.i386


4, Step 3 normal operation will come again./configure

Discovery Report

Configure:error:We require OpenSSL; Try--with-openssl

It's a hint that we have less OpenSSL (just in case there are two of them on the system)

Yum Install OpenSSL
Yum Install Openssl-devel

5, step 4 run normally come again./configure

You don't seem to having Berkeley DB version 4.0.14 or newer
Installed and linked to Apr-util. We have created makefiles which
Would build without the Berkeley DB back-end; Your repositories would
Use FSFS as the default back-end. You can find the latest version of
Berkeley DB here:
Http://www.oracle.com/technology/software/products/berkeley-db/index.html

It means the environment is fine.

6. Make

This step points to the time

7. Make Install

This step is fine.

The following error occurs if make install:
/home/upload/subversion-1.6.6/subversion/svnversion/.libs/lt-svnversion:error while loading shared libraries: Libiconv.so.2:cannot open Shared object file:no such file or directory
Make: * * * [Revision-install] Error 127
Workaround:
1. Edit the/etc/ld.so.conf file
Vi/etc/ld.so.conf
Add the following line of code
/usr/local/lib
2. Run Ldconfig after saving:
/sbin/ldconfig
Note: ld.so.conf and ldconfig are used to maintain system dynamic link libraries.
3, and then install
Make install
Test whether the installation was successful

8. Find the installation directory of SVN, default./configure installed to/usr/local/bin

Svnserve--version

Installation Successful

Svnserve, version 1.6.1 (r37116)
Compiled Nov 6 2016, 06:07:24

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository back-end (FS) modules is available:

* Fs_fs:module for working with a plain file (FSFS) repository.

9, add to the environment variable

Vim/etc/profile

At the back, add

Svnpath= $PATH:/usr/local/
Export Svnpath

10, build an SVN root directory, because the project is more than one

[Email protected] ~]$ mkdir-p/home/zhangy/www #-p means that if there is no parent directory built

11, build a warehouse.

[Email protected] ~]$ mkdir-p/home/zhangy/www/repos

[Email protected] www]$ svnadmin create/home/zhangy/www/repos/

12, Import data

[[Email protected] ~]$ svn import./svntest file:///home/zhangy/www/repos-m "Initial repository test"
Adding svntest/test.php

Committed Revision 1.

13, modify svnserve.conf

[Email protected] conf]# VI svnserve.conf

[General]
Anon-access = None
auth-access = Write
Password-db = passwd
Authz-db = Authz

14, directory control file Authz

[Email protected] conf]# VI Authz
[Groups]

admin= zhangy

[repos:/]
@admin = RW
* = R

15. Modify User Password file passwd

[Email protected] conf]# VI passwd

[Users]
Zhangy = root

16. Start SVN

[Email protected] www]# svnserve-d-r/home/zhangy/www

In particular, it is important to note that/HOME/ZHANGY/WWW is the repository's root directory and does not overlap the [repos:/] directory. If overlap is prompted with the following error

[[Email protected] checkout]$ SVN co SVN://127.0.0.1/
Svn:authorization failed

17, Test SVN

Checkout

[[Email protected] checkout]$ SVN co svn://127.0.0.1/repos
Authentication Realm: <svn://127.0.0.1:3690> 3d0c32b1-3841-4518-b6b1-dcdb6c7ed716
Password for ' zhangy ':
-----------------------------------------------------------------------
attention! Your Password for authentication realm:

<svn://127.0.0.1:3690> 3d0c32b1-3841-4518-b6b1-dcdb6c7ed716

Can only is stored to disk unencrypted! You is advised to configure
Your system so, Subversion can store passwords encrypted, if
Possible. See the documentation for details.

You can avoid future appearances of this warning by setting the value
Of the ' store-plaintext-passwords ' option to either ' Yes ' or ' no ' in
'/home/zhangy/.subversion/servers '.
-----------------------------------------------------------------------
Store Password unencrypted (yes/no)? Yes
A repos/test.php
Checked out Revision 1.

Checkout will appear when the store password unencrypted, the solution

Vi/home/zhangy/.subversion/servers

Find the following and the comment is removed and changed to Yes.

# store-plaintext-passwords = No

Install SVN under Linux (encoding-based approach)

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.