This is how I installed https://github.com/phanan/koel on a raspberry pi.
Still, flac transcoding isn't working for me
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mariadb-server mysql-client nginx php5-fpm php5-cli php5-mcrypt php5-mysql php5-curl git
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo curl -o- -L https://yarnpkg.com/install.sh | bash
mysql -u root -p
> CREATE DATABASE koel DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
> exit;
#koel
cd /var/www
sudo git clone https://github.com/phanan/koel.git
sudo chmod 777 -R koel
cd koel/
sed -i 's/ADMIN_EMAIL=/[email protected]/g' .env
sed -i 's/ADMIN_NAME=/ADMIN_NAME=admin/g' .env
sed -i 's/ADMIN_PASSWORD=/ADMIN_PASSWORD=admin-pass/g' .env
sed -i 's/DB_CONNECTION=/DB_CONNECTION=mysql/g' .env
sed -i 's/DB_HOST=/DB_HOST=localhost/g' .env
sed -i 's/DB_DATABASE=homestead/DB_DATABASE=koel/g' .env
sed -i 's/DB_USERNAME=homestead/DB_USERNAME=root/g' .env
sed -i 's/STREAMING_METHOD=/STREAMING_METHOD=x-accel-redirect/g' .env
cd /var/www/koel
npm install
sudo npm install gulp
yarn
./node_modules/.bin/gulp --production
php artisan koel:init
sudo chown -R :www-data /var/www/koel
sudo mkdir /var/music
sudo chmod 775 /var/music
sudo vim /etc/php5/fpm/php.ini
set cgi.fix_pathinfo=0
sudo php5enmod mcrypt
sudo service php5-fpm restart
sudo vim /etc/nginx/sites-available/default
I have this content :
server {
listen *:80;
server_name yourdomain.tld raspberrypi.local;
root /var/www/koel;
index index.php;
gzip on;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;
gzip_comp_level 9;
# Whitelist only index.php, robots.txt, and those start with public/ or api/
if ($request_uri !~ ^/$|index\.php|robots\.txt|api/|public/) {
return 404;
}
location /media/ {
internal;
# A 'X-Media-Root' should be set to media_path settings from upstream
alias $upstream_http_x_media_root;
access_log /var/log/nginx/koel.access.log;
error_log /var/log/nginx/koel.error.log;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
#try_files $uri /index.php =404;
try_files $uri $uri/ /index.php?$args;
#fastcgi_param PATH_INFO $fastcgi_path_info;
#fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_intercept_errors on;
include fastcgi_params;
}
}
Then restart nginx to apply changes
sudo service nginx restart
sudo fallocate -l 1G /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
cd
git clone --depth=1 git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg/
./configure --arch=armel --target-os=linux --enable-gpl --enable-nonfree --enable-demuxer=flac --enable-muxer=flac --enable-decoder=flac --enable-encoder=flac --enable-parser=flac
make -j4
sudo make install
your script is missing npm