RUEI 13.1.1版本在OEL 5.7上的安装

准备工作

  • ntp的工作和同步
/sbin/chkconfig --list | grep ntpd
ntpd     0:off   1:off   2:off   3:off   4:off   5:off   6:off
/sbin/chkconfig ntpd on
/sbin/chkconfig --list | grep ntpd
ntpd     0:off   1:off   2:on    3:on    4:on    5:on    6:off
/etc/init.d/ntpd start
Starting ntpd:                                     [  OK  ]

ntpq -pn
       remote           refid      st t when poll reach   delay   offset  jitter
  ==============================================================================
  *194.171.167.130     .PPS.         1 u 994 1024 377     6.429   0.041   0.093
  +80.85.129.25        130.235.20.3  3 u 725 1024 377     4.435   0.673   0.129
  +82.94.235.106       135.81.191.59 2 u 678 1024 377     1.709   1.774   0.020
   127.127.1.0         .LOCL.       10 l   8   64 377     0.000   0.000   0.001


 

  • 软件包安装

 安装数据库需要安装的包

yum --disablerepo=* --enablerepo=cdrom -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh numactl-devel glibc-headers

 

rpm -Uhv httpd-2.2.15-*..x86_64.rpm \
libpcap-0.9*.x86_64.rpm \
apr-1.2.7-11.*.x86_64.rpm \
apr-util-1.2.7-*.x86_64.rpm \
php-5.1.6-*.x86_64.rpm \
mod_ssl-2.2.3-*.el5.x86_64.rpm \
distcache-1.4.5-*.x86_64.rpm \
php-common-5.1.6-*.x86_64.rpm \
php-cli-5.1.6-*.x86_64.rpm \
php-mbstring-5.1.6-*.x86_64.rpm \
php-soap-5.1.6-*.x86_64.rpm \
php-ldap-5.1.6-*.x86_64.rpm \
gmp-4.1.4-*.el5.x86_64.rpm \
postgresql-libs-8.1.11-*.el5_1.1.x86_64.rpm \
lm_sensors-2.10.7-*.el5.x86_64.rpm \
net-snmp-5.3.2.2-*.el5.x86_64.rpm \
net-snmp-utils-5.3.2.2-*.el5.x86_64.rpm \
perl-XML-Twig-3.26-*.fc6.noarch.rpm \
perl-XML-Parser-2.34-*.x86_64.rpm \
bridge-utils-1.1-*.x86_64.rpm

rpm -Uhv fonts-*

 

在CentOS 6.5(EL 6)环境中,通过yum安装软件包(cdrom)如下:

yum --disablerepo=* --enablerepo=cdrom -y install perl-URI
yum --disablerepo=* --enablerepo=cdrom -y install perl-XML-Twig
yum --disablerepo=* --enablerepo=cdrom -y install net-snmp-utils
yum --disablerepo=* --enablerepo=cdrom -y install sendmail-cf
yum --disablerepo=* --enablerepo=cdrom -y install httpd
yum --disablerepo=* --enablerepo=cdrom -y install mod_ssl
yum --disablerepo=* --enablerepo=cdrom -y install php
yum --disablerepo=* --enablerepo=cdrom -y install php-ldap
yum --disablerepo=* --enablerepo=cdrom -y install php-soap
yum --disablerepo=* --enablerepo=cdrom -y install librsvg2
yum --disablerepo=* --enablerepo=cdrom -y install xorg-x11-xinit
yum --disablerepo=* --enablerepo=cdrom -y install rsync
yum --disablerepo=* --enablerepo=cdrom -y install ksh

yum --disablerepo=* --enablerepo=cdrom -y install wget
yum --disablerepo=* --enablerepo=cdrom -y install bc
yum --disablerepo=* --enablerepo=cdrom -y install bind-utils
yum --disablerepo=* --enablerepo=cdrom -y install hdparm
yum --disablerepo=* --enablerepo=cdrom -y install libpcap
yum --disablerepo=* --enablerepo=cdrom -y install bridge-utils
yum --disablerepo=* --enablerepo=cdrom -y install ncurses
yum --disablerepo=* --enablerepo=cdrom -y install zlib
yum --disablerepo=* --enablerepo=cdrom -y install php-process

yum --disablerepo=* --enablerepo=cdrom -y install *-fonts

yum --disablerepo=* --enablerepo=cdrom -y install php-mbstring

 

同时需要

ln -s /usr/lib64/libpcap.so.1.4.0  /usr/lib64/libpcap.so.0.9.4

 

 

解压到/root目录

cd /root
unzip package_name.zip

 

  • 建立用户以及修改环境

 

/usr/sbin/groupadd moniforce
/usr/sbin/useradd moniforce -g moniforce -d /var/opt/ruei
chmod -R 750 /var/opt/ruei
chown -R moniforce:moniforce /var/opt/ruei

cp /root/RUEI/extra/ruei.conf /etc/
chmod 644 /etc/ruei.conf
chown moniforce:moniforce /etc/ruei.conf

ruei.conf文件是这样的

export RUEI_HOME=/opt/ruei
export RUEI_DATA=/var/opt/ruei

export RUEI_USER=moniforce
export RUEI_GROUP=moniforce
export RUEI_DB_INST=ux
export RUEI_DB_TSCONF=UXCONF
export RUEI_DB_TSSTAT=UXSTAT
export RUEI_DB_USER=UXINSIGHT
export RUEI_DB_TNSNAME=uxinsight
export RUEI_DB_TNSNAME_CFG=$RUEI_DB_TNSNAME

# RUEI Enriched Data Exchange setting
#

export RUEI_DB_TNSNAME_BI=uxinsight

 

安装及ln java

cd /usr/java
tar xzf /root/RUEI/Java/jre-8u66-linux-x64.tar.gz

ln -s /usr/java/jre1.8.0_66 /usr/java/jre

 

安装reporter

 

/sbin/chkconfig httpd on

mkdir -p /var/www/.gnome2

在/etc/sysconfig/httpd文件加入

source /etc/ruei.conf

生成/etc/php.d/ruei.ini文件,加入

session.gc_maxlifetime = 14400
memory_limit = 192M
upload_max_filesize = 128M
post_max_size = 128M

  • 安装oracle 数据库Instant Client
cd /root/RUEI/IC
rpm -Uhv oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
rpm -Uhv oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm

 

 

  • 安装php-oci8模块
cd /root/RUEI/PHP/OL5
rpm -Uhv php-oci8-11gR2-5.1.6-27.el5_7.4.x86_64.rpm

 

  • Zend Optimizer安装

 针对内核版本5.x

 

cd /root/RUEI/ZendOptimizer
tar zxvf ZendOptimizer-3.3.3-linux-glibc23-x86_64.tar.gz
cd ZendOptimizer-3.3.3-linux-glibc23-x86_64
./install

 将/etc/php.ini中下段文字移入/etc/php.d/ruei.ini

 

[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3

zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

针对内核版本6.x 

在内核版本6.x的CentOS 6.5中,需要安装Zend Guard Loader

cd /root/RUEI/ZendGuardLoader
tar xvf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
cp ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x/ZendGuardLoader.so \
/usr/lib64/php/modules/
chown root.root /usr/lib64/php/modules/ZendGuardLoader.so
chmod 755 /usr/lib64/php/modules/ZendGuardLoader.so

 

然后把下面这段加入/etc/php.d/ruei.ini文件中

zend_extension=/usr/lib64/php/modules/ZendGuardLoader.so
zend_loader.enable=1

zend.enable_gc = Off

 

  • 安装report数据库

ruei-prepare-db.sh,ruei-check.sh,sql_scripts和db_templates目录拷贝到/home/oracle(/root/RUEI/131).

 

    • 数据库至少需要7.5G以上空间,建议用虚拟机的话直接给40G以上,否则就退出了
    • create前先需要启动lsnrctl start

 

chmod +x ruei-prepare-db.sh ruei-check.sh
chmod -R +r /home/oracle/sql_scripts/
chmod -R +r /home/oracle/db_templates/

login as oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 ./ruei-prepare-db.sh create

 

      创建完数据库后脚本需要你指定一个tablespace name,用他提示的UXINSIGHT就可以继续了,此处文荡没描述清楚,我折腾了n多个RUEI版本,悲剧啊!

 

 数据库创建成功后清除垃圾

 

mkdir -p /home/oracle/bin
cp /root/RUEI/extra/ruei-clean.sh /home/oracle/bin
chmod +x /home/oracle/bin/ruei-clean.sh
su - oracle -c 'echo "10 0 * * * /home/oracle/bin/ruei-clean.sh" | crontab'

 

 

  • 安装reporter软件

 

mkdir -p /opt/ruei
chmod 755 /opt/ruei

/usr/sbin/usermod -aG moniforce apache
/usr/sbin/usermod -aG uucp apache
/usr/sbin/usermod -aG uucp moniforce

cd /root/RUEI/131
chmod +x ruei-install.sh

./ruei-install.sh reporter

 

restart httpd

 

/sbin/service httpd restart

 

用root用户将下列文字添加入bash_profile(RUEI_DATA/.bash_profile):

 

source /etc/ruei.conf
source $RUEI_HOME/bin/env.sh


./ruei-check.sh postinstall


su - moniforce
set-admin-password


 

 

登录界面

 

http://localhost/ruei

 

官方安装文档

https://docs.oracle.com/cd/E63000_01/SRUNI/rueiinstalling.htm#BCGHFAHC

 

安装完httpd的包后需要在/etc/httpd/conf下修改httpd.conf文件,加入启动端口和ServerName,文档又说得不明不白,再次消耗一大堆时间!

 

网络抓报文

 

网卡配置

登陆RUEI主机,查看网卡配置文件,确保镜像端口的配置文件中:


BootProto=none
OnBoot=yes

 

使用ifup,ifdown来enable和disable网卡
如果镜像使用到多块网卡,需要逐一操作

 

通过命令

tcpdump -i eth1 -nn -s0 -A >> packer.txt

 

正常报文

.^M&...P..X.r.<(P.......POST /ruei/rpc.php HTTP/1.1^M
Host: 10.8.13.38^M
Connection: keep-alive^M
Content-Length: 314^M
Origin: http://10.8.13.38^M
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36^M
Content-Type: application/x-www-form-urlencoded^M
Accept: */*^M
Referer: http://10.8.13.38/ruei/main.php?frmWindow=wnd_stats_collector&frmProfileID=2&frmCollectorID=1^M
Accept-Encoding: gzip, deflate^M
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4^M
Cookie: PHPSESSID=sukk5ulc4sq6nogj9fl3kihl55^M
^M
frmHandler=rpc_appliance&frmAction=updateCollectorStats&WI_FORM_TOKEN=303ef7deb0924f64c7de61cf6dbb5cc8&frmID=1&frmViewSec=26&frmViewState=eJxLtDK2qi62MrdSKi1OLYrPTFGyLrYytFIyBNOmVkrFJUWOySWZZakBqUWZ-UDpJCsDkJSxlVJ-UhZEKiwztRwiUQsA6z8ZPw~1Cf01N2FFjhZm3tK2j58hJ-Zzp3UCJDhr_83Owp_51M&frmViewStateValues=strCurView%3DG
11:06:22.289743 IP 10.8.13.38.80 > 10.8.13.253.3586: Flags [.], ack 857, win 16264, length 0
....E..(.i@.@.c4

 

遇到收集器时间不匹配的设置(/etc/ruei.conf)

export TZ=Asia/Shanghai
posted @ 2016-06-04 19:43  ericnie  阅读(647)  评论(0编辑  收藏  举报