一:搭建yum 仓库

对于新手可以参考此文:《Vmware Workstation _linux yum 仓库搭建》、《CentOS7.2 创建本地YUM源和局域网YUM源

1)切换至 yum.repo.d 目录

[root@oracle ~]#  cd /etc/yum.repos.d
[root@oracle yum.repos.d]# ls
packagekit-media.repo public-yum-ol6.repo
[root@oracle yum.repos.d]# cat 100 public-yum-ol6.repo
cat: 100: No such file or directory
[public_ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1 [public_ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/0/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_u1_base]
name=Oracle Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/1/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_u2_base]
name=Oracle Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/2/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_u3_base]
name=Oracle Linux $releasever Update 3 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/3/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_u4_base]
name=Oracle Linux $releasever Update 4 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_u5_base]
name=Oracle Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/5/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_u6_base]
name=Oracle Linux $releasever Update 6 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/6/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_u7_base]
name=Oracle Linux $releasever Update 7 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/7/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_u8_base]
name=Oracle Linux $releasever Update 8 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/8/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=$uek [public_ol6_UEKR3_latest]
name=Unbreakable Enterprise Kernel Release 3 for Oracle Linux $releasever ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=$uekr3 [public_ol6_UEKR4]
name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEKR4/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=$uekr4 [public_ol6_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEK/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_MySQL]
name=MySQL 5.5 for Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/MySQL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_gdm_multiseat]
name=Oracle Linux 6 GDM Multiseat ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/gdm_multiseat/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_MySQL56]
name=MySQL 5.6 for Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/MySQL56/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_MySQL57]
name=MySQL 5.7 for Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/MySQL57_community/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_ceph10]
name=Ceph Storage for Oracle Linux Release 1.0 - Oracle Linux 6.6 or later ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/ceph10/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_spacewalk20_server]
name=Spacewalk Server 2.0 for Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk20/server/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_spacewalk20_client]
name=Spacewalk Client 2.0 for Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk20/client/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 # the following repositories are only available for x86_64 architecture systems
[public_ol6_ofed_UEK]
name=OFED supporting tool packages for Unbreakable Enterprise Kernel on Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/ofed_UEK/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
priority=20 [public_ol6_UEKR4_OFED]
name=OFED supporting tool packages for Unbreakable Enterprise Kernel Release 4 on Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEKR4/OFED/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
priority=20 [public_ol6_playground_latest]
name=Latest mainline stable kernel for Oracle Linux 6 ($basearch) - Unsupported
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/playground/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_spacewalk22_server]
name=Spacewalk Server 2.2 for Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk22/server/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_spacewalk22_client]
name=Spacewalk Client 2.2 for Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk22/client/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_software_collections]
name=Software Collection Library release 1.2 packages for Oracle Linux 6 (x86_64)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/SoftwareCollections12/x86_64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_spacewalk24_server]
name=Spacewalk Server 2.4 for Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk24/server/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [public_ol6_spacewalk24_client]
name=Spacewalk Client 2.4 for Oracle Linux 6 ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/spacewalk24/client/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0 [root@oracle yum.repos.d]#

2)创建任意名,后缀为.repo 的文件

#查看文件挂载情况
[root@oracle yum.repos.d]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_oracle-lv_root
50G 4.2G 43G 9% /
tmpfs 1.9G 228K 1.9G 1% /dev/shm
/dev/sda1 477M 83M 366M 19% /boot
/dev/mapper/vg_oracle-lv_home
955G 288M 906G 1% /home
/dev/sr0 3.8G 3.8G 0 100% /media/OL6.8 x86_64 Disc 1 20160518 #系统光盘默认挂载
[root@oracle yum.repos.d]#

如果系统没有默认加载linux系统光盘。的挂载方式。

#制作没有挂载的环境。先把 public-yum-ol6.repo  文件名修改修改
[root@oracle yum.repos.d]# ls
packagekit-media.repo public-yum-ol6.repo
[root@oracle yum.repos.d]# mv public-yum-ol6.repo public-yum-ol6.repo.bak20181222
[root@oracle yum.repos.d]# ls
packagekit-media.repo public-yum-ol6.repo.bak20181222
[root@oracle yum.repos.d]#
[root@oracle yum.repos.d]# vi server.repo
[public_ol6_latest]
name=Oracle Linux ###名称可以任取
baseurl=file:///mnt/Server ####file:///mnt 本机,网络:http://,ftp://
gpgcheck=1 ###验证签名,mdd5
enabled=1 ####启用yum仓库
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle ###验证签名

具体操作如图:如果 yum list  all 显示没有错误,表示yum 环境安装成功了 。

TIPS:

执行 yum list all 验证 yum 仓库是否配置好。若开始配置错了,用 yum clean all 清理后,再次执行 yum list all

二:安装所需要的包

方法一:执行该包,会自动安装依赖包,oracle 安装所有者和组,并设置内核设置

yum install oracle-rdbms-server-12cR1-preinstall* -y
####更新sysctl.con配置
#sysctl -p
####安装日志
/var/log/oracle-database-server-12cR2-preinstall/backup/timestamp/orakernel.log

方法二:手动安装依赖包,创建用户和组,并配置内核

1:安装yum 包

yum install binutils-* -y
yum install compat-libstdc++-33* -y
yum install coreutils-* -y
yum install elfutils-libelf-* -y
yum install elfutils-libelf-devel-* -y
yum install gcc* -y
yum install gcc-c++-* -y
yum install glibc-* -y
yum install glibc-common-* -y
yum install glibc-devel-* -y
yum install glibc-headers* -y
yum install ksh* -y
yum install libaio* -y
yum install libaio-devel-*
yum install libgcc-* -y
yum install libstdc++-* -y
yum install libstdc++-devel-* -y
yum install make-* -y
yum install sysstat-* -y
yum install unixODBC-* -y
yum install unixODBC-devel* -y
yum install compat-libcap* -y

2:配置资源登录参数

vi /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240

3;配置 pam.d 参数

vi /etc/pam.d/login

session required pam_limits.so

4:资源参数配置

kernel.shmall =

##note:1/2 of physical memory in pages, this will be the value 2097152. See Note 301830.1 for more information. 对于超出8GB系统内存,如共享内存段(shmmax)的最大大小是16G,则所需要共享内存页数(shmall)为16GB/4KB=16777216KB/4KB=4194304(页) 32GB,64GB可以依上述方式类推。

kernel.shmmax =
##note:1/2 of physical memory in bytes. This would be the value 2147483648 for a system with 4GB of physical RAM. (单位字节) kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
kernel.panic_on_oops=1 ####12c新增加参数

5:创建用户

# /usr/sbin/groupadd -g 54321 oinstall
# /usr/sbin/groupadd -g 54322 dba
# /usr/sbin/useradd -u 54321 -g oinstall -G dba oracle

三.关闭 SELINUX 功能

会自动安装依赖包,oracle 安装所有者和组,并设置内核设置

SELINUX=disabled ####这里设置为 disabled 关闭 SELINUX 

[root@oracle yum.repos.d]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ] [root@oracle yum.repos.d]# chkconfig iptables off
[root@oracle yum.repos.d]#
[root@oracle yum.repos.d]#

四.修改/etc/hosts  文件

修改前:

# vi /etc/hosts

127.0.0.1   localhost   localhost.localdomain
192.168.232.2 oracle oracle.example.com #Note:三元合一致/etc/hosts 文件解析hostname 指令显示的主机名/etc/sysconfig/network 配置

修改后:

五:创建安装目录

[root@oracle ~]# mkdir -p /u01/app/oracle ###创建目录
[root@oracle ~]# chown -R oracle:oinstall /u01/app/oracle ###目录所属root@oracle ~]# chmod -R 775 /u01/ ###授权root@oracle ~]# chmod -R 775 /u01/app/ ###授权
[root@oracle ~]# chmod -R 775 /u01/app/oracle ###授权

六:配置环境变量

[oracle@oracle ~]$ vi .bash_profile
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
export UMASK=022
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export CLASSPATH=$ORACLE_HOME/JRE:ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

[oracle@oracle ~]$ source /home/oracle/.bash_profile

七:安装数据库软件

1:上传压缩包

1):用鼠标在ssh2的连接页签上面右键选择“连接SFTP标签”

2):在sftp页签中:用put filepath 的方式上传文件

查看上传的文件信息。

Last login: Sat Dec 22 14:34:45 2018 from 192.168.1.107
[root@oracle ~]# ls
anaconda-ks.cfg Documents install.log Music p17694377_121020_Linux-x86-64_2of8.zip Public Videos
Desktop Downloads install.log.syslog p17694377_121020_Linux-x86-64_1of8.zip Pictures Templates
[root@oracle ~]# ll
total 2625160
-rw-------. 1 root root 1805 Dec 16 23:53 anaconda-ks.cfg
drwxr-xr-x. 2 root root 4096 Dec 16 00:37 Desktop
drwxr-xr-x. 2 root root 4096 Dec 16 00:37 Documents
drwxr-xr-x. 2 root root 4096 Dec 16 00:37 Downloads
-rw-r--r--. 1 root root 51901 Dec 16 23:53 install.log
-rw-r--r--. 1 root root 9810 Dec 16 23:49 install.log.syslog
drwxr-xr-x. 2 root root 4096 Dec 16 00:37 Music
-rw-r--r--. 1 root root 1673517582 Dec 22 11:37 p17694377_121020_Linux-x86-64_1of8.zip
-rw-r--r--. 1 root root 1014527110 Dec 22 11:18 p17694377_121020_Linux-x86-64_2of8.zip
drwxr-xr-x. 2 root root 4096 Dec 16 00:37 Pictures
drwxr-xr-x. 2 root root 4096 Dec 16 00:37 Public
drwxr-xr-x. 2 root root 4096 Dec 16 00:37 Templates
drwxr-xr-x. 2 root root 4096 Dec 16 00:37 Videos
[root@oracle ~]# cd /
[root@oracle /]# ls
bin boot dev etc home lib lib64 lost+found media misc mnt net opt proc root sbin selinux srv sys tmp u01 usr var
[root@oracle /]# cd /home/oracle/
[root@oracle oracle]# ls
[root@oracle oracle]# mv /root/p17694377_121020_Linux-x86-64_* /home/oracle/.
[root@oracle oracle]# ls
p17694377_121020_Linux-x86-64_1of8.zip p17694377_121020_Linux-x86-64_2of8.zip
[root@oracle oracle]#
[root@oracle oracle]# ll
total 2625056
-rw-r--r--. 1 root root 1673517582 Dec 22 11:37 p17694377_121020_Linux-x86-64_1of8.zip
-rw-r--r--. 1 root root 1014527110 Dec 22 11:18 p17694377_121020_Linux-x86-64_2of8.zip [root@oracle oracle]# chown oracle:oinstall p17694377_121020_Linux-x86-64_*
[root@oracle oracle]# ll
total 2625056
-rw-r--r--. 1 oracle oinstall 1673517582 Dec 22 11:37 p17694377_121020_Linux-x86-64_1of8.zip
-rw-r--r--. 1 oracle oinstall 1014527110 Dec 22 11:18 p17694377_121020_Linux-x86-64_2of8.zip
[root@oracle oracle]#

2:解压压缩包

这个解压过程需要些时间

# unzip p17694377_121020_Linux-x86-64_1of8.zip
# unzip p17694377_121020_Linux-x86-64_2of8.z

修改文件的 权限

[root@oracle oracle]# pwd
/home/oracle
[root@oracle oracle]# ll
total 2625060
drwxr-xr-x. 7 oracle oinstall 4096 Jul 11 2014 database
-rw-r--r--. 1 oracle oinstall 1673517582 Dec 22 11:37 p17694377_121020_Linux-x86-64_1of8.zip
-rw-r--r--. 1 oracle oinstall 1014527110 Dec 22 11:18 p17694377_121020_Linux-x86-64_2of8.zip
[root@oracle oracle]# chown -R oracle:oinstall /home/oracle/database/
[root@oracle oracle]# ll
total 2625060
drwxr-xr-x. 7 oracle oinstall 4096 Jul 11 2014 database
-rw-r--r--. 1 oracle oinstall 1673517582 Dec 22 11:37 p17694377_121020_Linux-x86-64_1of8.zip
-rw-r--r--. 1 oracle oinstall 1014527110 Dec 22 11:18 p17694377_121020_Linux-x86-64_2of8.zip
[root@oracle oracle]# cd database/
[root@oracle database]# ll
total 72
drwxr-xr-x. 4 oracle oinstall 4096 Dec 23 10:44 install
-rwxr-xr-x. 1 oracle oinstall 34132 Jul 11 2014 readme.html
drwxrwxr-x. 2 oracle oinstall 4096 Jul 7 2014 response
drwxr-xr-x. 2 oracle oinstall 4096 Jul 7 2014 rpm
-rwxr-xr-x. 1 oracle oinstall 8533 Jul 7 2014 runInstaller
drwxrwxr-x. 2 oracle oinstall 4096 Jul 7 2014 sshsetup
drwxr-xr-x. 14 oracle oinstall 4096 Jul 7 2014 stage
-rwxr-xr-x. 1 oracle oinstall 500 Feb 7 2013 welcome.html
[root@oracle database]#
[root@oracle database]#

3.安装数据库软件

1:安装Xme30.exe 软件

软件下载路劲:链接:http://pan.baidu.com/s/1gf5cbKn 密码:m1pn

1):安装步骤一直下一步即可

2):注册lic

3):启动工具

2:oracle 11g 安装步骤图解

1:查看宿主机器(即:客户机的ip)

2:设置Oracle 用户登录密码,(我这里设置的为oracle  实际情况的密码据实际环境情况而定)。并切换到 oracle用户

#查看文件
[oracle@oracle ~]$ ls
database p17694377_121020_Linux-x86-64_1of8.zip p17694377_121020_Linux-x86-64_2of8.zip
[oracle@oracle ~]$ ll
total 2625060
drwxr-xr-x. 7 oracle oinstall 4096 Jul 11 2014 database
-rw-r--r--. 1 oracle oinstall 1673517582 Dec 22 11:37 p17694377_121020_Linux-x86-64_1of8.zip
-rw-r--r--. 1 oracle oinstall 1014527110 Dec 22 11:18 p17694377_121020_Linux-x86-64_2of8.zip
#显示文件路径
[oracle@oracle ~]$ pwd
/home/oracle
#查看文件属性
[oracle@oracle ~]$ ls -all
total 2625092
drwx------. 5 oracle oinstall 4096 Dec 23 11:25 .
drwxr-xr-x. 5 root root 4096 Dec 22 16:36 ..
-rw-------. 1 oracle oinstall 81 Dec 23 11:25 .bash_history
-rw-r--r--. 1 oracle oinstall 18 Mar 22 2016 .bash_logout
-rw-r--r--. 1 oracle oinstall 176 Mar 22 2016 .bash_profile
-rw-r--r--. 1 oracle oinstall 124 Mar 22 2016 .bashrc
drwxr-xr-x. 7 oracle oinstall 4096 Jul 11 2014 database
drwxr-xr-x. 2 oracle oinstall 4096 Nov 20 2010 .gnome2
drwxr-xr-x. 4 oracle oinstall 4096 Dec 16 23:42 .mozilla
-rw-r--r--. 1 oracle oinstall 1673517582 Dec 22 11:37 p17694377_121020_Linux-x86-64_1of8.zip
-rw-r--r--. 1 oracle oinstall 1014527110 Dec 22 11:18 p17694377_121020_Linux-x86-64_2of8.zip
#递归的查看 database 文件夹下的文件属性
[oracle@oracle ~]$ ls -allR database/

修改:.bash_profile 文件内容;增加下内容。

#//以下内容可不写
#//指定安装Oracle 终端的类型
export ORACLE_TERM=xterm export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib #设置临时的库文件的path 路径 export CLASSPATH=$ORACLE_HOME/JRE:ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib #设置java lib 文件搜索路径

Last login: Sun Dec 23 11:21:51 2018 from 192.168.1.107
[root@oracle ~]# su - oracle
[oracle@oracle ~]$ ls
database p17694377_121020_Linux-x86-64_1of8.zip p17694377_121020_Linux-x86-64_2of8.zip
[oracle@oracle ~]$ cd database/
[oracle@oracle database]$ ll
total 72
drwxr-xr-x. 4 oracle oinstall 4096 Dec 23 10:44 install
-rwxr-xr-x. 1 oracle oinstall 34132 Jul 11 2014 readme.html
drwxrwxr-x. 2 oracle oinstall 4096 Jul 7 2014 response
drwxr-xr-x. 2 oracle oinstall 4096 Jul 7 2014 rpm
-rwxr-xr-x. 1 oracle oinstall 8533 Jul 7 2014 runInstaller
drwxrwxr-x. 2 oracle oinstall 4096 Jul 7 2014 sshsetup
drwxr-xr-x. 14 oracle oinstall 4096 Jul 7 2014 stage
-rwxr-xr-x. 1 oracle oinstall 500 Feb 7 2013 welcome.html
[oracle@oracle database]$ [oracle@oracle database]$ export DISPLAY=192.168.1.106:0.0
[oracle@oracle database]$ ./runInstaller
Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 42455 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3967 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-12-23_12-04-12PM. Please wait ...[oracle@oracle database]$

3:进行图形界面的安装操作

取消接受更新选项框, next

点击yes

这里先选择“install database software only” 仅安装数据库软件

单实例数据库安装,Next

安装语言选择。

Next

ORACLE_BASE:

ORACLE_HOME:

安装目录位置

OraInventory目录位置,Next

检查约束条件

问题处理方法:

对于下面缺少的依赖包是yum 安装依赖包的时候出现错误,没有安装成功。需要出现把依赖包安装成功。如果再重新检查一下就有可以了。

点击”install”,开始安装

开始安装

Last login: Sun Dec 23 14:28:59 2018 from 192.168.1.107
[root@oracle ~]# [root@oracle ~]# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world. Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@oracle ~]# /u01/app/oracle/product/12.1.0/dbhome_1/root.sh
Performing root user operation. The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/12.1.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.
[root@oracle ~]#

4:DBCA创建数据库

  1.  使用DBCA创建数据库 

创建数据库库

高级配置:

模板类型主要有seed和noseed两种,主要的区别在于是否包含数据文件。简单来说,seed就是 从RMAN备份中恢复数据库,由于是恢复所以也不能做其他更多的定制修改,但是最大的特点是 创建速度快,OLTP和OLAP的模板就属于seed模板类型;而“定制数据库”则属于nonseed模板 ,不包含数据文件,需要使用create database命令创建数据库,创建时间要稍微长一些,对于大 部分系统业务来说,需要根据自己的需求来选择合适的模板类型。

如果创建一个空CDB,多一个PDB: proc1,proc2,proc3

用户密码设置

归档文件,闪回区,Next

Oracle Database Vault提供控制以防止未经授权的特权用户访问敏感数据并防止未经授权的数据库更改。

数据库块

进程数:300 并发。

2:使用DBCA更改数据库的配置 

3: 使用DBCA删除数据库

方法一:ORACLE_HOME目录
$ORACLE_HOME/deinstall/deinstall 方法二:软件包目录
cd database/ $ ./runInstaller -deinstall -home /u01/app/oracle/product/12.1.0/dbhome_1 方法三:
$ORACLE_HOME/dbs 参数文件删除
$ORACLE_BASE/oradata
/etc/oratab
/etc/oraInst.loc
oraInventory
$ORACLE_HOME
######删除数据库软件
图形化界面:
路径:
software + db DB :
DBCA ---delete database SQL>
mount;
alter session distcitxxxx;(drop)
drop database;
show database name; 数据库文件,参数文件,控制文件都删除;
rman target /
drop database include xxx;
备份,归档,数据 software:
图形化:
命令:
rm -rf $ORACLE_BASE
/usr/local/bin/
/etc/ora* oraInst.loc oratabs
#删除数据库
Last login: Wed Dec 26 22:40:58 2018 from 192.168.1.107
[root@oracle ~]# su - oracle
[oracle@oracle ~]$ cd /u01/app/oracle/
admin/ audit/ cfgtoollogs/ checkpoints/ diag/ oradata/ oraInventory/ product/
[oracle@oracle ~]$ cd /u01/app/oracle/product/12.1.0/dbhome_1/
[oracle@oracle dbhome_1]$ ls
addnode cdata ctx demo hs jdbc log oc4j oracore perl R root.sh sqlpatch ucp
apex cfgtoollogs cv diagnostics install jdk md odbc oraInst.loc plsql racg scheduler sqlplus usm
assistants clone dbs dmu instantclient jlib mgw olap ord plugins rdbms slax srvm utl
bin crs dc_ocm dv inventory ldap network OPatch oui precomp relnotes sqldeveloper suptools wwg
ccr css deinstall has javavm lib nls opmn owm QOpatch rest sqlj sysman xdk
[oracle@oracle dbhome_1]$ cd inventory/
[oracle@oracle inventory]$ ls
Actions21 backup Clone Components21 ContentsXML globalvariables invDetails.properties make Queries21 response Scripts Templates
[oracle@oracle inventory]$ ll
total 48
drwxr-x---. 13 oracle oinstall 4096 Dec 23 14:56 Actions21
drwxr-x---. 3 oracle oinstall 4096 Dec 23 15:04 backup
drwxr-x---. 2 oracle oinstall 4096 Dec 23 15:04 Clone
drwxr-x---. 137 oracle oinstall 4096 Dec 23 15:01 Components21
drwxr-x---. 3 oracle oinstall 4096 Dec 23 15:04 ContentsXML
drwxr-x---. 3 oracle oinstall 4096 Dec 23 15:03 globalvariables
-rw-r-----. 1 oracle oinstall 191 Dec 23 15:04 invDetails.properties
drwxr-x---. 2 oracle oinstall 4096 Dec 23 15:03 make
drwxr-x---. 20 oracle oinstall 4096 Dec 23 14:56 Queries21
drwxr-x---. 2 oracle oinstall 4096 Dec 23 14:56 response
drwxr-x---. 3 oracle oinstall 4096 Dec 23 15:04 Scripts
drwxr-x---. 24 oracle oinstall 4096 Dec 23 15:03 Templates
[oracle@oracle inventory]$ pwd
/u01/app/oracle/product/12.1.0/dbhome_1/inventory
[oracle@oracle inventory]$ cd ..
[oracle@oracle dbhome_1]$ ls
addnode cdata ctx demo hs jdbc log oc4j oracore perl R root.sh sqlpatch ucp
apex cfgtoollogs cv diagnostics install jdk md odbc oraInst.loc plsql racg scheduler sqlplus usm
assistants clone dbs dmu instantclient jlib mgw olap ord plugins rdbms slax srvm utl
bin crs dc_ocm dv inventory ldap network OPatch oui precomp relnotes sqldeveloper suptools wwg
ccr css deinstall has javavm lib nls opmn owm QOpatch rest sqlj sysman xdk
[oracle@oracle dbhome_1]$ cd deinstall/
[oracle@oracle deinstall]$ ls
bootstrap_files.lst bootstrap.pl deinstall deinstall.pl deinstall.xml jlib readme.txt response sshUserSetup.sh utl
[oracle@oracle deinstall]$ pwd
/u01/app/oracle/product/12.1.0/dbhome_1/deinstall
[oracle@oracle deinstall]$

===================================================================================================================

第四章:Oracle12c 数据库在linux环境安装的更多相关文章

  1. Linux环境安装PostgreSQL-10.1

    转载自:https://www.cnblogs.com/LinBug/p/8082790.html Linux环境安装PostgreSQL-10.1   环境及资源 Linux版本:CentOS re ...

  2. Linux环境安装.NET运行环境

    Linux环境安装.NET运行环境 Linux环境安装.NET运行环境 1. 构建编译环境: (1) sudo apt-get install build-essential (2) sudo apt ...

  3. Linux 环境安装 Node、nginx、docker、vsftpd、gitlab

    Linux 环境安装 centos7 # 更新yum yum update -y 0. 防火墙 firewalld 新入的JD云服务器,发现防火墙默认是关闭的. # 查看防火墙状态 systemctl ...

  4. Linux环境安装Nexus

    Linux环境安装Nexus Nexus可以做Maven私服,私服不是Maven的核心概念,它仅仅是一种衍生出来的特殊的Maven仓库.有三种专门的Maven仓库管理软件可以用来帮助大家建立私服: N ...

  5. Linux环境安装xmapp(PHP-Mysql集成环境)

    xmapp是很多初学者使用的PHP环境集成包,用yum在linux安装的php和mysql版本现在都很低,xmapp可以解决这个问题,下面我们直接进入正题,安装一个php集成环境. 我使用的是vm虚拟 ...

  6. 在Linux环境安装redis步骤,且设置开机自动启动redis

    最近在linux环境安装了redis学习,目前已经安装成功且设置开机即启动状态,我把步骤流程记录了下来,分享给需要的小伙伴. 1.我在/usr/local/localsoftware/目录下创建了一个 ...

  7. (转)iOS Wow体验 - 第四章 - 为应用的上下文环境而设计

    本文是<iOS Wow Factor:Apps and UX Design Techniques for iPhone and iPad>第四章译文精选,其余章节将陆续放出.上一篇:Wow ...

  8. MongDB篇,第四章:数据库知识4

    MongDB 数据库知识4 GridFS 大文件存储 文件的数据库存储 1,在数据库中以   字符串的方式  存储文件在本地的路径: 优点: 节省数据库空间 缺点: 当数据库或者文件位置发生变化时则无 ...

  9. linux环境安装mysql,以及mysql基本的终端操作命令

    linux环境下安装mysql服务器.客户端mysql简单的终端操作指令(使用数据库.简单的增删改查和备份恢复)1 SQL: Structured Query Language 结构化查询语言. 运用 ...

随机推荐

  1. WEB通知和React Native之即时通讯(iOS Android)

    WEB通知和React Native之即时通讯(iOS Android) 一,需求分析 1.1,允许服务器主动发送信息给客户端,客户端能监听到并且能接收. 1.2,为了方便同一个系统内的用户可以指定某 ...

  2. spring异常Unsatisfied dependency expressed through constructor parameter 0

    异常信息: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with nam ...

  3. Java instanceof运算符

    java 中的instanceof 运算符是用来在运行时指出对象是否是特定类的一个实例.instanceof通过返回一个布尔值来指出,这个对象是否是这个特定类或者是它的子类的一个实例. 用法: res ...

  4. EventBus 线程切换原理

    主要问题其实只有两个,其一:如何判断当前发送事件的线程是否是主线程:其二:如何在接收事件时指定线程并执行: 一个一个来看. 1.如何判断是否在主线程发送 EventBus在初始化的时候会初始化一个Ma ...

  5. python之内置函数(一)

    一.内置函数一1.内置函数总览 abs() dict() help() min() setattr()all() dir() hex() next() slice() any() divmod() i ...

  6. 基于maven的spring-boot的pom文件详解

    Spring Boot 推荐的基础 POM 文件 名称 说明 spring-boot-starter 核心 POM,包含自动配置支持.日志库和对 YAML 配置文件的支持. spring-boot-s ...

  7. win10应用商店打不开,错误代码0x80131500

    我也突然遇到这个问题,一开始找各种方法也解决不了.然后在外网找到方法. 很多人只是把代理开了,只要关了就可以了.这点不累述,都会提到. 我的win10应用商店有两个错误代码0x80131500和0x8 ...

  8. Vim和Neovim安装YouCompleteMe

    确定支持Python,Vim一般支持,Neovim默认不支持 Vim的就不介绍方法了,很多系统都不一样.Neovim添加Python支持 pip install setuptools pip inst ...

  9. python中os.path.isdir()函数的使用

    在python 中,os.path.isdir(path)函数主要用来判断函数内部的path是否为一个目录 具体关于这个函数的解说参考博客https://blog.csdn.net/xjp_xujip ...

  10. prometheus 配置容器 cadvisor监控节点

    安装cadvisor docker run \ --volume=/:/roofs:ro \ --volume=/var/run:/var/run:rw \ --volume=/sys:/sys:ro ...