은근한

Ubuntu Server Build , Laravel Install 본문

카테고리 없음

Ubuntu Server Build , Laravel Install

EsJoo 2016. 1. 16. 23:05

Unbuntu 서버 설치 및 라라벨 설치 입니다


IP설정 [인터넷 연결]

저장소 변경 및 IP 설정

고정 IP 사용할 때 입니다.


1. 저장소 변경

sudo vi  /etc/apt/sources.list

1,$ s/kr.archive.ubuntu.com/ftp.daum.net/g



2. DHCP 삭제

sudo apt-get remove dhcp-client



3. 고정IP 설정

sudo vi /etc/network/interfaces

auto eth0

iface eth0 inet static

        address xxx.xxx.xxx.xxx

        netmask xxx.xxx.xxx.xxx

        network xxx.xxx.xxx.xxx

        broadcast xxx.xxx.xxx.xxx

        gateway xxx.xxx.xxx.xxx

각자 할당된 IP및 설정을 해주시면 됩니다.




서버 설치


1. PHP 최신버전 설치

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:ondrej/php5-5.6

sudo apt-get update

sudo apt-cache policy php5



2. APM Composer 설치

sudo apt-get install apache2

sudo apt-get install php5

sudo apt-get install mysql-server

sudo apt-get install php5-mysql

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

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

sudo a2enmod rewrite

sudo service apache2 restart




서버 설치 Laravel 설치


1. Laravel 설치

composer global require "laravel/installer=~1.1"



2. Laravel 경로 설정

~/.composer/vendor/bin 폴더를 여러분의 경로(PATH)

추가 해야 합니다.



3. Laravel 프로젝트 생성

패스 설정이 끝났다면 터미널 및 커맨드 입력에

laravel new 프로젝트명

을 치시면 자동 생성이 됩니다.

터미널에서 컴포저의 create-project 커맨드를 사용하여 설치도 가능

composer create-project laravel/laravel {directory} "~5.0.0" --prefer-dist

설치 후에는 최신의 패키지로 업그레이드 해야 합니다. 먼저 {directory}/vendor/compiled.php 파일을

삭제하고 설치된 현재 {directory} 에서 composer update 명령어를 입력하시면 됩니다..




Mysql 설정


1. Mysql 외부 접속

sudo vi /etc/mysql/my.cnf

# bind-address = 127.0.0.1   ß 해당부분 주석 처리 해주세요

sudo /etc/init.d/mysql restart

mysql -uroot -p

권한 설정입니다.

grant all privileges on *.* to 'root'@‘IP Address or %' identified by 'Password';




FTP 설치 및 설정


1. FTP 설치 및 설정

FTP

sudo apt-get install vsftpd

 sudo vi /etc/vsftpd.conf

 anonymous_enable = NO             // 기본값은 YES인데 NO로 변경. 익명 사용자의 연결을 허용하는 옵션

 local_enable = YES                      // 주석제거. 로컬 계정 사용자의 접속 허용 여부 옵션

 write_enable = YES                     // 주석제거

sudo restart vsftpd