LoginSignup
15
13

More than 5 years have passed since last update.

さくらのVPS(CentOS7)にLaravel5.3をインストールする

Last updated at Posted at 2016-10-10

環境

  • CentOS 7
  • Nginx 1.1
  • PHP 7

手順

composer を入れる

  • curl -sS https://getcomposer.org/installer | php
  • mv composer.phar /usr/local/bin/composer

インストール

  • composer create-project --prefer-dist laravel/laravel プロジェクト名

  • ここでPHPUnitがインストールできないとエラーが出たので、composer.jsonから一旦記述を削除する

  • 改めてcomposer install

  • php artisan listartisanコマンドが使えることを確認

ページにアクセスしたらエラーになる場合

僕の場合、HTTP ERROR 500 になった。

プロジェクトの所有者をnginxにしてみる(今回は nginx を使っているので)

  • chown -R nginx:nginx プロジェクト名/

※たぶんパーミッションを変えても良い

まだ 500 エラー

SELinux のファイルコンテキストを変更する。

  • chcon -R -t httpd_sys_rw_content_t /var/www/laravel/storage
  • chcon -R -t httpd_sys_rw_content_t /var/www/laravel/bootstrap/cache

  • 参考

次は The only supported ciphers are AES-128-CBC and AES-256-CBC

キーを生成すれば良いらしい。

  • php artisan key:generate
  • php artisan config:clear
  • 参考

完了!

Laravel-min.png

後でPHPUnit入れないと。。

15
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
13