Skip to content
Mohammad Al Mamun edited this page Jan 26, 2017 · 1 revision

// basic stuff install sudo apt-get install git sudo apt-get install unzip

// LAMP sudo apt-get install tasksel sudo tasksel install lamp-server

// CURL + 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

curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer

//install phpmyadmin sudo apt-get install phpmyadmin # later accessible through localhost/phpmyadmin

If you get a 404 error upon visiting http://localhost/phpmyadmin: You will need to configure apache2.conf to work with Phpmyadmin.

$ sudo gedit /etc/apache2/apache2.conf

Include the following line at the bottom of the file, save and quit.

$ Include /etc/phpmyadmin/apache.conf

Then, try to acccess localhost/phpmyadmin again

//Creating Laravel Project cd /var/www/html/ sudo composer create-project laravel/laravel work --prefer-dist sudo chmod -R 777 work

//Creating Virtual Host work.com sudo leafpad /etc/apache2/sites-available/work.com.conf

#/etc/apache2/sites-available/work.com.conf contains following lines <VirtualHost *:80> ServerName work.com DocumentRoot /var/www/html/work/public

	<Directory /var/www/html/work/public>
		AllowOverride All
		Require all granted
	</Directory>

// enable that site sudo a2ensite work.com service apache2 reload

// fix hosts file sudo leafpad /etc/hosts

        #/etc/hosts contents following lines                                
        127.0.0.1       work.com

or use this command sudo -- sh -c "echo '\n127.0.0.1 \twork.com'>> /etc/hosts"

// make permanent aliases: echo "alias cls='clear'" >> ~/.bash_aliases && source ~/.bash_aliases echo "alias sudo='sudo '" >> ~/.bash_aliases && source ~/.bash_aliases echo "alias fm='pcmanfm'" >> ~/.bash_aliases && source ~/.bash_aliases

That's it laravel is installed!

Clone this wiki locally