1.필수패키지 설치
# yum install gcc* ncurses-devel cmake
2.계정추가
# groupadd -g 400 mysql
# useradd -u400 -g400 -d /usr/local/mysql -s /bin/false mysql
3.설치
# tar xvfz mysql-5.5.29.tar.gz
# cd mysql-5.5.29
# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DSYSCONFDIR=/etc -DDEFAULT_CHARSET=utf8 -DMYSQL_TCP_PORT=3306 -DWITH_EXTRA_CHARSETS=all -DDEFAULT_COLLATION=utf8_general_ci
# make && make install
4.설정
# cp -arp support-files/my-huge.cnf /etc/my.cnf
# cp -arp support-files/mysql.server /etc/init.d/mysqld
# /usr/local/mysql/bin/mysql_install_db --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql
# chown -R mysql.mysql /usr/local/mysql
# chmod 711 /usr/local/mysql
# chmod 700 /usr/local/mysql/data
# chmod 751 /usr/local/mysql/bin
# chmod 750 /usr/local/mysql/bin/*
# chmod 755 /usr/local/mysql/bin/mysql
# chmod 755 /usr/local/mysql/bin/mysqldump
# chmod 700 /etc/init.d/mysqld
# chkconfig --add mysqld
# chkconfig mysqld on
5.방화벽 설정
# vi /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -p tcp -m state –state NEW -m tcp –dport 3306 -j ACCEPT
# service iptables restart
# iptables -nL
ACCEPT tcp — 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:3306
'LINUX > DB' 카테고리의 다른 글
Mysql 8.0 소스설치 (0) | 2019.05.27 |
---|---|
Mysql 5.7 소스설치 (0) | 2019.05.27 |
Mysql 5.6 소스설치 (0) | 2019.05.27 |
Mysql 5.1 소스설치 (0) | 2019.05.27 |
Mysql 5.0 소스설치 (1) | 2019.05.27 |