Last active
October 16, 2015 23:49
-
-
Save igara/d967522d09516387ec69 to your computer and use it in GitHub Desktop.
[メモ]GentooにH2O+PHP7.0.0RC4をインストールする。 ref: http://qiita.com/igara/items/1b7cd8e714844440795d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="/home/vagrant/.phpenv/bin:$PATH" | |
eval "$(phpenv init -)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo emerge git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo emerge libyaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ source ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/CHH/php-build.git | |
$ cd php-build/ | |
$ sudo sh install.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php-build --definitions | |
5.2.17 | |
↑ | |
省略 | |
↓ | |
5.6.14 | |
5.6snapshot | |
7.0.0alpha1 | |
7.0.0alpha2 | |
7.0.0beta1 | |
7.0.0beta2 | |
7.0.0beta3 | |
7.0.0RC1 | |
7.0.0RC2 | |
7.0.0RC3 | |
7.0.0RC4 | |
7.0snapshot | |
master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# libjpegをインストール | |
$ wget http://www.ijg.org/files/jpegsrc.v9a.tar.gz | |
$ tar xzf jpegsrc.v9a.tar.gz | |
$ ./configure --enable-shared | |
$ make | |
$ make install | |
# libpngをインストール | |
$ wget http://prdownloads.sourceforge.net/libpng/libpng-1.6.18.tar.gz | |
$ tar xzf libpng-1.6.18.tar.gz | |
$ cd libpng-1.6.18 | |
$ ./configure --enable-shared | |
$ make | |
$ sudo make install | |
$ cd | |
# まだ足りないのがあるかも | |
USE="tidy" emerge php | |
USE="fpm" emerge php | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo php-build 7.0.0RC4 ~/.phpenv/versions/7.0.0RC4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ phpenv versions | |
$ php-fpm -v | |
# 現在のバージョンを確認する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ phpenv global 7.0.0RC4 | |
$ php-fpm -v | |
# 現在のバージョンを確認する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# php-fpm.confを更新 | |
$ cp ~/.phpenv/versions/7.0.0RC4/etc/php-fpm.conf.default ~/.phpenv/versions/7.0.0RC4/etc/php-fpm.conf | |
# php-fpm.d/www.confも更新 | |
cp ~/.phpenv/versions/7.0.0RC4/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/7.0.0RC4/etc/php-fpm.d/www.conf | |
# php-fpmを実行 | |
~/.phpenv/versions/7.0.0RC4/sbin/php-fpm & | |
# エラーが出なければ問題無し |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# composerのインストール | |
$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer | |
$ composer global require "laravel/installer=~1.1" | |
$ laravel new slack_rack_php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# H2Oをダウンロード | |
$ wget https://github.com/h2o/h2o/archive/v1.5.0.tar.gz | |
# 解凍 | |
$ tar zxf v1.5.0.tar.gz | |
# 解凍して作成したディレクトリに移動する | |
$ cd h2o-1.5.0/ | |
# -DWITH_BUNDLED_SSLフラグというのがあるのだそうだ | |
$ cmake -DWITH_BUNDLED_SSL=on . | |
# build | |
$ cmake . | |
$ make h2o | |
$ sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# public_htmlというディレクトリを作成する | |
$ mkdir /home/vagrant/public_html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 起動 | |
$ sudo h2o -m daemon -c h2o.conf | |
# 終了 | |
$ sudo kill -TERM `cat /home/vagrant/pid-file` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 起動 | |
$ sudo h2o -m daemon -c h2o.conf | |
# 終了 | |
$ sudo kill -TERM `cat /home/vagrant/pid-file` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/CHH/phpenv.git | |
$ cd phpenv/bin/ | |
$ sh phpenv-install.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php-build --definitions | |
5.2.17 | |
↑ | |
省略 | |
↓ | |
5.6.14 | |
5.6snapshot | |
7.0.0alpha1 | |
7.0.0alpha2 | |
7.0.0beta1 | |
7.0.0beta2 | |
7.0.0beta3 | |
7.0.0RC1 | |
7.0.0RC2 | |
7.0.0RC3 | |
7.0.0RC4 | |
7.0snapshot | |
master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user: vagrant | |
listen: 80 | |
hosts: | |
"example.com": | |
paths: | |
/: | |
file.dir: /home/vagrant/slack_rack_php/public | |
file.custom-handler: | |
extension: .php | |
fastcgi.connect: | |
host: 127.0.0.1 | |
port: 9000 | |
type: tcp | |
access-log: /home/vagrant/access-log | |
error-log: /home/vagrant/error-log | |
pid-file: /home/vagrant/pid-file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello H2O! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
phpinfo(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment