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
EDIT :
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
wget https://github.com/ampache/ampache/releases/download/4.1.1/ampache-4.1.1_all.zip

root@harumin:/home# wget https://github.com/ampache/ampache/releases/download/4.1.1/ampache-4.1.1_all.zip
root@harumin:/home# mkdir -p /var/www/ampache
root@harumin:/home# unzip ampache-4.1.1_all.zip -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/

Tahap-5: INSERT APACHE DATABASE

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

Tahap-6: GENERATE CONFIGURATION FILE

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

Tahap-7: CREATE ADMIN ACCOUNT
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 :

https://www.digitalocean.com/community/tutorials/how-to-install-the-ampache-music-streaming-server-on-ubuntu-18-04
https://nxnjz.net/2019/01/installation-of-ampache-on-ubuntu-18-04/

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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