Difference between revisions of "From src"

611 bytes added ,  20:18, 10 March 2014
m
small changes
m (small changes)
Line 25: Line 25:
Prepare environment:
Prepare environment:
  sudo apt-get install build-essential flex bison libssl-dev libmysqlclient-dev mysql-server
  sudo apt-get install build-essential flex bison libssl-dev libmysqlclient-dev mysql-server
Prepare database
mysql -u root -p
CREATE DATABASE netxms;
GRANT ALL ON netxms.* TO netxms@localhost IDENTIFIED BY 'password';
\q


Configure & make:
Configure & make:
cd /usr/local/src/netxms-git
./reconf
  ./configure --with-server --with-agent --with-mysql --enable-unicode
  ./configure --with-server --with-agent --with-mysql --enable-unicode
  make
  make
Line 45: Line 41:
  sudo cp contrib/nxagentd.conf-dist /etc/nxagentd.conf
  sudo cp contrib/nxagentd.conf-dist /etc/nxagentd.conf


Edit config files:
Edit server config file:


/etc/netxmsd.conf
/etc/netxmsd.conf
Line 55: Line 51:
  LogFile = /var/log/netxms
  LogFile = /var/log/netxms


/etc/nxagentd.conf
===MySQL database===
  LogFile = {syslog}
  mysql -u root -p
  Servers = localhost
  CREATE DATABASE netxms;
 
  GRANT ALL ON netxms.* TO netxms@localhost IDENTIFIED BY 'password';
Configure startup scripts
  \q
  cd /usr/local/src/netxms-1.2.12/contrib/startup/debian/
create initial shema
  sudo cp netxmsd /etc/init.d/
  nxdbmgr init /usr/local/share/netxms/sql/dbinit_mysql.sql
  sudo cp nxagentd /etc/init.d/
sudo chmod u+x /etc/init.d/nxagentd
sudo chmod u+x /etc/init.d/netxmsd
sudo update-rc.d nxagentd defaults
sudo update-rc.d netxmsd defaults


=Debian 7 + oracle=
=Debian 7 + oracle=
Line 73: Line 64:
  sudo apt-get install build-essential flex bison libssl-dev autoconf libtool unzip libaio-dev
  sudo apt-get install build-essential flex bison libssl-dev autoconf libtool unzip libaio-dev


===Install oracle driver libs===
===Oracle libs===
Get oracle libs from site: [http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html | oracle]
Get oracle libs from site: [http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html | oracle]
  instantclient-basic-linux.x64-11.2.0.4.0.zip
  instantclient-basic-linux.x64-11.2.0.4.0.zip
Line 96: Line 87:
Configure & compile
Configure & compile
  cd /usr/local/src/netxms-git
  cd /usr/local/src/netxms-git
  .reconf
  ./reconf
  ./configure --enable-unicode --with-agent --with-oracle=/usr/local/lib/instantclient_11_2/ --with-server --with-snmp
  ./configure --enable-unicode --with-agent --with-oracle=/usr/local/lib/instantclient_11_2/ --with-server --with-snmp
  make
  make
Line 105: Line 96:
  sudo ldconfig
  sudo ldconfig


Make startup configuration as described above (Debian 7 + Mysql)
Edit /etc/netxmsd.conf
<pre>
DBDriver = /usr/lib/netxms/dbdrv/oracle.ddr
DBServer = ServerIP/'''ServerName.DomaiNname''' #Here is service (full database name), not SID
DBName = netxms
DBLogin = netxms
DBPassword = PaSwD
</pre>


Prepare database as described: [[Oracle]]
===Oracle database===
<pre>
-- USER SQL
CREATE USER netxms IDENTIFIED BY PaSwD
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP;
-- QUOTAS
ALTER USER netxms QUOTA UNLIMITED ON USERS;
-- ROLES
GRANT RESOURCE TO netxms;
GRANT CONNECT TO netxms;
</pre>
create initial shema
nxdbmgr init /usr/local/share/netxms/sql/dbinit_oracle.sql
 
=Change agent config=
/etc/nxagentd.conf
LogFile = {syslog}
Servers = localhost
 
=Startup scripts=
Configure startup scripts
cd /usr/local/src/netxms-1.2.12/contrib/startup/debian/
sudo cp netxmsd /etc/init.d/
sudo cp nxagentd /etc/init.d/
sudo chmod u+x /etc/init.d/nxagentd
sudo chmod u+x /etc/init.d/netxmsd
sudo update-rc.d nxagentd defaults
sudo update-rc.d netxmsd defaults
38

edits