간혹 부팅 도중 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
,

1) mysql 강제로 kill한다. 패스워드를 몰라서 mysqladmin 으로 내릴 수 없음

pkill -9 <mysqlPID>

 

2) skip-grant-tables 옵션으로 mysql 을 올린다.

# /usr/local/mysql/bin/mysqld_safe --user=mysql --skip-grant-tables &

 

3) root로 접속한다.

# mysql -u root mysql

 

4) root 패스워드를 바꾼다.

mysql> update user set password=PASSWORD(‘New password’) where user=’root’;

 

5) 권한을 적용한다.

mysql> FLUSH PRIVILEGES;

 

6) mysql을 내린다.

# ./mysqladmin -uroot -p shutdown

 

7) 다시 정상적으로 올린다.

# /usr/local/mysql/bin/mysqld_safe --user=mysql &

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

Mysql 8.0 InnoDB Storage Engine Features  (0) 2019.02.12
Mysql 8 vs PostgreSQL 10 간단 비교  (2) 2019.01.02
mysql parameter 튜닝했던 기록  (0) 2015.01.14
Posted by neo-orcl
,

1. table size

SELECT table_name = convert(varchar(30), min(o.name))
 , table_size = convert(int, ltrim(str(sum(cast(reserved as bigint)) * 8192 / 1024., 15, 0))), UNIT = 'KB'
FROM sysindexes i
  INNER JOIN
  sysobjects o
  ON (o.id = i.id)
WHERE i.indid IN (0, 1, 255)
AND  o.xtype = 'U'
GROUP BY i.id
ORDER BY table_size DESC;

 

2. table count

SELECT o.name, i.rows FROM sysindexes i INNER JOIN sysobjects o ON i.id = o.id
WHERE i.indid < 2 AND o.xtype = 'U' ORDER BY o.name;

'Knowledge > SQL-server' 카테고리의 다른 글

Prevent windows authentication  (0) 2015.01.27
Posted by neo-orcl
,