Deployment in SYS ARM-2T

I have wrote some blogs about service deployment in arm based development board. This time I find a ARM server provided by So you Start. These servers are using ARM A9 process, which have the same model as WD MyCloud (Gen2). The performance of this process is not very strong. The HDD is brand new 2.5′ HGST 2TB 7200RPM.

This time I used Debian 9 as OS. I will install qBittorrent and Nextcloud in this platform.

The problem is the kernel in this System, it is a OVH custom kernel, and there is no way to change it to distribution kernal in pannel. And I cannot get all firmware information from the system. So I cannot generate my kernal with source code of mainline. This kernal donot support snapd and BBR.

Install qBittorrent

In order to use the latest qBittorrent, I have to compile from latest source code. First part is dependency packages.

apt-get -yqq update; apt-get -yqq upgrade; \apt-get -y install build-essential checkinstall pkg-config automake libtool git screen libgeoip-dev python3 python3-dev zlib1g-dev \libboost-dev libboost-system-dev libboost-chrono-dev libboost-random-dev libssl-dev \qtbase5-dev qttools5-dev-tools libqt5svg5-dev

if you are usting Debian 8, you should compile Qt by yourself.
I used libtorrent 1.0.11. This version is relative stable.

wget https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_0_11/libtorrent-rasterbar-1.0.11.tar.gztar xf libtorrent-rasterbar-1.0.11.tar.gzcd libtorrent-rasterbar-1.0.11./configure --disable-debug --enable-encryption --with-libgeoip=system CXXFLAGS=-std=c++11 --with-boost-libdir=/usr/lib/arm-linux-gnueabihfmake -j$(nproc)checkinstall -yldconfig

The latest qBittorrent is 4.1.1:

wget https://github.com/qbittorrent/qBittorrent/archive/release-4.1.1.tar.gztar xf release-4.1.1.tar.gzcd qBittorrent-release-4.1.1./configure --disable-gui --disable-debug --with-boost-libdir=/usr/lib/arm-linux-gnueabihfmake -j$(nproc)checkinstall -y

start qBittorrent and agree its terms:

qbittorrent-nox -d

The default WebUI:http://your IPADDRESS:8080/
default username:admin
default password:adminadmin

Then, add startup script for qBittorrent:

touch /etc/systemd/system/qbittorrent.servicevi /etc/systemd/system/qbittorrent.service

with following code:

[Unit]Description=qBittorrent Daemon ServiceAfter=network.target[Service]Type=forkingExecStart=/usr/local/bin/qbittorrent-nox -dExecStop=/usr/bin/killall -w -s 9 /usr/local/bin/qbittorrent-noxTimeoutSec=300[Install]WantedBy=multi-user.target

enable startup:

systemctl enable qbittorrent

Tips: If you want to use a non-root user, you have to specific your username in [Service]: User=.

Install nextcloud

We cannot ust snapd due to the kernal, so I had to manual install. The steps are from the official Knowledgebase. Mose individual use do not requires mysql. I used sqlite instead.

Install dependency packages:

apt-get install apache2 libapache2-mod-php7.0apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring php7.0-sqlite3apt-get install php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip

download latest Nextcloud and decompress it into /var/www. The permission also need to be modified.

chown -R www-data:www-data /var/www/nextcloudchown -R 755 /var/www/nextcloud

create a configure file for nextcloud:/etc/apache2/sites-available/nextcloud.conf

Alias /nextcloud "/var/www/nextcloud/"  Options +FollowSymlinks  AllowOverride All   Dav off  SetEnv HOME /var/www/nextcloud SetEnv HTTP_HOME /var/www/nextcloud

create symlink

ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf

enable some additional features:

a2enmod rewritea2enmod headersa2enmod enva2enmod dira2enmod mimeservice apache2 restart

Configure ocDownloader for Nextcloud:

This plugin can be installed from the official plugin repo from the control panel of the Nextcloud, but its aria2 still need to manual installed.

The first step is to install aria2 with apt, then create a configure file /var/www/nextcloud/.aria2.conf:

enable-rpc=truerpc-allow-origin-all=truerpc-listen-all=truemax-concurrent-downloads=5continue=truemax-connection-per-server=5min-split-size=10Msplit=10max-overall-download-limit=0max-download-limit=0max-overall-upload-limit=0max-upload-limit=0dir=./aria2downloadsfile-allocation=prealloccheck-certificate=false

Make a startup script for aria2, this service should be start by usergroup www-data.

touch /etc/systemd/system/aria2.servicevi /etc/systemd/system/aria2.service

with following things

[Unit]Description=Aria2c download managerAfter=network-online.target  [Service]Type=forkingUser=www-dataRemainAfterExit=yesExecStart=/usr/bin/aria2c -D --conf-path=/var/www/nextcloud/.aria2.confExecReload=/usr/bin/kill -HUP $MAINPIDRestartSec=1minRestart=on-failure    [Install]WantedBy=multi-user.target

enable startup when booting:

systemctl enable aria2

This server has a big storage space and good bandwidth, but it dont have ipv6 and each thread of tcp connection is also limited to 5Mbps, but you can use a old alternate kernel to solve it.

, ,
Previous Post
QuickBox efs mod v1.1.1
Next Post
Deployment of Latex IDE in macOS

1 Comment. Leave new

Leave a Reply

Your email address will not be published.

Fill out this field
Fill out this field
Please enter a valid email address.

This site uses Akismet to reduce spam. Learn how your comment data is processed.