1.下载
链接:https://pan.baidu.com/s/1EtI7jdktSgAD2WXt6kgwZQ
提取码:biae
2. 系统环境
yum -y install bc
yum install libaio*
yum -y install unzip
3.解压安装
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
cd Disk1
rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
如果出现
This system does not meet the minimum requirements for swap space. Based on
the amount of physical memory available on the system, Oracle Database 11g
Express Edition requires 2048 MB of swap space. This system has 2046 MB
of swap space. Configure more swap space on the system and retry the
installation.
则需要扩容交换空间
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon -s
卸载 Oracle 11g XE ,重新安装
rpm -e oracle-xe-11.2.0-1.0.x86_64
安装
rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
4.配置
执行命令进行配置
/etc/init.d/oracle-xe configure
默认即可
添加环境变量
vim /etc/profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
环境变量生效
source /etc/profile
5.登录
切换用户
su - oracle
sqlplus /nolog
connect / as sysdba
create user test identified by 123456;
授权
grant connect, resource to test ;