Manually from the prompt

Editing configuration files

You can also setup an OP5 System by using a text editor such as vim or jed.

This manual does not cover the usage of vim or jed, there are other manuals that does that. Check out the command vimtutor for an introduction to the vim editor.

The following files needs to be edited if you configure the system by a text editor

To configure keyboard layout:

/etc/sysconfig/keyboard

To set root password run the command passwd.

monitor!root:~# passwd

To configure timezone

/etc/sysconfig/clock

The following files are used when changing the network settings:

File Usage
/etc/hosts FQDN, hostname and host aliases
/etc/resolv.conf DNS resolving
/etc/sysconfig/network Hostname, Domain, Default gateway
/etc/sysconfig/network-scripts/ifcfg-<ifname> IP Address, Netmask

Network time server

Network time server: /etc/ntp.conf

Editing this file is optional but highly recommended by OP5.

This file configures which server that the OP5 System shall use as Network Time Server. Edit the variable 'server' to change the server to synchronize against. It is possible to add several server entries to get time from several NTP servers.

If you are unsure about if you have a NTP server to synchronize against you can always use pool.ntp.org which is a large pool of, free to use, NTP servers on the Internet.

Example:

server ntp.pool.org

When you have edited the file you can issue following commands to force a time synchronization and test your configuration.

service ntpd stop
ntpdate ntp1.sth.netnod.se
service ntpd start

You can replace ntp1.sth.netnod.se in the example above with the IP address or hostname of your own NTP server.

NTP communicates over port 123/UDP, don't forget to configure your firewalls.

Set timezone

To set the correct timezone two this needs to be done.

  • Set the correct timezone for php
  • Set the correct timezone for the system

PHP

Edit the file

/etc/php.ini

Change the value

date.timezone = CET

to the timezone that corresponds with your system

System

To change the systems timezone you have to create link from the correct timezone to /etc/localtime The different timezone are located under /usr/share/zoneinfo/<COUNTRY>/<CITY>

Create a link with the ln -sf command from the city closest to your system to /etc/localtime ie:

ln -sf /usr/share/zoneinfo/Europe/Stockholm /etc/localtime

E-mail settings: /etc/postfix/main.cf

Editing this file is mandatory.

This file configures postfix which is the MTA (Mail Transfer Agent) that comes with op5 System. The MTA is used primarily to send out notification and report emails from your OP5 products.
To be able to deliver emails the following variables must be edited

myhostname, set itto the FQDN of your OP5 System

If you want the MTA to use a relay host (ie forward all emails to a specific mail server) edit following variables:

relay_host, set this to the hostname of your mail server. This variable is optional.

fallback_relay, set this to the hostname of your fallback relay, in case your primary mailserver is down. This variable is optional.

Don't forget to change relay_host if you change hostname or IP on your email server.

SMS modem: /etc/smsd.conf

Editing this file is optional.

This file configures the smsd program that sends SMS messages. This file is only needed if your system is equipped with a GSM/GPRS modem.

If you don't want to edit this file make sure to disable the PIN-code control on your SIM card.

If you want to use a PIN code you need to uncomment and edit the variable 'pin'

Example:

pin=1234

Depending on what sms gateway you have you may need to change the baudrate.

baudrate=38400

The table below describes what baudrate need for each sms gateway.

SMS Gateway Baudrate
TC35 38400
TC65 115200

To test your settings you can issue the command sendsms

monitor!root:~# sendsms
Destination: 46733123456
Text: Testing to send SMS.

If you want to see what’s happening you can issue the command

tail -f /var/log/smsd.log

This will show you the conversation between the sms program and the gsm modem.

License

To install a license the license file must fist be copied to the OP5 server and placed in the /root folder.
Run the following command to activate the license:

# cp op5license-<UUID>.lic /etc/op5license/op5license.lic

NRPE: /etc/nrpe.conf

Editing this file is optional, but highly recommended.

NRPE is the UNIX/Linux agent that OP5 products use to gather information about the OP5 System. To allow an OP5 System to communicate with NRPE the 'allowed_hosts' variable needs to be edited.

Example:

allowed_hosts=127.0.0.1,192.168.1.10

SSL certificates: /etc/httpd/mksslcrt.sh

This is a script that can be used to generate a self signed SSL certificate for the OP5 webbserver. Run the script by issuing the command

# /etc/httpd/mksslcrt.sh

If you select to encrypt the CA and SERVER keys on STEP 7 and 8 you will have to enter the pass phrase every time you start apache. OP5 recommend you not to encrypt keys.

System backup: /etc/op5-backup/main.conf

OP5 recommends that you configure backup for your system.

OP5backup is a simple but efficient backup utility for the op5 System. 

It can backup the configuration of OP5 System, OP5 Monitor, OP5 Statistics and OP5 Logserver. If you configure OP5backup it is very easy to restore a failed system. Read more on Backing up the System.

Static routes: /etc/sysconfig/network-scripts/route-<ifname>

This is optional.

Persistent routes are configured by creating a file for each interface that you wish to route traffic out from. The file should be named /etc/sysconfig/network-scripts/route-<ifname>

Example: /etc/sysconfig/network-scripts/routes-eth0

The syntax for this file is:

<network> via <gateway> dev <ifname>

Example:

172.27.76.0/24 via 192.168.1.1 dev eth0

Patch management

The OP5 System is RPM based, therefore all patches is distributed as RPM packages. Starting with OP5 System version 3.0 the yum update manager is supported and the recommended method to update your system. More information regarding yum is found at:
http://en.wikipedia.org/wiki/Yellowdog_Updater,_Modified

YUM update manager

Yum is an automatic updater and package installer/remover for rpm based Linux systems. Yum is the default method used to update a number of major rpm based distributions, including CentOS 6 and Red Hat Enterprise Linux 6. The op5 System is preconfigured to retreive all its updates via op5 repositories. To manage yum you need console access to the system or log on via SSH.
To check if there are any updates availabe for your system execute:

yum check-update

Issuing the command above might give a result looking like this:

Loading "installonlyn" plugin
Setting up repositories
Reading repository metadata in from local files

op5-system-upgrade.noarch 3.0.3-op5.1_RHEL5 op5-system-base
plugins.i386 2.2.0-op5.4_RHEL5 op5-system-addon
portal.noarch 1.4.4-op5.1_RHEL5 op5-system-addon

This means that there are three available updates. To download and install the 'plugins.i386' and 'portal.norach' packages issue:

yum update plugins portal.noarch

Yum have a built-in dependency checker that automatically fetches any other package that the chosen package(s) depend on.

To install all available updates you issue the same command but without specifying any package:

yum update

The repositories provided by OP5 is intended for OP5 customers only. You therefore need to have a valid OP5 license installed to be able to use yum.

Handling RPM packages manually

RPM is the package management software that OP5 System utilizes. A RPM package consists of all files and information necessary to install or upgrade a software.

To install an RPM package use the command

rpm ?Uvh

Example:

monitor!root~# rpm -Uvh plugins-2.0.6.op5.4.rpm
Preparing? ################################# [100%]
1:plugins ################################# [100%]
monitor!root~#