Posted on

ARM Server Update, Summer 2018

Continuing our quarterly ARM Server update series, it is now Summer 2018 so it is time to review the ARM Server news and ecosystem updates from the past few months!  This blog series only covers the ARM Server highlights, but for more in-depth ARM Server news be sure to check out the Works on Arm Newsletter, delivered every Friday by Ed Vielmetti!

Looking at our recent blog posts, the most important headline seems to be the rumored exit from the business by Qualcomm.  Although, at the moment, this has not been confirmed, if true it would be a major setback for ARM Servers in the datacenter.  The Qualcomm Centriq had been shown to be very effective by CloudFlare for their distributed caching workload, and had been shown by Microsoft to be running a portion of the Azure workload as well.

However, just as Qualcomm is rumored to be exiting, Cavium has released the new ThunderX2 to general availability, and several new designs have now been shown and are listed for sale.  The ThunderX2 processor is a 32-core design that can directly compete with Xeons, and provides all of the platform features that a hyperscaler would expect.

Finally, in software news, Ubuntu has released it’s latest 18.04 Bionic Beaver release, which is an LTS version, thus offering 5 years of support.  As in the past, there is an ARM64 version of Ubuntu, which should technically work on any UEFI standard ARM Server.  Examples include Ampere X-Gene servers, Cavium ThunderX servers, Qualcomm, Huawei, HP Moonshot, and AMD Seattle servers.

As always, make sure to check back for more ARM Server and Datacenter industry news, or follow us on Twitter for daily updates on all things ARM, IoT, single board computers, edge computing, and more!

 

Posted on

How to Install Nextcloud on a Debian or Ubuntu ARM Server

With the recent fork of the Owncloud project, many users are switching over to the newly founded Nextcloud project to build and use their own personal cloud servers to host personal files, photos, movies, and documents.  This alternative is popular for people concerned with data privacy, as you do not need to rely on a public cloud or drive similar to Box, Dropbox, Google Drive, OneDrive, etc.  With those services, you don’t know precisely where your data lives, who has access to view it, and what safeguards are in place to protect your data.  With Nextcloud, you know exactly where your data resides, and who has access to it.  Best of all, running it on a Debian or Ubuntu ARM server is easy!  Let’s get started!

In this tutorial, we will show you how to install Nexcloud on an Ubuntu or Debian ARM server.

First, let’s update the server to the latest versions of applications:

 

sudo apt-get update
sudo apt-get upgrade
sudo reboot

 

Next, we need to install the core applications that will make Nextcloud work; PHP, Apache, and MySQL.  You will be asked to create a MySQL root password during this installation:

apt-get install lamp-server^
apt-get install libxml2-dev php-zip php-dom php-xmlwriter php-xmlreader php-gd php-curl php-mbstring
a2enmod rewrite
sudo service apache2 reload

 

Once that is complete, it is time to actually download and configure Nextcloud (version 10 is the latest at the time of this writing, but check to see if a newer version exists and replace the number in these commands):

wget https://download.nextcloud.com/server/releases/nextcloud-10.0.1.tar.bz2
tar -vxjf nextcloud-10.0.1.tar.bz2
sudo mv nextcloud /var/www

 

Next, we need to set the proper permissions on the Nextcloud files and folders.  Nextcloud has provided a script that will do this for us, making it very easy.  Thus, we need to create a new file and paste in the contents of the script they’ve given us.

nano nextcloud_permissions.sh

Paste this in to the new file:

#!/bin/bash

ocpath=’/var/www/nextcloud’
htuser=’www-data’
htgroup=’www-data’
rootuser=’root’

printf “Creating possible missing Directories\n”

mkdir -p $ocpath/data
mkdir -p $ocpath/assets
mkdir -p $ocpath/updater

printf “chmod Files and Directories\n”

find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750

printf “chown Directories\n”

chown -R ${rootuser}:${htgroup} ${ocpath}/
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
chown -R ${htuser}:${htgroup} ${ocpath}/assets/
chown -R ${htuser}:${htgroup} ${ocpath}/config/
chown -R ${htuser}:${htgroup} ${ocpath}/data/
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
chown -R ${htuser}:${htgroup} ${ocpath}/updater/

chmod +x ${ocpath}/occ

printf “chmod/chown .htaccess\n”

if [ -f ${ocpath}/.htaccess ] then
chmod 0644 ${ocpath}/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
fi

if [ -f ${ocpath}/data/.htaccess ] then
chmod 0644 ${ocpath}/data/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
fi

 

Now we will just make the script executable, and then run it:

sudo chmod +x nextcloud_permissions.sh
sudo ./nextcloud_permissions.sh

 

Our next step is to configure Apache to listen for and serve requests for the NextCloud application.  We will create an Apache configuration file to accomplish this, and then populate it:

nano /etc/apache2/sites-available/nextcloud.conf

Paste this Apache configuration in to the file:

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

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

&ltIfModule mod_dav.c>
Dav off
&lt/IfModule>

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

&lt/Directory>

 

 

Next, we are going to make some changes to the Apache modules that are loaded and then restart Apache:

sudo ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mime
sudo a2enmod ssl
sudo a2ensite default-ssl
sudo service apache2 reload

 

Now it is time to configure MySQL by creating the table and user that Nextcloud needs to operate.  First we connect to MySQL:

sudo mysql -u root -p

Once logged in to MySQL, we”ll make the table and user:

create database nextcloud;
create user nextclouduser@localhost identified by 'your-password';
grant all privileges on nextcloud.* to nextclouduser@localhost identified by 'your-password';
flush privileges;
exit;

 

At this point, we decided a reboot was probably a good idea, but you might be able to skip this step:

sudo reboot

 

Once your server comes back up, the Nextcloud web interface will be available, and we will finish our configuration via the browser.  In your browser, go to http://[the-ip-address-of-your-server]/nextcloud

You will see the “Create Account” screen shown here:

nextcloud-install-on-ubuntu-or-debian-arm-server-1

You will need to create an Admin name and password for your Nextcloud install, and when you scroll down you will notice that Nextcloud needs the MySQL information you created earlier.  Provide it the information asked, if you used the instructions above, the database name is ‘nextcloud’, username is ‘nextclouduser’, and then whatever password you selected.  The location of the database is ‘localhost’.

If everything is correct, you will be redirected to the Dashboard (you will get an inline pop-up to download the Nextcloud Apps first)

nextcloud-install-on-ubuntu-or-debian-arm-server-2

 

Dismiss that and you will see the Files application:

nextcloud-install-on-ubuntu-or-debian-arm-server-3

 

At this point, you are up and running with Nextcloud on your Ubuntu or Debian ARM Server!  You can even add additional features and applications from the menu, such as Mail, Document viewer, Tasks, and more!  Happy hosting!

nextcloud-install-on-ubuntu-or-debian-arm-server-4

 

Posted on

How to Install Confluence on an Ubuntu ARM Server

Following up on our previous article, which covered How to Install JIRA on an ARM Server, we’ll now take a look at how to install Atlassian Confluence on an ARM Server as well.

As mentioned in our previous article, when we set out to use Confluence and JIRA for some development work, we noticed there was a lack of information on the topic and no real authoritative guide on how to install and run Confluence or JIRA on ARM platforms. So, we decided to piece together what we learned in the hopes that it will help someone else.

As Confluence is architecturally similar to JIRA, much of the documentation from our prior article is replicated here with just a few minor edits, but we will go through the entire exercise anyways for the sake of clarity.

First, lets discuss the specific environment this guide addresses. This tutorial is for installing Confluence on Ubuntu 14.04 LTS running on ARM architecture processors. It may also work on similar Linux distros such as Raspbian for the Raspberry Pi, Debian, etc, but we only tested and built on Ubuntu Server 14.04 LTS, so your mileage may vary on the others.

Before we get in to the details, here is a quick overview of what we will accomplish in this guide:

1. Add Oracle Java repository
2. Install Oracle Java SDK
3. Download and configure Confluence
4. Run Confluence!

Let’s get started.

First, we need to ensure we have a few software utilities installed that will help us add some software repositories in the next step.

sudo apt-get install python-software-properties software-properties-common

This is going to give us access to the ‘add-apt-repository’ command, which we’ll make use of now:

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

This will pull in a new repository that contains the Oracle Java SDK. We need to use the Oracle Java runtime environment, as opposed to the OpenJDK packages that are in the default Ubuntu repos.

sudo apt-get install oracle-java7-installer

The JAVA_HOME variable should be set for you during installation, but just to be certain we are going to install one more utility, which will allow us to also choose which Java to run if more than one are present on your system.

sudo apt-get install oracle-java7-set-default

Once it finishes installing, we run it with:

sudo update-alternatives --config java

And then choose your Oracle Java installation from the numerical options. It will look similar to this:

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
————————————————————
* 0 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 manual mode

Press enter to keep the current choice[*], or type selection number:

Select the one that references your new Oracle Java installation, if it is not already selected.

Once complete, you can test everything is working by running:

java -version

It should give you back information on the installed Java version, and should be similar to this:

java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode)

Now that Java is installed and configured, it is time to download and setup Confluence. Atlassian only provides a binary for installing Confluence on 32-bit and 64-bit x86 platforms, so we cannot use their automated installation scripts. To run Confluence on ARM, we need to use the Archive File option provided by Atlassian. Further reading on the topic can be found here: Installing Confluence on Linux from Archive File (https://confluence.atlassian.com/display/DOC/Installing+Confluence+on+Linux+from+Archive+File). To download the archive, go to https://www.atlassian.com/software/confluence/download and click on Linux. You will see one labeled “Confluence 5.7.3 Server – Standalone (TAR.GZ Archive)” We can see that it is a link to https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-5.7.3.tar.gz (at the time of this writing). That is the file we are interested in.

On your server, navigate to the folder you want to download this file to, and then start the download.

sudo wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-5.7.3.tar.gz

Once the download has finished, we need to extract it.

sudo tar -xvzf atlassian-confluence-5.7.3.tar.gz

This will extract the contents of the archive in to a subdirectory. Next, we are going to need to declare a path for the variable ‘confluence.home’, so lets first make a directory to point the variable at.

sudo mkdir /var/confluence

Now we can set the property in the ‘atlassian-confluence-5.7.3/WEB-INF/classes/confluence-init.properties’ file.

sudo nano atlassian-confluence-5.7.3/WEB-INF/classes/confluence-init.properties

Uncomment the line to define ‘confluence.home’ and add /var/confluence/ Save and exit.

At this point, Confluence has what it needs and is able to run, so we can start it with:

cd bin
./start-confluence.sh

Confluence can take up to 10 minutes or more to start, depending on your ARM processor’s core and speed, as well as your filesystem location and speed. Once it’s fully loaded and operational, you can access Confluence by browsing to http://your-ip-address:8080 and going through the steps to finalize setup.

Remember, installing Confluence like this was only tested on an Ubuntu 14.04 LTS ARM Server, but these steps should be roughly the same for installing Confluence on a Raspberry Pi running Raspian, or a Debian ARM server.

Enjoy!

Posted on

How to Install JIRA on an Ubuntu ARM Server

We recently began testing Atlassian JIRA and Confluence for some internal development work, and we noticed there was a lack of documentation on the steps necessary to install and run JIRA on ARM Servers. There are fragmented pieces of information scattered about the web, but not a complete installation guide specifically designed for running JIRA on ARM. Hopefully this walkthrough will help clear up any confusion on the topic, and help you install JIRA successfully.

First, lets discuss the specific environment this guide addresses. This tutorial is for installing JIRA on Ubuntu 14.04 LTS running on ARM architecture processors. It may also work on similar Linux distros such as Raspbian for the Raspberry Pi, Debian, etc, but we only tested and built on Ubuntu Server 14.04 LTS, so your mileage may vary on the others.

Before we get in to the details, here is a quick overview of what we will accomplish in this guide:

1. Add Oracle Java repository
2. Install Oracle Java SDK
3. Download and configure JIRA
4. Run JIRA!

Let’s get started.

First, we need to ensure we have a few software utilities installed that will help us add some software repositories in the next step.

sudo apt-get install python-software-properties software-properties-common

This is going to give us access to the ‘add-apt-repository’ command, which we’ll make use of now:

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

This will pull in a new repository that contains the Oracle Java SDK. We need to use the Oracle Java runtime environment, as opposed to the OpenJDK packages that are in the default Ubuntu repos.

sudo apt-get install oracle-java7-installer

The JAVA_HOME variable should be set for you during installation, but just to be certain we are going to install one more utility, which will allow us to also choose which Java to run if more than one are present on your system.

sudo apt-get install oracle-java7-set-default

Once it finishes installing, we run it with:

sudo update-alternatives --config java

And then choose your Oracle Java installation from the numerical options. It will look similar to this:

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 manual mode

Press enter to keep the current choice[*], or type selection number:

Select the one that references your new Oracle Java installation, if it is not already selected.

Once complete, you can test everything is working by running:

java -version

It should give you back information on the installed Java version, and should be similar to this:

java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode)

Now that Java is installed and configured, it is time to download and setup JIRA. Atlassian only provides a binary for installing JIRA on 32-bit and 64-bit x86 platforms, so we cannot use their automated installation scripts. To run JIRA on ARM, we need to use the Archive File option provided by Atlassian. Further reading on the topic can be found here: Installing JIRA from an Archive File on Windows, Linux or Solaris. To find the archive, browse to https://www.atlassian.com/software/jira/download and click on “All JIRA download options”. You will see one labeled “JIRA 6.4.2 (TAR.GZ Archive)” We can see that it is a link to https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-6.4.2.tar.gz (at the time of this writing). That is the file we are interested in.

On your server, navigate to the folder you want to download this file to, and then start the download.

sudo wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-6.4.2.tar.gz

Once the download has finished, we need to extract it.

sudo tar -xvzf atlassian-jira-6.4.2.tar.gz

This will extract the contents of the archive in to a subdirectory. Next, we are going to need to declare a path for the variable ‘jira.home’, so lets first make a directory to point the variable at.

sudo mkdir /var/jira

Now we can set the property in the ‘atlassian-jira/WEB-INF/classes/jira-application.properties’ file.

sudo nano atlassian-jira/WEB-INF/classes/jira-application.properties

Uncomment the line to define ‘jira.home’ and add ‘/var/jira’ (without the quotes). Save and exit.

At this point, JIRA has what it needs and is able to run, so we can start it with:

cd bin
./start-jira.sh

JIRA can take up to 10 minutes or more to start, depending on your ARM processor’s core and speed, as well as your filesystem location and speed. Once it’s fully loaded and operational, you can access JIRA by browsing to http://your-ip-address:8080 and going through the steps to finalize setup.

Remember, installing JIRA like this was only tested on an Ubuntu 14.04 LTS ARM Server, but these steps should be roughly the same for installing JIRA on a Raspberry Pi running Raspian, or a Debian ARM server.

Enjoy!

Posted on

HOW-TO: Install Minecraft Server on the Raspberry Pi Server or Ubuntu 14.04 ARM Server

Minecraft is one of the most popular games played online, and installing your own Minecraft Server on ARM is easy! These instructions will allow you to install Minecraft Server on the Raspberry Pi, or on our Ubuntu 14.04 ARM Server.

First, we need to connect to our node via SSH.

Once logged in, lets make sure we keep our downloads in our home directory for ease of use:

cd /home

Once in the home directory, we are first going to download and set up Java.

We do that by running:

sudo wget --no-check-certificate http://www.java.net/download/jdk8/archive/b111/binaries/jdk-8-ea-b111-linux-arm-vfp-hflt-09_oct_2013.tar.gz

After Java has finished downloading, we need to extract it:

sudo tar zxvf jdk-8-ea-b111-linux-arm-vfp-hflt-09_oct_2013.tar.gz -C /opt/

If the download and extract were successful, we will test to make sure Java is working by:

sudo /opt/jdk1.8.0/bin/java -version

We should see this, confirming Java is now ready:

java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b111)

Java HotSpot(TM) Client VM (build 25.0-b53, mixed mode)

Finally, let’s remove the downloaded gzip to save a bit of disk space:

sudo rm jdk-8-ea-b111-linux-arm-vfp-hflt-09_oct_2013.tar.gz

Now, it is time to download Minecraft Server!

wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar

Once it has finished downloading, we can launch it by running:

sudo /opt/jdk1.8.0/bin/java -Xmx1024M -Xms1024M -jar minecraft_server.jar

The Raspberry Pi only has 512mb of RAM, so it will not actually allocate 1024…but it will take approximately 400mb or so that is available to it.

The Ubuntu 14.04 ARM server does have a full gig of RAM, but the OS takes up a bit of that. So Minecraft Server will probably reserve about 750mb to 800mb of memory to run in. This is plenty.

At this point, Minecraft Server will go through it’s startup routine, and you will be able to join the newly created world by pointing your game to the IP Address of your node (you can also modify game variables by editing the server.properties file, located in your /home directory.)