-
Notifications
You must be signed in to change notification settings - Fork 0
Preinstallations
At this page are some required steps listed. They are needed to compute STARQL queries with PostgreSQL or Apache Spark. You can use these installation steps to set up only one node (master) or optional for a whole cluster. You need a running instance of Ubuntu at every node you want to use.
-
Update
Update all your nodes with:user@master:~$ sudo apt-get update && sudo apt-get -y dist-upgrade
Then reboot:
user@master:~$ sudo reboot -
Maven
You need to installmavento build the project from the repository andgitto clone it:user@master:~$ sudo apt-get install maven git -
Oracle Java 8
To run the application you need to install Java 8 at every node. You can verify a Java installation withjava -version. You should get something like this:java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)If not, then you do not have Java 8 installed. You can do it with the following commands:
user@master:~$ sudo add-apt-repository ppa:webupd8team/java user@master:~$ sudo apt-get update user@master:~$ sudo apt-get install oracle-java8-installer
-
Hosts File
In thehostsfile at any node under/etc/hostsyou should have at least:127.0.0.1 localhost # any name your node actually has 127.0.1.1 name # your master node 192.168.1.100 master # your slaves, when you use more than one node 192.168.1.101 slave00 192.168.1.102 slave01 ...
-
User To avoid security issues you should add a new user and a new group at every node you want to use:
user@master:~$ sudo addgroup cluster user@master:~$ sudo adduser --ingroup cluster starql
-
Configuring SSH
You need a openssh-server running at every node. Even if you only use one node. You can do it with the command:user@master:~$ sudo apt-get install -y openssh-serverLogin as the new user with
sudo su starql. Then you can generate a ssh key pair with the following command:starql@master:~$ ssh-keygen -t rsa -b 4096At the master node you need to add the generated public key to the list of authorized keys with the following command:
starql@master:~$ ssh-copy-id -i ~/.ssh/id_rsa.pub localhost
You can test it with the command:
starql@master:~$ ssh localhostIf you want to use more than one node, you need to copy the public key to the list of authorized keys at every slave node. You can do it with the following commands:
starql@master:~$ ssh-copy-id -i ~/.ssh/id_rsa.pub slave00 starql@master:~$ ssh-copy-id -i ~/.ssh/id_rsa.pub slave01 ...
-
Disable IPv6
We need to disable IPv6 at every node, because hadoop does not support it. To do it you need to add the following lines to/etc/sysctl.conf.# disable ipv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 -
PostgreSQL installation
You need a running instance of PostgeSQL at the master node. The Spark back end also uses a PostgreSQL database as a data input. If you do not have installed PostgreSQL yet, then you can do it with the following command:user@master:~$ sudo apt-get install postgresqlModify
/etc/postgresql/9.5/main/pg_hba.confand change the linelocal all all peerto
local all all md5Make sure you have these lines in the file
pg_hba.conf:host all all 127.0.0.1/32 md5 host all all 192.168.0.0/16 md5Modify
/etc/postgresql/9.5/main/postgresql.confand change the line#listen_addresses = 'localhost'`to
listen_addresses = '*'`Restart PostgreSQL:
user@master:~$ sudo service postgresql restartChange your password:
user@master:~$ sudo -u postgres psql postgres=# ALTER USER Postgres WITH PASSWORD '<newpassword>'; postgres=# \q -
Reboot
Reboot all your nodes:user@master:~$ sudo reboot
And Now?
Goto Home and continue with the next steps.