2014-01-11
參考
http://www.opennms.org/wiki/Installation:Yum#Select_Your_Release_and_Distribution
快速安裝程式 opennms_centos6.5x64.sh 內容如下
echo -e "\033[31m"
echo -e "Program : opennms_centos6.5x64.sh "
echo -e "OpenNMS 1.12.3 Install Shell Script (CentOS 6.5, x86_64) "
echo -e "by Shau-Rong Lu 2014/01/11 "
echo -e "\033[0m"
rpm -Uvh http://yum.opennms.org/repofiles/opennms-repo-stable-rhel6.noarch.rpm
yum -y install postgresql postgresql-server
service postgresql initdb
service postgresql start
chkconfig postgresql on
cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.old
sed -i -e "s@ident@trust@" /var/lib/pgsql/data/pg_hba.conf
#echo "host all all 0.0.0.0/0 trust" >> /var/lib/pgsql/data/pg_hba.conf
tail -n 10 /var/lib/pgsql/data/pg_hba.conf
service postgresql restart
#移除 #listen_addresses = 'localhost' 的註解
sed -i -e "s@#listen_addresses = 'localhost'@listen_addresses = 'localhost'@" /var/lib/pgsql/data/postgresql.conf
service postgresql restart
# 安裝設定 Oracle/Sun JDK
if [ ! -s jdk-7u45-linux-x64.rpm ]; then
echo "Can not find /usr/local/jdk-7u45-linux-x64.rpm"
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-x64.rpm" -O jdk-7u45-linux-x64.rpm
#exit
fi
rpm -ivh jdk-7u45-linux-x64.rpm
alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_45/bin/java 100
alternatives --set java /usr/java/jdk1.7.0_45/bin/java
echo
echo 'export JAVA_HOME=/usr/java/jdk1.7.0_45' >> /etc/profile
echo 'export PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile
echo 'export CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar' >> /etc/profile
source /etc/profile
java -version
export | grep jdk
# 安裝 OpenNMS
yum -y install opennms
export OPENNMS_HOME=/opt/opennms
echo 'export PATH=$PATH:$OPENNMS_HOME/bin' >> /etc/profile
# 設定 OpenNMS 使用的 JAVA
/opt/opennms/bin/runjava -S /usr/java/latest/bin/java
#$OPENNMS_HOME/bin/runjava -S /usr/java/jdk1.7.0_45/bin/java
#check
$OPENNMS_HOME/bin/runjava -s
# 立刻關閉 SELinux
/usr/sbin/setenforce 0
# 設定 reboot 後也關閉 SELinux
sed -i -e "s@SELINUX=enforcing@#SELINUX=enforcing@" /etc/selinux/config
sed -i -e "s@SELINUX=permissive@#SELINUX=permissive@" /etc/selinux/config
sed -i -e "/SELINUX=/aSELINUX=disabled" /etc/selinux/config
# 關閉防火牆
service iptables stop
chkconfig iptables off
建立 OpenNMS 需要的資料庫
$OPENNMS_HOME/bin/install -dis
chkconfig httpd on
service httpd restart
chkconfig opennms on
service opennms start
firefox http://localhost:8980/opennms/ &
帳號密碼都是 admin
[root@localhost ~]# yum list | grep opennms
jicmp.x86_64 1.4.1-1 @opennms-stable-rhel6
jicmp6.x86_64 1.2.1-1 @opennms-stable-rhel6
opennms.noarch 1.12.3-1 @opennms-stable-common
opennms-core.noarch 1.12.3-1 @opennms-stable-common
opennms-repo-stable.noarch 1.0-18 installed
opennms-webapp-jetty.noarch 1.12.3-1 @opennms-stable-common
iplike.i386 2.0.2-1.el6 opennms-stable-rhel6
iplike.x86_64 2.0.2-1.el6 opennms-stable-rhel6
jdk.noarch 2000:1.6.0.0-1onms opennms-stable-rhel6
jdk.i586 2000:1.6.0_24-fcs opennms-stable-common
jicmp.i386 1.4.1-1 opennms-stable-rhel6
jicmp6.i386 1.2.1-1 opennms-stable-rhel6
jrrd.i386 1.0.5-1 opennms-stable-rhel6
jrrd.x86_64 1.0.5-1 opennms-stable-rhel6
mib2events.noarch 1.0.1-1 opennms-stable-common
mib2opennms.i386 0.3.2-1 opennms-stable-rhel6
mib2opennms.x86_64 0.3.2-1 opennms-stable-rhel6
opennms-docs.noarch 1.12.3-1 opennms-stable-common
opennms-jmx-config-generator.noarch 1.12.3-1 opennms-stable-common
opennms-ncs.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-collector-juniper-tca.noarch
1.12.3-1 opennms-stable-common
opennms-plugin-protocol-cifs.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-protocol-dhcp.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-protocol-nsclient.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-protocol-radius.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-protocol-xml.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-protocol-xmp.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-provisioning-dns.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-provisioning-link.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-provisioning-map.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-provisioning-rancid.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-provisioning-snmp-asset.noarch
1.12.3-1 opennms-stable-common
opennms-plugin-ticketer-centric.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-ticketer-jira.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-ticketer-otrs.noarch 1.12.3-1 opennms-stable-common
opennms-plugin-ticketer-rt.noarch 1.12.3-1 opennms-stable-common
opennms-plugins.noarch 1.12.3-1 opennms-stable-common
opennms-remote-poller.noarch 1.12.3-1 opennms-stable-common
opennms-repo-obsolete.noarch 1.0-18 opennms-stable-rhel6
opennms-repo-testing.noarch 1.0-18 opennms-stable-rhel6
opennms-repo-unstable.noarch 1.0-18 opennms-stable-rhel6
perl-OpenNMS-Release.noarch 2.9.10-1 opennms-stable-common
[root@localhost ~]#
[研究] OpenNMS 1.12.3 快速安裝程式 (yum)(CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/01/opennms-1123-yumcentos-65-x64.html
[研究] OpenNMS 1.6.10 網路管理工具 安裝 (yum)(CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=18009
[研究] OpenNMS 1.6.10 網路管理工具 安裝 (yum)(CentOS 5.4 x86_64)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=18037
[研究] OpenNMS 1.8.12 安裝 (yum)(CentOS 6.0 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20267
沒有留言:
張貼留言