RHEL6.6下部署Precise 960

目录

1. 系统环境

  1.1 主机信息

  1.2 软件信息

  1.3 主机设置

2. 安装oracle

  2.1 配置本地YUM

  2.2 安装依赖包

  2.3 创建目录和用户

  2.4 配置oracle环境变量

  2.5 安装数据库

  2.6 创建监听

  2.7 创建数据库

3. 安装Precise Server

  3.1 安装Precise Framework

  3.2 登录Precise


   现代企业依靠多层架构的应用系统
--在关键的业务运行系统中,业务的交易路径横跨客户端,网络,Web,中间件,数据库和存储。应用程序的速度缓慢是一个痛苦的长期性问题,会影响企业收入,占用人力和运作成本。

PRECISE从用户交易的角度看应用监控管理,提供一种统一全面的方法来管理现今复杂的、分布式的、松耦合的应用系统,可以管理和报告影响交易性能的每一个组件,可以直接报告最终用户的响应时间,可以快速发现最影响性能、最耗用系统资源的方法或SQL语句,识别紧急性能瓶颈,并且当应用系统性能指标不正常时,提供实际可行的建议。


1. 系统环境

1.1 主机信息

序号

操作系统

主机名

IP地址

内存

硬盘

1

RHEL 6.6

precise

192.168.230.128/24

2G

40G

注:由于测试环境资源有限,故内存和硬盘分配较小,如果资源充足,建议内存至少4G以上,硬盘越大越好。具体参考下表:

clip_image002


1.2 软件信息

序号

软件名称

软件版本

1

Precise

960

2

Oracle

11.2.0.4


1.3 主机设置

(1)、禁用防火墙

[root@precise ~]# /etc/init.d/iptables status

iptables: Firewall is not running.

[root@precise ~]# chkconfig --list iptables

iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off

(2)、禁用SELinux

[root@precise ~]# getenforce

Disabled


2. 安装oracle

Precise收集的监控信息存放在性能仓库数据库里面,如果要监控oracle或者DB2数据库,则必须安装oracle作为性能仓库,可以安装一个单实例数据库,也可以安装一个RAC数据库。为部署简单,安装一个单实例即可。


2.1 配置本地YUM

挂载操作系统安装光盘,运行下面的脚本,创建本地YUM。

[root@precise ~]# cat createlocalyum.sh

#!/bin/bash

cd /etc/yum.repos.d/

mkdir bak

mv *.repo bak/

cat << EOF > local.repo

[Local]

baseurl=file:///media/Server

gpgcheck=1

enabled=1

EOF

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*

yum clean all

yum makecache

[root@precise ~]# sh createlocalyum.sh

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Repository 'Local' is missing name in configuration, using id

Cleaning repos: Local

Cleaning up Everything

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Repository 'Local' is missing name in configuration, using id

Local | 4.1 kB 00:00 ...

Local/group_gz | 211 kB 00:00 ...

Local/filelists_db | 3.3 MB 00:00 ...

Local/primary_db | 3.1 MB 00:00 ...

Local/other_db | 1.4 MB 00:00 ...

Metadata Cache Created


2.2 安装依赖包

[root@precise ~]# yum install gcc compat-libstdc++-33 elfutils-libelf-devel gcc-c++ libaio-devel libstdc++-devel pdksh libcap.so.1 –y


2.3 创建目录和用户

运行下面的脚本,创建安装oracle所需的用户和目录。

[root@precise ~]# cat createuseranddir.sh

#!/bin/bash

groupadd oinstall

groupadd dba

useradd -g oinstall -G dba oracle

echo "123456" | passwd --stdin oracle

mkdir -p /u01/oraInventory

chown -R oracle:oinstall /u01/

chmod -R 775 /u01/

[root@precise ~]# sh createuseranddir.sh

Changing password for user oracle.

passwd: all authentication tokens updated successfully.


2.4 配置oracle环境变量

运行下面的脚本,将环境变量写入oracle用户的profile文件中。

[root@precise ~]# cat addenv.sh

#!/bin/bash

cat <<EOF>> /home/oracle/.bash_profile

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=\$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME

LD_LIBRARY_PATH=\$ORACLE_HOME/lib; export LD_LIBRARY_PATH

ORACLE_SID=pmdb; export ORACLE_SID

ORA_NLS33=\$ORACLE_HOME/nls/admin/data; export ORA_NLS33

NLS_LANG=american_america.zhs16gbk; export NLS_LANG

PATH=\$ORACLE_HOME/bin:\$PATH; export PATH

EOF

[root@precise ~]# sh addenv.sh

[root@precise ~]# su - oracle

[oracle@precise ~]$ env | grep -i oracle

USER=oracle

LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/dbhome_1/lib

ORACLE_SID=pmdb

ORACLE_BASE=/u01/app/oracle

MAIL=/var/spool/mail/oracle

PATH=/u01/app/oracle/product/11.2.0/dbhome_1/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin

PWD=/home/oracle

HOME=/home/oracle

LOGNAME=oracle

ORA_NLS33=/u01/app/oracle/product/11.2.0/dbhome_1/nls/admin/data

ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1


2.5 安装数据库

在oracle主目录下加压安装包。

[oracle@precise ~]$ unzip /mnt/hgfs/data/oracle/software/11204/p13390677_112040_Linux-x86-64_1of7.zip

[oracle@precise ~]$ unzip /mnt/hgfs/data/oracle/software/11204/p13390677_112040_Linux-x86-64_2of7.zip

在终端Windows电脑上启动Xmanager Passive后,再设置DISPLAY环境变量为Windows电脑的地址,就可以将Linux上的图像映射到Windows上了。

[oracle@precise ~]$ export DISPLAY=192.168.230.1:0.0

[oracle@precise ~]$ cd database/

[oracle@precise database]$ ./runInstaller

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB. Actual 28445 MB Passed

Checking swap space: must be greater than 150 MB. Actual 3999 MB Passed

Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-07-24_04-10-31PM. Please wait ...

选择不接受安全更新。

clip_image004

选择跳过软件更新。

clip_image006

仅安装数据库软件。

clip_image008

选择单实例安装。

clip_image010

clip_image012

选择企业版。

clip_image014

选择默认的安装路径。

clip_image016

选择默认的清单目录。

clip_image018

选择管理组和操作组。

clip_image020

安装检查提示一些参数不满足要求,点解“Fix&Check Again”进行修复。

clip_image022

以root身份运行系统创建的修复脚本。

[root@precise ~]# /tmp/CVU_11.2.0.4.0_oracle/runfixup.sh

Response file being used is :/tmp/CVU_11.2.0.4.0_oracle/fixup.response

Enable file being used is :/tmp/CVU_11.2.0.4.0_oracle/fixup.enable

Log file location: /tmp/CVU_11.2.0.4.0_oracle/orarun.log

Setting Kernel Parameters...

The value for shmmni in response file is not greater than value of shmmni for current session. Hence not changing it.

The value for semmsl in response file is not greater than value of semmsl for current session. Hence not changing it.

The value for semmns in response file is not greater than value of semmns for current session. Hence not changing it.

The value for semmni in response file is not greater than value of semmni for current session. Hence not changing it.

kernel.sem = 250 32000 100 128

fs.file-max = 6815744

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.wmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_max = 1048576

fs.aio-max-nr = 1048576

uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)

clip_image024

忽略pdksh的安装。

clip_image026

开始安装。

clip_image028

以root身份运行配置脚本。

clip_image030

[root@precise ~]# /u01/app/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

[root@precise ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Copying dbhome to /usr/local/bin ...

Copying oraenv to /usr/local/bin ...

Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

clip_image032


2.6 创建监听

[oracle@precise ~]$ netmgr

clip_image034

clip_image036

clip_image038

clip_image040

clip_image042

clip_image044

clip_image046

[oracle@precise ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-JUL-2015 16:54:41

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production

System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Log messages written to /u01/app/oracle/diag/tnslsnr/precise/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.230.128)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.230.128)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production

Start Date 24-JUL-2015 16:54:42

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File /u01/app/oracle/diag/tnslsnr/precise/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.230.128)(PORT=1521)))

Services Summary...

Service "pmdb" has 1 instance(s).

Instance "pmdb", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully


2.7 创建数据库

[oracle@precise ~]$ dbca

clip_image048

clip_image050

clip_image052

clip_image054

clip_image056

clip_image058

clip_image060

clip_image062

clip_image064

clip_image066

clip_image068

clip_image070

clip_image072

clip_image074

clip_image076


3. 安装Precise Server

3.1 安装Precise Framework

在服务器端创建Precise用户。

[root@precise ~]# useradd precise

[root@precise ~]# echo '123456' | passwd --stdin precise

Changing password for user precise.

passwd: all authentication tokens updated successfully.

需要安装ksh。

[root@precise ~]# yum install ksh

然后在终端电脑上启动安装程序。

clip_image078

接受许可协议。

clip_image080

指定服务器地址和服务器类型。

clip_image082

此处选择自动安装一般会失败,直接选择手动安装。

clip_image084clip_image086

输入数据库相关信息。

clip_image088

为数据库用户指定密码,为数据文件指定目录。如果该目录不存在,需要使用oracle用户进行创建。

[oracle@precise ~]$ mkdir /u01/app/oracle/oradata/pmdb

clip_image090

clip_image092

具体安装信息如下:

Server Name or IP Address: 192.168.230.128
Server Type: UNIX
Precise Listener Port: 20702
Precise GUI Port: 20790
Precise GUI Shutdown Port: 20798
Oracle Database Server: 192.168.230.128
Oracle SID: pmdb
Oracle Listener Port: 1521
Manual Schema Enabled: False
User Name: PRECISE_PMDB
Oracle user to own the PMDB schema: PRECISE_PMDB
Temporary tablespace name: PRECISE_PMDB_TMP
Stored in datafile: PRECISE_PMDB_TMP.dbf
Store datafiles in this directory: /u01/app/oracle/oradata/pmdb
Create the tablespaces as bigfiles: True
Tablespaces Definition:

Tablespace Name

Initial Size (MB)

Extent Size (MB)

Uniform Size (KB)

PRECISE_PMDB_TAB_LARGE

64

512

2048

PRECISE_PMDB_TAB_MEDIUM

64

512

512

PRECISE_PMDB_TAB_SMALL

64

512

80

PRECISE_PMDB_TAB_STS

32

1024

256

PRECISE_PMDB_IND_LARGE

64

512

1024

PRECISE_PMDB_IND_MEDIUM

64

512

256

PRECISE_PMDB_IND_SMALL

64

512

80

PRECISE_PMDB_TAB_INFRA

64

512

80

clip_image094

根据步骤先生成安装文件和配置文件到本地,然后在上传到服务器的Precise用户主目录下,再运行安装文件。

[precise@precise ~]$ cp /mnt/hgfs/data/precise/psin_ba_Linux .

[precise@precise ~]$ cp /mnt/hgfs/data/precise/setup.xml .

[precise@precise ~]$ ls

psin_ba_Linux setup.xml

[precise@precise ~]$ ./psin_ba_Linux

Listener installation completed

3515695 1

clip_image096

clip_image098

提示是否要使用开机自动启动和关机自动停止,暂不设置。

Server: 192.168.230.128 Status: WAIT Can be run: No

Automatically Start Precise Agents on the 192.168.230.128 Server

Precise agents can be automatically started by the UNIX server startup script. This action item is optional and you can click Mark as Done in AdminPoint also if you don't want to automatically handle the Precise agents upon server startup/shutdown.

To automatically start the Precise agents upon server startup, add the following command to the server startup process:

/home/precise/infra/bin/psin_infra -handle-agents start

To automatically stop the Precise agents upon server shutdown, add the following command to the server shutdown process:

/home/precise/infra/bin/psin_infra -handle-agents stop

clip_image100

clip_image102


3.2 登录Precise

打开IE浏览器,输入http://192.168.230.128:20790/admin,进入到登录页面。输入用户名和口令:admin/admin(缺省用户名/口令)

clip_image104

clip_image106

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28536251/viewspace-1750113/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/28536251/viewspace-1750113/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值