IMP-JP Solaris 8 へのインストール

IMP で使う MySQL のインストール

インストール環境

MySQL 3.23.58

バイナリインストール

mysql-max-3.23.58-sun-solaris2.8-sparc.tar.gz を展開するが,Solaris の tar ではチェックサムエラーが出るので, gtar で展開する.

# cd /opt
# gzcat mysql-max-3.23.58-sun-solaris2.8-sparc.tar.gz | gtar xvf -
# ln -s  mysql-max-3.23.58-sun-solaris2.8-sparc mysql
# /usr/sbin/groupadd -g 2001 mysql
# /usr/sbin/useradd -d /opt/mysql -u 2003 -g mysql -s /bin/false mysql
# cd mysql
# vi +20 bin/mysqlaccess

パスの変更

diff -c  bin/mysqlaccess  bin/mysqlaccess.org 
*** bin/mysqlaccess     Thu Nov 27 10:57:23 2003
--- bin/mysqlaccess.org Thu Nov 27 10:56:17 2003
***************
*** 17,26 ****
 
        # ****************************
        # information on MySQL
!       #$MYSQL     = '/usr/local/mysql/bin/mysql';    # path to mysql executable
!       $MYSQL     = '/opt/mysql/bin/mysql';    # path to mysql executable
!       #$SERVER    = '3.21';
!       $SERVER    = '3.23.58';
        $MYSQL_OPT = ' --batch --unbuffered';
        $ACCESS_DB = 'mysql';            # name of DB with grant-tables
        $ACCESS_H  = 'host';             # 
--- 17,24 ----

          # ****************************
          # information on MySQL
!       $MYSQL     = '/usr/local/mysql/bin/mysql';    # path to mysql executable
!       $SERVER    = '3.21';
        $MYSQL_OPT = ' --batch --unbuffered';
        $ACCESS_DB = 'mysql';            # name of DB with grant-tables
        $ACCESS_H  = 'host';             # 
***************
*** 35,42 ****
          $ACCESS_D_BCK = 'db_backup';     
          $DIFF      = '/usr/bin/diff'; 
          $TMP_PATH  = '/tmp';             #path to writable tmp-directory
!         #$MYSQLDUMP = '/usr/local/mysql/bin/mysqldump';
!         $MYSQLDUMP = '/opt/mysql/bin/mysqldump';
			                    #path to mysqldump executable

          $MYSQLADMIN= 'http://foobar.com/MySQLadmin';
--- 33,39 ----
          $ACCESS_D_BCK = 'db_backup';     
          $DIFF      = '/usr/bin/diff'; 
          $TMP_PATH  = '/tmp';             #path to writable tmp-directory
!         $MYSQLDUMP = '/usr/local/mysql/bin/mysqldump';
                                           #path to mysqldump executable

          $MYSQLADMIN= 'http://foobar.com/MySQLadmin';

データベース作成(create grant table 仮テーブル? 作成)

# scripts/mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
031127 11:02:09  ./bin/mysqld: Shutdown Complete


To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
./bin/mysqladmin -u root  password 'new-password'
./bin/mysqladmin -u root -h blade150  password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd . ; ./bin/safe_mysqld &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests

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

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

バイナリの所有権変更

# cd ..
# chown -R root /opt/mysql/.
# chown -R mysql /opt/mysql/data
# chgrp -R mysql /opt/mysql/.   

その他

# cp bin/my_print_defaults /usr/bin
# vi /etc/my.cnf
[mysqld]
basedir=/opt/mysql
datadir=/opt/mysql/data
#port=3306
#socket=/var/run/mysql.sock
skip-innodb

起動スクリプト

# cp support-files/mysql.server /etc/init.d
# ln -s /etc/init.d/mysql.server /etc/rc3.d/S99mysql
# ln -s /etc/init.d/mysql.server /etc/rc0.d/K01mysql
# vi /etc/init.d/mysql.server
diff -c /etc/init.d/mysql.server support-files/mysql.server 
*** /etc/init.d/mysql.server    Thu Nov 27 11:17:58 2003
--- support-files/mysql.server  Fri Sep 12 00:13:17 2003
***************
*** 39,51 ****
  # If you want to affect other MySQL variables, you should make your changes
  # in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.

! basedir=/opt/mysql

  # The following variables are only set for letting mysql.server find things.

  # Set some defaults
! #datadir=/usr/local/mysql/data
! datadir=/opt/mysql/data
  pid_file=
  if test -z "$basedir"
  then
--- 39,50 ----
  # If you want to affect other MySQL variables, you should make your changes
  # in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.

! basedir=

  # The following variables are only set for letting mysql.server find things.

  # Set some defaults
! datadir=/usr/local/mysql/data
  pid_file=
  if test -z "$basedir"
  then

MySQL 管理者のパスワードつけ(MySQL 起動後, 固定系)

./bin/mysqladmin -u root  password 'new-password'

DBI/DBD-mysql

% cd DBI-1.38
% /usr/local/bin/perl Makefile.PL
% make
% make test
# make install

% PATH=${PATH}:/opt/mysql/bin
% cd DBD-mysql-2.9003
#   % /usr/local/bin/perl Makefile.PL --ssl   <- make test で失敗する
% /usr/local/bin/perl Makefile.PL
% make
# make install

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2010-05-26 (水) 10:37:23