m6uのエンジニアっぽい日記

PHP利用開発やFuelPHP利用開発、PostgreSQL利用開発、Androidアプリ開発、CentOS7サーバー構築など、テクニカルでエンジニアっぽい内容の日記

CentOS 7.3&PHP 7.1.4にFuelPHP 1.8をインストールしてみるテスト

古いサーバーからの引っ越しを前提に、技術習得中

VMware上のゲストOSとしてCentOS 7.3を立ち上げ、Server Worldさんの「PHP 7.1 インストール
CentOS 7 : PHP 7.1 インストール : Server World」に従ってPHP 7.1.4をインストールし、webコンテンツをいじる新規ユーザーwebuserをapacheグループ所属にした上で作業中。
CentOS - CentOS7以降での、FuelPHPのインストール先はどこが良いか(102191)|teratail」で教えてもらった情報を参考に、FuelPHPのPHP7対応版であるv1.8をインストールしてみたときの記録。
「/var/www」の下に、fuelディレクトリを作って、そこにインストールしてみたときのログ。

composer create-projectコマンドを使ってさくっと展開

[webuser@localhost fuel]$ composer create-project fuel/fuel --prefer-dist .
Installing fuel/fuel (1.8.0.1)
- Installing fuel/fuel (1.8.0.1): Loading from cache
Created project in .
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 13 installs, 0 updates, 0 removals
- Installing composer/installers (v1.4.0): Loading from cache
- Installing fuelphp/upload (2.0.6): Loading from cache
- Installing michelf/php-markdown (1.4.0): Loading from cache
- Installing psr/log (1.0.2): Loading from cache
- Installing monolog/monolog (1.18.2): Loading from cache
- Installing phpseclib/phpseclib (2.0.0): Loading from cache
- Installing fuel/core (1.8.0.4): Loading from cache
- Installing fuel/auth (1.8.0.4): Loading from cache
- Installing fuel/email (1.8.0.4): Loading from cache
- Installing fuel/oil (1.8.0.4): Loading from cache
- Installing fuel/orm (1.8.0.1): Loading from cache
- Installing fuel/parser (1.8.0.4): Loading from cache
- Installing fuel/docs (1.8.0.4): Loading from cache
fuel/fuel suggests installing dwoo/dwoo (Allow Dwoo templating with the Parser package)
fuel/fuel suggests installing mustache/mustache (Allow Mustache templating with the Parser package)
fuel/fuel suggests installing smarty/smarty (Allow Smarty templating with the Parser package)
fuel/fuel suggests installing twig/twig (Allow Twig templating with the Parser package)
fuel/fuel suggests installing pyrocms/lex (Allow Lex templating with the Parser package)
fuel/fuel suggests installing mthaml/mthaml (Allow Haml templating with Twig supports with the Parser package)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-mcrypt (Install the Mcrypt extension in order to speed up a few other cryptographic operations.)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
phpseclib/phpseclib suggests installing pear-pear/PHP_Compat (Install PHP_Compat to get phpseclib working on PHP < 5.0.0.)
Writing lock file
Generating autoload files
[webuser@localhost fuel]$

って、いつの間にかv1.8.0.1が出てたんですね! しかも、「fuelphp/upload (2.0.6)」とかv2側のパッケージも追加されていたりして。

public/index.phpの改変

諸々のディレクトリ指定をこんな風に書き換えて、welcome!が表示されて一安心。

define('DOCROOT', '/var/www/html/');
define('APPPATH', '/var/www/fuel/fuel/app/');
define('PKGPATH', '/var/www/fuel/fuel/packages/');
define('COREPATH', '/var/www/fuel/fuel/core/');