Skip to content

Installation Instructions

barryo edited this page Feb 12, 2013 · 5 revisions

This document is a step by step installation howto using a Git clone.

NOCtools does not require any database backend so hopefully installation is quick and easy.

This document should work for any Linux / UNIX based system with Apache and PHP 5 (>=5.4).

Details

Get the Source

Log into the server where you wish to install NOCtools.

Move to the directory where you wish to store the source. Note that it should not be checked out into any web exposed directory (e.g. do not checkout to /var/www). In my case, I'm going to use /usr/local/NOCtools so I:

cd /usr/local
git clone git://github.com/opensolutions/NOCtools.git

As it stands, there is one branch of interest:

  • master - this reflects stable and complete features. Pushes to here are considered production ready.

Any other branch reflects in progress feature branches that may have been pushed for no other reason than offsite backup. These will eventually be merged into master.

Regularly pulling from master will keep you up to date.

Install Third Party Libraries

NOCtools requires the following third party libraries:

  • Zend Framework (V1.11 but other versions may work)
  • Smarty (V3)
  • OSS_SNMP
  • OSS-Framework

You can install / use third party libraries directly into NOCtools's library/ directory from SVN externals / Git clones or link to existing copies elsewhere on your system. The following subsections explain each option.

Install Directly into NOCtools

This is the easiest option by far:

cd /usr/local/NOCtools
./bin/library-init.sh

To update the libraries at a later date from their respective SVN repositories then just:

cd /usr/local/NOCtools
./bin/library-update.sh

Using Already Installed / Packaged Versions

Zend Framework

So long as Zend/Application.php is in your path, you should not need to do anything.

This should be the case with a package manager based install of Zend Framework. If not, then you can symlink the Zend directory to the NOCtools library. For example, on Ubuntu 10.10:

ln -s /usr/share/php/libzend-framework-php/Zend /usr/local/NOCtools/library/Zend

Smarty

Again, ensure Smarty.class.php is in your path.

If not, then you can symlink the parent directory containing this file to the NOCtools library. For example, on Ubuntu 10.10 you could:

ln -s /usr/share/php/smarty /usr/local/NOCtools/library/Smarty

If you don't use the symlink method, you will need to update your NOCtools/application/configs/application.ini as follows (using the above Ubuntu 10.10 example):

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Smarty View
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
...
resources.smarty.plugins[] = APPLICATION_PATH "/../library/OSS/Smarty/functions"
resources.smarty.plugins[] = "/usr/share/php/smarty/plugins"
resources.smarty.plugins[] = "/usr/share/php/smarty/sysplugins"

Configure the System

Now copy some configuration files and edit as appropriate:

cp application/configs/application.ini.dist application/configs/application.ini
cp application/configs/devices.ini.dist application/configs/devices.ini

Filesystem Permissions

The web server user will need write access to var/. On Debian / Ubuntu this is www-data but change as appropriate for your system:

chown -R www-data: var/

Set Up Apache

You need to tell Apache where to find NOCtools and what URL it should be served under. In this example, we're going to serve it from /NOCtools (e.g. www.example.com/NOCtools). As such, we create an Apache configuration block as follows on our web server:

Alias /NOCtools /usr/local/NOCtools/public

<Directory /usr/local/NOCtools/public>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    allow from all

    SetEnv APPLICATION_ENV production

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ /NOCtools/index.php [NC,L]
</Directory>

You may need to edit the above if you're using a different URL or file system path. Reload Apache and you can now browse to your new installation.

There is also a .htacceess.dist file in public/ which can be used instead of some of the above.

Clone this wiki locally