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
,

보통 oracle 유저로 /etc/hosts 파일을 읽을 수는 있어야 오라클이 정상 동작한다.

/etc/hosts 파일에 대한 other 권한의 read를 없앨 경우 10g와 11g 동작이 틀리다.

10g의 경우:

1. sqlplus 접속 자체가 엄청나게 느려진다.
2. startup시 얼럿로그에 ORA-00130 나타난다.
3. 시작 자체는 된다.
4. 얼럿로그에 주기적으로 아래 메시지가 출력된다.
    Errors in file /oracle/admin/testdb/bdump/testdb_ora_4307.trc:
    ORA-07445: exception encountered: core dump [kslgetl()+120] [SIGSEGV] [Address not mapped to object] [0x000000210] [] []
    ORA-00108: failed to set up dispatcher to accept connection asynchronously
    Fri Apr 19 10:35:45 KST 2013
found dead dispatcher 'D000', pid = (18, 3)
5. 리스너 시작이 안된다.
    [oracle@centos5 ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 19-APR-2013 10:35:17
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Starting /oracle/product/10.2.0/db1/bin/tnslsnr: please wait...
  TNSLSNR for Linux: Version 10.2.0.5.0 - Production
    System parameter file is /oracle/product/10.2.0/db1/network/admin/listener.ora
    Log messages written to /oracle/product/10.2.0/db1/network/log/listener.log
    Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=centos5.6x64)(PORT=1521)))
    TNS-12545: Connect failed because target host or object does not exist
     TNS-12560: TNS:protocol adapter error
      TNS-00515: Connect failed because target host or object does not exist

Listener failed to start. See the error message(s) above...

11g의 경우:

1. sqlplus 접속 자체가 엄청나게 느려진다.
2. startup시 ORA-00119가 나타나며 실패한다.
3. 아래는 11g 테스트 결과

[root@centos5 etc]# ls -l hosts
-rw-r--r-- 2 root root 208  9??29  2012 hosts
[root@centos5 etc]# chmod 640 hosts
[root@centos5 etc]# su - oracle
[oracle@centos5 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 19 10:16:40 2013
Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning option

sys@ORCL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORCL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=centos5.6x64)(PORT=1521))'

Posted by neo-orcl
,