ATTENTION: Try the aronode installer from KyleFromOhio. It does MUCH more than just setup a node for you. https://github.com/KyleFromOhio/arionum-scripts
ATTENTION (again): Since people seem to NOT read the giant ATTENTION above I’ll post it again. Follow these instructions to setup a node in 5 minutes => https://github.com/KyleFromOhio/arionum-scripts

One more time… why do all this work manually when you can just run a bash script and be running in five minutes? Use this => https://github.com/KyleFromOhio/arionum-scripts

There are a number of reasons to run a full-fledged ARO node.

  1. It helps the ARO network grow as it acts as a peer validating transactions and blocks on the network.
  2. It certainly strengthens the value of the cryptocurrency.
  3. Running your own node provides you with direct access to your own ARO API that you can use to talk to your own applications.
  4. Setting up an ARO node for testing is also possible but requires some additional notes. I wrote an article explaining a testnet setup here.

You can take a look at the ARO github for basic information here.

For this article, we will attempt to dive deeper and get your Linux machine to serve up an ARO node.

Just a side note, this post will not tackle on how to install packages/dependencies in details. With that, you may want to google it and pick up some basic linux knowledge.

Alright, let’s move along!

In order to run an ARO node, you need to make sure that your system has the following installed.

Requirements for running an Arionum node are as follows:

  • nginx (preferred) OR apache2 (easier)
  • PHP 7.2
  • php-pdo
  • php-bcmath
  • php-gmp
  • mysql OR mariadb (preferred)

Update & Upgrade

As always, before installing anything else, it is recommended to run updates and upgrades first.

So, go on and enter the command below and wait until it finishes

sudo apt-get update && sudo apt-get dist-upgrade -y

 

Installing Web Server

Choosing between nginx or apache as the web server is up to you. Make sure you pick one. Don’t install both.

Check if you got one installed. Otherwise, go ahead and install it.

sudo apt-get install apache2

apache2 -v

OR

sudo apt-get install nginx

nginx -v

Installing Database

Choosing between mysql and mariadb (not owned by Oracle) is up to you. In this sample guide, mysql will be used.

If you don’t have one installed yet. Go find how to install one of them. Otherwise, if you think one is installed already, check if so.

sudo apt-get install mysql_server

mysql -V

Then run this command below to safeguard your database server.

mysql_secure_installation

 

Installing PHP & PHP Extensions (for Apache2)

sudo apt-get install python-software-properties -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update 
sudo apt-get install php7.2 -y
sudo apt-get install php-mysql -y
sudo phpenmod pdo_mysql
sudo apt-get install php7.2-common php-bcmath php-gmp -y

Installing PHP & PHP Extensions (for Nginx)

sudo apt-get install python-software-properties -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt-get install php7.2-cli php7.2-fpm php7.2-curl php7.2-gd php7.2-mysql php7.2-mbstring zip unzip
sudo apt-get install php7.2-common php-bcmath php-gmp -y
sudo service php7.2-fpm restart
sudo systemctl restart nginx

Check if you have PHP installed and/or your PHP version is at least 7.2.

Launch the terminal and enter this command.

php -v

In case you don’t have PHP or have an older version, it is necessary that you install the required version. Work on it before proceeding.

After you have installed PHP, install needed modules. These were included above but make sure you have them.

php-pdo

sudo apt-get update

sudo apt-get install php-mysql

Ensure that pdo is enabled.

sudo phpenmod pdo_mysql

php-bcmath

sudo apt-get install php-bcmath

php-gmp

sudo apt-get install php-gmp

 

Setting Up The Node Software

When all requirements are installed, you’re now ready to setup your ARO node.

Clone the node repository by entering command below.

Install it to your webroot (probably either /var/www/html or /usr/share/nginx/html) or your vhost location is you are setting vhosts (not covered in this guide).

git clone https://github.com/ProgrammerDan/arionum-node.git .

Now that the ARO code is on your computer, you will need to setup a database and configure ARO to connect to it.

We do NOT recommend installing phpmyadmin on your live production nodes as it is notoriously insecure. If you can, use a third party Mysql GUI tool with an SSH tunnel feature to connect to your linux machine. This will give you a nice GUI to edit your database and keep your node secure. On MAC, we recommend https://www.sequelpro.com/ and on Windows try https://www.heidisql.com/

In the example below we will show phpmyadmin for setting up a database but the steps can apply to any GUI software you use.

Open your browser and load your phpmyadmin (localhost/phpmyadmin).

Create a database for the node. You can name the database anything you want.

Once created, open you GUI file explorer and go to the cloned repository. Folder is assumed to be named as arionum-node.

From the main node directory, open include folder and edit config.inc.php.

Update the file with your database information.

Next, you have to change the permission of tmp folder and tmp/db-update file.

 

In the terminal, enter commands below:

cd /var/www/arionum-node.com

sudo chmod 777 tmp -R

sudo chmod 777 tmp/db-update -R

Optional; Virtual Host (Apache2 only)

If the only website on your server is arionum node then you do not need a virtual host. This is a basic overview of how to do it in apache. Otherwise, you can skip this step.

Create a virtual host configuration in your web server.

cd /etc/apache2/sites-enabled

sudo cp 000-default.conf arionum-node.com.conf

sudo nano arionum-node.com.conf

Now, edit this part of the file. Right after the comments. Fill in on what you have named your folder  in /var/www

After modifying the file, enable the virtual host configuration file by:

sudo a2ensite arionum-node.com

And then, restart the apache server.

sudo service apache2 restart

If you setup node on your actual domain, you can already load it on the browser. Otherwise, edit /etc/hosts file and include the IP address of your web server.

sudo nano /etc/hosts

Initial Loading of the Node

If you want to setup your node as a testnet, do NOT load the node in a browser yet until you edit your config file to testnet = true; Read our article on setting up a testnet to complement this article.

Lastly, load the domain/subdomain (depends where you installed) in the browser. Once, it loads the first time, it will setup the tables in the database you created earlier and will ask you to refresh the page. Refresh it.

Check your database in your MYSQL GUI you use to verify it has the tables.

It says refresh, so reload the page and it will be updated to the current block.

Then that’s it! You’ve now become a peer on the network.

 

If you want to automate everything, put all the commands into a bash script. The following example is using nginx web server and mariadb database.

Arionum Node Install Script

ATTENTION: Try the aronode installer from KyleFromOhio https://github.com/KyleFromOhio/arionum-scripts

Leave a Reply

Your email address will not be published. Required fields are marked *