FrontPage king/2004-11

Nov 30, 2004
man page to pdf
Submitted by king @ 11-30 [09:55 pm]
# man -t 5 passwd > passwd_manual.ps
# ps2pdf14 passwd_manual.ps passwd_manual.pdf

/etc/make.profile 새로 거는법 !!!
Submitted by king @ 11-30 [06:31 pm]
cd /etc/
 rm make.profile
 ln -s ../usr/portage/profiles/default-linux/x86/2004.3 make.profile

emerge sync 오류
Submitted by king @ 11-30 [05:52 pm]
wrote 14361 bytes  read 3740411 bytes  33081.69 bytes/sec
total size is 78789417  speedup is 20.98

>>> Updating Portage cache...  ...done!

Performing Global Updates: /usr/portage/profiles/updates/4Q-2004
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'

 ** Skipping packages. Run 'fixpackages' or set it in FEATURES to fix the
    tbz2's in the packages directory. Note: This can take a very long time.
 * IMPORTANT: 42 config files in /etc need updating.
 * IMPORTANT: 13 config files in /usr/X11R6/lib/X11/xkb need updating.
 * Type emerge --help config to learn how to update config files.

iwlist scanning result
Submitted by king @ 11-30 [03:41 pm]
eth1      Scan completed :
          Cell 01 - Address: 00:02:8A:A8:9C:15
                    Protocol:IEEE 802.11b
                    Encryption key:on
                    Bit Rate:11 Mb/s
                    Extra: Rates (Mb/s): 11 
                    Extra: Signal: -60  dBm 
                    Extra: Last beacon: 14ms ago
          Cell 02 - Address: 00:02:8A:9E:50:74
                    Protocol:IEEE 802.11b
                    Encryption key:on
                    Bit Rate:11 Mb/s
                    Extra: Rates (Mb/s): 11 
                    Extra: Signal: -75  dBm 
                    Extra: Last beacon: 15ms ago
          Cell 03 - Address: 00:02:8A:9E:51:D0
                    Protocol:IEEE 802.11b
                    Encryption key:on
                    Bit Rate:11 Mb/s
                    Extra: Rates (Mb/s): 11 
                    Extra: Signal: -49  dBm 
                    Extra: Last beacon: 14ms ago
          Cell 04 - Address: 00:02:8A:9E:50:AE
                    Protocol:IEEE 802.11b
                    Encryption key:on
                    Bit Rate:11 Mb/s
                    Extra: Rates (Mb/s): 11 
                    Extra: Signal: -54  dBm 
                    Extra: Last beacon: 18ms ago


가상 데스크탑 for windows
Submitted by king @ 11-30 [11:22 am]

Nov 29, 2004
Submitted by king @ 11-29 [02:44 pm]
14:39 <@무한포옹> 유니캐스트는 일반적으로 host - host 구요.
14:39 <@무한포옹> 멀티캐스트는 동시에 여러대로 뿌리는데 잘 안쓰이고.
14:40 <@무한포옹> broadcast는 같은 network 대역의 모든 호스트에 뿌리지요..

Nov 28, 2004
gnome mixer
Submitted by king @ 11-28 [09:28 pm]

배경화면 site
Submitted by king @ 11-28 [06:03 pm]

Thinkpad wheel button on linux
Submitted by king @ 11-28 [03:48 pm]

굵게표시된 부분만 추가해준다
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
# 아래 1줄 추가
	InputDevice	"USB Mouse" "SendCoreEvents"
	InputDevice    "Keyboard0" "CoreKeyboard"


Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
# 아래 4줄추가
        Option	    "Emulate3Buttons""true"
        Option	    "Emulate3Timeout" "50"
        Option	    "EmulateWheel" "true"
        Option	    "EmulateWheelButton" "2"

# 아래항목 다 추가
Section	"InputDevice"
	Identifier	"USB Mouse"
	Driver		"mouse"
	Option		"Device"	"/dev/input/mice"
	Option		"Protocol"	"ImPS/2"
	Option		"Emulate3Buttons"	"true"
	Option		"ZAxisMapping"		"4 5"

Nov 27, 2004
for ipw2100 1.0.1 firmware
Submitted by king @ 11-27 [05:15 pm]

Nov 26, 2004

나의 FireFox 익스텐션 목록
Submitted by king @ 11-26 [10:47 am]

Nov 25, 2004
양파옹이 준 php 소스
Submitted by king @ 11-25 [06:00 pm]
echo 문을 활용한 hello world
$default_var 변수에 문자열을 대입해서 echo 한 hello world
문자열을 이어줄때 사용되는 연산자 "."
변수를 더할때 사용되는 연산자 "+"
변수를 "" 로 묶어도 변수로 인식하는 예제
문자열과 변수를 더했을때 결과는 "변수"만 남음
test6.php 예제를<html>, <body>, 으로 묶은 예제
for문과 "++" 연산자를 사용해서 1부터 10까지 줄바꿈해가면서 출력하는 예제
test8.php 예제를 <php echo(" <html> <body>"); 로 묶고 닫은 예제
test9.php 예제에 echo 문을 추가한 예제
if, else 문을 이용하여 True, False 값 얻어내는 예제
while 문을 이용하여 1부터 10까지 줄바꿈해가면서 출력하는 예제
$_GET 을 이용한 if , else 문 예제
for 문을 이용하여 i 값에 10보다 작을때까지 2씩 더하는 예제
$_GET 을 이용한 echo 문 예제

스팸 발송 유동 IP List
Submitted by king @ 11-25 [11:11 am]

Nov 24, 2004
디렉토리별로 용량확인할때
Submitted by king @ 11-24 [10:47 am]
1. du -sh *
2. du -h --max-depth=1 디렉토리

Nov 23, 2004
awk 문장 하나 더
Submitted by king @ 11-23 [04:35 pm]
# awk -F'-' '{ print $NF $(NF-1) $(NF-2) }'

-F '-' : 구분자를 '-' 로 지정한다, 기본값은 ' ' 이다 (스페이스,탭)
NF : 필드의숫자를 지정해줌 (NF-1 은 NF 보다 하나 적은 자릿수)

예문) ms-kim-znc
결과값) znckimms (거꾸로 -가 없이 나열된다)

mysql 파일에서 원하는것만 추출하기
Submitted by king @ 11-23 [03:53 pm]
  • mysql 파일

ns:/tmp# cat mysql
Mon Nov 22 04:00:00 KST 2004
Mon Nov 22 14:45:19 KST 2004
419-/bin/tar: Error exit delayed from previous errors
420-building file list ... done
423-wrote 6816186828 bytes  read 10818965 bytes  211143.42 bytes/sec
424-total size is 6813642151  speedup is 1.00
425-Mon Nov 22 14:45:19 KST 2004
Uptime: 2183641  Threads: 601  Questions: 128667057  Slow queries: 145
Opens: 1400  Flush tables: 1  Open tables: 127  Queries per second avg: 58.923
| Max_used_connections     | 649        |
| Key_reads                | 468        |
| Key_read_requests        | 8844554    |
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              3099260   1795896   1145932  62% /
none                         0         0         0   -  /proc
usbdevfs                     0         0         0   -  /proc/bus/usb
none                         0         0         0   -  /dev/pts
/dev/sda6             25711124   7192752  17212292  30% /env
/dev/sda5              2063504     45800   1912884   3% /home
none                   1032220         0   1032220   0% /dev/shm
/dev/sda3              2063536    328340   1630372  17% /var
/dev/sdb1             70557052  23517372  43455584  36% /data
23G     /data/mysqldata/data

  • get.sh

ns:/tmp# cat get.sh
STARTTIME=`head -1 mysql | awk '{print }'`
echo "시작시간: $STARTTIME"
ENDTIME=`head --lines=2 mysql | tail -1 | awk '{print }'`
echo "끝난시간: $ENDTIME"
grep 'total size is' mysql | awk '{print }'
grep 'avg:' mysql | awk '{print }'
grep 'Max_used_connections' mysql | awk '{print }'
grep '\/data' mysql | awk '{print }'

  • 결과값

ns:/tmp# ./get.sh
시작시간: 04:00:00
끝난시간: 14:45:19


나머지도 이런식으로 하면 된다 :)

wheel 그룹만 su 사용하기
Submitted by king @ 11-23 [11:35 am]
# cd /usr/bin
# ls -l
# chmod 4750 /bin/su
# chgrp wheel /bin/su
# vi /etc/group
wheel:x:10:root,tongseob 이런식으로 추가

Nov 22, 2004
FC3 에서 mysql 4 설치하다가 libcprts.so.5 없다고 할때
Submitted by king @ 11-22 [03:05 pm]
./bin/my_print_defaults: error while loading shared libraries: libcprts.so.5: cannot open shared object file: No such file or directory
Installing all prepared tables
./bin/mysqld: error while loading shared libraries: libcprts.so.5: cannot open shared object file: No such file or directory
Installation of system tables failed!

FC3 에서 SELinux 끄는법
Submitted by king @ 11-22 [11:40 am]
  • 설정파일위치 : /etc/selinux/config

[root@wiki selinux]# cat config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.

  • 끄는법

# setenforce 0

  • 키는법

# setenforce 1

  • /boot/grub/grub.conf 에서 selinux=0 부트플래그 옵션을 준다

Nov 18, 2004

RedHat 7.3 apt-get upgrade 내역
Submitted by king @ 11-18 [12:11 am]
The following packages will be upgraded
  Canna-devel Canna-libs LPRng WindowMaker WindowMaker-libs XFree86-100dpi-fonts XFree86-75dpi-fonts XFree86-ISO8859-15-100dpi-fonts
  XFree86-ISO8859-15-75dpi-fonts XFree86-ISO8859-2-100dpi-fonts XFree86-ISO8859-2-75dpi-fonts XFree86-doc XFree86-font-utils XFree86-tools
  XFree86-truetype-fonts apache apache-devel apache-manual ark arpwatch arts arts-devel balsa bind bind-devel bind-utils cervisia cpp cups cups-devel
  cups-libs cvs dateconfig ddskk-xemacs epic ethereal ethereal-gnome evolution fetchmail fetchmailconf file fileutils gaim gal gal-devel galeon gcc gcc-c++
  gcc-chill gcc-g77 gcc-java gcc-objc gdb gdm gettext gftp ggv gkrellm glibc glibc-common glibc-debug glibc-debug-static glibc-devel glibc-kernheaders
  glibc-profile glibc-utils gnupg grip gtkam gtkam-gimp gtkhtml gtkhtml-devel gv hanterm-xf hwdata iproute iptables iptables-ipv6 kaboodle kamera karm
  kcalc kcoloredit kde-i18n-Korean kdeaddons-noatun kdeadmin kdeartwork kdeartwork-kworldclock kdeartwork-locolor kdeartwork-screensavers kdegames
  kdegames-devel kdelibs kdelibs-devel kdemultimedia-arts kdemultimedia-devel kdemultimedia-kfile kdemultimedia-libs kdenetwork-devel kdenetwork-libs
  kdepasswd kdepim kdepim-cellphone kdepim-devel kdepim-pilot kdesdk-gimp kdesdk-kapptemplate kdesdk-kbabel kdesdk-kbugbuster kdesdk-kmtrace kdesdk-kompare
  kdesdk-kspy kdessh kdetoys kdevelop kdict kdvi kedit kfax kfile-pdf kfile-png kfloppy kfract kghostview khexedit kiconedit kit kjots kljettool klpq kmail
  kmid kmidi kmix knewsticker knode knotes koncd kooka korn kpaint kpf kppp krb5-devel krb5-libs krb5-server krb5-workstation kregexpeditor
  kregexpeditor-devel kruler kscd ksirc ksnapshot ktalkd ktimer kuickshow kview kviewshell kviewshell-devel kxmlrpcd lftp libao libao-devel libesmtp
  libesmtp-devel libgal19 libkscan libkscan-devel libmad libpcap libpng libpng-devel libstdc++ libstdc++-devel libusb libusb-devel lisa losetup lv lynx
  mailman man mgetty mgetty-sendfax mgetty-viewfax mgetty-voice micq mm mm-devel mod_auth_any mod_python mod_ssl modutils-devel mount mozilla mozilla-chat
  mozilla-devel mozilla-dom-inspector mozilla-js-debugger mozilla-mail mozilla-nspr mozilla-nspr-devel mozilla-nss mozilla-nss-devel mozilla-psm mysql
  mysql-devel mysql-server mysqlclient9 nasm nasm-doc nasm-rdoff nautilus nautilus-devel nautilus-mozilla netpbm netpbm-devel netpbm-progs netscape-common
  netscape-communicator netscape-navigator nfs-utils noatun nscd nss_ldap openldap openldap-clients openldap-devel openldap-servers openldap12 openssh
  openssh-askpass openssh-askpass-gnome openssh-clients openssh-server openssl openssl-devel openssl-perl openssl095a openssl096 pam pam-devel pam_smb pan
  perl perl-CGI perl-CPAN perl-DB_File perl-Digest-MD5 perl-NDBM_File perl-suidperl php-devel pine postfix postgresql postgresql-contrib postgresql-devel
  postgresql-docs postgresql-jdbc postgresql-libs postgresql-odbc postgresql-perl postgresql-python postgresql-server postgresql-tcl postgresql-tk psmisc
  pxe python python-devel python-docs python-tools python2 python2-devel python2-docs qt qt-MySQL qt-ODBC qt-PostgreSQL qt-Xt qt-designer qt-devel
  qt-static quota redhat-config-network redhat-lsb rhn_register rhn_register-gnome rsync rxvt samba samba-client samba-common samba-swat sane-backends
  sane-backends-devel scrollkeeper sendmail sendmail-cf sendmail-devel sendmail-doc shadow-utils sox-devel squid stunnel tar tcpdump tetex tetex-dvips
  tkinter tkinter2 ucd-snmp ucd-snmp-devel ucd-snmp-utils unzip up2date up2date-gnome util-linux vim-X11 vim-common vim-enhanced vim-minimal vnc vnc-doc
  vnc-server wget wordtrans wordtrans-kde wordtrans-qt wordtrans-web wu-ftpd xchat xinetd xpdf xpdf-chinese-simplified xpdf-chinese-traditional
  xpdf-japanese xpdf-korean ypserv yum zebra zlib zlib-devel
The following packages have been kept back
  XFree86 XFree86-Xnest XFree86-Xvfb XFree86-base-fonts XFree86-devel XFree86-libs XFree86-twm XFree86-xdm XFree86-xf86cfg XFree86-xfs ghostscript gnomeicu
  gphoto2 gphoto2-devel kcharselect kdeaddons-kate kdeaddons-kicker kdeaddons-knewsticker kdeaddons-konqueror kdebase kdebase-devel kdebindings
  kdebindings-devel kdebindings-kmozilla kdeutils-laptop kdf klprfax libogg libogg-devel libvorbis libvorbis-devel mpg321 php php-imap php-ldap php-manual
  php-mysql php-odbc php-pgsql php-snmp sox sylpheed vorbis-tools xine

Nov 16, 2004
Fedora Core 3 - nptl 확인여부
Submitted by king @ 11-16 [05:58 pm]
[root@ns lib]# getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.3
[root@ns lib]#

gentoo profile change
Submitted by king @ 11-16 [11:08 am]
To upgrade do the following steps:
# emerge -n '>=sys-apps/portage-2.0.51'
# cd /etc/
# rm make.profile
# ln -s ../usr/portage/profiles/default-linux/x86/2004.2 make.profile
# ln -s ../usr/portage/profiles/default-linux/x86/2004.3 make.profile

Nov 16, 2004
gentoo mirror
Submitted by king @ 11-16 [12:45 am]

ntsysv description file
Submitted by king @ 11-15 [11:49 am]

Nov 12, 2004
카스 1.5 리스트
Submitted by king @ 11-12 [05:22 pm]
all seeing eye import needs

Fedora Core 3
Submitted by king @ 11-12 [02:17 pm]

Nov 10, 2004
페도라 코어2 -> 코어3 업그레이드 (절차요약)
Submitted by king @ 11-10 [11:51 am]
절차 요약 . (더 요약 할 것도 없네요. ^^)

1. 백업 해라.

2. rpm -q kernel kernel-smp
쓰지 않는 커널은 삭제 해라.

3. yum clean all
yum dir 을 깨끗이 ( 새로운 yum list 를 얻기 위해 )

4. rpm -Uvh yum-2.1.11-3.noarch.rpm
다운받은 새로운 yum 으로 업그레이드.

5. rpm -Uvh fedora-release-3-8.i386.rpm
역시 다운받은 fedora-release 도 업그레이드

6. yum list updates
yum list 업데이트

7. yum upgrade
이제 업그레이드 시작..

8. Gnome 유저는 이렇게.
yum groupupdate "GNOME Desktop Environment"
(이렇게도 가능하군요. 몰랐음. )

9. 재부팅.. 이상없기를..

틀린부분 지적 및 수정해주세요.
위 yum list 를 수작업으로 추가해 주어야 할 것이 있나요?

apt-get 으로 업그레이드 하는 방법도 있었죠?

Fedora Core2 -> Core3 Upgrade
Submitted by king @ 11-10 [11:47 am]
Upgrading from Fedora Core 2 to Fedora Core 3 via Yum:
In general, if you're not cramped for space/time/something you should use
anaconda to upgrade. You'll find you come out with a much more reliable
upgrade process and much less pain. However, if you'd like to try to 
upgrade the whole system via yum you should follow these instructions. 
Before you start it would be a good idea to do the following:

- run rpm -q kernel kernel-smp
  compare the results to the kernel you are running (uname -r).
  run 'rpm -e' for each of the kernels that you are not using
    rpm -e kernel-2.6.5-1.358 kernel-smp-2.6.5-1.358
   This will make things a lot easier on you, trust me, and it frees up a HUGE 
   amount of disk space.

- clean up your yum dirs:
  yum clean all
- download yum from the fedora core 3 tree and update it:
  rpm -Uvh yum-2.1.11-3.noarch.rpm

- download fedora-release from the fedora core 3 tree and update it:
  rpm -Uvh fedora-release-3-8.i386.rpm                                        


- run a yum list updates to get the metadata and make sure everything is working:
  yum list updates
  you should see a lot of packages from that output.
- Now you're ready to run the update:
  yum upgrade

- Let yum do it's thing (confirming when prompted, of course).

- For gnome users you will want to run:
  yum groupupdate "GNOME Desktop Environment"
  to get the latest set of packages for GNOME.
- Then reboot your system and make sure you select the new kernel as the default.

Good luck!

md5sum check for windows
Submitted by king @ 11-10 [10:21 am]

Nov 09, 2004
설치된 젠투 백업받기
Submitted by king @ 11-09 [04:01 pm]
  • 통짜로 백업하기

# tar cvzpf /mnt/backup/gentoobackup.tar.gz / --exclude=/mnt/backup 

  • 디렉토리 별로 백업하기

# tar cvpzf /mnt/backup/gentoo.tar.gz /(파티션별 디렉토리) -X exclude_list

파티션별로 압축할때에 -X 옵션을 사용해서 exclude_list 파일내에 백업에 불필요한 디렉토리들을


Nov 09, 2004
vim 에서 tab 을 4로 줄이기
Submitted by king @ 11-09 [01:11 am]

# vi $HOME/.vimrc
set ts=4


Nov 03, 2004
젠투에서 패키지명을 정확히 모를때...
Submitted by king @ 11-03 [11:38 am]
[11:36] <@onion_athlon> emerge epm 하신다음
[11:36] <@onion_athlon> epm -qa | grep 패키지명
[11:36] <@onion_athlon> 이런식으로 찾은걸 unmerge해주시면 됩니다

Fedora yum mirrors
Submitted by king @ 11-03 [10:33 am]


name=Fedora Core 2 -- Fedora US mirror

name=Fedora Core 2 updates -- Fedora US mirror

name=Fedora Linux (stable) for Fedora Core 2 -- Fedora US mirror

name=Livna.org Fedora Compatible Packages (stable)
baseurl= http://rpm.livna.org/fedora/$releasever/$basearch/yum/stable

#name=Livna.org Fedora Compatible Packages (unstable)

#name=Livna.org Fedora Compatible Packages (testing)

name=Fedora Linux $releasever - $basearch - freshrpms



yum fedora-us-core-2 http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora/2/i386/RPMS.os
yum fedora-us-updates-2 http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora/2/i386/RPMS.updates
yum fedora-us-stable-2 http://mirrors.usc.edu/pub/linux/fedora//fedora/fedora/2/i386/RPMS.stable

yum livna-stable-fc2 http://rpm.livna.org/fedora/2/i386/yum/stable
#yum livna-testing-fc2 http://rpm.livna.org/fedora/2/i386/yum/testing
#yum livna-unstable-fc2 http://rpm.livna.org/fedora/2/i386/yum/unstable

yum freshrpms http://ayo.freshrpms.net/fedora/linux/2/i386/freshrpms

Fedora mirrors
Submitted by king @ 11-03 [10:30 am]

참고로 한국은

    * ftp://ftp.kreonet.re.kr/pub/Linux/fedora/core/
    * rsync://ftp.kreonet.re.kr/fedora/core/
    * ftp://mirror.hostway.co.kr/pub/fedora/
    * ftp://ftp.kaist.ac.kr/pub/fedora/linux/core/

Nov 03, 2004
모니위키에서 C 코드 넣을때
Submitted by king @ 11-03 [01:57 am]
[01:55] <hyungoo_Zilla> {{{#!vim c   
[01:55] <hyungoo_Zilla> 소스코드 
[01:55] <hyungoo_Zilla> \\}}}
[01:56] <hyungoo_Zilla> 모니위키에서 이렇게 해주면 되네요 :)

#include <stdio.h>
void main(){
    printf("Hello World"\n);

Nov 01, 2004
데비안 runlevel 관리하기
Submitted by king @ 11-01 [04:35 pm]
: 그리고 시작프로그램(-_-a) 등록할때 젠투에서는 'rc-update'를 사용하는데 요.
: 데비안에도 그런 프로그램이 있는지요.
: 공부가 부족해서 어이없는 질문 드린게 아닌지.. ^-^;;;

데비안에서 유사한 프로그램으로는 update-rc.d가 있습니다.
(패키지 설치시 이러한 것들은 주로 패키지내의 스크립트들에 의해서
저절로 실행/설치되며, 이 스크립트들은 /var/lib/dpkg/info에
으로 들어있습니다.)

update가능한 류는 대부분 "update-"로 시작됩니다.
예를 들면, update-menus, update-rc.d, update-alternatives, .., 등
"update-"치고 <tab>을 치면 해당되는 유틸리티들이 주욱 나옵니다.

  • 참고로 start-stop-daemon 도 있다고함 (from sCag)

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2004-11-30 21:55:42
Processing time 1.5543 sec