'설정'에 해당되는 글 4건

  1. [git] git 설정하기 2010/07/31
  2. git daemon 서버 설정 2010/06/24
  3. Moniwiki의 초기 설정 2010/04/23
  4. iptables 설정 2008/09/23

[git] git 설정하기

from Development 2010/07/31 01:25
1. git 설치
sudo apt-get install build-dep git-core git-doc


2. git 구성하기
2.1. username과 email 설정
git config --global user.name "Yang Jeong-Seok"
git config --global user.email "dasomoli@gmail.com"


2.2.. git 설정 확인
git config --global --list


2.3.. git color ui 사용
git config --global color.ui "auto"


2.4. 기본 인코딩을 cp949로 바꾸기
git config --global i18n.commitEncoding cp949
git config --global i18n.logOutputEncoding cp949


윈도에서는 LESSCHARSET=latin1 으로 설정해야 로그 메시지를 볼 수 있다.
set LESSCHARSET=latin1

2.5. 기본 에디터를 vim 으로 설정하기
git config --global core.editor "vim"

git daemon 서버 설정

from Linux 2010/06/24 16:44

/pub/repo 에 "git clone git://xxx.xxx.xxx.xxx/repo/kernel kernel" 과 같이 하여 repository를 설정하였다면

# git daemon --verbose --export-all --base-path=/pub/repo --detach

git://<새 서버>/pub/repo/kernel 등의 URL로 접근이 가능.

touch .git/git-daemon-export-ok

git config daemon.receivepack="true"

Moniwiki의 초기 설정

from Development 2010/04/23 20:40
1. monisetup.php 에서 한 일.
 1.1. Site 이름 설정
$sitename='Wiki';
 1.2. 업로드 가능한 파일 확장자 추가.
$pds_allowed="png|jpg|jpeg|gif|mp3|zip|tgz|gz|txt|css|exe|hwp|pdf|flv|alz|bmp|doc|xls|ppt|pptx|xlsx|docx|gul|gif|bz2";
 1.3. 테마 바꾸기
$theme='azblue';
 1.4. 편집창 사이즈 좀더 길게..
$edit_rows=26;
 1.5. 위지윅 에디터는 아직 불안정 한 것 같으니 Disable
$use_wikiwyg=0;
 1.6. 부분 편집 가능하도록..
$use_sectionedit=1;
 1.7. 로그인한 후에 글 편집 가능하도록..
$security_class='needtologin';
 
2. php 설정(/etc/php.ini)에서 upload를 위한 작업
 2.1. 최대 업로드 파일 사이즈 조정
upload_max_filesize = 2048M
 2.2. POST 방식으로 업로드하므로 POST data size 조정
post_max_size = 1024M
 
3. azblue 테마 수정(theme/azblue/theme.php)
 3.1. 폭이 너무 좁으니 좀 넓게..
$_width='80%';
 

iptables 설정

from Linux/Ubuntu 2008/09/23 01:04
오랜만에 iptables 설정을 하려니 어떻게 했었는지 하나도 기억이 안나더군요.
기억나는건 iptables -L 하나...;;;
할 때만 기억했다가 또 까먹고 또 까먹고.. 이 놈의 돌대가리..;;
암튼 그래서 검색을 해보니 우분투의 community 도움말에 설정 관련 글(https://help.ubuntu.com/community/IptablesHowTo)이 있네요~
참 편리하게 잘 만들어놨네요^^

1. Establicshed 세션 허용
$ sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

2. 특정 포트 허용
$ sudo iptables -A INPUT -p tcp --dport <포트 번호> -j ACCEPT
<포트 번호> 는 135:139 형식으로 범위를 조절할 수 있다.

3. 그 외 모두 막기
sudo iptables -A INPUT -j DROP

4. 현재 iptables 설정 파일로 저장하기
$ sudo sh -c "iptables-save > /etc/iptables.rules"

5. iptables 설정 파일로 부팅 시에 재설정하기
$ sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet dhcp
 pre-up iptables-restore < /etc/iptables.rules
 post-down iptables-save -c > /etc/iptables.rules
p.s : 본문의 etc/etc 로 해주셔야 합니다. > 나 < 이후에 / 가 붙지 않는 버그가 텍스트큐브에 있는 듯 합니다. -> 티스토리로 이전 후 수정되었습니다.

예제)
1. 특정 IP 대역만 허용
# iptables -A INPUT -p all -s 192.168.0.0/24 -j ACCEPT
# iptables -A INPUT -j DROP