2010년 1월 30일 토요일

centos 5.4 한글화면

centos 5.4 처음 설치에서 한글 메뉴로의 설치가 불가능하여 영문으로 설치하고 나서 한글로 전환할때.

1. 프로그램 > 소프트웨어 추가/삭제 > 검색 >> 언어지원(Language) > 한국어를 선택
2. 시스템 > 관리 > 언어 > 한국어 를 선택한다.,



centos ifconfig명령 PATH추가

centos ifconfig명령 PATH추가

centos 5.4를 설치하고 ifconfig 명령이 실행 안된다.
~/.bash_profile 에서
PATH에 /sbin 경로를 추가하여 해결한다.

[h1skies@localhost ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
PATH=$PATH:/sbin

export PATH
[h1skies@localhost ~]$

==============================================================
참고:
http://www.troubleshooters.com/linux/prepostpath.htm

Troubleshooters.Com and T.C Linux Library Present
Adding a Directory to the Path
Copyright (C) 2002 by Steve Litt
[ Linux Library | Troubleshooters.Com | Email Steve Litt | Copyright Notice ]

Debug like a Ninja
Contents:

    * Disclaimer
    * Pre and Post Pathing
    * Adding to a Single User's Path
    * Adding to All Users' Paths (except root)
    * Adding to the Path of User root
    * Summary

Executive Summary
Adding a directory to the path of a user or all users would seem trivial, but in fact it isn't. The best place to add a directory to the path of a single user is to modify that user's .bash_profile file. To add it to all users except user root, add it to /etc/profile. To also add it to the path of user root, add it to root's .bash_profile file.

Disclaimer
Obviously, you use this document at your own risk. I am not responsible for any damage or injury caused by your use of this document, or caused by errors and/or omissions in this document. If that's not acceptable to you, you may not use this document. By using this document you are accepting this disclaimer.
Pre and Post Pathing

Linux determines the executable search path with the $PATH environment variable. To add directory /data/myscripts to the beginning of the $PATH environment variable, use the following:

PATH=/data/myscripts:$PATH

To add that directory to the end of the path, use the following command:

PATH=$PATH:/data/myscripts

But the preceding are not sufficient because when you set an environment variable inside a script, that change is effective only within the script. There are only two ways around this limitation:

   1. If, within the script, you export the environment variable it is effective within any programs called by the script. Note that it is not effective within the program that called the script.
   2. If the program that calls the script does so by inclusion instead of calling, any environment changes in the script are effective within the calling program. Such inclusion can be done with the dot command or the source command. Examples:
      . $HOME/myscript.sh
      source $HOME/myscript.sh

Inclusion basically incorporates the "called" script in the "calling" script. It's like a #include in C. So it's effective inside the "calling" script or program. But of course, it's not effective in any programs or scripts called by the calling program. To make it effective all the way down the call chain, you must follow the setting of the environment variable with an export command.

As an example, the bash shell program incorporates the contents of file .bash_profile by inclusion. So putting the following 2 lines in .bash_profile:

PATH=$PATH:/data/myscripts
export PATH

effectively puts those 2 lines of code in the bash program. So within bash the $PATH variable includes $HOME/myscript.sh, and because of the export statement, any programs called by bash have the altered $PATH variable. And because any programs you run from a bash prompt are called by bash, the new path is in force for anything you run from the bash prompt.

The bottom line is that to add a new directory to the path, you must append or prepend the directory to the $PATH environment variable within a script included in the shell, and you must export the $PATH environnment variable. The only remaining question is: In which script do you place those two lines of code?
Adding to a Single User's Path

To add a directory to the path of a single user, place the lines in that user's .bash_profile file. Typically, .bash_profile already contains changes to the $PATH variable and also contains an export statement, so you can simply add the desired directory to the end or beginning of the existing statement that changes the $PATH variable. However, if .bash_profile doesn't contain the path changing code, simply add the following two lines to the end of the .bash_profile file:

PATH=$PATH:/data/myscripts
export PATH

Adding to All Users' Paths (except root)

You globally set a path in /etc/profile. That setting is global for all users except user root. Typical /etc/profile files extensively modify the $PATH variable, and then export that variable. What that means is you can modify the path by appending or prepending the desired directory(s) in existing statements modifying the path. Or, you can add your own path modification statements anywhere before the existing export statement. In the very unlikely event that there are no path modification or export statements in /etc/profile, you can insert the following 2 lines of code at the bottom of /etc/profile:

PATH=$PATH:/data/myscripts
export PATH

Adding to the Path of User root
User root is a special case, at least on Mandrake systems. Unlike other users, root is not affected by the path settings in /etc/profile. The reason is simple enough. User root's path is set from scratch by its .bash_profile script. In order to add to the path of user root, modify its .bash_profile.

Summary
A fundimental administration task is adding directories to the execution paths of one or more users. The basic code to do so is:

PATH=$PATH:/data/myscripts
export PATH

Place that code, or whatever part of that code isn't already incorporated, in one of the following places:

User Class
    Script to modify
One user
    $HOME/.bash_profile
All users except root
    /etc/profile
root
    /root/.bash_profile

===========================================================
http://www.linuxforums.org/forum/linux-newbie/91912-how-set-path.html

Use one of the following lines in your '.cshrc' file (depending on where in the path you want your directories):

Code:
set path = ( <*> $path )
set path = ( $path <*> )

<*> = "list of one or more paths separated by spaces"
Also, you do not need to be root -- just edit your '.cshrc' file as a normal user...
__________________
* Linux 101 * Linux 102 * Computer 101 * Software 101 *
-
-
Remember: amateurs built the ark... professionals built the Titanic

2010년 1월 1일 금요일

My irssi--config

irssi

# cd /usr/ports/irc/irssi
# make install clean

# irssi

[(status)] /set recode on
[(status)] /set recode_fallback euckr
[(status)] /set recode_out_default_charset euckr
[(status)] /set recode_transliterate on
[(status)]
[(status)]
[(status)] /set timestamp_format %H:%M:%S
[(status)] /save
[(status)] /q <nick>
[(status)] /SERVER ADD -auto -network hanirc irc.hanirc.org 6667
[(status)]
[(status)] /SET autolog ON
[(status)]
[(status)]
[(status)] /save

------------------------------------------------------------
# vim ~/.irssi/config
servers = (
  { address = "eu.irc6.net"; chatnet = "IRCnet"; port = "6667"; },
  { address = "irc.webchat.org"; chatnet = "WebChat"; port = "6667"; },
  { address = "irc.rizon.net"; chatnet = "Rizon"; port = "6667"; },
  { address = "irc.link-net.org"; chatnet = "LinkNet"; port = "6667"; },
  { address = "silc.silcnet.org"; chatnet = "SILC"; port = "706"; },
  {
    address = "irc.hanirc.org";
    chatnet = "hanirc";
    port = "6667";
    use_ssl = "no";
    ssl_verify = "no";
    autoconnect = "yes";
  },
  {
    address = "purple.hanirc.org";
    chatnet = "HanIRC";
    port = "6664";
    password = "password";
    use_ssl = "no";
    ssl_verify = "no";
    autoconnect = "no";
  }
);
~
~
channels = (
  { name = "#irssi"; chatnet = "ircnet"; autojoin = "No"; },
  { name = "silc"; chatnet = "silc"; autojoin = "No"; },
  { name = "#freebsd"; chatnet = "hanirc"; autojoin = "Yes"; },
  { name = "#ubuntu"; chatnet = "hanirc"; autojoin = "Yes"; }
);
~
~
settings = {
  core = {
    real_name = "User H1skiesKim Donggyu";
    user_name = "h1skies";
    nick = "h1skies";
    recode_fallback = "euckr";
    recode_out_default_charset = "euckr";
    recode = "yes";
    timestamp_format = "%H:%M:%S";
  };
  "fe-text" = { actlist_sort = "refnum"; };
  "fe-common/core" = { autolog = "yes"; };
};
logs = { };
h1skies@~/.irssi%
------------------------------------------------------------------------

채널 이동
ESC+1, ESC+2, ....

이전글 보기
page up / page down키 사용


[(status)] /q <nick>
[(status)] /q   또는 /wc   ### /wc (an alias for /window close). /part will not work.
[(status)] /server irc.hanirc.org    또는
[(status)] /server irc.hanirc.org 6667
[(status)] /connect purpl.hanirc.org   ###open a new network connection
[(status)] /join #freebsd
[(status)] /disconnect
[(status)]

# cd ~/irclogs

2009년 12월 12일 토요일

09년 04회 리눅스마스터2급 2차시험 A형

날짜 : 2009년 12월 6일 일요일 14시
시험 장소 : 개포동 수도전기공고

한국방송통신인력센터
http://exam.ihd.or.kr/sub/information/information02.asp




합격자 발표일 12월 18일 기대됨.

2009년 11월 11일 수요일

fedora tips

fedora11:  your system had a kernel failure
sol :
# su
# yum update --enablerepo=u*g

------------------------------------------
콘솔 화면 로케일
$ export LANG=en_US
$ export LANG=ko_KR.UTF-8
$ export LANG=ko_KR.eucKR

자동 설정
$ vim ~/.bashrc
    # User specific aliases and functions
    alias en='export LANG=us_US'
    alias ko='export LANG=ko_KR.UTF-8'
    alias x='export LANG=ko_KR.UTF-8; startx'
추가한다.

-------------------------------------------
$ showkey
$ setkeycodes 71 122
$ setkeycodes 72 123

부팅할 때 자동 적용
# vim /etc/rc.d/rc.local
     # keycode for Hangul key, Hangul_Hanja key
     setkeycodes 71 122
     setkeycodes 72 123
추가한다

X-window
# xev
# vim /etc/X11/Xmodmap
     keycode 209 = Hangul_Hanja
     Keycode 210 = Hangul
# xmodmap /etc/X11/Xmodmap             # 재부팅 없이 바로 적용
# xev

------------------------------------------------------------
# system-config-network

# lsmod
# rmmod <모듈이름>
-----------------------------------------------------------
# yum install xmms xmms-mp3

-----------------------
yum install stardict
   /usr/share/stardic/dic/ 디렉트리에 사전파일을 복사해 넣는다.

---------------------------
// 다국어 설정을 편집합니다.
# vi /etc/sysconfig/i18n
▷ LANG="ko_KR.UTF-8"
▶ LANG="ko_KR.eucKR"

재부팅 후 적용된다.

fedora11 - grub..etc


grub 복구하기
grub-install /dev/hda

grub 비밀번호 설정하기
# grub
grub> md5crypt
Password: *************
Encrypted: xxxxxxxxxxxxxxxxxxxx          # 문자복사

터미널 하나를 더 실행하여
/etc/grub.conf 또는 /boot/grub/grub.conf, boot/grub/grub.lst 파일 수정
# vim /boot/grub/grub.conf
.....
default=0
timeout=5
splashimage=(hd1,0) /boot/grub/splash.xpm.gz
hiddenmenu
password --md5 xxxxxxxxxxxxxxxxxxxx
tiele Redora Core (2.6.15-1.2054_FC5)

# reboot

부팅화면에서 아무키나 눌러  grub 부팅 선택 화면으로 들어간다.
p 키를 눌러 비밀번호 입력한다. 패스워드를 입력하기 전에는 grub을 편집할 수 없다.
e: edit
a: modify
c: command-line


MBR의 부팅 정보를 디스켓에 백업하기
1. 디스켓 ext2 파일 시스템으로 포멧하기
   # mke2fs /dev/fd0
2. 디스켓 마운트
   #  mount -t ext2 /dev/fd0 /media/floppy
3. 마운트된 플로피 디스크에 boot/grub 디렉터리 만들기
   # mkdir -p /media/floppy/boot/grub
4. 시스템의 부팅 정보가 들어 있는 /boot/grub 디렉터리에 있는 파일들을 플로피 디스크의 /boot/grub로 복사
   # cp /boot/grub/* /media/floppy/boot/grub
5. grub의 명령 행 인터페이스에서 플로피 디스크에 부팅 정보를 설정 내용을 적용
   # grub
   grub> root (fd0)      # 루트 파티션으로 플로피 디스크를 지정
   grub> setup (fd0)    # 플로피 디스크로 부팅 정보를 복사
   grub> quit
이제 플로피 디스크로 부팅하면 디스켓에 저장되어 있는 부팅 정보를 바탕으로 부팅할 수 있다.