logo资料库

腾讯云服务器安装oracle11g.docx

第1页 / 共36页
第2页 / 共36页
第3页 / 共36页
第4页 / 共36页
第5页 / 共36页
第6页 / 共36页
第7页 / 共36页
第8页 / 共36页
资料共36页,剩余部分请下载后查看
关于Centos7安装Oracle
一、准备工作
1. 服务器一台,这里选用了腾讯云服务器
2. 系统为Centos7,64位
3. Oracle安装包,下载地址:
4. 准备Xstart,Xftp,Xshell,用来连接服务器。
二、连接工作
1.使用Xshell连接服务器。
2.使用Xftp连接服务器
三、配置工作
1.创建运行oracle数据库的系统用户和用户组
2.创建oracle数据库安装目录
3.修改OS标识
4.修改linux内核(root下)
5.修改用户的SHELL限制(root下)
6.修改/etc/pam.d/login 文件(root下)
7.编辑 /etc/profile(root下)
8.安装包(root下)
9.关闭防火墙,CentOS7防火墙默认是firewall,低于7的为iptables
10.关闭selinux(root下,需要重启生效)
11.配置用户环境变量
12.oracle用户下,这里使用xftp传输oracle的2个安装包。上传到/usr/local/
13.Swap分配
①查看Swap空间,free -h
②执行如下命令,在根目录生成swap文件,count设定块数,bs设定块大小,生成4G的swap。
③接下来需要设置为交换分区(路径与上面的路径一致)。
④挂载交换分区(路径与上面的路径一致)。
14.图形化参数设置(root)
15.使用Xstart连接服务器xstart下远程报错"已拒绝X11转移申请"的解决方法:
四、安装Oracle
(1)掉勾
(2)默认
(3)选择server Class(服务类)
(4)选择单实例数据库安装(默认)
(5)选择高级安装
(6)选择英语和中文
(7)选择企业版
(8)默认路径
(9)默认,选择dba
(10)默认,一般用途/事物处理
(11)选择字符集Unicode(AL32UTF8)
(12)默认使用Database Control管理数据库
(13)默认数据库存储路径
(14)默认不启动自动备份
(15)设置口令
(16)默认dba
(17)勾选Ignore All,点击next
(18)点击Finish
(19)等待,中间弹出框就点continue
(20)继续等待
(21)去掉scott的勾选
(22)根据图片运行(千万不要直接点击ok,运行完以下代码后点击OK)
(23)成功界面
关于 Centos7 安装 Oracle By fw 目录 关于 Centos7 安装 Oracle................................................................................................................. 1 一、准备工作 ............................................................................................................................ 2 1. 服务器一台,这里选用了腾讯云服务器......................................................................2 2. 系统为 Centos7,64 位................................................................................................2 3. Oracle 安装包,下载地址:........................................................................................ 2 4. 准备 Xstart,Xftp,Xshell,用来连接服务器。 .................................................................2 二、连接工作 ............................................................................................................................ 2 1.使用 Xshell 连接服务器。 ............................................................................................. 2 2. 使用 Xftp 连接服务器............................................................................................... 4 三、配置工作 ............................................................................................................................ 4 1. 创建运行 oracle 数据库的系统用户和用户组 ........................................................4 2. 创建 oracle 数据库安装目录....................................................................................5 3. 修改 OS 标识..............................................................................................................6 4. 修改 linux 内核(root 下)............................................................................................6 5.修改用户的 SHELL 限制(root 下)................................................................................. 7 6.修改/etc/pam.d/login 文件(root 下)....................................................................... 7 7.编辑 /etc/profile(root 下)........................................................................................8 8.安装包(root 下)...........................................................................................................9 9.关闭防火墙,CentOS7 防火墙默认是 firewall,低于 7 的为 iptables.............. 9 10.关闭 selinux(root 下,需要重启生效)............................................................10 11.配置用户环境变量 ..................................................................................................10 12.这里使用 xftp 传输 oracle 的 2 个安装包。上传到/usr/local/src.......................... 11 13.Swap 分配 ................................................................................................................... 11 ①查看 Swap 空间,free -h............................................................................................ 11 ③接下来需要设置为交换分区(路径与上面的路径一致)。 ................................. 12 14.图形化参数设置(root)................................................................................................12 15.使用 Xstart 连接服务器 xstart 下远程报错"已拒绝 X11 转移申请"的解决方法: .......................................................................................................................................... 13 四、安装 Oracle.......................................................................................................................14
一、准备工作 1. 服务器一台,这里选用了腾讯云服务器 2. 系统为 Centos7,64 位 3. Oracle 安装包,下载地址: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8 664soft-100572.html (下载以下 2 个安装包) 4. 准备 Xstart,Xftp,Xshell,用来连接服务器。 二、连接工作 1.使用 Xshell 连接服务器。
2. 使用 Xftp 连接服务器 三、配置工作 1. 创建运行 oracle 数据库的系统用户和用户组 [root@localhost ~]$ su root #切换到 root Password: [root@localhost ]# groupadd oinstall #创建用户组 oinstall [root@localhost ]# groupadd dba #创建用户组 dba [root@localhost ]# useradd -g oinstall -g dba -m oracle 户,并加入到 oinstall 和 dba 用户组 #创建 oracle 用
[root@localhost ]# passwd oracle 在 CentOS 的图形登陆界面没法登陆 #设置用户 oracle 的登陆密码,不设置密码, Changing password for user oracle. New password: # 密码 BAD PASSWORD: The password is shorter than 8 characters Retype new password: # 确认密码 passwd: all authentication tokens updated successfully. [root@localhost ]# id oracle # 查看新建的 oracle 用户 uid=1001(oracle) gid=1002(dba) groups=1002(dba) [root@localhost]# 具体操作如下所示: 2. 创建 oracle 数据库安装目录 [root@localhost ]# mkdir -p /data/oracle #oracle 数据库安装目录 [root@localhost ]# mkdir -p /data/oraInventory 录 #oracle 数据库配置文件目 [root@localhost ]# mkdir -p /data/database #oracle 数据库软件包解压目录 [root@localhost ]# cd /data
[root@localhost ]# ls #创建完毕检查一下(强迫症) database oracle oraInventory [root@localhost data]# chown -R oracle:oinstall /data/oracle 所有者为 oinstall 用户组的 oracle 用户 #设置目录 [root@localhost data]# chown -R oracle:oinstall /data/oraInventory [root@localhost data]# chown -R oracle:oinstall /data/database [root@localhost data]# 3. 修改 OS 标识 原因是 oracle 默认不支持 CentOS 系统安装。 操作步骤如下: 4. 修改 linux 内核(root 下) 输入命令: vim /etc/sysctl.conf ,按 i 键进入编辑模式,修 改或添加下列内容,编辑完成后按 Esc 键,输入“:wq”保存退出。 然后,使用命令:sysctl -p 使之立刻生效。
fs.suid_dumpable = 1 fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 1052151808 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default=4194304 net.core.rmem_max=4194304 net.core.wmem_default=262144 net.core.wmem_max=1048586 5.修改用户的 SHELL 限制(root 下) 输入命令:vim /etc/security/limits.conf,按 i 键进 入编辑模式 ,添加下列内容,编辑完成后按 Esc 键,输入“:wq” 保存退出。 oracle oracle oracle oracle oracle soft nproc 2047 hard nproc 16384 soft nofile 4096 hard nofile 65536 soft stack 10240 6.修改/etc/pam.d/login 文件(root 下)
输入命令:vim /etc/pam.d/login,按 i 键进入编辑模式, 添加下列内容,编辑完成后按 Esc 键,输入“:wq”保存退出。 session required /lib/security/pam_limits.so session required pam_limits.so 7.编辑 /etc/profile(root 下) 输入命令:vim /etc/profile,添加下列内容,编辑完成 后按 Esc 键,输入“:wq”存盘退出。 if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
分享到:
收藏