Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

@bells17

古い MySQL (5.0.77) をビルドしてインストールする

ちょっと古い CentOS (5.4) で古い MySQL をインストールする必要があったのでメモ

MySQL インストール

参考: http://myknowledge.seesaa.net/article/99361578.html

cd /usr/local/src
yum -y install gcc gcc-c++ ncurses-devel
wget --no-check-certificate http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.77.tar.gz

tar -xvf mysql-5.0.77.tar.gz
cd /usr/local/src/mysql-5.0.77
./configure \
    --prefix=/usr/local/mysql \
    --with-mysqld-user=mysql \
    --with-client-ldflags=-all-static \
    --with-mysqld-ldflags=-all-static \
    --with-charset=utf8 \
    --with-collation=utf8_general_ci \
    --with-extra-charsets=all \
    --enable-assembler \
    --enable-local-infile

make
make install

MySQL 初期化設定

groupadd -r mysql
useradd -r -g mysql mysql
/usr/local/mysql/bin/mysql_install_db \
    --basedir=/usr/local/mysql \
    --datadir=/var/lib/mysql \
    --user=mysql
chown -R mysql:mysql /usr/local/mysql

cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/
service mysql.server start

/usr/local/mysql/bin/mysql_secure_installation

自動起動設定

chkconfig --add mysql.server
chkconfig mysql.server on
chkconfig --list|grep mysql
mysql.server    0:off   1:off   2:on    3:on    4:on    5:on    6:off
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
1
Help us understand the problem. What are the problem?