- Oracle下载
oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
oracle-database-ee-19c-1.0-1.x86_64.rpm - Oracle安装
cd /opt yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm
- 环境变量
echo "export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1" >> /etc/profile echo "export PATH=\$ORACLE_HOME/bin:\$PATH" >> /etc/profile echo "export NLS_LANG=AMERICAN_AMERICA.AL32UTF8" >> /etc/profile echo "export ORACLE_SID=ORCLCDB" >> /etc/profile source /etc/profile
-
Oracle配置
1.执行oracle配置:/etc/init.d/oracledb_ORCLCDB-19c configure 2.创建oracle用户:useradd oracle 3.切换oracle用户:su oracle 4.连接oracle数据库:sqlplus / as sysdba 5.创建数据库用户(c##oracle19c):create user c##oracle19c identified by 123456; 6.授权数据库用户(c##oracle19c):grant dba to c##oracle19c; 7.防火墙打开端口权限:firewall-cmd --zone=public --add-port=1521/tcp --permanent && firewall-cmd --reload 解释说明: root用户无法通过'sqlplus / as sysdba'命令连接oracle,只有oracle用户可以通过'sqlplus / as sysdba'命令 连接oracle,所以需要创建oracle用户,通过oracle用户执行'sqlplus / as sysdba'命令连接oracle,连接oracle 成功后创建的数据库用户c##oracle19c是允许root用户连接oracle,需要注意Oracle19c数据库用户名必须以c##开头
- Navicat连接Oracle