๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ๋ฐœ/์„œ๋ฒ„ ํ™˜๊ฒฝ

[CentOS 7] Subversion ์„ค์น˜ :: ๋งˆ์ด์ž๋ชฝ

by ๐ŸŒปโ™š 2018. 9. 1.

Subversion์€ ์ค„์—ฌ์„œ SVN์ด๋ผ๊ณ ๋„ ํ•œ๋‹ค.

์—ฌ๋Ÿฌ ์‚ฌ๋žŒ๋“ค๊ณผ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ• ๋•Œ ๋ฒ„์ „ ํ˜น์€ ์†Œ์Šค๋ฅผ ๊ณต์œ ํ•  ์ˆ˜ ์žˆ๋Š” ํ˜•์ƒ๊ด€๋ฆฌ ํ”„๋กœ๊ทธ๋žจ์ด๋‹ค.


ํ˜•์ƒ๊ด€๋ฆฌ ํ”„๋กœ๊ทธ๋žจ์œผ๋กœ SVN๋ณด๋‹ค๋Š” Git์„ ๋งŽ์ด ์‚ฌ์šฉํ•˜์ง€๋งŒ, SVN๋„ ์•„์ง ๋งŽ์ด ์‚ฌ์šฉํ•œ๋‹ค.

์ „์ž์ •๋ถ€ ํ”„๋ ˆ์ž„์›Œํฌ์—์„œ ๊ฐœ๋ฐœํ™˜๊ฒฝ ์†Œ์Šค๊ด€๋ฆฌ ํ”„๋กœ๊ทธ๋žจ์œผ๋กœ SVN์„ ์‚ฌ์šฉํ•˜๋„๋ก ๋˜์–ด์žˆ๋‹ค.


ํ•„์ž๋Š” 1.7.14๋ฒ„์ „์œผ๋กœ ์ปดํŒŒ์ผ ์„ค์น˜๋ฅผ ํ• ๊ฒƒ์ด๋‹ค.

http://subversion.apache.org/





archive download site





ํ•„์š”ํ•œ ๋ฒ„์ „์˜ ๋งํฌ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ•œ๋‹ค.





wget ๋ฐฉ์‹์œผ๋กœ ๋ฐ›์•„์ฃผ๊ณ  ํ’€์–ด์ค€๋‹ค.

1
2
3
4
5
[jamong@localhost ~]$ cd dev_util/
[jamong@localhost dev_util]$ mkdir svn
[jamong@localhost ~]$ cd svn/
[jamong@localhost svn]$ wget https://archive.apache.org/dist/subversion/subversion-1.7.14.tar.gz
[jamong@localhost svn]$ tar xvfz subversion-1.7.14.tar.gz
cs





์ปดํŒŒ์ผ ์„ค์น˜๋ฅผ ์œ„ํ•ด ํ•„์š”ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ์„ค์น˜ํ•ด์ค€๋‹ค.



arp, apr-util ๋ฒ„์ „ํŠธ๋ฆฌ http://archive.apache.org/dist/apr/

wget์œผ๋กœ ๋ฐ›์•„์ฃผ๊ณ  ํ’€์–ด์ค€๋‹ค.

1
2
3
4
[jamong@localhost svn]$ wget http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
[jamong@localhost svn]$ tar xvfz apr-1.5.2.tar.gz
[jamong@localhost svn]$ wget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
[jamong@localhost svn]$ tar xvfz apr-util-1.5.4.tar.gz

cs





apr ์ปดํŒŒ์ผ ์„ค์น˜

1
2
3
4
5
[jamong@localhost svn]$ cd apr-1.5.2/
[jamong@localhost apr-1.5.2]$ ./configure --prefix=/home/jamong/dev_util/svn/apr
[jamong@localhost apr-1.5.2]$ make
[jamong@localhost apr-1.5.2]$ make install
[jamong@localhost apr-1.5.2]$ make clean

cs






apr-util ์ปดํŒŒ์ผ ์„ค์น˜

1
2
3
4
5
6
[jamong@localhost apr-1.5.2]$ cd /home/jamong/dev_util/svn/apr-util-1.5.4
[jamong@localhost apr-util-1.5.4]$ ./configure --prefix=/home/jamong/dev_util/svn/apr-util\
>  --with-apr=/home/jamong/dev_util/svn/apr
[jamong@localhost apr-util-1.5.4]$ make
[jamong@localhost apr-util-1.5.4]$ make install
[jamong@localhost apr-util-1.5.4]$ make clean

cs






sqlite ์„ค์น˜ ๋ฐ ์„ค์ •

https://www.sqlite.org/download.html




wget์œผ๋กœ ์„ค์น˜ํ•˜๊ณ  ํ’€์–ด์ค€๊ณ  sqlite3.c ํŒŒ์ผ์„ SVN ์†Œ์Šค ์„ค์น˜ ํด๋”์— ํด๋”๋ฅผ ๋งŒ๋“ค์–ด์ฃผ๊ณ  ๋„ฃ์–ด์ค€๋‹ค.

1
2
3
4
5
6
[jamong@localhost svn]$ wget https://www.sqlite.org/2018/sqlite-autoconf-3240000.tar.gz
[jamong@localhost svn]$ tar xvfz sqlite-autoconf-3240000.tar.gz
[jamong@localhost svn]$ cd subversion-1.7.14/
[jamong@localhost subversion-1.7.14]$ mkdir sqlite-amalgamation/
[jamong@localhost subversion-1.7.14]$ cd /home/jamong/dev_util/svn/sqlite-autoconf-3240000
[jamong@localhost sqlite-autoconf-3240000]$ cp sqlite3.c /home/jamong/dev_util/svn/subversion-1.7.14/sqlite-amalgamation/
cs





์ด์ œ SVN ์ปดํŒŒ์ผ ์„ค์น˜๋ฅผ ํ•œ๋‹ค.

1
2
3
4
5
6
7
8
[jamong@localhost sqlite-autoconf-3240000]$ cd /home/jamong/dev_util/svn/subversion-1.7.14
[jamong@localhost subversion-1.7.14]$ ./configure --prefix=/home/jamong/dev_util/svn\
>  --with-apr=/home/jamong/dev_util/svn/apr\
>  --with-apr-util=/home/jamong/dev_util/svn/apr-util\
>  --without-berkeley-db
[jamong@localhost subversion-1.7.14]$ make
[jamong@localhost subversion-1.7.14]$ make install
[jamong@localhost subversion-1.7.14]$ make clean

cs






svn ์ €์žฅ์†Œ๋ฅผ ๋งŒ๋“ค์–ด์ค€๋‹ค.

1
2
3
4
[jamong@localhost ~]$ cd /home/jamong/dev_util/svn/
[jamong@localhost svn]$ mkdir repository
[jamong@localhost svn]$ cd bin/
[jamong@localhost bin]$ ./svnadmin create --fs-type fsfs /home/jamong/dev_util/svn/repository/
cs






svn ์œ ์ € ๋ฐ ๋น„๋ฐ€๋ฒˆํ˜ธ ๋“ฑ๋กํ•ด์ค€๋‹ค

1
2
3
[jamong@localhost bin]$ cd ..
[jamong@localhost svn]$ cd repository/conf
[jamong@localhost conf]$ vi passwd
cs

์ฃผ์„์„ ํ’€์–ด์ฃผ๊ณ  ์›ํ•˜๋Š” ์œ ์ €๋ช…๊ณผ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์„ค์ •ํ•ด์ค€๋‹ค.

1
2
[users]
jamong = ๋น„๋ฐ€๋ฒˆํ˜ธ
cs




svnserve.conf ์„ค์ •

1
[jamong@localhost conf]$ vi svnserve.conf

cs

์•„๋ž˜์™€๊ฐ™์ด ์„ค์ •

1
2
3
4
5
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
cs





๊ถŒํ•œ์„ค์ •

1
[jamong@localhost conf]$ vi authz
cs

์•„๋ž˜์™€๊ฐ™์ด ์„ค์ •ํ•œ๋‹ค.

1
2
3
4
5
[groups]
allusers = jamong
 
[/]
@allusers = rw
cs

group์— ๊ณ„์ •์„ ์ถ”๊ฐ€ํ•ด์ฃผ๊ณ , group์— ์ฝ๊ธฐ์™€ ์“ฐ๊ธฐ ๊ถŒํ•œ์„ ๋ถ€์—ฌํ•ด์ค€๋‹ค.





๋งˆ์ง€๋ง‰์œผ๋กœ ๋ฐฉํ™”๋ฒฝํฌํŠธ๋ฅผ ๊ฐœ๋ฐฉํ•ด์ค€๋‹ค.

svn์˜ default ํฌํŠธ๋Š” 3690์ด๋‹ค.

1
2
3
4
[jamong@localhost conf]$ sudo firewall-cmd --zone=public --add-port=3690/tcp --permanent
[jamong@localhost conf]$ sudo firewall-cmd --reload
[jamong@localhost conf]$ sudo firewall-cmd --list-ports
22/tcp 3306/tcp 8080/tcp 80/tcp 9090/tcp 3690/tcp

cs




svn์‹คํ–‰์„ ํ•œ๋‹ค.

1
[jamong@localhost ~]$ svnserve -d -r /home/jamong/dev_util/svn
cs



svn์ด ์ œ๋Œ€๋กœ ์„ค์น˜ ๋˜์—ˆ๋Š”์ง€ ๋ฒ„์ „์„ ํ™•์ธํ•ด์ค€๋‹ค.

1
2
3
4
5
6
7
8
[jamong@localhost conf]$ svn --version
svn, ๋ฒ„์ ผ 1.7.14 (r1542130)
    Apr 11 201802:40:28์— ์ปดํŒŒ์ผ ๋จ
 
Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/
cs




๋‹ค์Œ ๊ธ€์—์„œ๋Š” svn์„ ํ†ตํ•ด์„œ ํ˜•์ƒ๊ด€๋ฆฌ๊ฐ€ ๋˜๋Š”์ง€ eclipse๋ฅผ ์ด์šฉํ•˜์—ฌ ํ™•์ธํ•  ๊ฒƒ์ด๋‹ค.

๋Œ“๊ธ€