Installation on Debian 8
This is installation documentation for installing Koel on Debian 8.
Install Dependancies
Most packages can be installed via apt-get.
user@debian:~/$ sudo apt-get install -y apache2 mysql-server php5 php5-mysql g++ git curl
Composer
More information about installing Composer can be found on its website here.
user@debian:~/$ sudo su
root@debian:/home/user# curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
root@debian:/home/user# exit
Node
The node package in the default Debian repo is too old. There is more information about installing newer versions for Ubuntu and Debain here, but the following will be enough.
user@debian:~/$ sudo su
root@debian:/home/user# curl -sL https://deb.nodesource.com/setup_4.x | bash -
root@debian:/home/user# exit
user@debian:~/$ sudo apt-get install -y nodejs
Prepare the database
Create the database, a user for the service, and then grant permissions for that user.
user@debian:~/$ mysql -u root -p
Enter password:
mysql> CREATE DATABASE koel DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
mysql> CREATE USER 'koel-db-user'@'localhost' IDENTIFIED BY 'koel-pass';
mysql> GRANT ALL PRIVILEGES ON koel.* TO 'koel-db-user'@'localhost' WITH GRANT OPTION;
mysql> exit;
sudo npm install --global bower gulp
sudo apt-get install -y nodejs npm
sudo npm update bower update
Prepare the project
user@debian:~/$ git clone https://github.com/phanan/koel.git user@debian:~/$ cd koel user@debian:~/koel$ npm install
--unsafe-perm
user@debian:~/koel$ composer install
Edit the .env file with the necessary configuration changes. Below are example configuration changes made via sed.
user@debian:~/koel$ sed -i 's/ADMIN_EMAIL=/ADMIN_EMAIL=admin@example.com/g' .env
user@debian:~/koel$ sed -i 's/ADMIN_NAME=/ADMIN_NAME=admin/g' .env
user@debian:~/koel$ sed -i 's/ADMIN_PASSWORD=/ADMIN_PASSWORD=admin-pass/g' .env
user@debian:~/koel$ sed -i 's/DB_DATABASE=homestead/DB_DATABASE=koel/g' .env
user@debian:~/koel$ sed -i 's/DB_USERNAME=homestead/DB_USERNAME=koel-db-user/g' .env
user@debian:~/koel$ sed -i 's/DB_PASSWORD=secret/DB_PASSWORD=koel-pass/g' .env
Now initialize the database and then start serving the site.
user@debian:~/koel$ php artisan koel:init
user@debian:~/koel$ php artisan serve
This will only allow connections from the localhost. If you would like to accept connections from other hosts, start the server by providing the ‘host’ option.
user@debian:~/koel$ php artisan serve --host 0.0.0.0