SAP BI 4.2笔记(基于linux)

SAP BI安装过程中会创建两个标准数据库:
BO_AUDIT、BO_CMS.
BO_AUDIT数据库是记录用户操作日志的库;
BO_CMS数据库是记录报表用户、服务器配置、文档信息的库,这个库是最重要的库;
The Central Management Server (CMS) collects audit information from the other BI platform servers and writes the details to the Auditing Data Store (ADS), known as the Auditing database. This information lets System Administrators manage their BI platform environment, and content usage, through reporting and analysis of ADS data.
The CMS system database is used to store BI platform information, such as user, server, folder, document, configuration, and authentication details. It is maintained by the Central Management Server (CMS), and in other documentation may be referred to as the system database or repository.
The databases that are used to store reporting data are referred to as reporting databases.
根据需要,我们还可以专门建立一个Reporting Database,用于存放比如人工导入的数据、其他地方抽过来的数据等。


SAP BI4.2自带的数据库是Sybase,在SqlAnywhere(sybase)下面是创建BO_AUDIT、BO_CMS,可能名字是BI4_Audit和BI4_CMS


默认安装完的时候BI4_Audit和BI4_CMS的容量都非常小:
BI4_Audit大约有6M,BI4_CMS大约有30M。
BI4_Audit可以在后台设置自动清理的时间,例如100天;
BI4_CMS主要用来记录一些用户权限、报表信息(属性、设置啥的),一般增长也不会太大。
因为BI报表的数据应该存放在BW数据仓库中,而不是BO的数据库!


BO标准数据库的迁移大概三小时内就能做完,其他数据库可以慢慢迁移。
一般来说,BI4_Audit大约有有2GB左右,BI4_CMS大约100M以内。
迁移的时候注意编码,MySQL端应该是utf8或者utf8mb4,防止后面打开BOE后乱码。


兼容的操作系统:RHEL6.8,SLES12兼容的数据库:

http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-5.6.34-1.el6.x86_64.rpm-bundle.tar


安装完BI,整体大约占用40GB硬盘(4GB的boot分区,‘10GB’的SWAP分区,15GB的BI数据,4GB的临时文件,其他为操作系统和常用应用)。
核心一点就是根分区和BI分区一定要预留够,否则后面很麻烦。


重要的路径:
/BIROOT/modifyOrRemoveProducts.sh   作用:卸载、更新、更改BI程序(组件)的安装。
/home/biconst/sqlanywhere   作用:数据库根目录(如果你的数据库不在此,那就在你定义的目录)
/home/biconst/sqlanywhere/database   作用:数据库数据,安装完约400MB
/home/biconst/sap_bobj   作用:BI核心程序的安装目录,安装完约15GB
/home/biconst/sap_bobj/enterprise_xi40   作用:BI核心应用中的核心,大约10GB
/home/biconst/sap_bobj/tomcat  作用:web容器根目录
/home/biconst/sap_bobj/tomcat/webapps   作用:java web应用,安装完约2GB
/home/biconst/sap_bobj/tomcat/work/Catalina/localhost  作用:tomcat的临时文件夹,安装完约2GB
/home/biconst/sap_bobj/logging  作用:BI系统的日志文件,报错了来这里查日志
SQLANYWHERE_CONFIGSCRIPT=/home/biconst/sqlanywhere/bin64/sa_config.sh
SQLANYWHERE_CMS_DBFILE=/home/biconst/sqlanywhere/database/BI4_CMS.db
SQLANYWHERE_AUDIT_DBFILE=/home/biconst/sqlanywhere/database/BI4_Audit.db
/home/biconst/sap_bobj/Data/PlatformSearchData  该目录不一定会有,但是如果有的话会占用非常大的空间,通常用100多GB。
4.2版的BI路径应该在这下面,和4.1有点不同。
WEB容器配置管理工具集:
注意:如果安装BI的过程中已经选择部署,则此处就不需要操作了。
/home/biconst/sap_bobj/enterprise_xi40/wdeploy

部署日志文件:
The WDeploy tool creates two log files with detailed information that may be useful for diagnosing problems or
monitoring activity.
wdeploy/logs/WDeploy_summary.log   概括性的日志
wdeploy/logs/WDeploy.log                          详细的日志
When a WDeploy command is issued, WDeploy_summary.log.01 is overwritten with the current command, and
WDeploy.log is appended.
As the WDeploy.log file grows to more than 512 KB, the file is renamed with a unique numbered suffix. For
example, WDeploy.log will be renamed to WDeploy.log.01. If a file named WDeploy.log.01 already exists,
WDeploy.log.02 will be created.

WAR文件集合:
/home/biconst/sap_bobj/enterprise_xi40/warfiles

workdir目录:
/home/biconst/sap_bobj/enterprise_xi40/wdeploy/workdir


start/stop
cd  /home/biconst/sap_bobj
./sqlanywhere_startup.sh
./sqlanywhere_shutdown.sh
./startservers
./stopservers
./tomcatstartup.sh
./tomcatshutdown.sh

访问:
http://domain/BOE/BI
http://domain/BOE/CMC


注意:由于各种原因,BI应用可能会发生内存溢出,发生时会在目录的logging下产生4GB左右的.hprof日志文件.
sap_bobj \logging\java_pid17204.hprof
这些文件会很快吞噬整块磁盘空间,导致最终没有可用空间,所以该目录需要每天监视!


配置iptables服务,将BI常用端口加入白名单

开启iptables,关闭selinux
配置iptables
以下配置的端口根据实际情况配置,注意数据库、SSH80tomcat的操作端口必须配置。
yum方式安装iptables
# yuminstall iptables-services
编辑防火墙配置文件
vi/etc/sysconfig/iptables
添加下面三句话到默认的22端口这条规则的下面
-A INPUT-p tcp -m state –state NEW -m tcp –dport 22 -j ACCEPT
-A INPUT-p tcp -m state –state NEW -m tcp –dport 80 -j ACCEPT
-A INPUT-p tcp -m state –state NEW -m tcp –dport 3306 -j ACCEPT
-A INPUT-p tcp -m state –state NEW -m tcp –dport 8080 -j ACCEPT
-A INPUT-p tcp -m state –state NEW -m tcp –dport 8443 -j ACCEPT
-A INPUT -p tcp -m state –state NEW -m tcp –dport 8005 -j ACCEPT
-A INPUT-p tcp -m state –state NEW -m tcp –dport 6400 -j ACCEPT
-A INPUT-p tcp -m state –state NEW -m tcp –dport 6410 -j ACCEPT
-A INPUT-p tcp -m state –state NEW -m tcp –dport 6405 -j ACCEPT
-A INPUT-p tcp -m state –state NEW -m tcp –dport 2638 -j ACCEPT
-A INPUT-p tcp -m state –state NEW -m tcp –dport 5801 -j ACCEPT
-A INPUT-p tcp -m state –state NEW -m tcp –dport 5901 -j ACCEPT

-AINPUT -p tcp -m state –state NEW -m tcp –dport 6001 -j ACCEPT

重启防火墙:
# /etc/init.d/iptables restart
必须要关闭系统自带的防火墙!!!(就因为这个问题,排查了一下午的错误,血与泪的教训啊,泥煤的MySQL报错不直接
简单的说,linux系统自带的SElinux是个垃圾,没法用,会导致MySQL等很多服务无缘无故启动不了,我们用iptables即可!!!
1. 永久关闭Selinux有效
  修改 /etc/selinux/config 文件中的 SELINUX=”” 为 disabled ,然后重启。
2. 即时生效(重启后无效)
  setenforce 0

校验是否安装成功
http://:/BOE/CMC
Substitute for the hostname of the web application server and for the web application
server\\\\\\’s listening port. If you are using a custom web application server root context or BOE.war web application
context, the URL will be different.
Log on as the Administrator user by typing Administrator into the User Name field and entering the
administrative password that you entered into the installation program.


安装必备的软件包:
注意:请不要自行安装JDK,BI安装过程中会自动安装,自行安装JDK会导致新的问题。
安装系统常用功能:
yum groupinstall “Compatibility libraries” “Base” “Development tools”
yum groupinstall “debugging Tools” “Dial-up Networking Support”

安装系统常用功能:
yum -y install tree nmap sysstat lrzsz dos2unix gcc* g tinyxml kernel wget net-tools psmisc screen vim links pcre pcre-devel zlib zlib-devel openssl openssl-devel cmake make zip unzip gzip bzip2* uuidd bc qt time ed perl ntp kernel-devel ntpdate libcurl libcurl-devel awk uname tar sty read which dirname id ulimit ping gcc-c glibc.i686

安装SAP BI要求的功能:
yum -y install libstdc .i686 install libstdc .x86_64 compat-libstdc -33.i686 compat-libstdc -33.x86_64 glibc.i686 glibc.x86_64 libX11.i686 libX11.x86_64 libXext.i686 libXext.x86_64 expat.i686 expat.x86_64 libgcc.i686 libgcc.x86_64 libXcursor.i686 libXcursor.x86_64 libXrender.i686 libXrender.x86_64 libXfixes.i686 libXfixes.x86_64 libxcb.i686 libxcb.x86_64 libXau.i686 libXau.x86_64 libXext-devel

然后执行一次yum更新:
yum –y update
yum –y upgrade


给RHEL6.8配置可用的yum源
注意:不要用最新版的RHEL,因为centos的更新发布比RHEL慢,如果用最新版的RHEL、则使用yum源的时候会找不到合适的版本。
操作步骤如下:
(关键点:卸载rhel自带的yum包的时候要注意忽略依赖关系、否则卸载不掉;安装yum的时候要注意全部一起安装,否则依赖关系没完没了)。

下载CENTOS6.8的yum安装包:
打开http://mirrors.163.com/centos/6.8/os/x86_64/Packages/,【CTRL F】搜索下面这些包,然后下载,然后上传到Linux。
yum
yum-metadata
yum-plugin-fastestmirror
yum-updateonboot
yum-utils

安装的时候如果提示有其他依赖再下载就是了。
然后执行下面的命令安装CENTOS的YUM工具:
rpm -qa |grep yum
rpm -qa|grep yum|xargs rpm -e –nodeps
rpm -ivh yum*

vi /etc/yum.repos.d/CentOS-Base.repo
粘贴下面的内容进去(然后wq保存,之后就能不注册redhat而使用centos的yum源了):
[base]
name=CentOS-$6.8 – Base – 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$6.8&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/6.8/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6


#released updates
[updates]
name=CentOS-$6.8 – Updates – 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$6.8&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/6.8/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6


#additional packages that may be useful
[extras]
name=CentOS-$6.8 – Extras – 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$6.8&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/6.8/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6


#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$6.8 – Plus – 163.com
baseurl=http://mirrors.163.com/centos/6.8/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

参考:
http://sanwen8.cn/p/2a3DPxF.html
http://mirrors.163.com/centos/6.8/os/x86_64/Packages/
http://blog.sina.com.cn/s/blog_4ab15f5f0102w2y5.html


分区规划:
名称
作用
大小
/swap
缓存,一般为内存的两倍
64GB
/boot
如果用的是RHEL,安装时建立此分区;如不是RHEL,不需要
4GB
/
类似于Windows的C盘(安装Linux和常用软件)
100GB
/ourdata或/opt
数据盘(数据库、我们的程序等)
剩余所有空间

rhel安装过程中的注意事项:
时区:北京/上海,
语言:勾选英语、简体中文、繁体中文。
启用网络,设置好hostname;
选择带GNOME桌面安装,勾选【开发调试】、【向下兼容】三个软件包复选框。
设置root用户密码。
创建一个用户(例如:biconst)、设置密码并勾选“设置为管理员复选框”。


一定不要忘记配置hosts文件,否则会有很多意想不到的问题:
编辑hosts文件
127.0.0.1                 sapbiprd
192.168.1.199                sapbiprd
192.168.1.199         sapbiprd.domain.com
192.168.1.100         sapbwprd
192.168.1.200         sapeccprd


安装MariaDB

使用中国电信的mariadb yum源
创建本机的repo(在/etc/yum.repos.d/下)
vim /etc/yum.repos.d/MariaDB.repo
内容如下:
[mariadb]
name = MariaDB
baseurl = http://mirrors.ctyun.cn/MariaDB/mariadb-10.1.13/yum/centos6-amd64/
gpgkey = http://mirrors.ctyun.cn/MariaDB/PublicKey
gpgcheck=1

先安装两个依赖
yum clean all
yum -y install jemalloc galera
卸载MySQL
rpm –qa|grep mysql
rpm –e mysql-libs-5.1.73-7.el6.x86_64 –nodeps
安装mariadb
yum install MariaDB-server MariaDB-client

yum 安装会自动创建mysql 用户和用户组
Yum安装会自动创建 /etc/my.cnf 以及/etc/my.cnf.d 文件架(并存放 server.conf client.conf tokudb.conf 等文件)

默认的rpm路径
basedir =/usr/bin
datadir=/var/lib/mysql
.h=/usr/include/mysql
plung=/usr/lib64/mysql
share=/usr/share/mysql

修改my.cnf文件
service mysql stop

注意:虽然是mariadb,但是mysql的命令是通用的!!

数据库文件存储在数据专用分区/ourdata
cp -rf /var/lib/mysql/*  /ourdata/sapbi/mariadb
chown -R mysql:mysql /ourdata/sapbi/mariadb
rm -rf /var/lib/mysql

修改配置文件/etc/my.cnf.d/mysql-clients.cnf,重点是[client],其他的可以参考
先用dd命令清空该文件,然后复制下面的内容到里面,参数根据需要修改!

[client]
port        = 3306
socket      = /ourdata/sapbi/mariadb/mysql.sock

修改配置文件/etc/my.cnf.d/server.cnf,这里的性能参数来自my-large.ini文件
先用dd命令清空该文件,然后复制下面的内容到里面,参数根据需要修改!

[mysqld]
port            = 3306
datadir         =/ourdata/sapbi/mariadb
socket          =/ourdata/sapbi/mariadb/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 64M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
thread_concurrency = 8
log-bin=mysql-bin
binlog_format=mixed
server-id   = 1
lower_case_table_names = 0

character-set-server = utf8

log-bin=mysql-bin
binlog_format=mixed
server-id   = 1
expire_logs_days = 10

default_storage_engine = InnoDB
innodb_data_home_dir = /ourdata/sapbi/mariadb
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /ourdata/sapbi/mariadb
innodb_buffer_pool_size = 256M
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

初始化数据
chown –R mysql:mysql /ourdata/sapbi/mariadb
mysql_install_db –defaults-file=/etc/my.cnf –datadir=/ourdata/sapbi/mariadb –user=mysql

启动服务
service mysql start

设置ROOT密码
mysqladmin -u root password “8888888”

登陆mysql
mysql -uroot -p

授权root远程登录
#root可从任何IP登陆,注意修改密码:\\\\\’888888\\\\\’
mysql>GRANT ALL PRIVILEGES ON *.* TO \\\\\’root\\\\\’@\\\\\’%\\\\\’ IDENTIFIED BY \\\\\’888888\\\\\’ WITH GRANT OPTION;

#root可从指定IP登陆,注意修改密码:\\\\\’888888\\\\\’、IP:\\\\\’192.168.1.188\\\\\’
mysql>GRANT ALL PRIVILEGES ON *.* TO \\\\\’root\\\\\’@\\\\\’192.168.1.188\\\\\’ IDENTIFIED BY \\\\\’888888\\\\\’ WITH GRANT OPTION;
mysql>FLUSH RIVILEGES

注意:mariadb安装完之后,root用户默认是没有密码的,执行mysql_secure_installation设置密码的时候直接敲回车跳过即可。

systemctl start mariadb ==> 启动mariadb
systemctl enable mariadb ==> 开机自启动
mysql_secure_installation ==> 设置 root密码等相关
mysql -uroot -p123456 ==> 测试登录!
Remove anonymous users? [Y/n] <– 是否删除匿名用户,回车
Disallow root login remotely? [Y/n] <–是否禁止root远程登录,回车,
Remove test database and access to it? [Y/n] <– 是否删除test数据库,回车
Reload privilege tables now? [Y/n] <– 是否重新加载权限表,回车
#修改root密码
SET PASSWORD FOR \\\\\’root\\\\\’@\\\\\’localhost\\\\\’ = PASSWORD(\\\\\’password1\\\\\’);
SET PASSWORD FOR \\\\\’root\\\\\’@\\\\\’127.0.0.1\\\\\’ = PASSWORD(\\\\\’password1\\\\\’);
#删除匿名用户
delete from user where user=\\\\\’\\\\\’;

设置mariadb开机启动
chkconfig mysql on
service mysql stop
reboot


Yum方式安装MySQL(如果网络不行,不要尝试,成功不了!)
# 下载mysql源安装包
shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
# 安装mysql源
shell> yum localinstall mysql57-community-release-el7-8.noarch.rpm
检查mysql源是否安装成功
shell> yum repolist enabled | grep “mysql.*-community.*”

安装MySQL
shell> yum install mysql-community-server

启动MySQL服务
shell> systemctl start mysqld

查看MySQL的启动状态
shell> systemctl status mysqld

开机

剩余70%内容付费后可查看

You may also like...

7 Responses

  1. ag说道:

    比htop更炫的top工具:
    https://github.com/MrRio/vtop

    yum install npm
    npm install -g vtop
    vtop

  2. ag说道:

    yum -y install epel-release
    yum -y install htop

  3. ag说道:

    网易centos 6最新的目录为:http://mirrors.163.com/centos/6/
    yum源设置的时候请注意.

  4. ag说道:

    SAP BI4.2需要的依赖包:
    yum install compat-libstdc++-33-3.2.3-69.el6.i686
    yum install compat-libstdc++-33.i686
    yum install compat-libstdc++-33-3.x86_x64
    yum install glibc.i686
    yum install libstdc++.i686
    yum install libX11-1.3-2.el6.i686

发表评论