« Previous : 1 : 2 : 3 : 4 : Next »

VirtualBox vdi파일 복사(uuid 재설정 필요없음)

vboxmanage clonehd (원본파일.vdi) (복사할파일.vdi)

위 명령으로 복사하면 uuid를 변경해줄 필요가 없다.

복사한 .vdi 파일을 '머신-새로만들기'에서 파일선택을 해주면
복사한 .vdi 파일을 사용할 수 있다.
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2011/04/14 11:04 2011/04/14 11:04
Response
No Trackback , No Comment
RSS :
http://shiftkey.org/rss/response/288

iso 파일을 마운트해서 wine으로 설치하기

공백이 있으면 아래와같이 콘솔에서 직접 설치파일을 선택해서 설치하면 된다.
"wine /home/myubuntu/.gvfs/MS\ Office\ 2007\ Full\ Package.iso/office2007.exe"
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2011/04/11 10:09 2011/04/11 10:09
,
Response
No Trackback , No Comment
RSS :
http://shiftkey.org/rss/response/287

sudo fsck.vfat /media/USB
또는
sudo dosfsck -av /media/USB
또는
mount -o rw,remount /media/usbmemory
또는
mount -o remount,rw /media/usbmemory


크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2011/03/24 16:27 2011/03/24 16:27
, , ,
Response
No Trackback , No Comment
RSS :
http://shiftkey.org/rss/response/286

PDF 파일의 내용이 제대로 안보일때

우분투에서 PDF 파일이 안보일 때
(특히 한글이 포함되어 있는 파일들)

poppler-data 패키지를 설치하면 보인다.

이유는 모르겠다.
괜히 pdf 뷰어가 꾸진줄알고 이것저것 설치하면서 놀았다.

sudo apt-get install poppler-data


크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2011/03/16 15:50 2011/03/16 15:50
, ,
Response
No Trackback , No Comment
RSS :
http://shiftkey.org/rss/response/285

Debian Root 패스워드를 분실했을때(GRUB)

1. GRUB 으로 들어간다.
2. 부팅옵션 선택하고 'e' 키를 눌러 edit 모드로 들어간다.
3. 커널 부분을 선택하고 'e' 키를 눌러 edit 모드로 들어간다.
4. 줄의 마지막에 rw init=/bin/sh 라고 추가해 준다.
5. 'b' 키를 눌러 부팅한다.
6. passwd root 명령으로 비밀번호 재설정
7. 리부팅한다.

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2009/12/30 11:37 2009/12/30 11:37

rtorrent - Linux man page

rtorrent(1) - Linux man page

Name

rtorrent - a BitTorrent client for ncurses

Synopsis

rtorrent [ -h ] [ -n ] [ -o key1=opt1,... ] [ -O key=opt ] [ URL | FILE ... ]

Description

rtorrent is a BitTorrent client for ncurses, using the libtorrent library. The client and library is written in C++ with emphasis on speed and efficiency, while delivering equivalent features to those found in GUI based clients in an ncurses client.

Most of the options below have their own default unit in addition to supporting B, K, M and G suffixes.

Keyboard Control

Global Keys

^q
Initiate shutdown, press again to force the shutdown and skip sending the stop signal to trackers.
up | down | left | right arrow keys
^P | ^N | ^B | ^F
Select entries or change windows. The right arrow key or ^F is often used for viewing details about the selected entry, while the left arrow key or ^B often returns to the previous screen.
a | s | d
Increase the upload throttle by 1/5/50 KB.
A | S | D
Increase the download throttle by 1/5/50 KB.
z | x | c
Decrease the upload throttle by 1/5/50 KB.
Z | X | C
Decrease the download throttle by 1/5/50 KB.

Main View Keys

->
View download.
1 - 7
Change view.
^S
Start download.
^D
Stop an active download, or remove a stopped download.
^K
Close a torrent and its files.
^E
Set the 'create/resize queued' flags on all files in a torrent. This is necessary if the underlying files in a torrent have been deleted or truncates, and thus rtorrent much recreate them.
^R
Initiate hash check of torrent.
^O
Change the destination directory of the download. The torrent must be closed.
^X
Call commands or change settings.
+ | -
Change the priority of the download.
backspace
Add torrent using an URL or file path. Use tab to view directory content and do auto-complete.
l
View log. Exit by pressing the space-bar.
U
Delete the file the torrent is tied to, and clear the association.
I
Toggle whether torrent ignores ratio settings.

Download View Keys

->
View torrent file list. Use the space-bar to change the file priority and * to change the priority of all files. Use / to collapse the directories. OUTDATED
1 | 2
Adjust max uploads.
3 | 4
Adjust min peers.
5 | 6
Adjust max peers.
u
Display transfering blocks.
i
Display chunk rarity.
o
Display the tracker list. Cycle the trackers in a group with the space-bar.
p
View peer and torrent information.
t | T
Initiate tracker request. Use capital T to force the request, ignoring the "min interval" set by the tracker.
k
Disconnect peer.
*
Choke/Snub peer.

Options

-b a.b.c.d
Bind listening socket and outgoing connections to this network interface address.
-d directory
Set the default download directory. Defaults to "./".
-h
Display help and exit.
-i a.b.c.d
Set the address reported to the tracker.
-n
Don't load ~/.rtorrent.rc on startup.
-o key1=opt1,...
-O key=opt
Set any number of options, see the SETTINGS section. The options given here override the resource files. Use capital -O to allow comma in the option.
-p a-b
Try to open a listening port in the range a up to and including b.
-s directory
Session management will be enabled and the torrent files for all open downloads will be stored in this directory. Only one instance of rtorrent should be used with each session directory, though at the moment no locking is done. An empty string will disable the session directory.

General Settings

bind = a.b.c.d
Bind listening socket and outgoing connections to this network interface address.
ip = a.b.c.d
ip = hostname
Set the address reported to the tracker.
port_range = a-b
Try to open a listening port in the range a up to and including b.
port_random = yes | no
Open the listening port at a random position in the port range.
check_hash = yes | no
Perform hash check on torrents that have finished downloading.
directory = directory
Set the default download directory. Defaults to "./".
session = directory
Session management will be enabled and the torrent files for all open downloads will be stored in this directory. Only one instance of rtorrent can be used per session directory. An empty string will disable the session directory.
http_proxy = url
Use a http proxy. Use an empty string to disable.
encoding_list = encoding
Add a preferred filename encoding to the list. The encodings are attempted in the order they are inserted, if none match the torrent default is used.
encryption = option,...
Set how rtorrent should deal with encrypted Bittorrent connections. By default, encryption is disabled, equivalent to specifying the option none. Alternatively, any number of the following options may be specified:

allow_incoming (allow incoming encrypted connections), try_outgoing (use encryption for outgoing connections), require (disable unencrypted handshakes),require_RC4 (also disable plaintext transmission after the initial encrypted handshake), enable_retry (if the initial outgoing connection fails, retry with encryption turned on if it was off or off if it was on), prefer_plaintext (choose plaintext when peer offers a choice between plaintext transmission and RC4 encryption, otherwise RC4 will be used).

peer_exchange = yes | no
Enable/disable peer exchange for torrents that aren't marked private. Disabled by default.
schedule = id,start,interval,command
Call command every interval seconds, starting from start. An interval of zero calls the task once, while a start of zero calls it immediately. Currently command is forwarded to the option handler. start and interval may optionally use a time format, dd:hh:mm:ss. F.ex to start a task every day at 18:00, use 18:00:00,24:00:00.
schedule_remove = id
Delete id from the scheduler.
start_tied =
Start torrents that are tied to filenames that have been re-added.
stop_untied =
close_untied =
remove_untied =
Stop, close or remove the torrents that are tied to filenames that have been deleted. Clear the association with the 'U' key.
close_low_diskspace = space
Close any active torrents on filesystems with less than space diskspace left. Use with the schedule option. A default scheduled event with id low_diskspace is set to 500Mb.
load = file
load_verbose = file
load_start = file
load_start_verbose = file
Load and possibly start a file, or possibly multiple files by using the wild-card "*". This is meant for use with schedule, though ensure that the start is non-zero. The loaded file will be tied to the filename provided.
import = file
try_import = file
Load a resource file. try_import does not throw torrent::input_error exception on bad input.
stop_on_ratio = min_ratio
stop_on_ratio = min_ratio,min_upload
stop_on_ratio = min_ratio,min_upload,max_ratio
Stop torrents when they reach the given upload ratio min_ratio in percent. If the optional min_upload is given, require a total upload amount of this many bytes as well. If the optional max_ratio is given, stop the torrent when reaching this ratio regardless of the total upload amount. Exclude certain torrent by pressing Shift+I in the downlist list. Use with the schedule option.
on_insert = id,command
on_erase = id,command
on_open = id,command
on_close = id,command
on_start = id,command
on_stop = id,command
on_hash_queued = id,command
on_hash_removed = id,command
on_hash_done = id,command
on_finished = id,command
Call a command on a download when its state changes. Only a subset of commands are available.

Throttle Settings

upload_rate = KB
download_rate = KB
Set the maximum global uploand and download rates.
min_peers = value
max_peers = value
Set the minimum and maximum number of peers to allow in each download.
min_peers_seed = value
max_peers_seed = value
Set the minimum nad maximum number of peers to allow while seeding, or -1 (default) to use max_peers.
max_uploads = value
Set the maximum number of simultaneous uploads per download.
max_uploads_div = value
max_downloads_div = value
Change the divider used to calculate the max upload and download slots to use when the throttle is changed. Disable by setting 0.
max_uploads_global = value
max_downloads_global = value
Max upload and download slots allowed. Disable by setting 0.

Tracker Related Settings

Tracker related settings.

enable_trackers = yes
Set to no to disable all tracker requests. Useful for disabling rtorrent with the schedule command.
tracker_dump = filename
Dump tracker requests to filename, disable by supplying an empty string. Only torrents loaded while tracker_dump contains a non-empty string will be logged at the moment, although disabling it will work as expected.
tracker_numwant = number
Set the numwant field sent to the tracker, which indicates how many peers we want. A negative value disables this feature.
use_udp_trackers = yes
Use UDP trackers. Disable if you are behind a firewall, etc, that does not allow connections to UDP trackers.
dht = disabled|off|auto|on
Support for querying the distributed hash table (DHT) to find peers for trackerless torrents or when all trackers are down. Set to disable to completely disable DHT, off(default) to enable DHT but to not start the DHT server, auto to automatically start and stop the DHT server as needed or on for permanently keeping the DHT server running. When set to automatic, the DHT server will start up when the first non-private torrent is started, and will stop 15-30 minutes after the last non-private torrent is stopped (or when rTorrent quits). For DHT to work, a session directory must be set (for saving the DHT cache).
dht_port = number
Set the UDP listen port for DHT. Defaults to 6881.
dht_add_node = host[:port]
Not intended for use in the configuration file but as one-time option in the client or on the command line to bootstrap an empty DHT node table. Contacts the given node and attempts to bootstrap from it if it replies. The port is optional, with port 6881 being used by default.
http_capath = path
http_cacert = filename
Set the certificates to use in http requests. See Curl's CURLOPT_CAPATH and CURLOPT_CAINFO options for further information.

User-interface Settings

Display related settings.

view_add = name
Create a new view.
view_sort = name
view_sort = name,seconds
Sort a view according the the criteria set by view_sort_current. If the optional argument is supplied, the view is not sorted if a change happened during the last seconds. This command is meant to be used with schedule.
view_sort_new = name,...
view_sort_current = name,...
Set the sorting criteria for when new elements inserted or view_sort is called. The list can contain any number of criteria, including zero, from the following:

name, name_reverse, stopped, started, complete, incomplete, state_changed, state_changed_reverse

view_filter = name,...
Set a list of filter to apply when new new downloads are added and when view_sort is called. All filters must match for the download to be included.

stopped, started, complete, incomplete,

key_layout = qwerty|azerty|qwertz|dvorak
Change the key-bindings.

File-system Settings

File-system related settings.

max_file_size = size
Set the maximum size a file can have. Disable by passing -1.
split_file_size = size
Split files in a torrent larger than size into seperate files. Disable by passing -1.
split_suffix = string
Set the suffix used on split files. Defaults to .part.

Download Settings

Settings that require a download as a target, the options need to be called through f.ex on_finished.

create_link = type,path,suffix
delete_link = type,path,suffix
Create or delete a symbolic link. The link path is the concatenation of path, the result of the type on the download, and suffix.

Available types are; base_path uses the base path of the download, base_filename uses the base filename of the download, tied uses the path of the file the download is tied to, see start_tied.

Advanced Settings

This list contains settings users shouldn't need to touch, some may even cause crashes or similar if incorrectly set.

hash_read_ahead = MB
Configure how far ahead we ask the kernel to read when doing hash checking. The hash checker uses madvise(..., MADV_WILLNEED) for the requests.
hash_interval = ms
Interval between attempts to check the hash when the chunk is not in memory, in milliseconds.
hash_max_tries = tries
Number of attempts to check the hash while using the mincore status, before forcing. Overworked systems might need lower values to get a decent hash checking rate.
safe_sync = yes|no
Always use MS_SYNC rather than MS_ASYNC when syncing chunks. This may be nessesary in case of filesystem bugs like NFS in linux ~2.6.13.
max_open_files = value
Number of files to simultaneously keep open. LibTorrent dynamically opens and closes files as necessary when mapping files to memory. Default is based on sysconf(_SC_OPEN_MAX). You probably only think you know what this option does, so don't touch it.
max_open_sockets = value
Number of network sockets to simultaneously keep open. This value is set to a reasonable value based on sysconf(_SC_OPEN_MAX).
max_open_http = value
Number of sockets to simultaneously keep open. This value is set to 32 by default.
max_memory_usage = bytes
Set the max amount of memory space used to mapping file chunks. This may also be set using ulimit -m where 3/4 will be allocated to file chunks.
send_buffer_size = value
receive_buffer_size = value
Adjust the send and receive buffer size for socket.
umask = 0022
Set the umask for this process, which is applied to all files created by the program.
cwd = directory
Changes the working directory of the process using chdir.
session_on_completion = yes
Controls if the session torrent is saved when a torrent finishes. By default on.
session_lock = yes
Controls if a lock file is created in the session directory on startup.
session_save =
Save the session files for all downloads.
tos = default|lowdelay|throughput|reliability|mincost
tos = hex
Change the TOS of peer connections, by default set to throughput. If the option is set to default then the system default TOS is used. A hex value may be used for non-standard settings.
handshake_log = yes
Enable logging of the peer handshake. This generates a large number of log messages, but may be useful to debug connection problems.

Authors

Jari "Rakshasa" Sundell <jaris@ifi.uio.no>


 출처 : http://linux.die.net/man/1/rtorrent

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2009/12/28 09:41 2009/12/28 09:41
, , , ,
Response
No Trackback , a comment
RSS :
http://shiftkey.org/rss/response/251

FTP 명령어

접속
open aaa.bbb.ccc.ddd 0000

REMOTE DIR 이동
ftp> cd .........................

PASSIVE MODE 설정
ftp> passive ports 0.0.0.0/0
Passive mode on.

UPLOAD
ftp> put /.../file /.../file                                         LOCAL REMOTE

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2009/08/28 17:30 2009/08/28 17:30
, ,
Response
No Trackback , No Comment
RSS :
http://shiftkey.org/rss/response/231

Trac에 관리자 추가하기

# trac-admin /home2/trac/프로젝트/ permission add 사용자아이디 TRAC_ADMIN

이걸 몰라서 캐고생했다니 ㅠ.ㅠ
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2009/07/24 09:17 2009/07/24 09:17
, , ,
Response
No Trackback , No Comment
RSS :
http://shiftkey.org/rss/response/226

Subversion, Trac, SSL 함께 설치하기

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

개요

- 이 문서는 우분투 리눅스 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 #>>>8443
-------- /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(/svn/projectname)>    # 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 공용 사용자 계정을 생성할려면 다음과 같이 한다.
* TRAC과 함께쓰면서 passwd를 같이 관리하기때문에 생략해도 됨
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"
예제> svn mkdir file://localhost/home2/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
shell> sudo chown -R www-data:www-data /var/lib/svn (SVN도 설정 필요)

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

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

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

TRAC에 관리자 페이지 생성 및 추가 방법
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2009/05/22 09:02 2009/05/22 09:02
, , , ,
Response
12 Trackbacks , No Comment
RSS :
http://shiftkey.org/rss/response/216

Etch 에서 Lenny로 업그레이드 후 CPAN이 말을 안듣는다.

말 안드는건 사탕 주면서 살살 달래야 하는데......

아래와 같이 해주니 되더라......

1. apt-get clean
2. apt-get install --reinstall libcompress-zlib-perl


출처 : Bug#502033: libcompress-zlib-perl: Upgrade Etch to Lenny Breaks CPAN

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2009/04/06 13:15 2009/04/06 13:15
, ,
Response
No Trackback , No Comment
RSS :
http://shiftkey.org/rss/response/212

« Previous : 1 : 2 : 3 : 4 : Next »

블로그 이미지

Shiftkey가 살아가는 이런 저런 이야기......

- shiftkey

Notices

Archives

Authors

  1. shiftkey

Calendar

«   2012/05   »
    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    

Site Stats

Total hits:
160845
Today:
120
Yesterday:
156