MySQLインストール

UNIXサーバ構築 OnTheVMware
CentOS上でのサーバ構築について解説

HOME > CentOS >  MySQLによるDBサーバ構築 >

 MySQLインストール

MySQLインストール


スポンサードリンク

MySQLとは サーバ用語集を見る

1.RPMパッケージダウンロード

MYSQL公式サイトからMysqlのバイナリファイルをダウンロードします。以下に私がダウンロードした際の画面イメージを示します。


※MySQL AB ではプラットフォームに特化した RPM を提供しています。プラットフォーム特化の RPM と一般の RPM の違いはプラットフォーム特化版 RPM は対象のプラットフォームにビルドされて動的にリンクされているのに対し、一般の RPM は Linux のスレッドに静的にリンクされています。


2.MYSQLのインストール


[root@cent01 Mysql]# ls
MySQL-client-community-5.1.29-0.rhel4.i386.rpm
MySQL-devel-community-5.1.29-0.rhel4.i386.rpm
MySQL-server-community-5.1.29-0.rhel4.i386.rpm
MySQL-shared-community-5.1.29-0.rhel4.i386.rpm
MySQL-test-community-5.1.29-0.rhel4.i386.rpm
perl-DBI-1.40-8.i386.rpm
[root@cent01 Mysql]#
rpm -ivh *
警告: MySQL-client-community-5.1.29-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
警告: perl-DBI-1.40-8.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing... ########################################### [100%]
1:perl-DBI ########################################### [ 17%]
2:MySQL-client-community ########################################### [ 33%]
3:MySQL-devel-community ########################################### [ 50%]
4:MySQL-server-community ########################################### [ 67%]

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h cent01 password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/



Notes regarding SELinux on this platform:
=========================================

The default policy might cause server startup to fail because it is
not allowed to access critical files. In this case, please update
your installation.

The default policy might also cause inavailability of SSL related
features because the server is not allowed to access /dev/random
and /dev/urandom. If this is a problem, please do the following:

1) install selinux-policy-targeted-sources from your OS vendor
2) add the following two lines to /etc/selinux/targeted/src/policy/domains/program/mysqld.te:
allow mysqld_t random_device_t:chr_file read;
allow mysqld_t urandom_device_t:chr_file read;
3) cd to /etc/selinux/targeted/src/policy and issue the following command:
make load


Starting MySQL....[ OK ]
Giving mysqld 2 seconds to start
5:MySQL-shared-community ########################################### [ 83%]
6:MySQL-test-community ########################################### [100%]
[root@cent01 Mysql]#
[root@cent01 Mysql]# rpm -qa --last | less
MySQL-test-community-5.1.29-0.rhel4 2008年09月12日 07時23分36秒
MySQL-shared-community-5.1.29-0.rhel4 2008年09月12日 07時23分14秒
MySQL-server-community-5.1.29-0.rhel4 2008年09月12日 07時22分58秒
MySQL-devel-community-5.1.29-0.rhel4 2008年09月12日 07時22分53秒
MySQL-client-community-5.1.29-0.rhel4 2008年09月12日 07時22分49秒
perl-DBI-1.40-8 2008年09月12日 07時22分45秒



rpmコマンドの詳細を見る
grepコマンドの詳細を見る




MySQLインストール

MySQL動作確認



スポンサードリンク



スポンサードリンク


 HOME / 免責事項 / サイトマップ /  問い合わせ
Copyright (C) 2008  UNIXサーバ構築 OnTheVMware  All rights reserved