- Install dependencies
Install NextcloudInstall Music- Install Ampache
- Install Garmin SubMusic
Nextcloud
- PHP >=7.2
- MySQL/MariaDB
- Nginx
- PHP >=7.2
- MySQL/MariaDB
- Nginx
- Composer
Install PHP
$ sudo apt install -y php-cli php-fpm php-json php-intl php-imagick php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-gmp
$ php --version
Edit /etc/php/7.2/fpm/php.ini:
memory_limit = 512M
Edit /etc/php/7.2/fpm/pool.d/www.conf:
clear_env = no
Restart php:
$ sudo service php7.2-fpm restart
Install database server
$ sudo apt -y install mariadb-server
$ sudo mysql_secure_installationEdit /etc/mysql/mariadb.cnf:
[client]default-character-set = utf8mb4[mysqld]character-set-server = utf8mb4collation-server = utf8mb4_general_citransaction_isolation = READ-COMMITTEDbinlog_format = ROWinnodb_large_prefix=oninnodb_file_format=barracudainnodb_file_per_table=1
$ sudo service mysql restart$ sudo service mariadb restart
$ sudo mysql -u root
> UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User = 'root';
FLUSH PRIVILEGES;
QUIT;
$ mysql -uroot -p
> CREATE USER 'nextcloud'@'localhost' identified by 'PASSWORD';CREATE DATABASE nextcloud;GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
> CREATE USER 'ampache'@'localhost' identified by 'PASSWORD';CREATE DATABASE ampache;GRANT ALL PRIVILEGES ON ampache.* TO 'ampache'@'localhost';FLUSH PRIVILEGES;QUIT;
$ mysql -u nextcloud -p$ mysql -u ampache -p> SHOW DATABASES;QUIT;
Check db configuration:
$ mysql -u root -p
> show variables like 'innodb_file_format';
show variables like 'innodb_file_per_table';
SELECT @@TX_ISOLATION
[deprecated] Install Nextcloud .zip distribution
$ unzip latest-19.zip$ sudo mv ./nextcloud /var/www/$ sudo chown -R www-data:www-data /var/www/nextcloud
$ sudo nginx -t$ sudo systemctl restart nginx
Finish nextcloud setup interactively:
open https://nextcloud.home in browser (index.php should start), enter database credentials and paths, etc.In case of an "untrasted domain" error page, edit trusted_domains in /var/www/nextcloud/config/config.php, e.g.:
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'server1.example.com',
2 => '192.168.1.50',
3 => '[fe80::1:50]',
),
Install web server
$ sudo apt install nginx-extras
Create /etc/nginx/sites-available/nextcloud.conf:
host config[deprecated]
Create /etc/nginx/sites-available/ampache.conf:
Enable a virtual nginx host:
$ sudo ln -s /etc/nginx/sites-available/nextcloud.conf /etc/nginx/sites-enabled
$ sudo mkdir /etc/ssl/nginx
$ mkdir -p /home/user/nextcloud.home/logs
$ sudo ln -s ~/Dvlp/keys/nextcloud.home.crt ~/Dvlp/keys/nextcloud.home.key /etc/ssl/nginx/
Remember to import the CA certificate in all your browsers/devices if using self-signed SSL certificates for the host.
server_names_hash_bucket_size 64;
$ sudo nginx -t$ sudo systemctl restart nginx
Check nginx:
in browser open http://localhost and see the nginx's debug message.
Edit /etc/hosts:
127.0.1.1 nextcloud.home www.nextcloud.home
Install Ampache
$ mkdir /var/www/ampache
$ sudo chown -R www-data:www-data /var/www/ampache
$ cd /var/www/ampache
$ sudo -u www-data git clone -b master https://github.com/ampache/ampache.git .
$ cd ~
<download Composer according to the instructions>
$ sudo mv composer.phar /usr/local/bin/composer
$ cd /var/www/ampache$ sudo -u www-data composer install --prefer-source --no-interaction
Open the hostname in a browser and finish Ampache installation.
Remember to do configuration steps: https://github.com/ampache/ampache/wiki/Basic.
[deprecated] Nextcloud Music
Garmin SubMusic
See more details here: https://github.com/memen45/SubMusic