Skip to content

Instantly share code, notes, and snippets.

@honda0510
Created February 25, 2011 14:46
Show Gist options
  • Save honda0510/843880 to your computer and use it in GitHub Desktop.
Save honda0510/843880 to your computer and use it in GitHub Desktop.
vanillaの開発環境を構築する手順書
■ 要件
Requirements - Vanilla Forums
http://vanillaforums.org/docs/installation-requirements
○ PHP version 5.2.0 or newer
○ PHP Config (php.ini): file_uploads = on
○ PHP Data Objects module installed (http://www.php.net/pdo)
○ PDO_MySQL module must be enabled (http://www.php.net/manual/en/ref.pdo-mysql.php)
○ GD version 2.0 or newer (optional, but required for profile pictures)
○ cURL or Sockets (to allow plugin sandboxing)
○ MySQL version 5 or newer
○ Apache version 2 or newer
○ AllowOverride = All (optional, but it allows friendly urls)
○ mod_rewrite (optional, but it allows friendly urls)
○ PHP version 5.2.0 or newer
確認方法:
phpinfo() のバージョン情報が 5.2.0 以上であることを確認する。
○ PHP Config (php.ini): file_uploads = on
確認方法:
phpinfo() の file_uploads が On であることを確認する。
○ PHP Data Objects module installed (http://www.php.net/pdo)
確認方法:
UnixライクOS では PHP 5.1.0 以降デフォルトで有効となっている。
○ PDO_MySQL module must be enabled (http://www.php.net/manual/en/ref.pdo-mysql.php)
確認方法:
phpinfo() の Configure Command に '--with-pdo-mysql[=DIR]' が含まれていることを確認する。[=DIR] はオプション。
参考:
http://www.php.net/manual/ja/ref.pdo-mysql.php
○ GD version 2.0 or newer (optional, but required for profile pictures)
確認方法:
1. phpinfo() の Configure Command に '--with-gd[=DIR]' が含まれていることを確認する。[=DIR] はオプション。
2. phpinfo() の GD Version が 2.0 以上であることを確認する。
参考:
http://jp.php.net/manual/ja/image.installation.php
○ cURL or Sockets (to allow plugin sandboxing)
確認方法:
phpinfo() の Configure Command に '--with-curl[=DIR]' もしくは '--enable-sockets' が含まれていることを確認する。[=DIR] はオプション。
参考:
http://jp.php.net/manual/ja/curl.installation.php
http://jp.php.net/manual/ja/sockets.installation.php
○ MySQL version 5 or newer
確認方法:
コマンドラインで mysql -V を実行し、バージョンが 5 以上であることを確認する。
○ Apache version 2 or newer
確認方法:
コマンドラインで apachectl -v を実行し、バージョンが 2 以上であることを確認する。
○ AllowOverride = All (optional, but it allows friendly urls)
確認方法:
httpd.conf で Gardenディレクトリが AllowOverride All となっていることを確認する。
○ mod_rewrite (optional, but it allows friendly urls)
コマンドラインで apachectl -M を実行し、出力結果に rewrite_module (shared) が含まれていることを確認する。
■ インストール
1. VMWare Player をダウンロード
http://downloads.vmware.com/jp/d/info/desktop_downloads/vmware_player/3_0
2. VMWare Player をインストール
sudo sh ~/Downloads/VMware-Player-3.1.3-324285.i386.bundle
3. Ubuntu をダウンロード
http://www.ubuntulinux.jp/products/JA-Localized/download
4. Ubuntu をインストール
VMware Player で仮想マシンを作成する。
これ以降の作業は仮想マシン上で行う。
5. Git をダウンロード
http://git-scm.com/
6. Git をインストール
sudo apt-get build-dep git-core
cd ~/Downloads/
tar jxvf git-1.7.4.1.tar.bz2
cd git-1.7.4.1/
./configure
make all
sudo make install
# インストールされたことを確認
git --version
# コミットの作者の情報を登録
git config --global user.name "ユーザー名"
git config --global user.email "メールアドレス"
# gitの出力に色をつける ※この作業は任意
git config --global color.ui "auto"
# gitの設定確認
git config --global --list
7. SSH鍵を作成
ssh-keygen -t rsa
# SSHで接続できることを確認
ssh git@github.com
# SSHで接続できなかった場合1
ssh-add ~/.ssh/id_rsa
ssh git@github.com
# SSHで接続できなかった場合2
# 既存のSSH鍵をすべて削除するので、必要に応じてバックアップをとること。
rm -rf ~/.ssh/
ssh-add -D
ssh-keygen -t rsa
ssh git@github.com
8. XAMPP for Linux をダウンロード
http://www.apachefriends.org/jp/xampp-linux.html
9. XAMPP for Linux をインストール
sudo tar zxvf xampp-linux-1.7.4.tar.gz -C /opt
# インストールされたことを確認
sudo /opt/lampp/lampp start
http://localhost/
10. Vanilla をインストール
cd /opt/lampp/htdocs/
sudo git clone git@github.com:yu-tang/Garden.git
sudo chmod -R 777 Garden/conf/
sudo chmod -R 777 Garden/uploads/
sudo chmod -R 777 Garden/cache/
# インストールされたことを確認
http://localhost/Garden/
■ Vanilla 初期設定
1. データベースとユーザー作成
/opt/lampp/bin/mysql -u root -p
CREATE DATABASE vanilla;
GRANT ALL ON vanilla.* TO 'vanilla-user'@'localhost' IDENTIFIED BY 'vanilla';
exit
2. 各種設定
http://localhost/Garden/ にアクセス
○ データベース ホスト
○ データベース名
○ データベース ユーザ
○ データベース パスワード
には、先ほど作成したデータベース情報を設定する。
○ アプリケーション タイトル
には、アプリケーション名を設定する。
○ 管理者の E メール
○ 管理者のユーザ名
○ 管理者のパスワード
○ 確認用パスワード(再入力)
には、Vanillaの管理者となるユーザー情報を設定する。
■ アンインストール
1. Vanilla をアンインストール
sudo rm -rf /opt/lampp/htdocs/Garden/
/opt/lampp/bin/mysql -u root -p
DROP DATABASE vanilla;
REVOKE ALL, GRANT OPTION FROM 'vanilla-user'@'localhost';
DROP USER 'vanilla-user'@'localhost';
2. XAMPP for Linux をアンインストール
sudo rm -rf /opt/lampp/
3. Git をアンインストール
未作成
4. Ubuntu をアンインストール
仮想マシンを削除
5. VMWare Player をアンインストール
sudo vmware-installer -u vmware-player
■ その他
1. XAMPP 起動
sudo /opt/lampp/lampp start
2. XAMPP for Linux 情報
http://www.apachefriends.org/jp/xampp-linux.html
3. ファイル一覧生成
cd /opt/lampp/htdocs/Garden/
find -name "*" -exec ls -dF {} \; > ~/Documents/vanilla_files.txt
4. リモートリポジトリの情報を取得
git remote show origin
5. 翻訳作業
sudo chmod -R 777 Garden/applications/dashboard/locale/ja-JP/
sudo chmod -R 777 Garden/applications/vanilla/locale/ja-JP/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment