Translate

2015년 7월 21일 화요일

[Solaris] 솔라리스 11 에 SVN Server 설치 - OpenCSW




환경

OS: Solaris 11
(작업은 root 계정으로 진행)

root@solaris11:~# uname -a
SunOS solaris11 5.11 11.2 i86pc i386 i86pc
root@solaris11:~#





PS. 인터넷이 안되는 상황(offline)이라면 아래의 링크로 들어가 설치하길 바란다.
  - [Solaris] 솔라리스 11 에 SVN Server 설치 (오프라인) - CollabNet





SVN(Subversion) 설치 방법
설치할 SVN을 선택한다: http://subversion.apache.org/packages.html#solaris

그중에 나는 OpenCSW 설치 (http://www.opencsw.org/packages/subversion/)
설치파일을 다운받을 필요 없이 아래와 같은 명령어로 설치가 가능하다.

# pkgadd -d http://get.opencsw.org/now
# /opt/csw/bin/pkgutil -U
# /opt/csw/bin/pkgutil -y -i subversion 
# /usr/sbin/pkgchk -L CSWsvn



설치가 완료되었다면 다음과 같이 저장소를 생성 및 셋팅 한다.


# svnadmin create --fs-type fsfs {저장소 경로}
# chmod -R g+w {저장소 경로}
# chown -R nobody:nobody {저장소 경로}

# vi {저장소 경로}/conf/svnserve.conf
 아래의 부분의 주석을 제거한다.
  anon-access = read
  auth-access = write
  password-db = passwd

# vi {저장소 경로}/conf/passwd
  사용자 계정과 패스워드를 입력한다.

# svnserve -d -r {저장소 경로}
  SVN Server 를 기동

# svn mkdir --editor-cmd=vi svn://localhost/{저장소 명}
  아무입력 없이 ':wq' 입력하여 종료한다.
  중간에 나오는 root 는 시스템계정 '사용자명' 은 조금전 생성한 사용자를 입력한다.



작업 후 svn://{IP_ADDRESS} 경로로 SVN을 접속해보면 접속이 되는 것을 확인 할 수 있다.





아래는 내가 실제로 작업한 부분..


1004lucifer@1004lucifer-desktop:~/다운로드$ ssh 192.168.0.81
The authenticity of host '192.168.0.81 (192.168.0.81)' can't be established.
RSA key fingerprint is bc:c2:b7:4c:83:c7:bb:68:8f:6b:3a:8d:fa:54:74:f4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.81' (RSA) to the list of known hosts.
Password: 
Last login: Wed Jul 22 02:31:49 2015
Oracle Corporation      SunOS 5.11      11.2    June 2014
1004lucifer@solaris11:~$ 
1004lucifer@solaris11:~$ sudo bash
Password: 
root@solaris11:/export/home/1004lucifer# 
root@solaris11:/export/home/1004lucifer# cd ~
root@solaris11:~# 
root@solaris11:~# ls -l
total 0
root@solaris11:~# 
root@solaris11:~# pkgadd -d http://get.opencsw.org/now

## Downloading...
..............25%..............50%..............75%..............100%
## Download Complete


The following packages are available:
  1  CSWpkgutil     pkgutil - Installs Solaris packages easily
                    (all) 2.6.7,REV=2014.10.16

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: 

Processing package instance <CSWpkgutil> from <http://get.opencsw.org/now>

pkgutil - Installs Solaris packages easily(all) 2.6.7,REV=2014.10.16
Please see /opt/csw/share/doc/pkgutil/license for license information.
## Processing package information.
## Processing system information.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user
permission during the process of installing this package.

Do you want to continue with the installation of <CSWpkgutil> [y,n,?] y

Installing pkgutil - Installs Solaris packages easily as <CSWpkgutil>

## Installing part 1 of 1.
/etc/opt/csw/pkgutil.conf.CSW
/etc/opt/csw <implied directory>
/opt/csw/bin/pkgutil
/opt/csw <implied directory>
/opt/csw/bin <implied directory>
/opt/csw/etc/pkgutil.conf.CSW
/opt/csw/etc <implied directory>
/opt/csw/libexec/pkgutil/wget-i386
/opt/csw/libexec/pkgutil/wget-sparc
/opt/csw/share/doc/pkgutil/license
/opt/csw/share/doc/pkgutil/readme
/opt/csw/share/man/man1/pkgutil.1
/opt/csw/var/pkgutil/admin.CSW
[ verifying class <none> ]
## Executing postinstall script.

Copying sample pkgutil.conf to /opt/csw/etc.
Copying sample pkgutil.conf to /etc/opt/csw.
Copying sample admin from /opt/csw/var/pkgutil to /var/opt/csw/pkgutil.

NOTE!
NOTE! Make sure to check out any changes in /etc/opt/csw/pkgutil.conf.CSW.
NOTE!


Installation of <CSWpkgutil> was successful.
root@solaris11:~# 
root@solaris11:~# /opt/csw/bin/pkgutil -U
=> Fetching new catalog and descriptions (http://mirror.opencsw.org/opencsw/testing/i386/5.11) if available ...
==> 3736 packages loaded from /var/opt/csw/pkgutil/catalog.mirror.opencsw.org_opencsw_testing_i386_5.11
root@solaris11:~# 
root@solaris11:~# 
root@solaris11:~# /opt/csw/bin/pkgutil -y -i subversion 
Solving needed dependencies ...
Solving dependency order ...
Install 39 NEW packages:
        CSWbdb48-4.8.30,REV=2010.12.06_rev=p0 (opencsw/testing)
        CSWcommon-1.5,REV=2010.12.11 (opencsw/testing)
        CSWggettext-data-0.18.1.1,p,REV=2011.03.15 (opencsw/testing)
        CSWglib2-2.41.0,REV=2014.05.31 (opencsw/testing)
        CSWiconv-1.14,REV=2011.08.08 (opencsw/testing)

...

Pausing for 5 seconds -- Ctrl-C to abort upgrade.

!! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!


Installation of <CSWsvn> was successful.
root@solaris11:~# 
root@solaris11:~# 
root@solaris11:~# 
root@solaris11:~# /usr/sbin/pkgchk -L CSWsvn
/opt/csw/bin/svn f none 0755 root bin 375128 33958 1392379858 CSWsvn
/opt/csw/bin/svnadmin f none 0755 root bin 61584 7843 1392379858 CSWsvn
/opt/csw/bin/svndumpfilter f none 0755 root bin 31356 37209 1392379858 CSWsvn
/opt/csw/bin/svnlook f none 0755 root bin 58316 44710 1392379858 CSWsvn
/opt/csw/bin/svnmucc f none 0755 root bin 29688 45253 1392379858 CSWsvn

...

/opt/csw/share/man/man5 d none 0755 root bin CSWlibmagic-data CSWlibkrb5-3 CSWsvn
/opt/csw/share/man/man5/svnserve.conf.5 f none 0644 root bin 3801 7279 1392379311 CSWsvn
/opt/csw/share/man/man8 d none 0755 root bin CSWsvn
/opt/csw/share/man/man8/svnserve.8 f none 0644 root bin 5379 19289 1392379311 CSWsvn
root@solaris11:~# 
root@solaris11:~# 
root@solaris11:~# cd /opt/csw/bin/
root@solaris11:/opt/csw/bin# ls -l
total 2112
drwxr-xr-x   2 root     bin            5  7월 22일  02:39 amd64
-rwxr-xr-x   1 root     bin        17840 2014년  6월  1일 gapplication
-rwxr-xr-x   1 root     bin        11592 2014년  6월  1일 gio-querymodules
-rwxr-xr-x   1 root     bin        23088 2014년  6월  1일 gsettings
drwxr-xr-x   2 root     bin            2  7월 22일  02:39 i486
drwxr-xr-x   2 root     bin            2  7월 22일  02:39 pentium
-rwxr-xr-x   1 root     bin       106397 2014년 10월 17일 pkgutil
-rwxr-xr-x   1 root     bin       375128 2014년  2월 14일 svn
-rwxr-xr-x   1 root     bin        61584 2014년  2월 14일 svnadmin
-rwxr-xr-x   1 root     bin        31356 2014년  2월 14일 svndumpfilter
-rwxr-xr-x   1 root     bin        58316 2014년  2월 14일 svnlook
-rwxr-xr-x   1 root     bin        29688 2014년  2월 14일 svnmucc
-rwxr-xr-x   1 root     bin        55228 2014년  2월 14일 svnrdump
-rwxr-xr-x   1 root     bin        92708 2014년  2월 14일 svnserve
-rwxr-xr-x   1 root     bin        48228 2014년  2월 14일 svnsync
-rwxr-xr-x   1 root     bin        14856 2014년  2월 14일 svnversion
-rwxr-xr-x   1 root     bin        46920 2011년 12월  9일 update-mime-database
-rwxr-xr-x   1 root     bin        15516 2013년  8월 16일 xmlcatalog
-rwxr-xr-x   1 root     bin        56112 2013년  8월 16일 xmllint
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# ./svnadmin help
일반적인 사용법: svnadmin SUBCOMMAND REPOS_PATH  [ARGS & OPTIONS ...]
특정 부속 명령의 사용법을 위해서는 'svnadmin help <subcommand>' 를 참조하십시오.
'svnlook --version'으로 버전과 파일시스템 모듈을 볼 수가 있습니다.

가능한 부속 명령어 목록:
   crashtest
   create
   deltify
   dump
   freeze
   help (?, h)
   hotcopy
   list-dblogs
   list-unused-dblogs
   load
   lock
   lslocks
   lstxns
   pack
   recover
   rmlocks
   rmtxns
   setlog
   setrevprop
   setuuid
   unlock
   upgrade
   verify

root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# mkdir /root/svn
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# ./svnadmin create --fs-type fsfs /root/svn/repository
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# chmod -R g+w /root/svn/repository/
root@solaris11:/opt/csw/bin# chown -R nobody:nobody /root/svn/repository/
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# ls -l /root/svn/
total 3
drwxrwxr-x   6 nobody   nobody         8  7월 22일  02:41 repository
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# vi /root/svn/repository/conf/svnserve.conf 
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# cat /root/svn/repository/conf/svnserve.conf 
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)

### Visit http://subversion.apache.org/ for more information.

[general]
### The anon-access and auth-access options control access to the
### repository for unauthenticated (a.k.a. anonymous) users and
### authenticated users, respectively.
### Valid values are "write", "read", and "none".
### Setting the value to "none" prohibits both reading and writing;
### "read" allows read-only access, and "write" allows complete 
### read/write access to the repository.
### The sample settings below are the defaults and specify that anonymous
### users have read-only access to the repository, while authenticated
### users have read and write access to the repository.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the
### directory containing this file.  The specified path may be a
### repository relative URL (^/) or an absolute file:// URL to a text
### file in a Subversion repository.  If you don't specify an authz-db,
### no path-based access control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### The groups-db option controls the location of the groups file.
### Unless you specify a path starting with a /, the file's location is
### relative to the directory containing this file.  The specified path
### may be a repository relative URL (^/) or an absolute file:// URL to a
### text file in a Subversion repository.
# groups-db = groups
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
# realm = My First Repository
### The force-username-case option causes svnserve to case-normalize
### usernames before comparing them against the authorization rules in the
### authz-db file configured above.  Valid values are "upper" (to upper-
### case the usernames), "lower" (to lowercase the usernames), and
### "none" (to compare usernames as-is without case conversion, which
### is the default behavior).
# force-username-case = none
### The hooks-env options specifies a path to the hook script environment 
### configuration file. This option overrides the per-repository default
### and can be used to configure the hook script environment for multiple 
### repositories in a single file, if an absolute path is specified.
### Unless you specify an absolute path, the file's location is relative
### to the directory containing this file.
# hooks-env = hooks-env

[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# vi /root/svn/repository/conf/passwd 
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# cat /root/svn/repository/conf/passwd 
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
# harry = harryssecret
# sally = sallyssecret
1004lucifer = 123qwe
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# ./svnserve -d -r /root/svn/repository
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# ps -ef | grep svn
    root  3380     1   0 02:43:31 ?           0:00 ./svnserve -d -r /root/svn/repository
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# ./svn mkdir svn://localhost/repository
svn: E205007: 로그 메시지를 구하기 위해 외부 프로그램을 사용할 수 없습니다. SVN_EDITOR 환경변수를 설정하시거나 --message (-m) 또는 --file (-F) 옵션을 사용하세요
svn: E205007: 환경변수 SVN_EDITOR, VISUAL, EDITOR 중 하나는 설정하거나, 'editor-cmd' 를 구성화일에 명시해야합니다
root@solaris11:/opt/csw/bin# 
root@solaris11:/opt/csw/bin# ./svn mkdir --editor-cmd=vi svn://localhost/repository

로그 메시지가 변경되지 않았거나 지정되지 않았습니다
취소(A), 계속(C), 수정(E):
c
인증 영역(realm): <svn://localhost:3690> 1f9da62f-7f0b-4bf2-8d61-3ffd53f3f6ea
'root'의 암호:*******

인증 영역(realm): <svn://localhost:3690> 1f9da62f-7f0b-4bf2-8d61-3ffd53f3f6ea
사용자명:1004lucifer
'1004lucifer'의 암호:******


-----------------------------------------------------------------------
주의! 인증정보 영역:

   <svn://localhost:3690> 1f9da62f-7f0b-4bf2-8d61-3ffd53f3f6ea

에 대한 당신의 비밀번호는 디스크에 암호화되어 저장되지 않습니다.
가능하면, 비밀번호를 암호화하여 저장하도록 설정을 바꾸십시오.
자세한 것은 문서를 참조하세요.

이 주의 문구를 다음에 보이지 않게 하려면, 'store-plaintext-passwords'의
설정을 'yes' 혹은 'no'로 지정하면 됩니다. 설정 파일은 다음과 같습니다.
'/root/.subversion/servers'
-----------------------------------------------------------------------
비밀번호를 평문으로 저장하겠습니까 (yes/no)?yes

커밋된 리비전 1.
root@solaris11:/opt/csw/bin#




참조: http://keizwer.tistory.com/354


댓글 없음 :

댓글 쓰기