国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

laravel5安裝配置

2019-11-08 03:02:43
字體:
來源:轉載
供稿:網友

http://tecadmin.net/install-laravel-framework-on-Ubuntu/

 

Step 1: Install LAMP

 

To start with Laravel, we first need to set up a running LAMP server. If you have already running LAMP stack skip this step else use followings commands to set up lamp on Ubuntu system.

 

Install php 5.5

$ sudo apt-get install python-software-PRoperties

$ sudo add-apt-repository ppa:ondrej/php5

$ sudo apt-get update

$ sudo apt-get install -y php5 php5-mcrypt php5-gd

Install Apache2

$ apt-get install apache2 libapache2-mod-php5

Install MySQL

$ apt-get install mysql-server php5-mysql

Step 2: Install Composer

 

Composer is required for installing Laravel dependencies. So use below commands to download and use as a command in our system.

 

$ curl -sS https://getcomposer.org/installer | php

$ sudo mv composer.phar /usr/local/bin/composer

$ sudo chmod +x /usr/local/bin/composer

Step 3: Install Laravel

 

To download latest version of Laravel, Use below command to clone master repo of laravel from github.

 

 

 

$ cd /var/www

$ git clone https://github.com/laravel/laravel.git

Navigate to Laravel code directory and use composer to install all dependencies required for Laravel framework.

 

$ cd /var/www/laravel

$ sudo composer install

Dependencies installation will take some time. After than set proper permissions on files.

 

$ chown -R www-data.www-data /var/www/laravel

$ chmod -R 755 /var/www/laravel

$ chmod -R 777 /var/www/laravel/app/storage

Step 4: Set Encryption Key

 

Now set the 32 bit long random number encryption key, which used by the Illuminate encrypter service.

 

$ php artisan key:generate

 

application key [uOHTNu3Au1Kt7Uloyr2Py9blU0J5XQ75] set successfully.

Now edit config/app.php configuration file and update above generated application key as followings. Also make sure cipher is set properly.

 

 

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

 

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

Step 5: Create Apache VirtualHost

 

Now add a Virtual Host in your Apache configuration file to access Laravel framework from web browser. Create Apache configuration file under /etc/apache2/sites-available/ directory and add below content.

 

$ vim /etc/apache2/sites-available/laravel.example.com.conf

<VirtualHost *:80>

        

        ServerName laravel.example.com

        DocumentRoot /var/www/laravel/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>

Finally lets enable website and reload Apache service using below command.

 

$ a2ensite laravel.example.com

$ sudo service apache2 reload

 


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 保定市| 赤峰市| 遂溪县| 凤山市| 闻喜县| 红河县| 藁城市| 钟祥市| 镇原县| 宣恩县| 洮南市| 西充县| 固安县| 辽源市| 富民县| 十堰市| 卫辉市| 平邑县| 无锡市| 综艺| 北流市| 甘谷县| 墨竹工卡县| 福州市| 黄石市| 孝义市| 江孜县| 定远县| 南乐县| 阳信县| 麻江县| 上饶县| 张家港市| 嘉兴市| 南安市| 海淀区| 墨玉县| 西平县| 宜君县| 古田县| 阳曲县|