LoginSignup
1
0

More than 3 years have passed since last update.

LAMP環境でFuelPHP動かしてみる vol.1 インストール編

Posted at

概要

業務内でFuelPHP使用する可能性あったので自宅で公式ドキュメント見つつインストール行ってたら思ったより手間取ったのでMEMO
同じ境遇の方のお役に立てれば光栄です。
今回はインストール編

本文

筆者環境

#  OS
$ cat /proc/version
Linux version 4.4.0-75-generic (buildd@lgw01-21) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #96-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017
#  mysql
$ mysql --version
mysql  Ver 14.14 Distrib 5.7.27, for Linux (x86_64) using  EditLine wrapper
#  php
$ php -v
PHP 7.0.33-0ubuntu0.16.04.6 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-0ubuntu0.16.04.6, Copyright (c) 1999-2017, by Zend Technologies

クイックインストール

# まずはドキュメントルートに降りようか
$ cd /var/www/html/
# oil を Web からクイックインストール
$ curl get.fuelphp.com/oil | sh
sh: 2: Syntax error: newline unexpected
# いやシンタックスエラーでインストールできない
# https://qiita.com/amagurik2/items/d3fa36bead063d3b7f4b
$ curl https://get.fuelphp.com/oil | sh
# oil が、たった今、インストールされました。Sites ディレクトリで blog プロジェクトを作ります
$ mkdir Sites
$ cd Sites/
$ oil create blog
# エラー出た
Cannot create cache directory /home/vagrant/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
# https://stackoverflow.com/questions/35874482/cannot-create-cache-directory-or-directory-is-not-writable-proceeding-withou
# composerをインストールしたとき、〜/ .composerフォルダーがルートによって作成されたため、$ sudoコマンドを使用したことを確認してください
$ sudo chown -R $USER $HOME/.composer
# もっかい!!!
$ oil create blog

ブラウザで確認

http://[IPアドレス]/Sites/blog/docs/

参考にさせて頂いたリンク先

FuelPHPのクイックインストールができない - Qiita
php - Cannot create cache directory .. or directory is not writable. Proceeding without cache in Laravel - Stack Overflow

1
0
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
1
0