OSX Installation Guide
-
Post Edited - Following my previous version of this post, I decided to update this with a full installation guide for OSX for others to use in the future:
The following information will run through all of the steps required to install NetXMS Server and Agent on OSX 10.11.5 (El Capitan) - Assuming a clean / fresh OS install. These steps may work on different versions, but you may need to change some of the commands - please pay attention to the commands and paths before executing the steps set out here:
- Install XCode
a) Via the App Store, install XCode
b) Launch XCode and accept the agreements and allow it to complete the setup installation tasks and to accept the licence agreement
- Install OpenSSL (64bit)
sudo mkdir -p /usr/local/src sudo chown -R <user:group> /usr/local/src // (change the user:group to match your own account) cd /usr/local/src sudo curl "https://www.openssl.org/source/openssl-1.0.2h.tar.gz" -o ./openssl-1.0.2h.tar.gz tar -zxvf ./openssl-1.0.2h.tar.gz cd openssl-1.0.2h export KERNEL_BITS=64 ./config no-ssl2 no-ssl3 enable-ec_nistp_64_gcc_128 --openssldir=/usr/local/openssl sudo make depend make make test sudo make install sudo chmod 777 /usr/local/openssl/ sudo security find-certificate -a -p /Library/Keychains/System.keychain > /usr/local/openssl/cert.pem sudo security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> /usr/local/openssl/cert.pem sudo chmod 755 /usr/local/openssl/
!! Restart your terminalopenssl version -a(Check that the version matches what you have built i.e. OpenSSL 1.0.2h)
Notes -
a) Check the outputs for errors during the make, make test and make install steps
b) If you want to build for 32bit, look http://stackoverflow.com/questions/31276793/compile-error-when-using-aes-gcm-in-xcode-on-os-x:
3) Install MySQL
a) Download the dmg image from https://dev.mysql.com/downloads/mysql/
b) Run the installer
c) Setup MySql to start on boot (System Preferences)
d) Use mysqlworkbench (worth installing from https://dev.mysql.com/downloads/workbench/) to change the root password
e) Suggest that you setup the database schema and user for netxms now
Setup new schema e.g. netXMS
Setup New user e.g. netxmsuser
Setup permissions for netxmsuser on netXMS schema - Grant all
4) Setup the Environmentsudo mv /usr/local/openssl/include/openssl /usr/local/include/openssl sudo ln -s /usr/local/openssl/lib/* /usr/local/lib/ sudo ln -s /usr/local/openssl/bin/openssl /usr/local/bin/openssl echo 'export LDFLAGS="-L/usr/local/lib"' >> ~/.bash_profile echo 'export CPPFLAGS="-I/usr/local/include -I/usr/local/include/openssl"' >> ~/.bash_profile source ~/.bash_profile
5) NetXMS Build
Note - I have been unable to get this build to accept encryption enabled in any form. The config summary always shows "Encryption enabled : No" even though the script has found the support for it -
checking for RSA_new in -lcrypto... yes
checking for EVP_aes_256_cbc in -lcrypto... yes
checking for EVP_bf_cbc in -lcrypto... yes
checking for EVP_idea_cbc in -lcrypto... yes
checking for EVP_des_ede3_cbc in -lcrypto... yesI have performed the installation regardless with openssl support in the hope that this can be enabled later
cd /usr/local/src sudo curl "https://www.netxms.org/download/netxms-2.0.3.tar.gz" -o ./netxms-2.0.3.tar.gz sudo tar -zxvf ./netxms-2.0.3.tar.gz cd netxms-2.0.3 sudo sh ./configure --with-server --with-agent --with-mysql --with-openssl sudo make sudo make install- NetXMS configuration
sudo cp /usr/local/src/netxms-2.0.3/contrib/netxmsd.conf-dist /etc/netxmsd.conf sudo cp /usr/local/src/netxms-2.0.3/contrib/nxagentd.conf-dist /etc/nxagentd.confEdit / add (using your editor of choice) to each file
a) /etc/nxagentd.confMasterServers = 127.0.0.1, <your server IP address>
b) /etc/netxmsd.conf# # Configuration file for netXMS Server # DBDriver = mysql.ddr DBServer = localhost DBName = netXMS DBLogin = <username> DBPassword = <password> LogFailedSQLQueries = yes LogFile = /var/log/netxms-server.log
c) /Library/LaunchDaemons/org.netxms.nxagent.plist<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>org.netxms.nxagent</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/nxagentd</string> <string>-d</string> </array> <key>RunAtLoad</key> <true/> <key>StandardErrorPath</key> <string>/tmp/org.netxms.nxagent.stderr</string> <key>StandardOutPath</key> <string>/tmp/org.netxms.nxagent.stdout</string> </dict> </plist>d) /Library/LaunchDaemons/org.netxms.server.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>org.netxms.server</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/netxmsd</string> <string>-d</string> </array> <key>RunAtLoad</key> <true/> <key>StandardErrorPath</key> <string>/tmp/org.netxms.server.stderr</string> <key>StandardOutPath</key> <string>/tmp/org.netxms.server.stdout</string> </dict> </plist>
7) Initialisationsudo /usr/local/bin/nxdbmgr init /usr/local/share/netxms/sql/dbinit_mysql.sql netxmsdcheck it runs ok then
down sudo launchctl load -w /Library/LaunchDaemons/org.netxms.server.plist sudo launchctl load -w /Library/LaunchDaemons/org.netxms.nxagent.plist
Should be up and running! - Install XCode
-
Hi,
it's quite strange that configure turns encryption off. Could you please post full config.log here?
Best regards,
Victor -
-
Hi,
from the log it seems that encryption is on. What do you get when running netxmsd -v?
Best regards,
Victor -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login