linux虚拟机配置:内存>=4G ,硬盘空间>=60G
oracle 11G安装包
具体过程在安装手册中有写,手册环境为redhat,centos7环境其实更简单
centos7中不需要安装httpd服务,只需要安装对应依赖即可。
安装过程分为三步:
1.安装数据系统:各种进程以及服务
runInstall
2.安装监听:外部启动数据库的进程
netca
3.安装实例:数据库数据内容
dbca
操作文档地址:
1.bash: lsnrctl: command not found...
使用切换用户命令su切换到ORACLE用户时要加 -,否则ORACLE下的命令全都无效。
2.bash: netca: command not found...
安装监听时需要进入oracle的bin目录
3.-bash: ulimit: max user processes: cannot modify limit: Operation not permitted
[root@localhost ~]# vim /etc/security/limits.conf
增加如下内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
问题得到解决
4.xhost: unable to open display ""
重启
5.Checking monitor must be configured to display at least 256 colors Could not ex
解决 要点主要在运行host + 1.进入root su - root password:XXXX 2.DISPLAY=:0.0; export DISPLAY 3.echo $DISPLAY 4.cd /usr/openwin/bin //有些目录没有openwin,直接/usr/bin 5. ./xhost 6. ./xhost + 7.进入oracle目录 8 su - oracle 9 DISPLAY=:0.0; export DISPLAY //如果要显示在其他主机,DISPLAY=IP:0.0; export DISPLAY 10 ./runInstaller
6.部分指令无法执行
可能是环境变量问题
系统级 /etc/profile source /etc/profile 立即生效 /etc/bashrc(ubuntu和Debian中是/etc/bash.bashrc) /etc/environment在系统启动运行,用于配置与系统运行相关但与用户无关的环境变量 用户级 ~/.profile (推荐首选) ~/.bashrc 当用户登录以及每次打开新的shell时该文件都会被读取,不推荐,效率受到影响 ~/.bash_profile或~./bash_login /.bash_profile>~./bash_login>~/.profile 而且会覆盖执行
检查环境变量是否正确
lsnrctl start
sqlplus /nolog
connect /as sysdba
startup
先确定系统中可以启动数据库,再保证端口是通的,默认1521端口。
如果不通,可以修改防火墙策略或者直接关闭防火墙
systemctl stop firewalld
查看用户:show user;
查看实例:select instance_name from V$instance;