LoginSignup
1
1

More than 5 years have passed since last update.

CentOSにSymfony2をインストールしてみる

Last updated at Posted at 2015-01-12

環境
CentOS:6.6
Symfony:2.3
PHP:5.5

※PHP5.3だとComposerのプロジェクト作成で失敗したのでPHP5.5を使用しました。

Composerのインストール

Composerをつかってプロジェクトを作成するので、まずはComposerのインストールをします。

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

プロジェクトの作成

Composerのインストールが完了したらプロジェクトを作成します。
 ※ path/ の部分をプロジェクト名に変更
composer create-project symfony/framework-standard-edition path/ "2.3.*"

プロジェクトの作成途中に、DB等の設定ががいろいろ聞かれるので設定します。

database_driver (pdo_mysql):
database_host (127.0.0.1):
database_port (null):
database_name (symfony): ddss
database_user (root): ddss
database_password (null): ddss
mailer_transport (smtp):
mailer_host (127.0.0.1):
mailer_user (null):
mailer_password (null):
locale (en):
secret (ThisTokenIsNotSoSecretChangeIt):
Clearing the cache for the dev environment with debug true
Installing assets using the hard copy option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for Acme\DemoBundle into web/bundles/acmedemo
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution
1
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
1
1