Before installing NetVizura make sure to set the time on your server correctly. Time change after the installation will invalidate the license! |
Before installing NetVizura you will have to install: Oracle Java 1.7, Apache Tomcat 6 and PostgreSQL 9.3 or higher, in that order. The installation process has been tested on CentOS 6.6. |
To install NetVizura follow these steps:
Step 1: sudo command installation: yum install sudo
Step 2: Oracle Java 1.7 package installation:
Default Java implementation is OpenJDK. You need to install Oracle Java package. Java packages should be installed before the Tomcat6 packages, if not Tomcat will use OpenJDK. |
rpm -Uvh file_name.rpm
alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_21/jre/bin/java 20000
alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.7.0_21/jre/bin/javaws 20000
alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_21/bin/javac 20000
alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0_21/bin/jar 20000
check if Java is properly installed with command java -version
Step 3: Apache Tomcat 6 package installation:
yum install tomcat6
service tomcat6 start
verify that Tomcat is running properly with the command service tomcat6 status
add Tomcat service to system startup: chkconfig tomcat6 on
Step 4: PostgreSQL package installation:
edit file /etc/yum.repos.d/CentOS-Base.repo
in section [base] add line "exclude=postgresql*"
in section [updates] add line "exclude=postgresql*"
go to http://yum.postgresql.org/ and choose appropriate PostgreSQL package in regard to your CentOS version and architecture.
CentOS 6, 64 bit example: http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-6.noarch.rpm
in the folder where the file is downloaded execute command rpm -ivh pgdg-centos93-9.3-6.noarch.rpm
execute command yum install postgresql93-server
execute command service postgresql-9.3 initdb
execute command service postgresql-9.3 start
verify that PostgreSQL is running properly with the command service postgresql-9.3 status
add PostgreSQL service to system startup: chkconfig postgresql-9.3 on
Step 5: Installing NetVizura package
yum localinstall downloaded_file_name.rpm
Step 6: Verify installation
After installation tweaking of configuration files is required in order to utilize the installed RAM to the fullest extent. The main consumers of RAM are operating system, PostgreSQL database and Tomcat. General rule for distributing memory is to split it in ratio 2:1 between PostgreSQL and Tomcat with 1 GB or more reserved for operating system.
For instance:
Installed RAM | PostgreSQL | Tomcat | OS |
---|---|---|---|
4 GB | 2 GB | 1 GB | 1 GB |
16 GB | 10 GB | 5 GB | 1 GB |
During installation NetVizura automatically allocates memory for Tomcat process. The amount allocated to Tomcat process is calculated according to the formula:
(RAMtotal - 1GB) / 3
but no less than 1GB.
For instance:
Total RAM | Tomcat |
---|---|
3 GB | 1 GB |
4 GB | 1 GB |
16 GB | 5 GB |
However, if you need to tweak Tomcat RAM allocation differently (the example for 2048MB):
/etc/tomcat6/tomcat6.conf
JAVA_OPTS
environment variable that defines memory This line looks something like the following:JAVA_OPTS="${JAVA_OPTS} -Xmx1024m -Xms1024m"
-Xmx
and -Xms
to the same amount. This should look something like:JAVA_OPTS="${JAVA_OPTS} -Xmx2048M -Xms2048M"
service tomcat6 restart
Tweaking PostgreSQL for best performance is a topic on which many books were written, but the following are some common sense suggestions. In general there are two groups of PostgreSQL tweaks that are helpful for NetVizura performance - "safe" and "unsafe" tweaks. "Safe" tweaks are those which can be applied in all cases. "Unsafe" tweaks trade reliability for performance. For the curious ones recommended reads (among countless others) are PostgreSQL Optimization Guide, PostgreSQL Tuning Guide, this article and this book.
In order to apply following tweaks edit file /var/lib/pgsql/PG_VERSION_NUMBER/data/postgresql.conf
. You will need to restart the PostgreSQL service after done editing with command: service postgresql restart
. Almost all of the following parameters are commented with carron character (#
). Although these tweaks are considered "safe" do take notice of the default values. Usually you can comment out the parameter that has been changed and PostgreSQL will revert to the default value.