Created
June 17, 2014 18:25
-
-
Save tamaspap/3accf35a2b057d050846 to your computer and use it in GitHub Desktop.
Setup LAMPP on Ubuntu
This file contains hidden or 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
// LAMP | |
sudo apt-get install tasksel | |
sudo tasksel install lamp-server | |
//CURL + Composer + mcrypt | |
sudo apt-get install curl php5-curl php5-mcrypt | |
curl -sS https://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/composer | |
//activate mod_rewrite + mcrypt | |
sudo a2enmod rewrite | |
sudo php5enmod mcrypt | |
sudo service apache2 restart | |
//if you have this error: | |
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message | |
sudo apt-get install mc (optional) | |
sudo mcedit /etc/apache2/apache2.conf | |
<<Line 57 (it can be any line) | |
ServerName localhost | |
>> | |
sudo service apache2 restart | |
//Creating Laravel Project | |
cd /var/www/html/ | |
sudo composer create-project laravel/laravel laravel --prefer-dist | |
sudo chmod -R o+w laravel/app/storage/ | |
!!At this moment http://localhost/laravel/public/ should be accessible (You have arrived.) | |
//Creating Virtual Host app.dev | |
sudo mcedit /etc/apache2/sites-available/app.dev.conf | |
#/etc/apache2/sites-available/app.dev.conf contents following lines | |
<VirtualHost *:80> | |
ServerName app.dev | |
DocumentRoot /var/www/html/laravel/public | |
<Directory /var/www/html/laravel/public> | |
AllowOverride All | |
Require all granted | |
</Directory> | |
</VirtualHost> | |
sudo a2ensite app.dev | |
service apache2 reload | |
sudo mcedit /etc/hosts | |
#/etc/hosts contents following lines | |
127.0.0.1 localhost | |
127.0.1.1 yourcomputername | |
127.0.0.1 app.dev | |
............... | |
service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment