-
Notifications
You must be signed in to change notification settings - Fork 19
Installation on Linux
-
MySQL Database
-
Apache Server
-
uncomment extensions:
extension=php_pdo_mysql.dll
,extension=php_mysqli.dll
-
PHP >= 5.4
-
Mcrypt PHP Extension
-
OpenSSL PHP Extension
-
Mbstring PHP Extension
-
Tokenizer PHP Extension
-
Composer
-
Laravel Framework is already included in this repository.
"$>" stands for console commands
-
Install the server, e.g.:
$> yum install httpd mariadb-server php php-ldap php-mysql
-
Install Composer:
- open directory:
$> cd /usr/local/bin/
- download composer:
$> php -r "readfile('https://getcomposer.org/installer');" | php
- add a symbolic link:
$> ln –s /usr/local/bin/composer.phar /usr/local/bin/composer
.
-
Install git:
$> yum install git
-
Copy Lara files with git:
- open directory:
$> cd /var/www/
- clone repository with git:
$> git clone https://github.com/ILSCeV/Lara.git
-
Update dependencies:
$> composer install
(this one can take some time - don't worry, make some tea) -
Change permissions:
$> cd /var/www
$> chown -R apache:apache Lara/
$> chmod -R 755 Lara/
$> chmod -R 777 Lara/storage
$> chmod -R 777 Lara/bootstrap/cache
- To hide "/Lara/public" path:
- open the Apache Server config (actual filename may vary):
$> vi /etc/httpd/conf.d/httpd.conf
- type
i
to enter editing mode - change
DocumentRoot
toDocumentRoot "var/www/Lara/public"
- hit
<ESC>
to exit editing mode - type
:x
and hit<Return>
to exit vi
-
Restart the server:
$> /etc/init.d/httpd restart
-
Create a MySQL database named "lara":
- switch to MySQL:
$> mysql –u root –p
- create new database named "lara":
$> create database lara
- update database schema from /Lara/ folder:
$> php artisan migrate --seed
(or import your DB dump)
- Rename the file
.env.example
located in/var/www/Lara/
into.env
and edit environment variables:
- set "APP_ENV=production" (or e.g. "development" depending on your context)
- set "APP_DEBUG=false" (or "true" for development)
- set a new application key with
$> php artisan key:generate
- set "DB_HOST", "DB_DATABASE", "DB_USERNAME" and "DB_PASSWORD" to your database credentials
-
For development purposes a workaround is built into the LoginController which assigns a random dummy-user at each login event, ignoring login/password input from user. Change it to the your actual authentication routine.
-
For development only: Install Node (https://nodejs.org/en/) then run (in the /Lara/ directory):
$> npm install
$> npm install --global gulp
$> gulp
- This will install typescript and gulp and running gulp will compile the typescript sources to the
bundle.js
file in/public/bin/
. Note that installing all dependencies may take a while but you can already proceed with the next steps.
- Run this once:
$> php artisan config:cache