ver. mysql-5.0.37
[기본준비]
yum install ncurses-devel
* configure 실행시, termcap 어쩌구저쩌구 에러 → yum install ncurses-devel
wget http://downloads.skysql.com/archives/mysql-5.0/mysql-5.0.37.tar.gz
[MySQL 실행 계정 생성]
useradd -M -s /bin/false mysql
[환경설정]
./configure \
--prefix=/usr/local/server/mysql \
--with-charset=utf8 \
--with-extra-charsets=all
[컴파일 및 설치]
make && make install
[설치경로 확인]
ls -al /usr/local/server/mysql
[MySQL 환경설정 파일 복사]
cp support-files/my-huge.cnf /etc/my.cnf
* my-huge.cnf → 메모리 1~2G 사이
[root@cacti mysql-5.0.37]# cp support-files/my-large.cnf /etc/my.cnf
[root@cacti mysql-5.0.37]# cd /usr/local/server/mysql/
[root@cacti mysql]# bin/mysql_install_db --user=mysql
[root@cacti mysql]# chown -R root .
[root@cacti mysql]# chown -R mysql var
[root@cacti mysql]# chgrp -R mysql .
[root@cacti mysql]# vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/server/mysql/bin
[root@cacti mysql]# source ~/.bash_profile
[root@cacti mysql]# cp share/mysql/mysql.server /etc/init.d/mysqld
[root@cacti mysql]# chkconfig --add mysqld
[root@cacti mysql]# chkconfig --list | grep mysqld
/etc/init.d/httpd start
Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[root@cacti mysql]# vi /usr/local/server/apache/conf/httpd.conf