markdown 在Ubuntu Server 16.04上安装JDownloader

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 在Ubuntu Server 16.04上安装JDownloader相关的知识,希望对你有一定的参考价值。

# Install JDownloader on Ubuntu Server 16.04

Install Java and get JDownloader with the following commands.
```
sudo apt install openjdk-8-jre-headless
wget http://installer.jdownloader.org/JDownloader.jar
```
After that move `JDownloader.jar` and change the owner to the user (e.g. `media`) under which JDownloader should be executed.
```
sudo mkdir /opt/jdownloader
sudo mv jdownloader.jar /opt/jdownloader
sudo chown media:media /opt/jdownloader 
```
Now we are ready to install JDownloader. Execute this command several times until you get asked for your My JDownloader login credentials on the console.
```
java -jar /opt/jdownloader/JDownloader.jar -norestart
```
Then create a new systemd unit under `/etc/systemd/system/jdownloader.service` and paste this script.
```bash
[Unit]
Description=JDownloader Service
After=network.target

[Service]
Environment=JD_HOME=/opt/jdownloader
Type=oneshot
ExecStart=/usr/bin/java -Djava.awt.headless=true -jar /opt/jdownloader/JDownloader.jar
RemainAfterExit=yes
# Should be owner of /opt/jdownloader
User=media
Group=media

[Install]
WantedBy=multi-user.target
```
To enable JDownloader on startup run this command.
```
sudo systemctl enable jdownloader.service
```
After a reboot you can access your server under https://my.jdownloader.org

Enjoy!

以上是关于markdown 在Ubuntu Server 16.04上安装JDownloader的主要内容,如果未能解决你的问题,请参考以下文章

markdown Ubuntu Server安装记

markdown Ubuntu Server NAT子网内共享网络

markdown 如何重命名Ubuntu Server 16主机名?

markdown SSHFS di MacOS dan Ubuntu Server

markdown Ubuntu 16.04上的Node.JS Production Server Setup

markdown Instalasi nodejs dengan versi terbaru melalui nvm di Ubuntu Server 16.04 LTS