Steps to Install NetXMS on CentOS 6.4 with web frontend

Started by curruscanis, June 18, 2015, 06:01:09 PM

Previous topic - Next topic

curruscanis

Here is my steps to install NetXMS 2 beta on a installation of CentOS 6.4 ( 64 bit )

I hope this helps anyone out there that is having a hard time. I attached the steps and put them inline here - they may be easier to read in the attachment:




Intall NetXMS on CentOS 6.4 with web frontend
These install instructions go through the steps of installing the NetXMS 2 beta with web frontend.
Install CentOS 6.4 minimal
Set IP and IP info
Yum install sshd
Chkconfig iptables off
Service iptables stop
Connect with SSH:
Install updates and prerequisites:
Yum update
yum groupinstall 'Development Tools'
yum install wget
yum install mysql
yum install mysql-server
yum install openssl-devel
yum install mysql-devel
Install NETXMS:
wget https://www.netxms.org/download/netxms-2.0-M4.tar.gz
tar zxvf netxms*
cd netxms*
sh ./configure --with-server --with-mysql --with-agent
make
make install
Copy sample config files:
   cp contrib/netxmsd.conf-dist /etc/netxmsd.conf
   cp contrib/nxagentd.conf-dist /etc/nxagentd.conf
Configure MySQL:
Chkconfig mysqld on
Mysql – u root –p password
CREATE USER 'netxms'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE netxms;
GRANT ALL ON netxms.* TO netxms IDENTIFIED BY 'password';
\q
Edit Netxmsd config file:
nano /etc/netxmsd.conf
DBDriver = /usr/local/lib/libnxddr_mysql.so
DBServer = localhost
DBName = netxms
DBLogin = netxms
DBPassword = password
LogFile = /var/log/netxmsd
LogFailedSQLQueries = yes
Edit NXAgentd config file
nano /etc/nxagentd.conf
   MasterServers = 127.0.0.1, your_server_IP_address
Nano /etc/ld.so.conf
   ADD LINE:   include /usr/local/lib
Ldconfig
Create NetXMS database:
/usr/local/bin/nxdbmgr init /usr/local/share/netxms/sql/dbinit_mysql.sql
Cause NEtXMS to Start NetXMS daemon on Boot:
cp contrib/startup/redhat/netxmsd /etc/init.d
chmod +x /etc/init.d/netxmsd
cp contrib/startup/redhat/nxagentd /etc/init.d
chmod +x /etc/init.d/nxagentd
chkconfig --add nxagentd
chkconfig --add netxmsd
Start services:
service netxmsd start
service nxagentd start
Install Java 8 – 64 bit
cd /opt/
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz"
tar xzf jdk-8u45-linux-x64.tar.gz
cd jdk*
alternatives --install /usr/bin/java java /opt/jdk1.8.0_45/bin/java 2
alternatives --config java
   There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*  1           /opt/jdk1.7.0_71/bin/java
+ 2           /opt/jdk1.8.0_25/bin/java
   3           /opt/jdk1.8.0_45/bin/java

Enter to keep the current selection
  • , or type selection number: 3
    Install Tomcat7
    https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.62/bin/apache-tomcat-7.0.62.tar.gz
    tar xzf apache-tomcat-7.0.62.tar.gz
    mv apache-tomcat-7.0.62 /usr/local/tomcat7
    Create tomcat startup script in /etc/init.d
       #!/bin/bash
    # description: Tomcat Start Stop Restart
    # processname: tomcat
    # chkconfig: 234 20 80
    JAVA_HOME=/opt/jdk1.8.0_45
    export JAVA_HOME
    PATH=$JAVA_HOME/bin:$PATH
    export PATH
    CATALINA_HOME=/usr/local/tomcat7


    case $1 in
    start)
    sh $CATALINA_HOME/bin/startup.sh
    ;;
    stop)
    sh $CATALINA_HOME/bin/shutdown.sh
    ;;
    restart)
    sh $CATALINA_HOME/bin/shutdown.sh
    sh $CATALINA_HOME/bin/startup.sh
    ;;
    esac
    exit 0
    Make script execuitable:  chmod 755 tomcat
    Chkconfig –add tomcat
    Install NetXMS Web Frontend:
    wget https://www.netxms.org/download/webui/nxmc-2.0-M4.war
    cp nxmc-2.0-M4.war nxmc.war
    cp nxmc.war /usr/local/tomcat7/webapps
    service tomcat start










lweidig

Might want to consider editing your post and removing passwords!  Also centos7 user why not delete your repost.

Alex Kirhenshtein

I removed sensitive information from topic. Thank you for report.

new centos7 user

#3
Hello,

I have a question as I am new to centos 7 and netxms and following you steps.

The /etc/init.d file what is file location?
I used nano /etc/init.d but will not save.
Where do I place the file or what directory do I open to edit?

So were is the tomcat file placed in the root directory?

Create tomcat startup script in /etc/init.d
   #!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/opt/jdk1.8.0_45
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/usr/local/tomcat7


case $1 in
start)
sh $CATALINA_HOME/bin/startup.sh
;;
stop)
sh $CATALINA_HOME/bin/shutdown.sh
;;
restart)
sh $CATALINA_HOME/bin/shutdown.sh
sh $CATALINA_HOME/bin/startup.sh
;;
esac
exit 0
Make script execuitable:  chmod 755 tomcat
Chkconfig –add tomcat

Install NetXMS Web Frontend:
wget https://www.netxms.org/download/webui/nxmc-2.0-M4.war
cp nxmc-2.0-M4.war nxmc.war
cp nxmc.war /usr/local/tomcat7/webapps
service tomcat start

Thanks for your help