redmineをmacにインストールしてみた 1日目

Redmineによるタスクマネジメント実践技法という本を読んで面白かったので自分でもRedmineをインストールしてみることにした。

普段使いには便利だけど、いろいろと癖のあるMacを使っているので、今後のためにメモを取ってみた。
まず、環境はMac OS X 10.8.4 メモリー8G

本家にくと一応Macも情報はあったがちょっと前のなので、多少読み替える必要がありそう。

1. Install Xcode/OS X Developer Tools
Either get XCode from the Mac App Store or register for a free account and download from: https://developer.apple.com/downloads/
An alternative is the latest version of Command Line Tools for XCode https://developer.apple.com/downloads . This is a smaller download and contains all that is necessary for installation.

Install Xcode/OS X Developer Toolsをインストールするのね、ことステップは既にやっていたので、スキップ

2. Install OS X MySQL and associated Libraries
MySQLと関連ライブラリのインストール
最新版64-bitをwww.mysql.comで取ってくるのね。

Download http://www.mysql.com/downloads/mysql/ (select latest 64-bit version, e.g. 5.5.25)

2013/09/11現在は 5.6.13 になってるらしい
コマンドラインでも、GUIでもいいらしい 今回は.pkgを選択

登録しろと言われたけど、No thanks, just start my download. をクリック
ダウンロードが終わると
本体とMySQLStartupItemが入っているので両方入れてみる

ReadMeを読むとStartup Itemをインストールした場合は
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
で起動できるみたいなのでコマンドラインで実行
Password:
が聞かれたので入力
Starting MySQL database server とメッセージが流れた
ps -ax | grep mysql
と確かめてみると

12645 ttys000 0:00.02 /bin/sh /usr/local/mysql/bin/mysqld_safe –datadir=/usr/local/mysql/data –pid-file=/usr/local/mysql/data/mini.local.pid
12745 ttys000 0:00.40 /usr/local/mysql/bin/mysqld –basedir=/usr/local/mysql –datadir=/usr/local/mysql/data –plugin-dir=/usr/local/mysql/lib/plugin –user=mysql –log-error=/usr/local/mysql/data/mini.local.err –pid-file=/usr/local/mysql/data/mini.local.pid

無事起動していた

Run the installation package .pkg file. This will install into /usr/local/mysql/bin
Run the MySQLStartupItem.pkg file to use GUI to start automatically after startup of your server. (Of course, command line also works.)
Open the MySQL.prefPane and install for all users. This provides a GUI for starting and stopping. (Of couse, command line also works.)

MySQL.prefPane を実行するとシステム環境設定にMySQLの項目が追加された、追加の際に全ユーザーを選択するらしい

Set the root password for your new installation of MySQL.
rootのパスワードを設定するのね

One way is to use the MySQLWorkbench.
MySQLWorkbench を使うか
Or from the command line:
コマンドラインで実行するかね
MySQLWorkbenchってなにと思って検索してみると
workbench本家のphpadminみたいなものかな??
初めてなので試してみよう
さっきと同様に登録しろって言われたけど 登録しないでNo thanks, just start my download.をクリック

mysqladmin -u root password NEWPASSWORD (where your password substitutes for NEWPASSWORD)

Add MySQL to the path. In terminal:
sudo touch /etc/paths.d/mysql (creates a file in which you type the path)
sudo nano /etc/paths.d/mysql

うわっ nanoってなに?? viでしょここは
sudo vi /etc/paths.d/mysql

In editor type /usr/local/mysql/bin then save and exit
Enter startup options to tell the MySQL client and daemon to connect to the local server. In terminal:
sudo nano /etc/my.cnf
ここもviで編集

In editor, add the following as appropriate:
[mysqld] socket = /tmp/mysql.sock
[client] socket = /tmp/mysql.sock

Install the MySQL binaries. Info about client libraries is available at http://support.apple.com/kb/HT4006 , or to download directly use
http://www.opensource.apple.com/other/MySQL-55.binaries.tar.gz (or latest version)
そんなファイルないって言われる

ちょっと検索すると
http://www.opensource.apple.com/source/MySQL/
に移動してる
MySQL client librariesってあるけど 古いなぁ 10.8用はなさそう 55で10.6用かぁ
いったんインストールしないで 先に行くかな
ってことでこれ以降は無実施

sudo tar -xzvf ~/Downloads/MySQL-55.binaries.tar.gz -C ~/Downloads
This will produce a root.tar archive, which must then also be extracted:
sudo tar -xzvf ~/Downloads/MySQL-55.binaries/MySQL-55.root.tar.gz -C /
If successful, tar should list the many files being placed in appropriate locations throughout the system

今日はここまで

Subscribe to Kentaro

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe