Deployment in SYS ARM-2T

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.gz
tar xf libtorrent-rasterbar-1.0.11.tar.gz
cd libtorrent-rasterbar-1.0.11
./configure --disable-debug --enable-encryption --with-libgeoip=system CXXFLAGS=-std=c++11 --with-boost-libdir=/usr/lib/arm-linux-gnueabihf
make -j$(nproc)
checkinstall -y
ldconfig

The latest qBittorrent is 4.1.1:


wget https://github.com/qbittorrent/qBittorrent/archive/release-4.1.1.tar.gz
tar xf release-4.1.1.tar.gz
cd qBittorrent-release-4.1.1
./configure --disable-gui --disable-debug --with-boost-libdir=/usr/lib/arm-linux-gnueabihf
make -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.service
vi /etc/systemd/system/qbittorrent.service

with following code:


[Unit]
Description=qBittorrent Daemon Service
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/bin/qbittorrent-nox -d
ExecStop=/usr/bin/killall -w -s 9 /usr/local/bin/qbittorrent-nox
TimeoutSec=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.0
apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring php7.0-sqlite3
apt-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/nextcloud
chown -R 755 /var/www/nextcloud

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


Alias /nextcloud "/var/www/nextcloud/"

<Directory /var/www/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud

</Directory>

create symlink


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

enable some additional features:


a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
service 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=true
rpc-allow-origin-all=true
rpc-listen-all=true
max-concurrent-downloads=5
continue=true
max-connection-per-server=5
min-split-size=10M
split=10
max-overall-download-limit=0
max-download-limit=0
max-overall-upload-limit=0
max-upload-limit=0
dir=./aria2downloads
file-allocation=prealloc
check-certificate=false

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


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

with following things


[Unit]
Description=Aria2c download manager
After=network-online.target
  
[Service]
Type=forking
User=www-data
RemainAfterExit=yes
ExecStart=/usr/bin/aria2c -D --conf-path=/var/www/nextcloud/.aria2.conf
ExecReload=/usr/bin/kill -HUP $MAINPID
RestartSec=1min
Restart=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 don’t have ipv6 and each thread of tcp connection is also limited to 5Mbps, but you can use a old alternate kernel to solve it.

Amefs, EFS, Linux
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. Required fields are marked *

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.

keyboard_arrow_up
Exit mobile version