镜像地址
http://vault.centos.org/7.3.1611/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso
通过方向键选择:install centos 7 回车
可以往下拉找到【中文】选中-继续
SOFTWARE会自动checking以及选择;
SYSTEM需手动选择下磁盘和开启网卡;
选择磁盘:直接点Done
如果可以自动获取IP 就点击开启(ON)即可;
如果需要手动IP则点击 configure....
根据自己的实际情况填写配置
点击 Done
Begin installation
安装的过程中给root设置个密码:ROOT PASSWORD
如果你设置的密码比较简单,则连续点两次Done;
等待安装完成;
重启
安装完成
root用户
创建文件夹
mkdir -p /app/rpm
使用winscp将预装文件放到此目录下,也可使用其他方式
安装unzip【解压应用】
将目录切换至/app/rpm
rpm -ivh unzip-6.0-19.el7.x86_64.rpm
root用户
[root@localhost ~]# vi /etc/sysconfig/selinux
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# systemctl disable firewalld.service
这一步比较关键
将目录切换至/app/rpm
解压Oracle_Offline.zip
unzip Oracle_Offline.zip
将目录切换到*.rpm所在路径
rpm -ivh elfutils-default-yama-scope-0.172-2.el7.noarch.rpm
rpm -Uvh libgcc-4.8.5-28.el7_5.1.x86_64.rpm
rpm -Uvh glibc-common-2.17-222.el7.x86_64.rpm
rpm -Uvh glibc-2.17-222.el7.x86_64.rpm
rpm -Uvh libgomp-4.8.5-28.el7_5.1.x86_64.rpm
rpm -Uvh binutils-2.27-27.base.el7.x86_64.rpm
rpm -Uvh elfutils-libs-0.170-4.el7.x86_64.rpm
rpm -Uvh libstdc++-4.8.5-28.el7_5.1.x86_64.rpm
rpm -Uvh elfutils-libelf-0.170-4.el7.x86_64.rpm
rpm -Uvh nspr-4.19.0-1.el7_5.x86_64.rpm
rpm -Uvh nss-softokn-freebl-3.36.0-5.el7_5.x86_64.rpm
rpm -Uvh nss-util-3.36.0-1.el7_5.x86_64.rpm
rpm -ivh mpfr-3.1.1-4.el7.x86_64.rpm
rpm -ivh libmpc-1.0.1-3.el7.x86_64.rpm
rpm -ivh libXau-1.0.8-2.1.el7.x86_64.rpm
rpm -ivh libstdc++-devel-4.8.5-28.el7_5.1.x86_64.rpm
rpm -ivh libxcb-1.12-1.el7.x86_64.rpm
rpm -ivh cpp-4.8.5-28.el7_5.1.x86_64.rpm
rpm -ivh lm_sensors-libs-3.4.0-4.20160601gitf9185e5.el7.x86_64.rpm
rpm -ivh libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm
rpm -ivh unixODBC-2.3.1-11.el7.x86_64.rpm
rpm -ivh kernel-headers-3.10.0-862.3.2.el7.x86_64.rpm
rpm -ivh glibc-headers-2.17-222.el7.x86_64.rpm
rpm -ivh glibc-devel-2.17-222.el7.x86_64.rpm
rpm -ivh gcc-4.8.5-28.el7_5.1.x86_64.rpm
rpm -ivh libX11-common-1.6.5-1.el7.noarch.rpm
rpm -ivh libX11-1.6.5-1.el7.x86_64.rpm
rpm -ivh libXext-1.3.3-3.el7.x86_64.rpm
rpm -ivh zlib-devel-1.2.7-17.el7.x86_64.rpm
rpm -ivh elfutils-libelf-devel-0.170-4.el7.x86_64.rpm
rpm -ivh libXp-1.0.2-2.1.el7.x86_64.rpm
rpm -ivh gcc-c++-4.8.5-28.el7_5.1.x86_64.rpm
rpm -ivh unixODBC-devel-2.3.1-11.el7.x86_64.rpm
rpm -ivh sysstat-10.1.5-13.el7.x86_64.rpm
rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
rpm -ivh libaio-devel-0.3.109-13.el7.x86_64.rpm
rpm -ivh pdksh-5.2.14-37.el5_8.1.x86_64.rpm
rpm -ivh nss-softokn-freebl-3.36.0-5.el7_5.x86_64.rpm
rpm -ivh glibc-2.17-222.el7.x86_64.rpm
rpm -ivh glibc-devel-2.17-222.el7.x86_64.rpm
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# useradd -g oinstall -G dba oracle
[root@localhost ~]# passwd oracle
[root@localhost ~]# vi /etc/sysctl.conf
复制文本在此:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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
修改完成后执行命令使配置生效:
[root@localhost ~]# sysctl -p
[root@localhost ~]# 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
[root@localhost ~]# vi /etc/pam.d/login
文件末尾增加:
复制文本在此:
session required /lib64/security/pam_limits.so
session required pam_limits.so
很多文章写的是修改/etc/profile文件,这里我修改oracle用户自己的环境变量配置文件:
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ vi ~/.bash_profile
修改如下:
最后五行自行加入。复制文本在此:
export ORACLE_BASE=/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
(根据自己实际情况修改)
可以用winscp从本地的windows上传,不细写了。上传解压后如下:
(修改了整个database文件夹的权限)
[oracle@localhost database]$ cp ./response/* ~/
修改的内容如下:
oracle.install.option=INSTALL_DB_AND_CONFIG
ORACLE_HOSTNAME=vtedhcc #根据实际情况填写
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/app/oracle/inventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/app/oracle/product/11.2.0
ORACLE_BASE=/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=orcl11g
oracle.install.db.config.starterdb.SID=orcl
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryLimit=1024
oracle.install.db.config.starterdb.password.ALL=Dhcc12345
oracle.install.db.config.starterdb.password.SYS=Dhcc12345
oracle.install.db.config.starterdb.password.SYSTEM=Dhcc12345
oracle.install.db.config.starterdb.password.SYSMAN=Dhcc12345
oracle.install.db.config.starterdb.password.DBSNMP=Dhcc12345
oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/app/oracle/oradata
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/app/oracle/fast_recovery_area
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
密码用的最简单的安装时会有警告,可以自己设置高强度的密码。
[oracle@localhost database]$ ./runInstaller -silent -ignorePrereq -responseFile ~/db_install.rsp
这过程可能会提示.oui,unzip没权限的问题,执行chmod u+x /文件位置 后,再执行上面的命令就可以
安装完成会提示
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root scripts to run
/data/oracle/inventory/orainstRoot.sh
/data/oracle/product/11.2.0/db_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
4. Return to this window and hit "Enter" key to continue
Successfully Setup Software.
新开一个终端,使用root登录执行上述脚本即可:
[root@localhost ~]# /data/oracle/inventory/orainstRoot.sh
[root@localhost ~]# /data/oracle/product/11.2.0/db_1/root.sh
数据库软件安装完成,并且安装了一个实例名为orcl的数据库。
[oracle@localhost ~]$ netca /silent /responsefile ~/netca.rsp
[oracle@localhost ~]$ lsnrctl start
[oracle@localhost ~]$ sqlplus / as sysdba
静默安装数据库完成。
离线包地址
https://download.csdn.net/download/blackbeauty1988/11248198