지풍@blog

지풍@blog RSS

Fedora나 CentOS 같은 redhat 계열에서 ifconfig을 실행 했을 경우 찾을 수 없다라는 오류가 뜰 경우 해결 하는 방법입니다

net-tools이라는 패키지가 설치되지 않아 발생하는 문제이며 아래와 같이 yum으로 설치 및 해결 가능합니다

# ifconfig
-bash: ifconfig: command not found
# yum install net-tools
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.6.20130109git.fc19 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch         Version                        Repository    Size
================================================================================
Installing:
 net-tools       x86_64       2.0-0.6.20130109git.fc19       fedora       293 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 293 k
Installed size: 855 k
Is this ok [y/d/N]: y
Downloading packages:
net-tools-2.0-0.6.20130109git.fc19.x86_64.rpm              | 293 kB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : net-tools-2.0-0.6.20130109git.fc19.x86_64                    1/1
  Verifying  : net-tools-2.0-0.6.20130109git.fc19.x86_64                    1/1

Installed:
  net-tools.x86_64 0:2.0-0.6.20130109git.fc19

Complete!


RHEL 5.x 이나 CentOS 5.x에서 perl 스크립트를 실행하면 아래와 같이 오류를 내면서 실행 안 되는 경우가 있습니다

Can't locate IO/Pty.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/lib/perl5/site_perl/5.8.8/Expect.pm line 22.


IO/Pty.pm을 찾을 수 없다라는 오류인데 RHEL 5.x이나 CentOS 5.x에서는 yum으로 해당 패키지를 설치할 수 없어 보이더군요

그래서 따로 구해서 설치를 해줘야 하는데 아래 주소에서 다운 받아 설치 할 수 있습니다

http://pkgs.repoforge.org/perl-IO-Tty

RHEL 5.x이나 CentOS 5.x는 여기서 직접 다운로드 됩니다

http://pkgs.repoforge.org/perl-IO-Tty/perl-IO-Tty-1.08-2.el5.rf.i386.rpm (32bit)

참고로 rpm으로 저 주소를 직접 넣어 설치는 불가능한 것 같습니다

wget으로 먼저 다운을 받고 rpm으로 설치를 해야 제대로 되더군요
tftp 서버가 CentOS나 RHEL에서는 기본으로 설치되지 않아 별도로 설치해야 하죠

yum으로 간단히 설치 할 수 있는데 아래와 같이 설치 할 수 있습니다

# yum update tftp-server

Loaded plugins: downloadonly, fastestmirror

Loading mirror speeds from cached hostfile

 * base: data.nicehosting.co.kr

 * extras: data.nicehosting.co.kr

 * updates: data.nicehosting.co.kr

addons                                                   |  951 B     00:00

base                                                     | 1.1 kB     00:00

extras                                                   | 2.1 kB     00:00

updates                                                  | 1.9 kB     00:00

Setting up Update Process

Package(s) tftp-server available, but not installed.

No Packages marked for Update

[root@w03 ~]# yum install tftp-server

Loaded plugins: downloadonly, fastestmirror

Loading mirror speeds from cached hostfile

 * base: data.nicehosting.co.kr

 * extras: data.nicehosting.co.kr

 * updates: data.nicehosting.co.kr

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package tftp-server.x86_64 0:0.49-2.el5.centos set to be updated

--> Finished Dependency Resolution


Dependencies Resolved


================================================================================

 Package            Arch          Version                     Repository   Size

================================================================================

Installing:

 tftp-server        x86_64        0.49-2.el5.centos           base         32 k


Transaction Summary

================================================================================

Install      1 Package(s)

Update       0 Package(s)

Remove       0 Package(s)


Total download size: 32 k

Is this ok [y/N]: y

Downloading Packages:

tftp-server-0.49-2.el5.centos.x86_64.rpm                 |  32 kB     00:27

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing     : tftp-server                                              1/1


Installed:

  tftp-server.x86_64 0:0.49-2.el5.centos


Complete!


위와 같이 yum으로 간단히 설치할 수 있고 rpm 명령어로 아래와 같이 설치 되었는지 확인할 수 있죠

# rpm -qa | grep tftp

tftp-server-0.49-2.el5.centos


이제 제대로 실행이 되는지 확인해야 하는데 설치가 되면 기본적으로 tftp 서버가 실행되어 있지도 않고 설정상 내려져 있죠

tftp 서버가 올라 가도록 설정을 해야 하는데 /etc/xinetd.d/tftp 파일을 열어 disable = yes를 disable = no로 바꿔 줘야 합니다

# default: off

# description: The tftp server serves files using the trivial file transfer \

#       protocol.  The tftp protocol is often used to boot diskless \

#       workstations, download configuration files to network-aware printers, \

#       and to start the installation process for some operating systems.

service tftp

{

        socket_type             = dgram

        protocol                = udp

        wait                    = yes

        user                    = root

        server                  = /usr/sbin/in.tftpd

        server_args             = -s /tftpboot

        disable                 = yes -> no

        per_source              = 11

        cps                     = 100 2

        flags                   = IPv4

}


그리고 tftp 서버가 xinetd에 속하기 때문에 xinetd를 재가동하면 tftp 서버가 실행이 될껍니다

# service xinetd restart

Stopping xinetd:                                           [  OK  ]

Starting xinetd:                                           [  OK  ]


xinetd가 재가동 되면 아래와 같이 제대로 tftp 서버가 실행이 되었는지 알 수가 있습니다

# netstat -a | grep tftp

udp        0      0 *:tftp                      *:*  


CentOS 5.x에서 git 설치

백과사전/리눅스 2011. 10. 19. 11:17 by 지풍
CentOS 5.x에서 yum으로 git가 설치가 안 되는 것 같더군요

CentOS 5.x 기본 패키지에 git가 포함이 안 되어서 yum으로 설치가 안 되는 것 같고

CentOS 6.x부터는 기본 패키지에 포함되어 있는 것 같아서 간단히 yum으로 설치가 될 것 같습니다

일단 git를 설치하기 위해 필요한 패키지들을 먼저 yum으로 설치 해 줍니다

# yum install zlib-devel

# yum install openssl-devel

# yum install perl

# yum install cpio

# yum install expat-devel

# yum install gettext-devel
# yum install curl 

 
필요한 패키지를 다 받았으면 git를 wget으로 다운 받고 설치합니다

# wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz

# tar xzvf git-latest.tar.gz

# cd git-{date}

# autoconf

# ./configure --with-curl=/usr/local

# make

# make install


위와 같은 과정을 거치면 git를 CentOS 5.x에서 사용 가능합니다

CentOS 5.x에서 가능하기 때문에 자연스레 RHEL 5.x에서도 가능하답니다

출처 : http://angry-fly.com/2009/03/installing-git-on-centos-5/
 
레드헷 계열(RHEL, fedora, CentOS 등등...)에서 yum으로 쉽게 패키지 관리를 할 수 있죠

보통 설치와 업데이트를 yum으로 하는데 거기에 yum으로 관리하는 패키지의 RPM을 다운 받을 수 있답니다

yum으로 RPM을 다운 받기 위해서는 yum-downloadonly이란 패키지를 yum으로 설치 해야 합니다

# yum search yumdownloader

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: mirror.khlug.org

 * extras: mirror.khlug.org

 * updates: mirror.khlug.org

============================ Matched: yumdownloader ============================

yum-utils.noarch : Utilities based around the yum package manager

# yum install yum-downloadonly

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: centos.ustc.edu.cn

 * extras: centos.ustc.edu.cn

 * updates: centos.ustc.edu.cn

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package yum-downloadonly.noarch 0:1.1.16-16.el5.centos set to be updated

--> Finished Dependency Resolution


Dependencies Resolved


================================================================================

 Package               Arch        Version                      Repository

                                                                           Size

================================================================================

Installing:

 yum-downloadonly      noarch      1.1.16-16.el5.centos         base       12 k


Transaction Summary

================================================================================

Install      1 Package(s)

Update       0 Package(s)

Remove       0 Package(s)


Total download size: 12 k

Is this ok [y/N]: y

Downloading Packages:

yum-downloadonly-1.1.16-16.el5.centos.noarch.rpm         |  12 kB     00:00

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897

base/gpgkey                                              | 1.5 kB     00:00

Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Is this ok [y/N]: y

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing     : yum-downloadonly                                         1/1


Installed:

  yum-downloadonly.noarch 0:1.1.16-16.el5.centos


Complete!


yum-downloadonly 패키지가 설치가 되면 그 때부터 yum으로 RPM을 다운 받을 수 있습니다

# yum install <패키지 이름> --downloadonly --downloaddir=<다운 받을 위치>


예를 들어 OpenIPMI 같은 경우는 아래와 같습니다

# yum install OpenIPMI --downloadonly --downloaddir=/root

Loaded plugins: downloadonly, fastestmirror

Loading mirror speeds from cached hostfile

 * base: centos.mirror.cdnetworks.com

 * extras: centos.mirror.cdnetworks.com

 * updates: mirror.khlug.org

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package OpenIPMI.x86_64 0:2.0.16-11.el5_7.2 set to be updated

--> Processing Dependency: OpenIPMI-libs = 2.0.16-11.el5_7.2 for package: OpenIPMI

--> Running transaction check

---> Package OpenIPMI-libs.x86_64 0:2.0.16-11.el5_7.2 set to be updated

--> Finished Dependency Resolution


Dependencies Resolved


================================================================================

 Package             Arch         Version                   Repository     Size

================================================================================

Updating:

 OpenIPMI            x86_64       2.0.16-11.el5_7.2         updates       162 k

Updating for dependencies:

 OpenIPMI-libs       x86_64       2.0.16-11.el5_7.2         updates       571 k


Transaction Summary

================================================================================

Install      0 Package(s)

Update       2 Package(s)

Remove       0 Package(s)


Total download size: 733 k

Is this ok [y/N]: y

Downloading Packages:

(1/2): OpenIPMI-2.0.16-11.el5_7.2.x86_64.rpm             | 162 kB     00:00

(2/2): OpenIPMI-libs-2.0.16-11.el5_7.2.x86_64.rpm        | 571 kB     00:02

--------------------------------------------------------------------------------

Total                                           196 kB/s | 733 kB     00:03



exiting because --downloadonly specified

ext3의 다음버전인 ext4가 나왔죠

커널 버전 2.6.28부터 추가 되었고 ext3와 화위 호환성, 1EB(헉!!)의 파일 시스템과 파일 하나가 16TB까지 지원 그리고 이전에 비해 성능과 신뢰성을 끌어 올렸다고 하네요

[root@localhost ~]# cat /etc/redhat-release
CentOS release 5.5 (Final)
[root@localhost ~]# cat /proc/version
Linux version 2.6.18-194.el5 (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Apr 2 14:58:35 EDT 2010

그런데 CentOS 5.x가 2.6.18 기반이여서 그런지 기본으로 ext4가 기본으로 탑재가 안 되어 있더군요
(CentOS 5.5에 ext4가 없으니 하위버전도 그러겠죠?? 확인 안 해봐서ㅠㅠ)

뭐 CentOS가 Red Hat Enterprise Linux 기반으로 되어 있으니까 Red Hat Enterprise Linux에도 ext4가 기본 탑재 안 되어 있을것 같네요
(한갖 소문에는 Red Hat Enterprise Linux 5.4부터 탑재 한다고 하던데 5.5에 없네요~)

구글에서도 ext2를 버리고 ext4로 갈려고 하고 redhat 계열에서는 점차 ext4로 갈려고 계획 중인가 보더군요

그나저나 redhat 계열의 패키지 관리 프로그램인 yum을 이용해서 쉽게 ext4를 시스템에 적용 시킬 수가 있더군요

아래 같이 하면 ext4를 설치할 수 있을껍니다~

[root@localhost ~]# yum install e4fsprogs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: centos.mirror.cdnetworks.com
 * base: centos.mirror.cdnetworks.com
 * extras: centos.mirror.cdnetworks.com
 * updates: centos.mirror.cdnetworks.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package e4fsprogs.i386 0:1.41.9-3.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch           Version                Repository      Size
================================================================================
Installing:
 e4fsprogs           i386           1.41.9-3.el5           base           1.1 M

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
e4fsprogs-1.41.9-3.el5.i386.rpm                          | 1.1 MB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : e4fsprogs                                                1/1

Installed:
  e4fsprogs.i386 0:1.41.9-3.el5

Complete!
[root@localhost ~]# rpm -ql e4fsprogs
/etc/mke4fs.conf
/sbin/debuge4fs
/sbin/dumpe4fs
/sbin/e4fsck
/sbin/e4image
/sbin/e4label
/sbin/e4undo
/sbin/finde4fs
/sbin/fsck.ext4
/sbin/fsck.ext4dev
/sbin/mke4fs
/sbin/mkfs.ext4
/sbin/mkfs.ext4dev
/sbin/resize4fs
/sbin/tune4fs
/usr/share/doc/e4fsprogs-1.41.9
/usr/share/doc/e4fsprogs-1.41.9/README
/usr/share/doc/e4fsprogs-1.41.9/RELEASE-NOTES
/usr/share/locale/ca/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/cs/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/de/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/es/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/fr/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/id/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/it/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/nl/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/pl/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/sv/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/tr/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/vi/LC_MESSAGES/e4fsprogs.mo
/usr/share/locale/zh_CN/LC_MESSAGES/e4fsprogs.mo
/usr/share/man/man5/e4fsck.conf.5.gz
/usr/share/man/man5/mke4fs.conf.5.gz
/usr/share/man/man8/debuge4fs.8.gz
/usr/share/man/man8/dumpe4fs.8.gz
/usr/share/man/man8/e4fsck.8.gz
/usr/share/man/man8/e4image.8.gz
/usr/share/man/man8/e4label.8.gz
/usr/share/man/man8/e4undo.8.gz
/usr/share/man/man8/fsck.ext4.8.gz
/usr/share/man/man8/fsck.ext4dev.8.gz
/usr/share/man/man8/mke4fs.8.gz
/usr/share/man/man8/mkfs.ext4.8.gz
/usr/share/man/man8/mkfs.ext4dev.8.gz
/usr/share/man/man8/resize4fs.8.gz
/usr/share/man/man8/tune4fs.8.gz

Fedora Core 초기 버전에서는 기본 설치 시 개발 환경과 서버 기능이 설치 되었는데 최근의 Fedora Core와 RHEL(Red Hat Enterprise Linux)를 포함한 Redhat 계열에서 기본 설치 시 gcc와 같은 컴파일러와 아파치와 mysql 같은 서버 기능이 설치 되지 않는데 아래와 같이 설치 시에 옵션을 추가하면 개발 환경과 서버 기능을 설치할 수 있다

사용자 삽입 이미지

설치 중에 위와 같이 어떤 기능을 설치할 것인지 묻는 화면에서 하단에 있는 Customize later 옆에 있는 Customize now을 선택한 다음에 Next를 클릭 하면 아래와 같이 선택할 수 있는 화면으로 넘어 가는데 Development와 Servers에서 원하는 기능을 체크인 한 다음에 설치 하면 개발 환경과 서버 기능을 추가할 수 있다

사용자 삽입 이미지
사용자 삽입 이미지

redhat 계열에서는(redhat, Fedora, Red Hat Enterprise Linux, CentOS등) 해당하는 배포판의 버전을 /etc/redhat-release에 해당하는 배포판의 버전이 있습니다

간혹 하위 버전의 배포판으로 만들어진 소스가 상위 버전의 배포판에서도 컴파일이 되지만

지원하지 않는 배포판이라고 컴파일이 안 될 경우에는 이 파일에 해당하는 하위 버전의 배포판으로 변경해 주면 됩니다

참고로 아래는 자주 쓰는 redhat 9 이랑 Fedora에서 redhat-release입니다

Fedora Core release 1 (Yarrow)
Fedora Core release 2 (Tettnang)
Fedora Core release 3 (Heidelberg)
Fedora Core release 4 (Stentz)
Fedora Core release 5 (Bordeaux)
Fedora Core release 6 (Zod)
Fedora Core release 7 (Moonshine)
Red Hat Linux release 9 (Shrike)

1 
분류 전체보기 (202)
내가 사는 이야기 (2)
백과사전 (89)
듣고 보는 것 (0)
세상 이야기 (1)
맛집 투어 & 여행 (0)
컴퓨터 이야기 (110)
게임 이야기 (0)
위시리스트 (0)
스포츠 이야기 (0)
영화 이야기 (0)
우하하하하 (0)

공지사항

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백