심히 걱정된다 - 2008/08/20 09:58
DB Setup
OS : CentOS 5.2 Default Setup
IP : 61.32.177.164 / 192.168.30.4

------------------------------------------------------------------------------------------
Pre Install

yum install gcc gcc-c++ ncurses-devel

------------------------------------------------------------------------------------------
MySQL 5.0 설치

   RPM 디폴트 설치

1. yum install mysql-server
2. service mysqld start
3. service mysqld stop
4. mv /var/lib/mysql /data/mysql50
5. ln -s /data/mysql50 /var/lib/mysql
6. mv /etc/my.cnf /var/lib/mysql
7. service mysqld start


------------------------------------------------------------------------------------------
MySQL 4.0 설치

   소켓의 위치와 서비스 포트를 변경

1. mysql-4.0.27.tar.gz 다운로드

2. 컨피규레이션

./configure --prefix=/usr/local/mysql40 --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-charset=euc_kr --without-debug --enable-assembler --with-innodb --with-berkeley-db --enable-local-infile --with-pthread --with-named-thread-lib=-lpthread --with-readline--with-unix-socket-path=/tmp/mysql40.sock --with-tcp-port=3307


에러시 확인할 사항

/usr/include/pthread.h 마지막 라인에 /* Linuxthreads */ 추가

3. make

4. make install

5. /usr/local/mysql40/bin/mysql_install_db
   디비초기화

6. mv /usr/local/mysql40/var /data/mysql40; ln -s /data/mysql40 /usr/local/mysql40/var
   물리적 데이터 저장위치 이동 후 심볼릭 링크

7. chown -R mysql.mysql /data/mysql40
   소유권 이동

8. vi /data/mysql40/my.cnf
   mysql40 환경설정 파일작성

--------------------------------------------------------------------------------
[client]
port            = 3307
socket          = /tmp/mysql40.sock

[mysqld]
port            = 3307
socket          = /tmp/mysql40.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 16M
thread_concurrency = 8
default-character-set = euc_kr
log-bin
server-id       = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
-------------------------------------------------------------------------------------

9. vi /etc/rc.d/rc.local
   시스템 시작 시 자동실행

   /usr/local/mysql40/bin/mysqld_safe &

10. /usr/local/mysql40/bin/mysqld_safe &
   데몬 실행

11. /usr/local/mysql40/bin/mysql
   접속 확인

12. netstat -an
   
   3306 포트와 3307 포트 리슨 확인
진보블로그 공감 버튼트위터로 리트윗하기페이스북에 공유하기딜리셔스에 북마크
TAG

Trackback Address ::

http://blog.jinbo.net/manim/trackback/22
PREV 1 ... 4 5 6 7 8 9 10 11 12 ... 29 NEXT