第一步,调试Linux虚拟机启动:
打开后,报错,如图:
解决:
步骤1:用管理员身份启动cmd,输入:bcdedit 查看hyper-v的状态,这里应该是off关闭状态。
步骤2:如果不是关闭状态,通过执行一个命令来关闭Hype-V服务:
在“CMD”下输入:bcdedit /set hypervisorlaunchtype off
步骤3:右脚桌面我的电脑>管理>服务和应用程序>服务,找到HV主机服务, 右键属性,启动类型改为禁用。
步骤4:完成以上步骤,重新启动电脑即可。
第二步,安装Oracle数据库:
1.首先准备好,安装包:
LINUX.X64_193000_db_home.zip
2.解压缩,安装包的命令:
unzip LINUX.X64_193000_db_home.zip
3.创建Oracle帐户:
安装组:oinstall
数据管理员组:dba
用户名:oracle,密码:netsmart
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
passwd oracle
4.编辑文件:
vi /etc/sysctl.conf
(内容)复制粘贴,即可:
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.small = 2097152
kernel.shmall = 8226107
kernel.shmmax = 33694134272
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
kernel.panic_on_oops = 1
net.ipv4.ip_local_port_range = 9000 65500
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.send_redirects = 0
net.ipv4.ip_forward = 0
因为使上述配置生效,而不重启系统,执行如下命令:
/sbin/sysctl -p
5.编辑文件:
vim /etc/security/limits.conf
(内容)复制粘贴,即可:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
(cat <<"EOFLIMITS">> /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOFLIMITS)
6.编辑文件:
vim /etc/pam.d/login
(内容)复制粘贴,即可:
session required pam_limits.so
7. 安装文件目录配置:
mkdir -p /data/Linux-Oracle19C
chown -R oracle:oinstall /data/
chmod -R 775 /data/
8.修改,环境变量设置:
vi .bash_profile
export ORACLE_SID=orcl
export ORACLE_HOME=/Linux-Oracle19C/app/oracle/product/19.3.000/db_home
export PATH=$ORACLE_HOME/bin:$PATH
export LD_BIND_NOW=1
可使用中下命令,查看环境变量:
env | grep ORA