Phalcon インストール (PHP)
PHP最速のフレームワークPhalconをさくらVPSへインストール
http://phalconphp.com/ja/download
http://docs.phalconphp.com/en/latest/reference/install.html
■ 必要なパッケージをサーバにインストール
sudo yum install php-devel php-mysql gcc libtool
■ gitからインストール、というかコンパイル
git clone --depth=1 git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./install
Thanks for compiling Phalcon! Build succeed: Please restart your web server to complete the installation
いけたっぽい。
■ php.ini へ追加
sudo vim /etc/php.ini // これ追加 extension=phalcon.so
■ apache再起動
sudo /etc/init.d/httpd restart
■ documentに従ってやっていく
cd build sudo ./install 32bits sudo ./install 64bits sudo ./install safe
Thanks for compiling Phalcon! Build succeed: Please restart your web server to complete the installation
また出た、いけたっぽい。また再起動しろと。
sudo /etc/init.d/httpd restart
■ そもそもphalconはちゃんと入ってるのか確認
適当なファイルで phpinfo(); する。
と、phalconがない… おい。
http://blog.fagai.net/2013/07/28/phalcon-php-tutorial/
php.ini に書いたextensionがちゃんと反映されていない模様。
上記の方と同じ方法でやってみる。
sudo vim /etc/php.d/phalcon.ini //新しくファイルつくり一行追加 extension=phalcon.so
再起動
sudo service httpd restart
phpInfo();みると、あったー、phalconの文字が。よし。
■ どうやってプロジェクト作るんだろうと思いつつ、チュートリアルがあるらしいのでclone
mkdir phalconTest cd phalconTest git clone https://github.com/phalcon/tutorial.git
それっぽい構造のが入ってきた
■ apacheを張ろう
これを参考に
http://docs.phalconphp.com/en/latest/reference/apache.html
1 Listen 8088 2 3 <VirtualHost *:8088> 4 5 #ServerAdmin admin@example.host 6 DocumentRoot "/home/{USER}/src/phalconTest/tutorial/public/" 7 DirectoryIndex index.php 8 ServerName example.host 9 ServerAlias www.example.host 10 11 <Directory "/home/{USER}/src/phalconTest/tutorial/public/"> 12 Options All 13 AllowOverride All 14 Allow from all 15 </Directory> 16 </VirtualHost>
apache再起動しアクセス
Hello! Sign Up Here!
おぉぉぉぉぉぉ、いけた。
ここからはTutorialに沿って勉強すればいいのね。
http://docs.phalconphp.com/en/latest/reference/tutorial.html