Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,839 members, 7,810,226 topics. Date: Saturday, 27 April 2024 at 12:56 AM

Installing Laravel On Linux - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Installing Laravel On Linux (1057 Views)

Who Can Configure Install Cpanel On Linux VPS / How To Install Laravel on OS x / Installing Wordpress On Linux (ubuntu) (2) (3) (4)

(1) (Reply)

Installing Laravel On Linux by dplumptre(m): 1:26pm On Jun 15, 2015
Hi Guys ,


Simplicity is the essence of happiness. – Cedric Bledsoe

This is what i see when i want to start a new project and i install laravel freshly to my projects folder





Steps :

1.) first install composer on ubuntu if you dont have it, u can test by typing composer in your terminal


php -r “readfile(‘https://getcomposer.org/installer’);” | php

//this will download a composer.phar into your home dir
//so you move it to your usr/local/bin
// by doing making it available globally then

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

3.)download the zip folder found in github for laravel doc,unzip it and put in a dir
then install like this below
demmy@flamming:~/projects/laravel-master$ sudo composer install

OR
//this is what i used
//simply do this line below take note that laraveldev is the folder i want my prj tobe
//after doing all this u can do the vhost and all the rest for it
//it will automatically download the dependencies
// you will see sth like Application key [RslfQQj1MDMpWr6jMJf9vq9KgOV2SwYa] set successfully.

sudo composer create-project laravel/laravel /home/demmy/projects/laraveldev

home/demmy/projects/laraveldev -> this part is where you put your projects



Some people prefer to put it in a www folder but i prefer to use a vhost to do this here is what you do , i am using ubuntu

14.04 and apache2.4



ubuntu 14.04 and apache2.4

Vhost:

GO TO
/etc/apache2/sites-available$

CREATE A YOUR FILE COPING THE DEFAULT

/etc/apache2/sites-available$ sudo cp 000-default.conf laraveldev.conf

ABOVE I USED LARAVELDEV.CONF MAKE SURE THE EXT IS .CONF THEN

sudo nano laraveldev.conf

//write the <VirtualHost *:80>
ServerAdmin info@overallheuristic.com
ServerName laravel.dev
DocumentRoot /home/demifreeze/projects/laraveldev/public

</VirtualHost>

sudo a2ensite laraveldev.conf // to enables site

ALSO IF ITS THE FIRST TIME YOU NEED TO SET THE PATH
WHERE YOU CALL YOUR FILES GO TO THE BELOW DIR

AND SET AllowOverride All

/etc/apache2$ sudo nano apache2.conf

below are the folders i use for my projects

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

<Directory /home/demifreeze/projects/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

I hope this helps if you are confused do drop a comment or holla if not till next time



I am Demola Plumptre a Lamp Developer , you can check out my blog http://overallheuristic.com/blog/ for more stuff

(1) (Reply)

Going Opensource With Asp.net!! / How Can I Embed Pdf In A Forum Post? / Using Jfreechart With Mysql To Plot A Graph Using JAVA

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.