LoginSignup
1
1

More than 5 years have passed since last update.

ServersMan(VPS)CentOS7(64bit)にLaravel5をインストールする

Last updated at Posted at 2016-09-10

前提:LAMP環境構築済みであること。httpdが起動していること。

root権限で接続する。

composerをインストール

curl -sS https://getcomposer.org/installer | php

下記のように表示される。

Downloading 1.2.0...

Composer successfully installed to: /root/composer.phar
Use it: php composer.phar
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:

The xdebug extension is loaded, this can slow down Composer a little.
Disabling it when using Composer is recommended.

移動させる。

mv composer.phar /usr/local/bin/composer

必要に応じて下記インストールする。

yum -y install zip
yum -y install unzip

Laravelインストール。

composer global require "laravel/installer=~1.1"

下記のように表示される。

Changed current directory to /root/.config/composer
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Do not run Composer as root/super user! See https://getcomposer.org/root for details
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing symfony/process (v3.1.4)
    Downloading: 100%

  - Installing symfony/polyfill-mbstring (v1.2.0)
    Downloading: 100%

  - Installing symfony/console (v3.1.4)
    Downloading: 100%

  - Installing guzzlehttp/promises (1.2.0)
    Downloading: 100%

  - Installing psr/http-message (1.0.1)
    Downloading: 100%

  - Installing guzzlehttp/psr7 (1.3.1)
    Downloading: 100%

  - Installing guzzlehttp/guzzle (6.2.1)
    Downloading: 100%

  - Installing laravel/installer (v1.3.4)
    Downloading: 100%

symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing psr/log (For using the console logger)
Writing lock file
Generating autoload files

任意のディレクトリでlaravelコマンドを実行する。

/root/.config/composer/vendor/bin/laravel new hoge

hogeというディレクトリが作成される。
その中に public というディレクトリが出来るので、DocumentRootに設定してhttpでアクセスできれば成功。
パーミッションの開け忘れに注意。

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