0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

さくらのレンタルサーバ スタンダードへのcomposerとLaravelのインストールメモ

Last updated at Posted at 2019-04-12

環境

さくらのレンタルサーバ スタンダード。
PHPのバージョンとインストール時にエラーになる。
php.cgiで任意のディレクトリのみPHPのバージョンを変更しても不可なので注意。

composerのインストール

参考
https://metrograph.jp/sakura-composer-install/

sshで接続

% ssh アカウント名@初期ドメイン

インストール

/home/アカウント名 へのインストールを想定。
完了すると composer.phar が作られる。

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

All settings correct for using Composer
Downloading...
Composer (version 1.8.5) successfully installed to: /home/アカウント名/composer.phar
Use it: php composer.phar

バージョンの確認。

% php composer.phar -V

Composer version 1.8.5 2019-04-09 17:46:47

Laravelのインストール

参考
https://laraweb.net/environment/674/

インストール

任意のディレクトリ( /home/アカウント名/www/test.アカウント名.com )で以下を実行。
sampleproject部分は任意に指定できるっぽい。

% php ../../composer.phar create-project "laravel/laravel=5.8.*" sampleproject

ファイルの移動

/home/アカウント名/www/test.アカウント名.com/sampleproject(プロジェクト名)/public
の中身を
/home/アカウント名/www/test.アカウント名.com/
へ移動させてindex.php内のパスを変更するらしいが、今回はテストなので移動させずにこのまま。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?