LoginSignup
0
1

More than 5 years have passed since last update.

CakePHP3 (CentOS7,Apache2.4,MariaDB10,PHP5.6)初期設定

Last updated at Posted at 2015-06-07

前提としてVagrantでCentOS7を構築した後CakePHP3をインストール

Vagrantの構築とCentOS7のセットアップは以下のリンクをご参照ください

1部 : vagrantの導入
2部 : vagrant内のCentOS7セットアップ

※ 2部のセットアップでCakePHP3のインストール条件はすべて満たしている

上記2部での条件でCakePHP3をインストール

OS : CentOS7
Apache : 2.4
PHP : 5.6.9
MariaDB : 10.0.19
CakePHP : 3.0

1. composer インストール

root権限に変更

$ su

password:

2-1. CakePHP3プロジェクトのフォルダへ遷移

$ cd /var/www/html

2-2. vagrantの場合

$ cd /vagrant

3. プロジェクト作成

$ composer self-update
$ composer create-project --prefer-dist -s dev cakephp

4. CakePHP 3 フォルダ権限変更

$ find tmp -type f -print | xargs chmod 777
$ find tmp -type d -print | xargs chmod 777
$ find logs -type f -print | xargs chmod 777
$ find logs -type d -print | xargs chmod 777

5. APIをcomposerに追加

$ composer require friendsofcake/bootstrap-ui:dev-master
$ composer require google/google-api-php-client:master
$ composer require google/apiclient
$ composer dump-autoload

6. CakePHP3のマイナーバージョンアップ

$ composer update

7. mariaDBの設定

cakephpでDBに接続するユーザーとスキーマの作成

ユーザー名 : cakephp3
パスワード : cakephp3
DB(スキーマ名) : cakephp3

8. 画面表示

以下のURLへアクセスする
http://192.168.33.10

アクセスした際にCakePHP3のホームページが表示されていれば成功です。

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