블로그 이미지
Flying Mr.Cheon youGom

Recent Comment»

Recent Post»

Recent Trackback»

« 2025/5 »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

 
 

















Git이라는거 좋네.

처음에는 '이게 왜필요하지'라는 생각으로 접근했다. 이 책을 읽어보니.. 왜 필요한 것인지 알았다.

Git, 분산 버젼 관리 시스템은 기존의 버젼 관리 시스템을 보완한거였다.


기존 버젼관리에서 중요부분을 수정하고나서 반영하려면, rock을 걸거나 공지한 후 모두가 커밋을 정지한상태에서 진행해야한다. 항상 모두가 동기화되어 진행하고 브랜치나 태그 따는데도 모두가 공유해야 한다. 안정적이든 불안정적이든간에.


물론, 지속적통합을 위해서 동기화되어 있는것이 맞다. 그러나 개발을 진행하다 보면, 약간의 비동기가 필요할때가 있다. 안정적 버젼을 제공해주기 위해 여러 브랜치테스팅이 필요한 경우도 있다. 이런 브랜치의 기능을 강화 시킨 솔루션이 '분산 버젼관리 시스템'이다. 


여기 분산버젼관리시스템의 핵심은 바로 '브랜치'다. 브랜치를 자유롭게 사용한다는 것이다. 때에 따라서 브랜치 정보를 수정할수도있고. 다른 부분에서 사용된 브랜치의 커밋정보도 끌어다 쓸 수가 있는 것이다. 이 부분은 기존 서버집중 버젼관리시스템에서는 약간 이해하기 어려운 부분이기도 했다. 독자도 이 부분의 개념을 이해하기 위해 3~4번 정도 번복해서 정독했었다.


Git의 기본은 로컬에서 Commit하여 로컬저장소에 보관하여, 안정적인 버젼을 서버로 Push하는 것이다.

여기에서 시작하여 각각의 버젼관리가 이루어진다. 태그는 수정불가는한 릴리즈 버젼을 지니고 있다.

태그를 수정하기 위해서는 새로운 브랜치를 생성하여 진행할 수 있다. 브랜치는 어느 버젼관리와 마찬가지로 여러갈래로 나뉘어지고, 다시 하나로 합쳐질 수 있다. 이 부분( 브랜치 및 합치기 ) 을 진행할 때, 로컬에서 자체적으로 수행하고, 공유가 필요한 부분만 서버에 전송( Push ) 한다.


이 책 부록에, 유용한 명령어 모음집이 맨 마지막에 붙어 있다. 어쩌면 설명없는 명령여 요약본으로 볼 수 있다.

독자도 나중에 필요할 것을 대비하여, 휴대가 편하도록 복사해 두었다.





'소프트웨어 공학 > 유지-보수' 카테고리의 다른 글

Doxygen 참고 자료  (0) 2011.10.25
:
프로젝트 산출물 관리를 위해 Trac과 svn을 연동하는 작업을 하였다. 처음엔 redhat에 깔았다가, selinux 패키지 문제 등 찾아내지 못한 문제들이 많아 ubuntu로 작업하였고, 한번 깐 다음에 문서를 작성하고, 그 대로 다시 한번 설치하여 보았다. 

이미 많은 trac, svn 연동 글들이 있지만, 해가 지나기도 하고, trac버전이 0.12로 올라오면서 trac에서 svn 지정하는 방식도 달라졌기 때문에 바로 적용하기 힘든 부분이 많았다. 이 글이 최신 버전으로 trac을 설치하는 데 도움이 되길 바란다.





1. Ubuntu 설치 

2. 파이썬 설치
#apt-get install python

3. SVN 패키지 설치
#apt-get install subversion

4. SVN 저장소 생성
#svnadmin create --fs-type fsfs <REPO-DIR>

- 사용자 추가
#htpasswd -c user_passwd admin
패스워드 입력
admin유저에 대한 정보가 user_passwd라는 파일에 기록된다.
나중에 아파치에서 이 파일을 통해 사용자 인증을 한다.

5. Apache 설치 & 실행
#apt-get install apache2 libapache2-svn
#/etc/init.d/apache2 start
웹브라우저에서 ip를 입력하여 초기 페이지가 뜨는지 확인

- Apache Python 모듈 설치
# apt-get install libapache2-mod-python

6. Apache 설정
# vi /etc/apache2/httpd.conf
dav, dav_svn 모듈이 설정되어 있는지 확인 합니다. 
주석처리 되어 있으면 주석을 없애고 없다면 아래 두줄을 추가합니다.

LoadModule dav_module         modules/mod_dav.so
LoadModule dav_svn_module     modules/mod_dav_svn.so

맨 밑에
웹으로 접근할 svn 주소를 명시한다

<Location /svn/REPO-NAME>     // 웹브라우저를 통해 ip/svn/REPO-NAME으로 접근 가능
     DAV svn
     SVNPath <REPO-DIR>     //저장소 주소     
     AuthType Basic
     AuthName "This is your repository"
     AuthUserFile /etc/apache2/pass/user_passwd //위에서 만든 패스워드 파일
     Require valid-user
</Location>

아파치 재시작
#/etc/init.d/apache2 stop
#/etc/init.d/apache2 start

이제 위의 주소를 통해 svn을 사용할 수 있다.

7. Trac 설치

- Trac 설치 필요패키지
Python
setuptools - # apt-get install python-setuptools
genshi - # apt-get install python-genshi
sqlite - # apt-get install python-sqlite

- Trac 설치

Using easy_install

One way to install Trac is using  setuptools. With setuptools you can install Trac from the subversion repository;

A few examples:

  • first install of the latest stable version Trac 0.12.2, with i18n support:
    easy_install Babel==0.9.5
    
    easy_install Trac
    
    It's very important to run the two easy_install commands separately, otherwise the message catalogs won't be generated.
  • Trac에서 Genshi 버전에러가 난다면 easy_install Genshi 로 재설치 해보자
  • upgrade to the latest stable version of Trac:
    easy_install -U Trac
    
  • upgrade to the latest trunk development version (0.13dev):
    easy_install -U Trac==dev
    

For upgrades, reading the TracUpgrade page is mandatory, of course.

8. Trac 환경 설정
1. 프로젝트 생성
# trac-admin /path/to/project initenv (생성 명령어, /path/to/project에 생성한다)
프로젝트 이름과 DB설정을 물어보는데, DB설정의 경우 아무 입력없이 enter를 치면 기본 설정으로 생성이 된다.

2. 웹에서 write 할 수 있도록 프로젝트 폴더의 권한 설정
# chown www-data:www-data -R /path/to/project

관리자 권한 부여
# trac-admin /YOUR/PROJECT/Trac_DIRECTORY/PROJECT_NAME permission add USERID TRAC_ADMIN

3. 웹 주소 매핑
- apache 설정 파일 수정
# vi /etc/apache2/httpd.conf
맨 밑에 로케이션 추가

  <Location /storagetf>     // ip/storagetf 로 접속됨
    SetHandler mod_python
    SetEnv PYTHON_EGG_CACHE /home/repo/storagetf/cache     
    PythonHandler trac.web.modpython_frontend
    PythonOption TracEnvParentDir   /home/storagetf/
    PythonOption TracUriRoot /storagetf
     AuthType Basic
     AuthName "This is your repository"
     AuthUserFile /etc/apache2/pass/user_passwd     // svn과 동일한 패스워드 파일 사용
     Require valid-userR
  </Location>

4. 웹 접속 권한 설정
# chown www-data:www-data -R /YOUR/PROJECT/Trac_DIRECTORY/
웹브라우저로 접속해보자


라고 나오면 성공, 프로젝트를 클릭하면



이런식으로 나오면 된다.


4. 웹 로그인 설정
일단 htpasswd 파일을 통한 인증을 하였는데, 관리자 id로 로그인했으면, html폼으로 로그인을 할 수 있도록 설정을 바꾸자
이를 위해 trac account manager plugin 을 깔아야 한다. http://trac-hacks.org/wiki/AccountManagerPlugin 참고
이를 깔고 아파치 재시작
관리자 메뉴에 들어가서 플러그인 목록을 보면 

이런 것들이 보일 것이다.

여기서 다 선택해도 상관이 없으며, email 인증을 하지 않을 거라면 밑에 EmailVerificationModule 은 비활성화 한다.

이를 적용한뒤, Accounts메뉴에 설정을 들어가자
사용자 id/pw를 관리할 방법, 파일 경로를 적는 것이 있는데,
htpasswd를 사용하므로

trac디렉토리/conf/trac.ini에서
password_file = 패스워드 파일 위치 추가


후에 svn도 연동하므로 svnservepasswordstore에도 추가해준다.


적용하면, Accounts->Users에서 유저 리스트 조회, 유저 추가, 패스워드 수정 등이 가능할 것이다.

웹에서 로그인도 가능

trac디렉토리/conf/trac.ini에서

[components]
trac.web.auth.loginmodule = disabled
추가

아파치 재시작




svn 저장소에 trunk, tags, branches 디렉토리를 생성한다. -> 그래야 trac이 인식함

다음 패키지를 설치한다.
apt-get install python-subversion

trac.ini에 다음을 추가한다. 
[repositories]
.alias = project
project.description = This is the ''main'' project repository.
project.dir = /home/repo/project
project.type = svn
project.url = http://your_project

svn 저장소의 hooks 디렉토리의 post-commit, post-revprop-change 실행파일을 생성(실행권한을 주어야 함)한다.
이는 commit후에 trac에 revision을 전송함으로써 trac에서 svn의 최신상태를 유지시켜준다.
post-commit

REPOS="$1"

REV="$2"


#"$REPOS"/hooks/mailer.py commit "$REPOS" $REV "$REPOS"/mailer.conf

export PYTHON_EGG_CACHE="/home/repo/cloud/cache"

/usr/local/bin/trac-admin /YOUR/TRAC/DIR changeset added "$REPOS" "$REV"


post-revprop-change

REPOS="$1"

REV="$2"

USER="$3"

PROPNAME="$4"

ACTION="$5"


#"$REPOS"/hooks/mailer.py propchange2 "$REPOS" $REV \

#  "$USER" "$PROPNAME" "$ACTION" "$REPOS"/hooks/mailer.conf

export PYTHON_EGG_CACHE="/home/repo/cloud/cache"

/usr/local/bin/trac-admin /YOUR/TRAC/DIR changeset modified "$REPOS" "$REV"

PYTHON_EGG_CACHE는 설정되어 있는 경우 해당 디렉토리를 써준다.

아파치 재시작
메뉴에서 '소스 둘러보기'가 활성화 됨



10. SSL 적용하기
을 참고하여 https 프로토콜로 전송하자
:

Subversion, Trac, SSL 함께 설치하기.

보안/서버관리 | 2011. 11. 9. 13:07 | Posted by youGom

개요
- 이 문서는 우분투 리눅스 6.06 버전을 기준으로 작성되었다. (http://www.ubuntu.com
- Subversion은 CVS를 대체하기 위해서 새로 나온 버전관리시스템이다.
- Trac은 위키, 로드맵, 버그추적기능을 통합적으로 제공하며, Subversion와 강력하게 연계되어 있다.
- 이 문서 내용대로 따라하면 Subversion, Trac이 모두 다수의 프로젝트를 지원하고,
사용자 인증을 거치며, SSL암호화를 통해 모든 전송내용이 암호화되므로 대규모 운용에도 손색이 없다.

테스트 환경
- Ubuntu 6.06 LTS

보장은 못 하지만 이 문서의 내용은 다른 버전의 우분투 혹은 데비안에서도 
문제 없이 작동할 것으로 예상된다.

참고한 자료들.
Subversion 관련
https://help.ubuntu.com/6.06/ubuntu/serverguide/C/version-control-system...
http://svnbook.red-bean.com/

Trac 관련
http://trac.edgewall.org/wiki/TracUbuntuMultipleProjects
http://trac.edgewall.org/wiki/TracModPython
http://trac.edgewall.org/wiki/TracOnUbuntu

Apache SSL/TLS 암호화
http://httpd.apache.org/docs/2.0/ssl/ssl_intro.html
http://mario.espaciolinux.com/apache2_ssl.html
http://www.vanemery.com/Linux/Apache/apache-SSL.html
http://httpd.apache.org/docs/2.0/ssl/ssl_howto.html
http://httpd.apache.org/docs/2.0/mod/mod_ssl.html

이 글을 거의 다 작성하고 나서야 발견한 좋은 글 (SSL암호화를 제외한 모든 내용이 들어 있다.)
http://ariejan.net/2006/12/01/how-to-setup-a-ubuntu-development-server-p...
http://ariejan.net/2006/12/02/how-to-setup-a-ubuntu-development-server-p...

1. 필요한 패키지 설치

Subversion 설치
shell> sudo apt-get install subversion libapache2-svn

Trac 설치
shell> sudo apt-get install trac libapache2-mod-python

2. 디렉토리 구조 설명

이 문서에서 사용할 디렉토리 구조를 설명한다.
이 문서의 끝까지 계속해서 사용될 것이므로 잘 기억해 주시길..

Subversion 저장소의 뿌리
/var/lib/svn

Trac 환경의 뿌리
/var/lib/trac

test1 이라는 이름의 프로젝트가 사용하는 디렉토리
Subversion저장소 : /var/lib/svn/test1
Trac 환경 : /var/lib/trac/test1

Cool_Project 라는 이름의 프로젝트가 사용하는 디렉토리
Subversion저장소 : /var/lib/svn/Cool_Project
Trac 환경 : /var/lib/trac/Cool_Project

<프로젝트이름> 라는 이름의 프로젝트가 사용하는 디렉토리
Subversion저장소 : /var/lib/svn/<프로젝트 이름>
Trac 환경 : /var/lib/trac/<프로젝트 이름>

이해가 가시죠??

3. 뿌리 디렉토리 생성
shell> sudo mkdir /var/lib/svn
shell> sudo chown -R www-data:www-data /var/lib/svn

shell> sudo mkdir /var/lib/trac
shell> sudo chown -R www-data:www-data /var/lib/trac

4. SSL암호화에 사용할 서버인증서 생성하기
불특정 다수를 대상으로 SSL서버를 구축할 경우 
공인인증기관이 서명한 서버인증서를 구입하는 것이 좋다.
공인인증기관이 서명한 서버인증서 구입하는 방법은 
http://httpd.apache.org/docs/2.0/ssl/ssl_faq.html 의
How do I create a real SSL Certificate? 부분을 참고하면 된다.

이 문서에서는 자기 스스로 서명한 서버인증서 기준으로 진행한다.
자기 스스로 서명한 서버인증서의 사용상 불편한 점은 
처음 접속할 때 인증서의 사용을 허가하겠다고 
'클릭을 1번 해줘야 한다'는 것이다.

자세한 내용은 다음과 같다.

OpenSSL 설치하기 (대부분의 경우 이미 설치되어 있음)
shell> apt-get install openssl

비밀키파일과 인증서 생성하기
shell> cd ~
shell> openssl req -new -x509 -nodes -out server.crt -keyout server.key
----------------------- 실행화면 시작 ------------------------------
Generating a 1024 bit RSA private key
.......................++++++
....++++++
writing new private key to 'server.key'
-----
...생략...
-----
Country Name (2 letter code) [GB]:KR
(국가코드를 입력한다.)
State or Province Name (full name) [Some-State]:
(주 혹은 도 이름을 입력한다. 
글쓴이는 직할시에 거주하므로 엔터키를 눌러서 넘어갔다.)
Locality Name (eg, city) []:Pusan
(거주하는 도시이름을 입력한다. 서울에 거주한다면 Seoul을 입력하면 될 듯하다.)
Organization Name (eg, company) [Internet Widgits Pty Ltd]:MyCompany
(조직명(혹은 회사명)을 입력한다.)
Organizational Unit Name (eg, section) []:Development
(부서이름을 입력한다.)
Common Name (eg, YOUR name) []:www.hostname.com
(Common Name은 인증서 생성시 입력하는 정보 중에서 가장 중요한 항목이다.
Common Name을 직역하면 '공통이름'이 되며, 
메세지에서는 예제로 실제 이름을 입력하라고 하지만,
그것은 개인 인증서 생성할 때나 해당되는 이야기이며, 
지금처럼 서버 인증서를 생성할 때에는 '서버 완전한 도메인 이름'을 입력해야 한다.
이 항목을 잘못 입력하면 사용자는 인증서에 심각한 에러가 있다는 메세지를 받게 되고, 
대개의 경우 에러메세지에 겁 먹고 인증서를 거부하게 되므로,
Subversion 및 Trac서비스를 제공할 수 없게 된다.
웹서버에 접속할 때 주소창에 http://www.hostname.com 이라고 입력한다면,
Common Name은 www.hostname.com 이 된다.)
Email Address []:xxx@daum.net
(전자우편주소를 입력한다. 글쓴이는 다음메일을 쓴다.)
----------------------- 실행화면 끝 ------------------------------

생성된 인증서 확인하기
shell> ls server*
server.key, server.crt 파일이 생성된 것을 알 수 있다.
server.key -> 비밀키(private key) 파일
server.crt -> 인증서(public key를 포함) 파일

인증서 파일을 적절한 위치로 복사
shell> cp server.key /etc/apache2/ssl/
shell> cp server.crt /etc/apache2/ssl/
shell> chmod 600 /etc/apache2/ssl/server.key
shell> rm ./server.key
shell> rm ./server.crt

5. Apache 웹서버 설정변경
SSL암호화를 지원하기 위해서 mod_ssl 모듈을 활성화 시킨다.
shell> sudo ln -s /etc/apache2/mods-available/ssl.load /etc/apache2/mods-enabled/
shell> sudo ln -s /etc/apache2/mods-available/ssl.conf /etc/apache2/mods-enabled/

Apache서버가 https의 기본포트인 443번을 듣도록 한다.
shell> sudo vi /etc/apache2/ports.conf
-------- /etc/apache2/ports.conf 에 추가할 내용 시작 ---------
Listen 443
-------- /etc/apache2/ports.conf 에 추가할 내용 끝 ---------

https서비스를 제공하는 VirtualHost가 사용할 DocumentRoot를 생성한다.
생성한 후에 빈 디렉토리로 놔둬도 된다.
shell> sudo mkdir /var/www-ssl

VirtualHost를 이용해서 https를 설정한다.
shell> sudo vi /etc/apache2/sites-available/ssl

--------- /etc/apache2/sites-available/ssl 내용 시작 --------------
# KLDP게시판에 업로드하면 아파치 설정화일의 태그가 사라지기 때문에
# <> 표시를 ()로 대체했습니다.
# 실제 사용할 때는 <> 로 대체해서 사용하십시오.
# 무슨 의미인지 명확하지 않다면, 
# 이 문서에 텍스트 화일로 첨부한 ssl.txt를 보십시오.
 
NameVirtualHost *:443
(VirtualHost *:443)
  DocumentRoot /var/www-ssl
 
  SSLEngine On
  SSLProtocol -all +TLSv1 +SSLv3
  SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM
  SSLOptions +StrictRequire
  SSLVerifyClient none
  SSLCertificateFile    /etc/apache2/ssl/server.crt
  SSLCertificateKeyFile /etc/apache2/ssl/server.key
 
  (Location /svn)    # Subversion 설정
    DAV svn
 
    # any "/svn/foo" URL will map to a repository /var/lib/svn/foo
    SVNParentPath /var/lib/svn
 
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /etc/dev_passwd
    Require valid-user
  (/Location)
 
  (Location /projects) # Trac 설정
    SetHandler mod_python   
    PythonHandler trac.web.modpython_frontend   
    PythonOption TracEnvParentDir /var/lib/trac   
    PythonOption TracUriRoot /projects
 
    AuthType Basic
    AuthName "Trac, Issue Tracking and Documenting"
    AuthUserFile /etc/dev_passwd
    Require valid-user
  (/Location)
(/VirtualHost)
--------- /etc/apache2/sites-available/ssl 내용 끝   --------------

shell> sudo ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/
shell> sudo /etc/init.d/apache2 restart

VirtualHost를 이용해서 http, https를 동시에 지원하며, 
Subversion과 Trac의 모든 전송내용이 암호화되며, 
하나의 사용자인증화일을 공유한다.

6. 사용자 생성
사용자를 생성하고, 암호를 저장하는 데 htpasswd라는 프로그램을 사용한다.

htpasswd에서 자주 사용하는 옵션은 다음과 같다.
-c : 파일 생성하기. 처음 실행할 때 1번만 주면 된다.
-m : MD5 암호화하기.

예를 들어서, user1, user2, user3 에 대해서 
Subversion 및 Trac 공용 사용자 계정을 생성할려면 다음과 같이 한다.
shell> sudo htpasswd -cm /etc/dev_passwd user1
shell> sudo htpasswd -m /etc/dev_passwd user2
shell> sudo htpasswd -m /etc/dev_passwd user3

암호를 물어올 때 2번 입력해 주면 된다.
New password: ***** (암호 입력)
Re-type new password: ***** (암호 다시 입력)
Adding password for user user1

7. Ubuntu서버에 저장소(repository) 생성

Subversion 저장소를 생성한다.
shell> sudo svnadmin create /var/lib/svn/<프로젝트 이름>

Trac은 특정한 구조를 가진 Subversion저장소만 인식할 수 있다.
shell> sudo svn mkdir file://localhost/var/lib/svn/<프로젝트 이름>/branches -m "initial structure1"
shell> sudo svn mkdir file://localhost/var/lib/svn/<프로젝트 이름>/tags -m "initial structure2"
shell> sudo svn mkdir file://localhost/var/lib/svn/<프로젝트 이름>/trunk -m "initial structure3"

Apache웹서버를 재시작 한다.
shell> sudo /etc/init.d/apache2 restart

웹브라우저로 https://<서버주소>/svn/<프로젝트 이름> 에 접속해 본다.
웹브라우저에서 프로젝트 소스가 보여야 정상이다.
(서버주소에 localhost나 127.0.0.1을 입력하면 연결이 안 될 수도 있다.
ifconfig을 실행시키면 나오는 진짜 IP주소를 사용해야 한다.
응답이 없으면, iptable방화벽에서 443번 포트를 막고 있는 지 확인한다.
https://<서버주소>/svn 으로 접속하면 Forbidden에러가 난다. 
URL 마지막에 반드시 <프로젝트 이름>을 붙여야 한다.
접속과정에서 인증서 관련해서 팝업창이 뜨면 영구히 허가한다.
인증서 생성과정에서 서버이름을 잘못 입력한 경우 
에러메세지가 1번 더 뜨는 데, 무시하면 된다.)

8. Trac 환경 생성 및 초기화

Trac 환경 생성하기 전에 다음 2가지 명령을 실행한다.
shell> sudo chown -R www-data:www-data /usr/share/trac
shell> sudo chown -R www-data:www-data /var/lib/svn
shell> sudo /etc/init.d/apache2 restart

Trac 환경 생성 한다.
shell> sudo trac-admin /var/lib/trac/<프로젝트 이름> initenv
-------------------- 실행화면 시작 ----------------------------------
Creating a new Trac environment at /var/lib/trac/<프로젝트 이름>
(/var/lib/trac/<프로젝트 이름> 디렉토리에 새로운 Trac환경을 생성중임.)

Trac will first ask a few questions about your environment
in order to initalize and prepare the project database.
(Trac은 프로젝트 데이터베이스를 준비하고 초기화시키기 위해서,
당신의 환경에 대해서 몇 가지 질문을 할 것입니다.)

Please enter the name of your project.
This name will be used in page titles and descriptions.
(당신의 프로젝트의 이름을 입력하십시오.
이 이름은 페이지 제목과 비고에 사용될 것입니다.)

Project Name [My Project]> test
(프로젝트 이름. 아무 값도 입력하지 않고 엔터키를 누를 경우 기본값은 My Project임.
여기서 원하는 프로젝트 이름을 입력하고 엔터키를 누른다.)

Please specify the connection string for the database to use.
By default, a local SQLite database is created in the environment
directory. It is also possible to use an already existing
PostgreSQL database (check the Trac documentation for the exact
connection string syntax).
(데이터베이스 연결문자열을 지정해 주십시오.
기본값으로 로컬에 SQLite 데이터베이스가 생성됩니다.
이미 존재하는 Postgresql 데이터베이스를 사용할 수도 있습니다.
(정확한 연결문자열 구성은 Trac문서를 참조하십시오.)
)

Database connection string [sqlite:db/trac.db]> 
(데이터베이스 연결 문자열. 기본값은 'sqlite:db/trac.db' 임
데이터베이스 연결 문자열에 대해서 아는 바 없으므로 엔터키를 눌러서 기본값을 사용함.)

Please specify the absolute path to the project Subversion repository.
Repository must be local, and trac-admin requires read+write
permission to initialize the Trac database.
(프로젝트의 Subversion저장소가 위치한 절대경로를 지정해 주십시오.
그 저장소는 로컬에 위치해야 하고, trac-admin은 Trac 데이터베이스를 위해서
읽기, 쓰기 권한을 가지고 있어야 합니다.)

Path to repository [/var/svn/test]> /var/lib/svn/test
(저장소의 path. 기본값은 '/var/svn/test'
우리는 프로젝트 저장소를 /var/lib/svn/test에 생성해 두었으므로 그것을 입력한다.)

Please enter location of Trac page templates.
Default is the location of the site-wide templates installed with Trac.
(Trac 페이지 템플릿의 위치를 입력하십시오.
기본값은 Trac과 함께 설치된 템플릿의 위치입니다.)

Templates directory [/usr/share/trac/templates]>
(템플릿 디렉토리. 기본값은 '/usr/share/trac/templates'.
이에 대해 아는 바 없으므로 엔터키를 눌러서 기본값을 사용한다.

Creating and Initializing Project
Configuring Project
trac.repository_dir
trac.database
trac.templates_dir
project.name
Installing default wiki pages
/usr/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields
... 생략 ...
/usr/share/trac/wiki-default/WikiNewPage => WikiNewPage
Indexing repository

Project environment for 'test' created.
(test 프로젝트를 위한 환경이 생성되었습니다.)

You may now configure the environment by editing the file:
(당신은 다음 위치의 파일을 편집해서 환경설정을 바꿀 수 있습니다.)

/var/lib/trac/test/conf/trac.ini

... 생략 ...

Congratulations!
(축하합니다!)
-------------------- 실행화면 끝 ----------------------------------

Apache웹서버에게 읽기, 쓰기 권한을 준다.
shell> sudo chown -R www-data:www-data /var/lib/trac

Apache 웹서버를 재시작해야 새로운 설정화일이 반영된다.
shell> sudo /etc/init.d/apache2 restart

웹브라우저로 https://<서버주소>/projects 에 접속해 본다.
프로젝트 리스트가 보여야 정상이다.
개별 프로젝트로 들어가면 Trac이 설정해 놓은 페이지가 보인다.
(서버주소에 localhost나 127.0.0.1을 입력하면 연결이 안 될 수도 있다.
ifconfig을 실행시키면 나오는 진짜 IP주소를 사용해야 한다.
응답이 없으면, iptable방화벽에서 443번 포트를 막고 있는 지 확인한다.)

이로서 전송내용이 암호화되고 사용자인증을 거치는 Subversion, Trac의 설치를 마쳤다.
이제 사용법만 공부하면 된다. --;


출처 : http://kldp.org/node/84957
 

 

:

Ubuntu에 Subversion Server 설치하기

보안/서버관리 | 2011. 11. 9. 11:25 | Posted by youGom
Ubuntu에서 서브버전을 설치한 김에 맨날 설치하는 것도 아니기 때문에 기록차 남겨둡니다.(외워지지도 않고 매번 찾기도 귀찮아서)

SVN 설치
sudo apt-get install subversion libapache2-svn
우분투에는 apt-get이 있어서 참 변하죠. libapache2-svn은 아파치 연동을 위해서 사용하는데 저는 굳이 http://로 저장소 연결할 필요도 없는데다가 svn프로토콜이 더 빠르기도 해서 그냥 svn만 가지고 사용하기로 했습니다.


Repository 만들기
svnadmin create /home/repos/svn/project
svnadmin 명령어를 통해서 저장소를 생성합니다. 저같은 경우는 /home/repos/svn/ 아래에 저장소를 project라는 저장소를 생성합니다. 


설정파일 편집
저장소의 conf폴더 안에 있는 파일을 이용해서 권한등의 설정을 해주어야 합니다.
svnserve.conf
anon-access : 로그인하지 않은 사용자에 대한 권한입니다. none은 읽기/쓰기 금지이고 read는 읽기만 write는 쓰기만 가능합니다.
auth-access : 로그인 사용자의 권한입니다. 권한명령어는 동일합니다.
password-db = passwd : 패스워드 설정파일의 파일명입니다. 기본으로 passwd로 되어 있고 conf폴더안에 있습니다.
realm = project : 사용자가 접속시 표시되는 이름입니다. 프로젝트 명을 적어주면 됩니다.

authz
[/]
outsider = rw
모든 경로에 대해서 outsider라는 사용자에게 rw권한을 줍니다. group이나 세부경로별로도 설정할 수 있습니다.

passwd
[users]
outsider = password
사용자ID와 비밀번호를 설정해 줍니다.


SVN 서버 실행
svnserve -d -r /home/repos/svn/
svnserve 명령어를 통해서 SVN서버를 실행해 줍니다. 접근할때는 svn://프로토콜로 접속하고 URL뒤에 각 레파지토리명까지 적어주어서 접근합니다.

killall svnserve
위 명령어를 통해서 SVN서버를 종료할 수 있습니다.



출처 : http://blog.outsider.ne.kr/472 
:


환경 :
  • 윈도 XP
  • Eclipse 3.5.2 (subclipse plugin)
  • Subversion 1.6.x

이클립스에서 svn 클라이언트로 작업중이었는데 Team -> Show History 기능을 사용하려면 제목과 같은 에러가 나왔습니다.
구글링해서 제 설정파일과 비교해보니 간단한 문제였네요.

일반적으로 svnserve.conf는 아래와 같이 주석이 풀려있겠죠.
svnserve.conf
1 [general]anon-access = readauth-access = writepassword-db = passwdauthz-db = authz

authz 파일의 경우 저는 아래와 같이 되어있었습니다. 
authz - before
1 [groups]user = soriwa[/]@user = rw

다음과 같이 everyone에 대한 읽기 권한을 줘야 제대로 읽어옵니다.
everyone에 대해서는 정의가 없으면 권한이 없는 거니까 늘 정해진 계정을 통해서만 작업되는 경우는 필요없을거라 생각해서 빼버렸거든요...이게 문제였네요.
authz - after
1 [groups]user = soriwa[/]@user = rw* = r
:

svn 데이터 dump 및 load 방법

소프트웨어 공학/개발 | 2011. 11. 7. 15:44 | Posted by youGom

svn 데이터 dump 및 load 방법( Repository 를 MyTest 로 가정)

 

 1. 해당 Repository 가 생성된 상위 directory 로 이동 한다.


 2. Repository 를 dump 한다.
  command >> svnadmin dump MyTest > MyTest.20006.09.09.dump
     ->  전체 dump
  command >> svnadmin dump MyTest -r 10 > MyTest.20006.09.09.dump
     -> 리비전 10 만 dump
  command >> svnadmin dump MyTest -r 10:20 > MyTest.20006.09.09.dump
     -> 리비전 10 부터 20 까지 만 dump

 

 3. 새로운 Repository 를 생성 한다. (Repository 를 MyTestNew 로 가정)
  command >> 
svnadmin create MyTestNew

 

 4. dump 된 데이터를 load 한다. (Repository 를 MyTestNew 로 가정)
  command >> svnadmin load MyTestNew < MyTest.20006.09.09.dump
     -> 새로운 리비전 으로 load (리비전 번호는 1부터 생성)
  command >> svnadmin load MyTestNew --force-uuid < MyTest.20006.09.09.dump
     
-> 기존 dump 했던 리비전 유지


출처 ;
http://blog.naver.com/cjsearch/60028473858

:

SVN-Trac 재연동

소프트웨어 공학/개발 | 2011. 11. 7. 15:39 | Posted by youGom

SVN
 - HotCopy 연동할폴더
Trac
 - resync

'소프트웨어 공학 > 개발' 카테고리의 다른 글

svn: Item is not readable (아이템이 읽기 불가능합니다) 해결  (0) 2011.11.08
svn 데이터 dump 및 load 방법  (0) 2011.11.07
TRAC 생성  (0) 2011.11.07
SVN 생성  (0) 2011.11.07
Subclipse for SVN on Eclipse CDT  (0) 2011.11.04
:

SVN 생성

소프트웨어 공학/개발 | 2011. 11. 7. 15:36 | Posted by youGom


 + 계정 설정_
  저장소 루트 \추가 저장소 폴더 \ conf \ passwd 파일에 계정 추가..
  ( ...\svn_data\conf\passwd )

 + 권한 설정_
  svnserve.conf 파일을 수정해서 액세스제한을 둔다.
  #비인증자 접근 금지
  #anon-access = read
    anon-access = none
    auth-access = wirte
  #인증시 뜨는 메시지
    realm = Hello Repository

'소프트웨어 공학 > 개발' 카테고리의 다른 글

SVN-Trac 재연동  (0) 2011.11.07
TRAC 생성  (0) 2011.11.07
Subclipse for SVN on Eclipse CDT  (0) 2011.11.04
Subversion 설치 및 Eclipse와의 연동  (0) 2011.11.04
[ELF] OpenSource Enlightenment DeskTop  (0) 2011.10.14
:

Subclipse for SVN on Eclipse CDT

소프트웨어 공학/개발 | 2011. 11. 4. 09:18 | Posted by youGom


Subversion is a great way to work on code in a collaborative fashion. There are a couple subversion plugins that work with Eclipse, one of them is called Subclipse.

To install Subclipse in Eclipse goto the Help menu and choose “Software Updates…”.

Once the “Software Updates and Add-ons” window displays itself we need to add the Subclipse update URL. Choose the “Available Software” tab, click “Add Site” and put in “http://subclipse.tigris.org/update_1.6.x” as the location and click “OK”.

Add Plugin Location

You will now see a new item in the list corresponding to the URL that you just added. Now to add subclipse you need to choose two plugins, subclipse itself and the JavaHL. JavaHL is the API that subclipse uses to talk to your SVN server. You can find these by expanding the tree by clicking the triangle to the left of the URL you just added, and then expanding the Subclipse subnode. After selecting the plugins click install and follow the dialogs through to the end.

Plugin Selection

Now that subclipse is installed, in the top right of Eclipse click the “Open Perspective” icon choose “Other” and choose “SVN Repository Exploring”, this perspective will give you the tools to work with your SVN repo, assuming you aren’t already happily using a tool like TortoiseSVN or the command line client to do so.

Add your repo location to the SVN perspecitve by clicking the icon at the top right of the repositories view and typing in the URL of your repo. Any repositories added here will also show up in other dialogs when working with SVN in Eclipse such as when adding or importing projects.

Add Repository

Adding Your Project to the SVN Repository

To add a project to SVN go back to your development perspective and simply right click on the project in the “Project Explorer”, expand the “Team” subitem and choose “Share Project…”. Now choose what repository to add your project to, click Next.

Choose Repository

Now you will be prompted to choose a folder name for your project in the repo; you can just use the name of the project or specify some folder further down in your repository hierarchy, click Next.

Repository Folder

The wizard will now ask for an initial commit comment, click Finish and your project will be created in the repo, but you will still need to commit your changes for the code to actually show up in SVN.

Ready to Share

Once you clicked Finish Eclipse will ask if you want to open the “Team Synchronizing” perspective. Click yes and once the perspective opens you can simply right click on the root project node and choose commit. You can also do commits from the SVN perspective, or in your development perspective the project right-click menu now has a bunch of SCM options under the Team submenu.

Team SCM Operations

At this point working with SVN in Eclipse is like working with any SCM tool, make changes, commit changes, rinse, repeat.

Importing a Project from SVN

There may be a project in an SVN repo that you want to import, this is fairly simple. Open the workspace that you want to import the project into. Goto “File” and choose “Import”. Expand SVN in the tree and choose “Checkout Project from SVN”, click Next.

Import from SVN

This next dialog lets you choose from which SVN location to pull the project, if you have already added a repo location in the SVN repo perspective it will show on the dialog, otherwise you can specify the location now, click Next. You will now be shown a list of folders on your repository, you can navigate them and click the folder that you’d like to import, click Next.

Choose Project Folder

The next window asks how you would like to setup the local project, including a name and which version to pull. The defaults should usually suffice unless you want to maybe pull and older version or a branch to work on, click Next.

Local Project Properties

The next dialog simply lets you import to a different workspace than the one you currently have mounted. You should already be in the workspace you want to import to so just click finish. The import process will take a moment after which you should see a new project in your workspace.

Congratulations, you’ve successfully imported the project and since it is bound to SVN you can now work on the code with your coworkers!

'소프트웨어 공학 > 개발' 카테고리의 다른 글

TRAC 생성  (0) 2011.11.07
SVN 생성  (0) 2011.11.07
Subversion 설치 및 Eclipse와의 연동  (0) 2011.11.04
[ELF] OpenSource Enlightenment DeskTop  (0) 2011.10.14
표준 Dispose 패턴을 구현하라.  (0) 2011.10.06
:

리눅스 위에서 돌아가는 X Window와 비슷한 거로 보았다.

오픈 소스 주소는 아래와 같다. ( SVN Export 용 주소 )
http://svn.enlightenment.org/svn/e/trunk

Web Browser에서 접근하려면 아래 주소로 가야한다.
http://trac.enlightenment.org/e/browser/trunk


선배와 이야기를 하다 오픈소스 이야기가 나오게 되었고, 그 중에 EFL을 소개 받았다.
EFL에는 다른 선배가 이미 멤버로 등록되어 있었다.
C를 기반으로 만들어졌다고 한다.
SVN으로 위 소스를 다운로드 받았다.
그리고 언더스탠드를 이용해 소스를 조금 분석해 보는 중이다.

C기반으로 작성되어 있으나, TestSuite를 제공하면서 프로젝트를 진행한 흔적이 보인다.
우분투나 가벼운 리눅스를 설치해서 EFL 데스크 탑을 설치해 얼마나 위대한지 구경해 보아야겠다.

그리고 기회가 된다면 이 오픈소스 멤버가 되고 싶기도 하다.
EFL 사이트 : http://www.enlightenment.org/

잠깐.. evas의 3D 쪽을 봤다. 꽤 명쾌하고 가볍게 짜놓은 게 보인다. 시간 날 때 짬짬히 봐볼만 하다.
C로만 되어 있다고 생각했는데, OOP도 적용되어 있어 보인다. 어쩌면.. 3D 부분만 넣었을지도 모른다.




EFL에 대한 용어 정리다.


이 용어 정리는 서주영씨가 번역해 놓은 내용이다. ( http://seoz.egloos.com/3669728 )

Enlightenment - 프로젝트의 원래 이름입니다. 오늘날 Enlightenment 라고 하면, 특정한 한 부분을 이야기하는게 아니라 이 프로젝트를 전반적으로 가리킵니다.

DR17 - E17 이라고 불리기도 하며, Enlightenment 데스크탑/윈도우 매니저의 최신 버전을 칭합니다. 아직 한참 개발중입니다. 현재 안정된 버전은 DR16 입니다. (역자 주: DR17 은 이름만으로 보면 단지 DR16 의 업버전이라고 오해할 수도 잇지만, 둘은 전혀 다른 윈도우 매니저입니다. 심지어 DR17 을 시작할 때, DR16 의 코드를 한줄도 사용하지 않았습니다.)

EFLs - "Enlightenment Foundation Libraries" 를 뜻하며 Enlightenment 데스크탑에 필요한 기반이 되는 라이브러리 모음입니다. Enlightenment 데스크탑의 핵심 부분이지만 그렇다고 EFL 이 Enlightenment 데스크탑은 아닙니다. (역자 주: Enlightenment 데스크탑이 EFL 라이브러리를 사용합니다.) 쉽게 말해 EFL 과 Enlightenment 데스크탑의 관계는 GTK 와 그놈(Gnome) 그리고 QT 와 KDE 의 관계와 같습니다.

'소프트웨어 공학 > 개발' 카테고리의 다른 글

Subclipse for SVN on Eclipse CDT  (0) 2011.11.04
Subversion 설치 및 Eclipse와의 연동  (0) 2011.11.04
표준 Dispose 패턴을 구현하라.  (0) 2011.10.06
[패턴] Layer Architecture Pattern  (0) 2011.10.01
c++ 고급  (0) 2011.08.24
: