说明:该安装过程为最简单化安装oracle19c,Linux系统至少熟悉常规操作!
1.1 操作系统:CentOS7.6
1.2 CPU:2核
1.3 内存:16G(建议不低于10G)
1.4 硬盘:200G+
echo "192.168.1.xx hostName">> /etc/hosts
systemctl stop firewalld.service
systemctl disable firewalld.service
mkdir -p /opt/oracle
mount /dev/sdaX /opt/oracle
vim /etc/fstab
//修改文件中刚才挂载的对应分区信息
mkdir /mnt/linux
mount /dev/cdrom /mnt/linux
cd /etc/yum.repos.d
mkdir bk
mv *.repo bk/
echo "[EL]" >> /etc/yum.repos.d/yuminstall.repo
echo "name =Linux 7.x DVD" >> /etc/yum.repos.d/yuminstall.repo
echo "baseurl=file:///mnt/linux" >> /etc/yum.repos.d/yuminstall.repo
echo "gpgcheck=0" >> /etc/yum.repos.d/yuminstall.repo
echo "enabled=1" >> /etc/yum.repos.d/yuminstall.repo
cat /etc/yum.repos.d/yuminstall.repo
说明:oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm 该工具在oracle官网有下载,实在找不到的,可以私信我,我发给你!
rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
如果提示有缺少的资源
yum -y install 资源1 资源2 ...
查看oracle用户信息是否已经创建(oracle-database-preinstall 会自动创建oracle用户信息)
id oracle
修改oracle用户密码,及目录权限授予
注意:/opt/oracle是oracle默认安装路径,如果你需要修改此路径,需要手动创建目录,并且删除预安装时创建的oracle用户,手动创建该用户,并进行权限赋值
passwd oracle
chown -R oracle:oinstall /opt/oracle
chmod -R 775 /opt/oracle
rpm -ivh oracle-database-ee-19c-1.0-1.x86_64.rpm
cd /etc/sysconfig/
//cp oracledb_ORACLCDB-19c.conf oracledb_rac(简单理解为你要创建的实例名称)-19c.conf
cp oracledb_ORACLCDB-19c.conf oracledb_rac-19c.conf
//查看该配置文件信息
more oracledb_rac-19c.conf
cd /etc/init.d/
cp oracledb_ORRCLCDB-19c oracledb_rac-19c
vim oracledb_rac-19c
:%s/ORCLCDB/rac/g
:%s/ORCLPB1/rac/g
export CHARSET=ZHS16GBK
export CREATE_AS_CDB=false
/etc/init.d/oracledb_rac-19c configure
su - oracle
echo "export LANG=en_US" >> ~/.bash_profile
echo "export ORACLE_BASE=/opt/oracle" >> ~/.bash_profile
echo "export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1" >> ~/.bash_profile
echo "export ORACLE_UNQNAME=rac" >> ~/.bash_profile
echo "export ORACLE_SID=rac" >> ~/.bash_profile
echo "NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG" >> ~/.bash_profile
echo "export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin" >> ~/.bash_profile
source ~/.bash_profile
env |grep ORACLE
// 关闭数据库
/etc/init.d/oracledb_rac-19c stop
// 启动数据库
/etc/init.d/oracledb_rac-19c start