Created
September 7, 2016 19:06
-
-
Save zgabievi/d85bab19ad9cd87909e5ca8284ff3304 to your computer and use it in GitHub Desktop.
Larval 5.* on Ubuntu 16.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic stuff | |
sudo apt-get install git | |
sudo apt-get install unzip | |
# LAMP & Taskel | |
sudo apt-get install tasksel | |
sudo tasksel install lamp-server | |
# CURL for Composer | |
sudo apt-get install curl php-curl php-mcrypt php-mbstring php-gettext | |
# enable mods | |
sudo phpenmod mcrypt | |
sudo phpenmod mbstring | |
sudo a2enmod rewrite | |
sudo systemctl restart apache2 | |
# Composer | |
curl -sS https://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/composer | |
# phpmyadmin (later accessible through localhost/phpmyadmin) | |
sudo apt-get install phpmyadmin | |
# Laravel | |
cd /var/www/html/ | |
sudo composer create-project laravel/laravel PROJECT_NAME --prefer-dist | |
sudo chmod -R 777 PROJECT_NAME | |
# VHost of PROJECT_DOMAIN | |
sudo vi /etc/apache2/sites-available/PROJECT_DOMAIN.conf | |
# paste lines | |
<VirtualHost *:80> | |
ServerName PROJECT_DOMAIN | |
DocumentRoot /var/www/html/PROJECT_NAME/public | |
<Directory /var/www/html/PROJECT_NAME/public> | |
AllowOverride All | |
Require all granted | |
</Directory> | |
</VirtualHost> | |
# enable site | |
sudo a2ensite PROJECT_DOMAIN | |
service apache2 reload | |
# fix hosts file | |
sudo vi /etc/hosts | |
# add following line | |
127.0.0.1 PROJECT_DOMAIN | |
# DONE! | |
# change default server directory (optional) | |
sudo vi /etc/apache2/sites-available/000-default.conf | |
# also | |
sudo vi /etc/apache2/apache2.conf | |
# find | |
<Directory /var/www/> | |
Options Indexes FollowSymLinks | |
AllowOverride None | |
Require all granted | |
</Directory> | |
# change path and restart apache | |
sudo service apache2 restart | |
# make laravel app to be the landing (localhost) site instead of apache2 (optional) | |
sudo a2dissite 000-default | |
# this is to enable it | |
sudo a2ensite 000-default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment