YUMSERV
Published 2019. 5. 27. 20:08
Mysql 5.0 소스설치 LINUX/DB
반응형

1.필수패키지 설치

# yum install ncurses-devel gcc*


2.계정 추가

# groupadd -g 400 mysql

# useradd -u400 -g400 -d /usr/local/mysql -s /bin/false mysql


3.설치

# tar xvfz mysql-5.0.96.tar.gz

# cd mysql-5.0.96

# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-mysqld-user=mysql --with-extra-charsets=all --enable-thread-safe-client --with-charset=utf8

# 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 755 /usr/local/mysql/bin/mysql

# chmod 750 /usr/local/mysql/bin/*

# 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


6. 서비스 시작

# /etc/init.d/mysqld start

 

반응형

'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.5 소스설치  (0) 2019.05.27
Mysql 5.1 소스설치  (0) 2019.05.27
profile

YUMSERV

@lena04301

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!