Audio streaming ampache ubuntu 18.04

Tahap-1: Install Ampache on Ubuntu 18.04

root@harumin:/home# apt update
root@harumin:/home# apt install -y apache2 mariadb-server mariadb-client php7.2 php7.2-common php7.2-mysql php7.2-curl php7.2-xml php7.2-gd composer ffmpeg
root@harumin:/home# systemctl enable –now mariadb.service apache2.service

Tahap-2: Konfiguasi Database

root@harumin:/home# mysql_secure_installation
Jawab Y untuk semua pertanyaan

root@harumin:/home# mysql -u root -p
pass : masukkan password root

MariaDB [(none)]> CREATE DATABASE ampache;
MariaDB [(none)]> CREATE USER ‘ampache’@’localhost’ IDENTIFIED BY ‘ampache’;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON ampache.* TO ‘ampache’@’localhost’;
MariaDB [(none)]> exit

Tahap-3: Konfigurasi Apache

root@harumin:/home# nano /etc/apache2/sites-available/ampache.conf
ServerName SERVER_IP
ServerAdmin webmaster@localhost
DocumentRoot /var/www/ampache/
ErrorLog ${APACHE_LOG_DIR}/ampache-error.log CustomLog ${APACHE_LOG_DIR}/ampache-access.log combined AllowOverride All

oot@harumin:/home# a2ensite ampache.conf
root@harumin:/home# a2enmod rewrite
root@harumin:/home# a2enmod expires
root@harumin:/home# systemctl restart apache2.service atau systemctl restart apache2

Tahap-4: Install ampache
Download ampache

root@harumin:/home# wget
root@harumin:/home# mkdir -p /var/www/ampache
root@harumin:/home# unzip -d /var/www/ampache/
root@harumin:/var/www/ampache# composer install –prefer-source –no-interaction
tunggu sampai proses selesai

root@harumin:/var/www/ampache# chown -R www-data:www-data /var/www/ampache/
Test di browser : http://SERVER_IP/


Desired Database Name: ampache
MySQL Hostname: localhost
MySQL port: kosongkan
MySQL Administrative Username: ampache
MySQL Administrative Password: masukkan password yg sudah di create
Overwrite if database already exists: unchecked
Create Tables: cheklis
Create Database User: unchecked


Web Path: kosongkan
Database Name: ampache
MySQL Hostname: localhost
MySQL Port: kosongkan
MySQL Username: ampache
MySQL Password: gunakan password yang sudah di create
Installation type: Assuming you want a fully featured installation for personal use, choose Default.
Transcoding Template Configuration: ffmpeg
Players: You should leave these settings unchanged in most cases.
Create Admin Account: Choose a username and password and proceed.
Your Ampache installation is now ready for use. You can login at http://SERVER_IP//login.php

create user dan password administrator

Tahap-8: Buat Katalog

1- Buat direktori untuk penyimpanan musik
root@harumin:/home# mkdir -p /home/musik
root@harumin:/home# chmod 777 /home/musik

2- Menu admin-> add katalog

Catalog name : Musik
Catalog type : local
Path : /home/musik

3- Edit php.ini
sudo nano /etc/php/7.2/apache2/php.ini
upload_max_filesize = 1024M
. . .
post_max_size = 2048M
. . .

  1. Upload musik menggunakan winscp ke /home/musik
  2. Refresh dan search di Albums
  3. Pastikan musik .mp3 sudah ada dan bisa diputar

Sumber :

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s