Laravel First Try

Download composer

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

Install laravel

$ cd /var/www/
$ composer create-project --prefer-dist laravel/laravel project-name
$ php artisan key:generate 

Edit file config/app.php

'key' => env('APP_KEY', 'uOHTNu3Au1Kt7Uloyr2Py9blU0J5XQ75'),

'cipher' => 'AES-256-CBC',

Create Apache VirtualHost

$ nano /etc/apache2/sites-available/project-name.com.conf
<VirtualHost *:80>

        ServerName laravel.example.com
        DocumentRoot /var/www/project-name/public

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/laravel>
                AllowOverride All
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
$ a2ensite project-name.com
$ sudo service apache2 reload

Access Laravel

$ sudo echo "127.0.0.1  project-name.com" >> /etc/hosts

And access http://project-name.com in your favorite web browser

Sumber: http://tecadmin.net/install-laravel-framework-on-ubuntu/

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: