I noticed that many people expressed the exigence to install ONOS on CentOS 6.X, 7 based systems, since it's very common to find these types of systems in production environments. Even if this distribution is not officially supported at the moment I though it would be a good idea to come up with a way to use that.
...
- The process described below will focus on the requirements to both compile and run (as a target machine) ONOS. The final deployment procedure is then totally similar to the one described for Ubuntu in the main user guide.
- You've just installed a brand new CentOS box and have logged in for the first time.
The basics: setup the network card, the hostname
First let's configure the network card.
...
Code Block | ||
---|---|---|
| ||
$ vi /etc/sysconfig/network # Check that the host name is correct $ vi /etc/hosts |
Install dependencies
For dependencies, you can just use yum.
...
Code Block | ||
---|---|---|
| ||
$ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u458u151-b14b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u458u151-linux-x64.rpm" $ rpmyum -ivhy localinstall jdk-8u458u151-linux-x64.rpm |
The yum command manages the the dependences, that's why we use it instead of rpm.
For maven I followed this guide instead: http://preilly.me/2013/05/10/how-to-install-maven-on-centos/
...
Code Block | ||
---|---|---|
| ||
$ chkconfig sshd on $ ssh-keygen -t rsa |
Configure IPtables and SELinux (CentOS 6.X)
IPtables and SELinux are enforced by default on CentOS. In this section I briefly show how to disable both, in order to don't deal with them. It's then up to the user to apply her/his specific configuration later on in a production environment.
...
Code Block | ||
---|---|---|
| ||
$ echo 0 >/selinux/enforce $ vi /etc/selinux/config # replace "SELINUX=enforcing" to "SELINUX=disabled" |
Configure an admin user
In order to use ONOS, we need to add a dedicated user, who must be sudoer (without the need of typing the password).
...
Code Block | ||
---|---|---|
| ||
$ sudo su admin |
Create needed directories:
Code Block | ||
---|---|---|
| ||
$ mkdir -p ~/Downloads $ mkdir -p ~/Applications |
Configure Git:
Code Block | ||
---|---|---|
| ||
$ sudo git config --global http.sslverify false |
Install ONOS
At this point you can download/deploy on this machine ONOS, as described in the main user guide.
...