Ubuntu에 Laravel 설치

2220 단어 PHPUbuntuLaravel
저는 Laravel을 시작하고 싶어요.
설치가 까다로워서 필기를 해요.

우선, php 설치

sudo apt install php

컴퓨터 설치

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Composer path

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

Laravel 설치

composer global require "laravel/installer"

Laravel에 path 추가.

export PATH="$PATH:/.config/composer/vendor/bin"

홈페이지에 있습니다.bashrc에 추가
source ~/.bashrc 
Ubuntu 버전에 따라 아마 여기일 거예요.
export PATH="$PATH:/.composer/vendor/bin"

달리다

php artisan serve

와!!멋있다

참조 링크


https://getcomposer.org/
https://getcomposer.org/doc/00-intro.md#globally
http://laravel.jp/
https://laravel.com/docs/4.2/quick
https://stackoverflow.com/questions/25373188/laravel-installation-how-to-place-the-composer-vendor-bin-directory-in-your

좋은 웹페이지 즐겨찾기