728x90
반응형
PHP
# php 버전 확인
php -v
# php 7버전대가 아니라면 삭제
yum remove php-*
yum remove php-common mod_php php-cli
# php 설치
yum install php71w
yum install php71w-cli php71w-common php71w-dba php71w-devel php71w-fpm php71w-gd php71w-imap
yum install php71w-ldap php71w-mbstring php71w-mcrypt php71w-mysqlnd php71w-odbc php71w-opcache
yum install php71w-pdo php71w-pdo_dblib php71w-pear php71w-pecl-imagick php71w-pecl-imagick-devel
yum install php71w-pgsql php71w-phpdbg php71w-process php71w-snmp php71w-soap php71w-tidy php71w-xml php71w-xmlrpc
# php 버전 확인
php -v
컴포저
# Install composer
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin/
# Add symbolic link composer
sudo ln -s /usr/local/bin/composer.phar /usr/local/bin/composer
# Set composer path
export PATH="$PATH:$HOME/.composer/vendor/bin"
라라벨
# Create fresh laravel project
laravel new blog[프로젝트이름]
# Create composer autoload directory
mkdir /home/blog/vendor
mkdir /home/blog/vendor/doctrine
mkdir /home/blog/vendor/doctrine/inflector
# Create Linux User
useradd jayg
chown jayg:jayg -R /home/blog
chmod 755 -R /home/blog
# composer basic package install
su jayg
php /usr/local/bin/composer install
# Change laravel enviorment file name
.env.example -> .env
# Application key setup
php artisan key:generate
홈스테드 (Windows10 Home / VirtualBox 환경으로 진행 이하 / > : CMD )
# Vagrant Windows-64bit download and install
https://www.vagrantup.com/downloads.html
# After download and install, execute homestaed git clone
cmd 실행
> cd C:\TEST_SOURCE\laravel_homestead
> git clone https://github.com/laravel/homestead.git ~/Homestead
# git clone 후
> cd ~/Homestead
> git checkout v7.9.0
> init.bat
# Add homestaed test server ip on Window Hosts file
192.168.10.10 homestead.test
# Vagrant basic command
> vagrant up (실행)
> vagrant suspend (일시중지)
> vagrant halt (종료)
# Vagrant connect SSH
> vagrant ssh (ssh CMD 접속)
192.168.10.10 (shell 프로그램 접속)
ID : vagrant
PW : vagrant
# Window Batch Program
vup.bat
------------------------------------------------
@ECHO ON
cd C:\TEST_SOURCE\laravel_homestead\~\Homestead
vagrant up
------------------------------------------------
vhalt.bat
-----------------------------------------------
@ECHO ON
cd C:\TEST_SOURCE\laravel_homestead\~\Homestead
vagrant halt
-----------------------------------------------
# Homestead.yaml Content description
ip : 192.168.10.10(가상 머신 IP)
memory : 가상머신 메모리
cpus : 가상머신 할당 cpu
provider : Hypervisor
authorize : 공개키
keys : 개인키
folders :
- map : ~/Code (to경로를 매핑할 로컬호스트 경로) [EX, C:\TEST_SOURCE\laravel\~\code] 으로 변경하자
to : /home/vagrant/Code (가상머신의 vagrant경로)
sites :
- map : homestead.app (가상도메인)
to : /home/vagrant/Code/Laravel(laravel프로젝트폴더)/public (도메인 경로)
※ 복수가상도메인 가능
- map : homestead2.app (가상도메인)
to : /home/vagrant/Code/Project/public (도메인 경로)
hhvm : true (php-fpm 대신 hhvm 사용가능)
Codeigniter VS Laravel
https://stackshare.io/stackups/codeigniter-vs-laravel#more
http://www.mindfiresolutions.com/blog/2017/11/laravel-vs-codeigniter/
728x90
반응형