간혹 부팅 도중 centos나 rhel 부팅이 너무 느릴 때가 있다.

그때 보면 콘솔에 starting sendmail service .... 과정에서 1분~20분 정도를 잡아먹는데

그 이유는 /etc/hosts의 도메인을 탐색하기 때문이다.

/etc/hosts에 FQDN(fully qualified domain name)이 적혀있지 않아 발생한다.

해결법은 /etc/hosts의 내용을 변경하는 방법 혹은 sendmail 서비스를 시작하지 않게 하는 방법이다.

1. /etc/hosts

# vi /etc/hosts

기존: 192.168.1.2 localhost

변경: 192.168.1.2 localhost.test.com

 

2. sendmail 서비스 시작 비활성화

# chkconfig --list | grep send

sendmail        0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제

# chkconfig --level 2345 sendmail off

 

※chkconfig 사용법 간략

chkconfig --list [name]
chkconfig --add name
chkconfig --del name
chkconfig [--level levels] name <on|off|reset>
chkconfig [--level levels] name

'Knowledge > OS' 카테고리의 다른 글

로그파일에 특정 문자열 발생시 액션 스크립트  (0) 2015.06.24
snmp 기본설정  (0) 2015.06.24
ssh 접속이 id 입력 후 느린 경우 해결(centos)  (0) 2015.01.16
cp 주의사항  (0) 2015.01.14
mount directory to directory  (0) 2015.01.14
Posted by neo-orcl
,

https://www.centos.org/modules/newbb/viewtopic.php?topic_id=29490

centos에서 booting시 sendmail 시작 과정에서 시간을 많이 잡아먹는 경우가 있다.
이때 /etc/hosts 파일이 도메인 형식을 가지지 않아서 그렇다고 한다.

※you must fully qualified domain name(FQDN)
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch21_:_Configuring_Linux_Mail_Servers
위 링크에 나온 내용

The /etc/hosts File The /etc/hosts file also is used by DNS clients and also needs to be correctly configured. Here is a brief example of the first line you should expect to see in it:

127.0.0.1 bigboy.my-site.com localhost.localdomain localhost bigboy
The entry for 127.0.0.1 must always be followed by the fully qualified domain name (FQDN) of the server. In the case above it would be bigboy.my-site.com. Then you must have an entry for localhost and localhost.localdomain. Linux does not function properly if the 127.0.0.1 entry in /etc/hosts doesn't also include localhost and localhost.localdomain. Finally you can add any other aliases your host may have to the end of the line.


예를 들어 위 링크의 변경된 내용이다.

My current hosts file:

Quote:
# Do not remove the following line, or various programs # that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.3.0.1 main
10.3.0.2 alt1

Change /etc/hosts to:

127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.3.0.1 main.my-site.com main
10.3.0.2 alt1.my-site.com alt1

도메인은 그냥 형식적으로 아무거나 써줘도 된다. 테스트로 검증됨

아니면 sendmail 서비스를 꺼주는 방법도 생각해볼만 하다

'Knowledge > OS' 카테고리의 다른 글

RHEL 4 or 5 recommended kernel parameters  (0) 2013.08.12
find: Argument list too long 해결  (0) 2013.06.14
Linux bash profile 설정팁  (0) 2013.01.22
Linux 압축관련  (0) 2013.01.21
Hdd add on Centos 5 without rebooting  (0) 2013.01.11
Posted by neo-orcl
,

root로 진행.
# ls /sys/class/scsi_host 
host0 

host0이 아닌 host1 이 나왔다면 아래 내용도 host0 -> host1로 변경되어야 한다.

# echo "- - -" > /sys/class/scsi_host/host0/scan

'Knowledge > OS' 카테고리의 다른 글

Linux bash profile 설정팁  (0) 2013.01.22
Linux 압축관련  (0) 2013.01.21
cpio 파일 압축풀기  (0) 2013.01.04
Link 명령어  (0) 2013.01.04
Raw device mapping on over linux contos 5.2 ver  (0) 2012.12.27
Posted by neo-orcl
,