Install

mattpascoe edited this page Feb 26, 2015 · 23 revisions

Requirements

ONA has a simple set of requirements to run. I will describe them each briefly here.

  • You will need a web server to service the page. Apache was the web server used to do the development and testing.
  • You will need a database to store the data. MySQL was the database used to develop and test with. We use the ADODB PHP database abstraction layer so using Postgres or Oracle should not be an issue although we have not tested with those backends.
  • You will need a PHP interpreter. ONA was written in the PHP language. Currently PHP version 5 or newer is required.
  • In addition to PHP, you will need at least one PHP database module that may or may not be part of your distributions main install. You can check that they exist by issuing the command php -m |grep mysql You will see a list of the installed modules and something like "mysql" should be in the list.
  • You should also install the php-gmp and php-mbstring module as well. Though the system should fall back to a simple mode without it.
  • While we are using the database abstraction system ADODB, the database creation scripts are all based off of MySQL . So for the time being, MySQL is the only truly supported database.
  • Although it is not a requirement, you can use an accelerator such as http://eaccelerator.net

Steps

  • cd /opt (or other directory you wish, all documentation assumes /opt)
  • git clone https://github.com/opennetadmin/ona.git
  • Add a symlink in your web server root that points ona -> /opt/ona/www. An example would be: ln -s /opt/ona/www /var/www/ona assuming your apache root is /var/www. An alternative to a symlink could be to add something like the following to your apache configuration:
Alias /ona "/opt/ona/www/"
<Directory "/opt/ona/www/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
  • touch /var/log/ona.log This is the default location for the ONA system log.
  • chown www-data /opt/ona/www/local/config /var/log/ona.log (or whatever your web server user is)
    • Opensuse uses wwwrun
    • Note that on some systems like Centos, that use SElinux, you may need to adjust the security context for /opt/ona/www/local as explained here. chcon -R -t httpd_sys_script_rw_t /opt/ona/www/local should do it.
  • Point your broswer to http://localhost/ona (replace localhost with your server name if needed) and follow the install steps
    • If needed you can manually run the installer by adding the following to the url. http://localhost/ona/?runinstaller=y
    • You could also create the following file to invoke the installer: touch /opt/ona/www/local/config/run_installer
  • Accept the GPL license.
  • You will now have a screen like the following:

ona-install

  • In the first box, ensure that all of the prerequisite checks are indicating 'Yes'. If not, fix them and reload the page to refresh their status.
  • Fill out the form (Help information is also in a box at the bottom of the form):
    • Database host: This is the IP or DNS name of the server hosting your database. This is usually localhost but can certainly point to any other server.
    • Database type: Since we use ADODB we can use many database backends, Currently however only MySQL is actually supported. Hope to fix this soon!
    • Database admin: This is the username of a user that can create databases and tables on your database server. Many times this is root.
    • Database admin password: The password for the admin user.
    • Database name: Since ONA supports contexts a database name instance should be given. You should always use default for your primary install. Only adjust this value if you will be using contexts. This name will be prefixed with ona_ when created so you will see databases in your system called ona_default for example. Also note that if you already have an instance with this name, the database will be dropped and re-created so please back it up and be cautious.
    • Application database user name: This is a user that will be created on the database server to be used by the application for connections. This user will be granted permissions to update tables in our new database. The default user is ona_sys.
    • Application database user password: The password for our new user.
    • Default domain name: This is the default name that the system will use when adding new hosts. The domain will be created automatically for you in the system. It would typically be the name of the domain for your organization.
  • Click create database. NOTE: Please remember this will drop any existing database that has the same name as provided in the database name field in order to re-create it.
  • If all went well you should see the following information:

install-success

  • Click the CLICK HERE TO START link to begin.

Upgrades

Upgrades should automatically be detected and performed. As usual MAKE A BACKUP FIRST! Its likely that I screwed something up and your data will be ground into a fine dust. Currently the autoupgrade of database elements only works when using a MySQL database.

Quick steps for upgrade:

  • Download the latest tar archive from http://github.com/opennetadmin/ona/archive/ona-current.tar.gz
  • tar --strip-components=1 -C /opt/ona -zxvf ona-current.tar.gz Or change -C /opt/ona to wherever your installed it to on your system
  • chown www-data /opt/ona/www/local/config (or whatever your web server user is)
  • Point your browser to http://localhost/ona/?runinstaller=y
    • If you do not run the upgrade installer you may run into issues. You must execute the link above after installing the tar archive.
  • After the license info you will be informed that an upgrade will occur. Select OK to the upgrade (after your backups n stuff)
  • If there is any new database updates they should be applied and you should see a note about the upgrade_index being updated as well as version numbers.
  • Once in, should see the latest version number displayed on the dashboard.

Configuration

  • By default when you connect to the GUI, you will have view only guest access. You can log in as the admin user with a password of admin.
  • There are a hand full of configuration options. A user with the 'advanced' level of security can adjust these values via the 'Manage system config' option in the Admin menu.
  • You can create more users via this menu.
  • Depending on the plugins you have installed, you may find other options available in this menu for those options.
  • Proceed to the Getting Started page.