1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ansible で MySQL Server をソースインストールしてみる

Posted at

Ansible で Apache をソースインストールしてみる
に続き、MySQLAnsible にて。

要件は以下。

  • CentOS 6.6 x86_64
  • 事前に git clone する必要あり(手順は後述)
  • MySQL のバージョンは 5.6.24
  • cmake にて configure する
  • /usr/local にインストール
  • /usr/local/mysql にシンボリックリンク作成
  • mysql/mysqluser/group 作成
  • 起動スクリプトを設置
  • Ansibleroot@localhost にて実行

PlayBook はこちら。

実行手順は以下。

shell-command
$ git clone https://github.com/ichifx/ansible-webdb-setup.git /var/tmp/ansible-webdb-setup
$ sudo ansible-playbook /var/tmp/ansible-webdb-setup/playbooks/mysql-install.yml

MySQL インストール後、mysqld プロセスを起動する流れは以下。

shell-command
$ sudo /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
$ sudo service mysqld start

/usr/local/mysql/data に mysql_install_db を突っ込んでます。

以上。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?