This is an archive of the ONOS 1.1 wiki. For the current ONOS wiki, look here.

I noticed that many people expressed the exigence to install ONOS on CentOS 6.X based systems, since it's very common to find this type of systems in production environments. Even if this distribution it's not officially supported at the moment I though it could be a good idea to come up with a way to use that.

Nothing complicate. ONOS is based on Java, which - by definition - can run on heterogeneous systems. It's just a matter of figure out the right dependencies.

I came up with this little tutorial, that hopefully should quickly guide the users over the process.

Important note: The tutorial is based on the following assumptions:

  • 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 that you logged in for the first time.

The basics: setup the network card, the hostname

First let's configure the network card

$ ip link set eth0 up
$ vi /etc/sysconfig/network-scripts/ifcfg-eth0 -> ON_BOOT = yes
$ service network restart

Then let's set the hostname editing /etc/hostname and /etc/hosts

$ vi /etc/hostname
$ vi /etc/hosts

Install dependencies

To install Java8 I referenced to this link, which it worked pretty straight forward, just copy and pasting the commands reported. http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/

Instead, for maven I followed this one http://preilly.me/2013/05/10/how-to-install-maven-on-centos/

We need to install a dependency called ncurses. We need to install it manually, compiling the package. This is how you should to it. If you see at the end of the procedure some errors, don't worry about it. It's a known issue of the package, that won't anyway hurt the functionality provided.

$ wget http://blog.starcklin.com/files/dpkg_1.17.6.tar.xz
$ tar -xf dpkg_1.17.6.tar.xz
$ cd dpkg-1.17.6
$ sudo yum install ncurses-devel ncurses
$ ./configure
$ make
$ cd utils
$ sudo make install

For all other dependencies, you can just use yum

$ yum -y install vim openssh-server openssh-clients wget git

Let's configure ssh

$ chkconfig sshd on
$ ssh-keygen -t rsa

Configure IPtables and SELinux

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.

Deactivate IPtables

$ sudo iptables -F
$ sudo service iptables save
$ sudo chkconfig iptables off
$ sudo chkconfig ip6tables off

Deactivate SELinux

$ echo 0 >/selinux/enforce
$ vi /etc/selinux/config  # put 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).

$ sudo adduser admin
$ sudo visudo  # add the following line at the END of the file: admin ALL=(ALL) NOPASSWD:ALL
               # Modify also the line "FromDefaults requiretty” to "FromDefaults !requiretty"

From this point we will continue as the admin user. If we did things correctly, we shouldn't be asked for the password.

$ sudo su admin

Create needed directories:

$ mkdir -p ~/Downloads
$ mkdir -p ~/Applications

Configure Git:

$ 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.

  • No labels