实验一 安装oracle11g 单机(2)

2020-04-16 11:48

#习惯,创建完进行查看

[root@centos7 tools]# ll /application/ 总用量 0 drwxr-xr-x 2 root root 6 8月 31 11:27 database drwxr-xr-x 2 root root 6 8月 31 11:27 oracle drwxr-xr-x 2 root root 6 8月 31 11:27 oraInventory [root@centos7 tools]# 1.2.4 对创建的目录进行授权

#设置目录所有者为oinstall用户组的oracle用户

[root@centos7 tools]# chown -R oracle:oinstall /application/{database,oracle,oraInventory} #查看是否创建成功 [root@centos7 tools]# ll /application/ 总用量 0 drwxr-xr-x 2 oracle oinstall 6 8月 31 11:27 database drwxr-xr-x 2 oracle oinstall 6 8月 31 11:27 oracle drwxr-xr-x 2 oracle oinstall 6 8月 31 11:27 oraInventory [root@centos7 tools]#

开始部署

1.3.1 安装oracle数据库所需要的软件包

[root@centos7 tools]#yum install gcc* gcc-* gcc-c++-* glibc-devel-* glibc-headers-* compat-libstdc* libstdc* elfutils-libelf-devel* libaio-devel* sysstat* unixODBC-* pdksh-* 6

1.3.2 修改内核参数

[root@centos7 ~]# cat /etc/sysctl.conf # System default settings live in /usr/lib/sysctl.d/00-system.conf. # To override those settings, enter new settings here, or in an /etc/sysctl.d/.conf file # # For more information, see sysctl.conf(5) and sysctl.d(5). net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.conf.all.rp_filter = 1 fs.file-max = 6815744 #设置最大打开文件数 fs.aio-max-nr = 1048576 kernel.shmall = 2097152 #共享内存的总量,8G内存设置:2097152*4k/1024/1024 kernel.shmmax = 4888888888#最大共享内存的段大小 kernel.shmmni = 4096 #整个系统共享内存端的最大数 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 #可使用的IPv4端口范围 net.core.rmem_default = 262144 net.core.rmem_max= 4194304 net.core.wmem_default= 262144 net.core.wmem_max= 1048576 [root@centos7 ~]# 使参数生效 [root@centos7 ~]# sysctl -p net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.conf.all.rp_filter = 1 sysctl: setting key \无效的参数 fs.file-max = 6815744 #设置最大打开文件数 fs.aio-max-nr = 1048576 sysctl: setting key \无效的参数 kernel.shmall = 2097152 #共享内存的总量,8G内存设置:2097152*4k/1024/1024 sysctl: setting key \无效的参数 kernel.shmmax = 2147483648 #最大共享内存的段大小 sysctl: setting key \无效的参数 kernel.shmmni = 4096 #整个系统共享内存端的最大数 kernel.sem = 250 32000 100 128 sysctl: setting key \无效的参数 net.ipv4.ip_local_port_range = 9000 65500 #可使用的IPv4端口范围 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 [root@centos7 ~]# 7

1.3.3 对oracle用户设置限制,提高软件运行性能

红色的为添加的内容

[root@centos7 ~]# cat /etc/security/limits.conf # /etc/security/limits.conf # #

# #This file sets the resource limits for the users logged in via PAM. # #It does not affect resource limits of the system services. # #

# #Also note that configuration files in /etc/security/limits.d directory, # #which are read in alphabetical order, override the settings in this # #file in case the domain is the same or more specific.

# #That means for example that setting a limit for wildcard domain here # #can be overriden with a wildcard setting in a config file in the #subdirectory, but a user specific setting here can be overriden only #with a user specific setting in the subdirectory. #

#Each line describes a limit for a user in the form: #

# # #Where:

# can be: # - a user name

# - a group name, with @group syntax # - the wildcard *, for default entry

# - the wildcard %, can be also used with %group syntax, # for maxlogin limit

8

#

# can have the two values:

# - \# - \#

# can be one of the following: # - core - limits the core file size (KB) # - data - max data size (KB) # - fsize - maximum filesize (KB)

# - memlock - max locked-in-memory address space (KB) # - nofile - max number of open file descriptors # - rss - max resident set size (KB) # - stack - max stack size (KB) # - cpu - max CPU time (MIN) # - nproc - max number of processes # - as - address space limit (KB)

# - maxlogins - max number of logins for this user # - maxsyslogins - max number of logins on the system # - priority - the priority to run user process with # - locks - max number of file locks the user can hold # - sigpending - max number of pending signals

# - msgqueue - max memory used by POSIX message queues (bytes) # - nice - max nice priority allowed to raise to values: [-20, 19] # - rtprio - max realtime priority #

# #

#* soft core 0

9

#* hard rss 10000 #@student hard nproc 20 #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #@student - maxlogins 4 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 #

# End of file

1.3.4 配置用户的环境变量

[root@centos7 ~]# vim /home/oracle/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH export ORACLE_BASE=/application/oracle #oracle数据库安装目录 export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 #oracle数据库路径 export ORACLE_SID=orcl #oracle启动数据库实例名 export ORACLE_TERM=xterm #xterm窗口模式安装 export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH #添加系统环境变量 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib #添加系统环境变量 export LANG=en_US.utf8 #防止安装过程出现乱码 export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK #设置Oracle客户端字符集,必须与Ora cle安装时设置的字符集保持一致 10


实验一 安装oracle11g 单机(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:专业技术人员时间管理与项目管理

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: