http://laravel.io/forum/05-25-2014-installing-laravel-on-Ubuntu
http://askubuntu.com/questions/48362/how-to-enable-mod-rewrite-in-apache
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts
http://laravel.com/docs/installation
Install Laravel 4 On Ubuntu
Recently i willing to learn laravel framework because of its rich features towards web development and that borrows a lot from Rails.In previous i have used the CodeIgniter for my projects.
This post is mainly for beginners, To Install laravel 4 on ubuntu 12.04
Installing Composer:
To install composer via terminal , type the command
# sudo curl -sS https://getcomposer.org/installer | php
Move the composer to usr/local/bin to access composer globally
# sudo mv composer.phar /usr/local/bin/composer
check if the composer is available globally by simply type
# composer
Installing Laravel:
To install laravel via Git Clone repository first you have to install Git on your machine , if Git is installed in your machine then clone Laravel git repository as
# git clone https://github.com/laravel/laravel.git /opt/lampp/htdocs/lara_test1
here lara_test1 our newly created project directory for installing laravel , To view the files inside the newly created project folder
# cd /opt/lampp/htdocs/lara_test1
# ls
To install composer to our project directory
# composer install
while installing composer if the error thrown such as
Laravel requires the Mcrypt PHP extension.
then you have to install the mycript library , for that simply use
# sudo apt-get install php5-mcrypt
and after that again re-install composer , it may fix issues.
And finally open your web browser and simply go to
http://localhost/l_test1/public/
Also , dont forget to change the persmission of folders within app/storage .
Every thing goes fine, you welcome with laravel's default message with Logo.
1) Install LAMP
2) install composer and laravel. install here means download. Basic download composer.phar and laravel.phar. mv them to /usr/local/bin. To make them simpler, rename composer.phar to composer and laravel.phar to laravel.
3) user composer to create laravel project.
sudo composer create-project laravel/laravel /var/www/myproject --prefer-dist
5) <VirtualHost *:80>
ServerAdmin myproject.local
ServerName www.myproject.local
ServerAlias www.test.com
DocumentRoot /var/www/myproject
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
6) sudo a2ensite myproject.conf
7) sudo vi /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu
127.0.1.2 myproject.local
8) sudo service apache2 restart
9) sudo chmod 755 app/storage
go to http://myproject.local/public
No comments:
Post a Comment