Ampache on Debian Stretch: Difference between revisions
From Braindisconnect
Jump to navigationJump to search
No edit summary |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
Create the [[Debian LAMP Stretch]] server first. | Create the [[Debian LAMP Stretch]] server first. | ||
Download the latest Ampache | == Install needed packages == | ||
apt install -y composer php7.0-curl php7.0-xml php7.0-gd | |||
== Download the latest Ampache == | |||
cd /var/www/html | cd /var/www/html | ||
git clone https://github.com/ampache/ampache.git | git clone https://github.com/ampache/ampache.git | ||
== Database == | |||
Create the DB and User, use whatever username and password you want. | |||
mysql -p | |||
Change ampache_user and ampache_pass to the username and password you want to use. | |||
CREATE DATABASE ampache; | |||
CREATE USER ampache_user@localhost IDENTIFIED BY 'ampache_pass'; | |||
GRANT ALL PRIVILEGES ON ampache.* TO 'ampache_user'@'localhost'; | |||
FLUSH PRIVILEGES; | |||
exit | |||
=== Import DB (uses root login) === | |||
mysql -p ampache < /var/www/html/ampache/sql/ampache.sql | |||
== Install Composer to Ampache == | |||
cd /var/www/html/ampache/ | |||
composer install --prefer-source --no-interaction | |||
== Configure Ampache == | |||
cd /var/www/html/ampache/config | |||
cp ampache.cfg.php.dist ampache.cfg.php | |||
nano ampache.cfg.php | |||
Change Web Path | |||
web_path = "/ampache" | |||
Change username and password for database | |||
database_username = ampache_username | |||
database_password = ampache_password | |||
Uncomment and change image sizes for Album Art | |||
album_art_min_width = 300 | |||
album_art_max_width = 1024 | |||
album_art_min_height = 300 | |||
album_art_max_height = 1024 | |||
== Configure Apache == | |||
nano /etc/apache2/apache2.conf | |||
Change AllowOverride None | |||
<nowiki><Directory /var/www/> | |||
Options Indexes FollowSymLinks | |||
AllowOverride All | |||
Require all granted | |||
</Directory></nowiki> | |||
== Configure PHP == | |||
nano /etc/php/7.0/apache2/php.ini | |||
Change | |||
upload_max_filesize = 100M | |||
post_max_size = 100M | |||
memory_limit = 512M | |||
==Chown the Web Dir == | |||
chown -R www-data:www-data /var/www/html | |||
== Restart Apache == | |||
service apache2 restart | |||
== Testing == | |||
Go to Amapche Test to finish install: | |||
http://<IP address>/ampache/test.php | |||
Everything should be green, if not fix and refresh the page. | |||
== Create Admin Account == | |||
Finally you need to create the admin account at: | |||
http://<IP address>/ampache/install.php?action=show_create_account&htmllang=en_US&charset= | |||
You can now log into Ampache using the admin account, you can create users from the server icon. |
Latest revision as of 18:25, 24 March 2019
Ampache Music Server
Create the Debian LAMP Stretch server first.
Install needed packages
apt install -y composer php7.0-curl php7.0-xml php7.0-gd
Download the latest Ampache
cd /var/www/html git clone https://github.com/ampache/ampache.git
Database
Create the DB and User, use whatever username and password you want.
mysql -p
Change ampache_user and ampache_pass to the username and password you want to use.
CREATE DATABASE ampache; CREATE USER ampache_user@localhost IDENTIFIED BY 'ampache_pass'; GRANT ALL PRIVILEGES ON ampache.* TO 'ampache_user'@'localhost'; FLUSH PRIVILEGES; exit
Import DB (uses root login)
mysql -p ampache < /var/www/html/ampache/sql/ampache.sql
Install Composer to Ampache
cd /var/www/html/ampache/ composer install --prefer-source --no-interaction
Configure Ampache
cd /var/www/html/ampache/config cp ampache.cfg.php.dist ampache.cfg.php nano ampache.cfg.php
Change Web Path
web_path = "/ampache"
Change username and password for database
database_username = ampache_username database_password = ampache_password
Uncomment and change image sizes for Album Art
album_art_min_width = 300 album_art_max_width = 1024 album_art_min_height = 300 album_art_max_height = 1024
Configure Apache
nano /etc/apache2/apache2.conf
Change AllowOverride None
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
Configure PHP
nano /etc/php/7.0/apache2/php.ini
Change
upload_max_filesize = 100M post_max_size = 100M memory_limit = 512M
Chown the Web Dir
chown -R www-data:www-data /var/www/html
Restart Apache
service apache2 restart
Testing
Go to Amapche Test to finish install:
http://<IP address>/ampache/test.php
Everything should be green, if not fix and refresh the page.
Create Admin Account
Finally you need to create the admin account at:
http://<IP address>/ampache/install.php?action=show_create_account&htmllang=en_US&charset=
You can now log into Ampache using the admin account, you can create users from the server icon.