Vagrantに開発環境構築
新規サービスの開発環境を整えるために、新たにnginx+php-fpm環境を構築しました。
参考のリンクまとめ
1.Vagrant構築
2.nginx構築
3.php-fpm構築
centOS7では、
nginxのスタートコマンドは
systemctl start nginx
自動起動コマンドは
systemctl enable nginx
php-fpmも同様に
systemctl start/enable php-fpm
また、開発ディレクトリを変更してPHPを動作させるには、/etc/nginx/conf.d/default.conf内の
location / { root /var/www; index index.php; }
と変更し、以下の部分も
location ~ \.php$ { root /var/www; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name; include fastcgi_params; }
と変更することで、動きました。 書いてたら、Qiitaに書けよと言われそうな(もしくは、この記事いる?)記事になってました。
Appcelerator studioでのアプリ開発のTextFieldクリック時に、アプリが落ちる問題
上記を参考に、変更を加えました。 どうやら、TableViewの中身が何もないと、落ちてしまうようです。 なので、以下のように一行足してあげればOKです。
$.table.setData([{"title": ""}]);
(実際のところ、この行邪魔になるけどなぁ)
laravel4.2プロジェクト作成
composer create-project laravel/laravel=~4.2 /vagrant/hoge --prefer-dist
でcreateすると、
[RuntimeException] Failed to clone git@github.com:laravel/laravel.git via git, https, ssh protocols, aborting. - git://github.com/laravel/laravel.git Cloning into '/vagrant/green'... error: could not commit config file /vagrant/green/.git/config
このようなエラーが出ました。
composer create-project laravel/laravel=~4.2 hoge --prefer-dist
ディレクトリを真上にすると、うまくいきました。
原因は不明です。