实习日志第34天---安装(总结)

前两天一直没写,装ORACLE soft 和dbca建库

截的图太多,具体过程就简单点:

配置检查:

df -h       3.4G的空间

free        1G的内存和1.5G的swap空间。其实swap稍微小点也没事

df -h /tmp   400MB的临时空间

 

系统版本:

rpm -q redhat-release

(redhat-release-4AS-8)

内核版本:

uname -r

我的是2.6.9-78.Elsmp

 

安装包:

binutils-2.15.92.0.2-18

compat-libstdc++-33.2.3-47.3

elfutils-libelf-0.97-5

elfutils-libelf-devel-0.97-5

glibc-2.3.9.4-2.19

glibc-common-2.3.9.4-2.19

glibc-devel-2.3.9.4-2.19

gcc-3.4.5-2

gcc-c++-3.4.5-2

libaio-devel-0.3.105-2

libaio-0.3.105-2

libgcc-3.4.5

libstdc++-3.4.5-2

libstdc++-devel-3.4.5-2

make-3.80-5

sysstat-5.0.5

unixODBC-2.2.11

unixODBC-devel-2.2.11

 

 

创建相应的用户组和用户:检查nobody用户是否存在。不存在的话,建立该用户。(使用nobody用户名的目的是,使任何人都可以登录系统,但是其UIDGID不提供任何特权,即该uidgid只能访问人人皆可读写的文件。当服务器向外服务时,可能会让clientnobody的身份登录

As the purpose of the user is essentially to allow database users to execute external jobs, you should not use the oracle user. The oracle user is a powerful user; obviously they can shut down the database, and have access to a number of resources, oracle and otherwise. You would not want to give any database user with privileges to schedule this job (actually create external job privs.) the ability to perform. all oracle actions; at least not in a normal environment. For security purposes, it is best to create a user with minimum privileges required to do the job. For example, if it reads from a specific directory, give them access to that directory, but not to the oracle binaries directory.
     The need for the low privilege user is simply a security measure. The term unprivileged user, in many contexts, is used to refer to a non-DBA user; it's a general term for a non super user.

 

#groupadd oinstall

#groupadd dba

#useradd -g oinstall -G dba oracle

#passwd oracle

 

查看内核参数是否满足要求,修改内核参数: /etc/sysctl.conf

fs.file-max = 512 * PROCESSES    (在这里PROCESSES 如何查看?或设置 ,和后面建kernel.shmall = 2097152                            库时的process有关?不过这里不加这个参数也没事貌似

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128149

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default = 4194304

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 262144

 

 

#sysctl -p执行一下参数设置

 

修改shell限制  (为了提高软件在linux系统上的性能)

1. /etc/security/limits.conf

oracle              soft    nproc   2047

oracle              hard    nproc   16384

oracle              soft    nofile  1024

oracle              hard    nofile  65536

2. /etc/pam.d/login

session    required     /lib/security/pam_limits.so

session    required     pam_limits.so

3. oracle用户的默认shell修改启动文件

/etc/profile{(.local-SUSE}加入以下语句:  (如果所用的shellC shell,另见)

if [ $USER = "oracle" ]; then

        if [ $SHELL = "/bin/ksh" ]; then

              ulimit -p 16384

              ulimit -n 65536

        else

              ulimit -u 16384 -n 65536

        fi

fi

 

创建目录:

oracle base目录大小3G,包括数据文件的话5.4G(这个不推荐,建议数据文件和软件分开)

创建基目录

# mkdir -p /mount_point/app

# chown -R oracle:oinstall /mount_point/app

# chmod -R 775 /mount_point/app/

(这个是基本目录,之后会在设置oracle用户环境变量的时候设置ORACLE_BASE变量)

 

OFA结构下目录,

ORACLE_BASE= /挂载点/app/oracle

Inventory directory= /挂载点/app/oraInventory

  ORACLE_HOME= $ORACLE_BASE/product/11.1.0/db_1  这些在OUI下可以设置

 

创建数据文件的目录:

 

修改oracle用户的环境变量

  # su - oracle

$ vi .bash_profile           shell版本不同:(.profile  /  .login

         加入参数:umask 022

如果存在ORACLE_SID, ORACLE_HOME, or ORACLE_BASE,先移去

执行:$ . ./.bash_profile

 

设置ORACLE_BASEORACLE_SID环境变量

$ ORACLE_BASE=/u01/app/oracle

$ ORACLE_SID=sales

$ export ORACLE_BASE ORACLE_SID       (似乎把这些写进.bash_profile比较好点)

确保ORACLE_HOMETNS_ADMIN没有被设置  

(对这个存在点疑问,可能是安装多版本数据库为确保不冲突而需要的步骤,之后启动sqlplus要设定)

$ unset ORACLE_HOME

$ unset TNS_ADMIN

再次确定以上设置正确

$ umask           (22,022或者0022)

$ env | more

 

安装:# xhost +    //$ xhost localhost.localdomain

解压后./runInstaller

 

 

具体的图不放了,最后运行下两个脚本就可以了(完成了通过OUI方式安装数据库的步骤)

 

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

转载于:http://blog.itpub.net/24005010/viewspace-689719/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值