Oracle安装手册

整理:罗代均 luodaijun@vip.163.com

目录

1.Linux常用命令 2

2.安装Oracle 10gR2 3

3.Oracle中文支持问题 5

4.Oracle服务启动关闭 5

5.开机自动启动Oracle 5

6.创建表空间 6

7.创建用户 7

1.Linux常用命令

查看编辑文本文件,用图形化的gedit

gedit /filepath

查看环境变量

env

设置别名

alias  别名='原命令'

如: alias startTomcat='/usr/local/tomcat/bin/startup.sh'

查看当前所在目录

pwd

查看磁盘空间使用情况

df

列出所有文件,包括隐藏文件

ls -l –a

设置所有用户都具有读写权限

chmod 777 /data/www/index.html

递归下级目录

chmod -R 777 /data/www

设置文件为可执行

chmod 755 /home/oracle/startOracle.sh

或者chmod +x /home/oracle/startOracle.sh

改变文件所有者

chown user:usergroup /path

chown -R user:usergroup /path

查看进程,并用正则过滤

ps -ef | grep java

杀死进程

kill -9 pid

pkill -9 process_name

如: pkill -9 java , pkill -9 nginx

动态更新显示文件内容,查看不断变化的文件

tail -f /usr/local/tomcat/log/catalina.out

删除文件及递归删除子目录

rm /filepath

rm -rf /path

查找文件

find /path -name *.swf

I/O重定向

如将查找到的结果输出到abc.txt

find /home/oracle -name *.jsp > abc.txt

压缩解压

(1).tar.gz

解压:tar zxvf  abc.tar.gz

压缩:tar czvf  abc.tar.gz    path

(2).tar

压缩: tar xvf abc.tar path

解压: tar zxvf  abc.tar

(3).bz

解压:bzip –d  abc.bz

(4).bz2

解压:bzip2 –d  abc.bz2

(5).gz

解压:gzip –d  abc.gz

(6).tar.bz2

解压:tar  jxvf  abc.tar.bz2

压缩:tar  jcvf  abc.tar.bz2 path

2.安装Oracle 10gR2

安装依赖包

yum -y install gcc gcc-c++ autoconf automake

yum -y install zlib zlib-devel openssl openssl-devel pcre pcre-devel

yum -y install unixODBC unixODBC-devel sysstat libXp libXp-devel libaio-devel

创建用户和组

/usr/sbin/groupadd oinstall

/usr/sbin/groupadd dba

/usr/sbin/useradd -m -g oinstall -g dba oracle

id oracle

passwd oracle

mkdir /oracle

chown -R oracle:oinstall /oracle

chmod -R 775 /oracle

设置环境变量

su – oracle

-----------------~/.bash_profile --------------------------

export ORACLE_BASE=/oracle

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

export ORACLE_SID=mam

export NLS_LANG='simplified chinese'_china.ZHS16GBK

export PATH=$PATH:$ORACLE_HOME/bin

export LANG=zh_CN.UTF-8

-------------------end--------------------------------------

环境变量生效

source ~/.bash_profile

修改内核参数

su root

------------/etc/sysctl.conf------------------------------

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=4194304

net.core.rmem_max=4194304

net.core.wmem_default=262144

net.core.wmem_max=262144

-----------------end---------------------------------------

内核参数生效

sysctl –p

------------------/etc/security/limits.conf  ---------------

oracle  soft    nproc   2047

oracle  hard    nproc   16384

oracle  soft    nofile  1024

oracle  hard    nofile  65536

--------------end----------------------------------------

注销用oracle用户登录

unzip oraclexxx.zip

export LC_ALL=c

非常重要!! 忽略检查操作系统,不然非oracle认证过的版本都不允许安装

./runInstaller –ignoreSysPrereqs

安装完成的时候,会弹出窗口要求运行如下两个脚本(root权限)

su root

/oracle/oraInventory/orainstRoot.sh

/oracle/product/10.2.0/db_1/root.sh

3.Oracle中文支持问题

强制使用英文界面

export LC_ALL=c

任意支持中文的字体都可以,比如文泉驿字体

这里我使用windows系统带的simsun.ttc

cp simsun.ttc /usr/share/fonts/zh_CN/TrueType/zysong.ttf

cd $ORACLE_HOME/jdk/jre/lib

cp font.properties.zh_CN.Redhat font.properties

cd $ORACLE_HOME/jre/1.4.2/lib/

cp font.properties.zh_CN.Redhat font.properties

cd $ORACLE_HOME/javavm/lib/ojvmfonts/

cp font.properties.zh_CN.Redhat font.properties

4.Oracle服务启动关闭

dbca:数据库创建向导

netca:网络服务配置向导

启动关闭监听器

lsnrctl start

lsnrctl stop

启动关闭oracle服务

进入sqlplus环境:  sqlplus /nolog

conn / as sysdba

startup    --启动

shutdown   --关闭

shutdown immediate –立即关闭

或者: dbstart和dbshut命令

启动管理控制台

emctl start dbconsole

emctl stop dbconsole

启动isqlplus

isqlplusctl start

isqlplusctl stop

5.开机自动启动Oracle

------------------start_oracle.sh------------------------------------

#!  /bin/bash

lsnrctl start

sqlplus /nolog <<EOF

conn / as sysdba

startup

EOF

-------------------end----------------------------------------------

设置为可执行文件

chmod 755 start_oracle.sh

-------------------stop_oracle.sh------------------------------------

#! /bin/bash

lsnrctl stop

sqlplus /nolog <<EOF

conn / as sysdba

shutdown immediate

EOF

-------------------end-----------------------------------------------

chmod 755 stop_oracle.sh

添加到 /etc/rc.d/rc.local开机执行

---------------/etc/rc.d/rc.local---------------------------------

su - oracle -c /home/oracle/start_oracle.sh >> /dev/null

----------------end------------------------------------------------

6.创建表空间

建议将表数据、索引、临时文件分别创建表空间,这样只需要重点备份表数据使用的表空间,实际上索引占用的磁盘空间非常的大

设置目录权限

chown oracle:oinstall /oradata/mam

chmod 775 /oradata/mam

------------01_create_tabspace.sql--------------------------------

set echo on

set feedback off

set verify off

define tb_path=/oradata/mam

prompt '开始创建表空间'

create tablespace mam_dat datafile '&tb_path/mam_dat01.dbf' size 10M AUTOEXTEND ON NEXT  10240K MAXSIZE UNLIMITED extent management local uniform size 128k online;

create tablespace mam_idx datafile '&tb_path/mam_idx01.dbf' size 10M AUTOEXTEND ON NEXT  10240K MAXSIZE UNLIMITED extent management local uniform size 128k online;

create temporary tablespace mam_tmp tempfile '&tb_path/mam_tmp01.dbf' size 10m AUTOEXTEND ON NEXT  10240K MAXSIZE UNLIMITED extent management local uniform size 128k;

prompt '结束'

---------------end------------------------------------------------

7.创建用户

------------------02_create_user.sql------------------------------

prompt 'start create user'

set feedback off

set define off

set echo off

create user mam identified by password

default tablespace mam_dat

temporary tablespace mam_tmp

account unlock;

grant AUDIT ANY to mam with admin option;

grant DROP USER to mam with admin option;

grant ALTER USER to mam with admin option;

grant ANALYZE ANY to mam with admin option;

grant BECOME USER to mam with admin option;

grant CREATE ROLE to mam with admin option;

grant CREATE TYPE to mam with admin option;

grant CREATE USER to mam with admin option;

grant CREATE VIEW to mam with admin option;

grant ALTER SYSTEM to mam with admin option;

grant AUDIT SYSTEM to mam with admin option;

grant CREATE TABLE to mam with admin option;

grant DROP PROFILE to mam with admin option;

grant ALTER PROFILE to mam with admin option;

grant ALTER SESSION to mam with admin option;

grant DROP ANY ROLE to mam with admin option;

grant DROP ANY TYPE to mam with admin option;

grant DROP ANY VIEW to mam with admin option;

grant QUERY REWRITE to mam with admin option;

grant ALTER ANY ROLE to mam with admin option;

grant ALTER ANY TYPE to mam with admin option;

grant ALTER DATABASE to mam with admin option;

grant CREATE CLUSTER to mam with admin option;

grant CREATE LIBRARY to mam with admin option;

grant CREATE PROFILE to mam with admin option;

grant CREATE SESSION to mam with admin option;

grant CREATE SYNONYM to mam with admin option;

grant CREATE TRIGGER to mam with admin option;

grant DROP ANY INDEX to mam with admin option;

grant DROP ANY TABLE to mam with admin option;

grant GRANT ANY ROLE to mam with admin option;

grant LOCK ANY TABLE to mam with admin option;

grant ALTER ANY INDEX to mam with admin option;

grant ALTER ANY TABLE to mam with admin option;

grant CREATE ANY TYPE to mam with admin option;

grant CREATE ANY VIEW to mam with admin option;

grant CREATE SEQUENCE to mam with admin option;

grant CREATE SNAPSHOT to mam with admin option;

grant DROP TABLESPACE to mam with admin option;

grant ALTER TABLESPACE to mam with admin option;

grant BACKUP ANY TABLE to mam with admin option;

grant CREATE ANY INDEX to mam with admin option;

grant CREATE ANY TABLE to mam with admin option;

grant CREATE PROCEDURE to mam with admin option;

grant DELETE ANY TABLE to mam with admin option;

grant DROP ANY CLUSTER to mam with admin option;

grant DROP ANY LIBRARY to mam with admin option;

grant DROP ANY SYNONYM to mam with admin option;

grant DROP ANY TRIGGER to mam with admin option;

grant EXECUTE ANY TYPE to mam with admin option;

grant INSERT ANY TABLE to mam with admin option;

grant SELECT ANY TABLE to mam with admin option;

grant UPDATE ANY TABLE to mam with admin option;

grant ALTER ANY CLUSTER to mam with admin option;

grant ALTER ANY LIBRARY to mam with admin option;

grant ALTER ANY TRIGGER to mam with admin option;

grant COMMENT ANY TABLE to mam with admin option;

grant CREATE TABLESPACE to mam with admin option;

grant DROP ANY SEQUENCE to mam with admin option;

grant DROP ANY SNAPSHOT to mam with admin option;

grant FORCE TRANSACTION to mam with admin option;

grant MANAGE TABLESPACE to mam with admin option;

grant ALTER ANY SEQUENCE to mam with admin option;

grant ALTER ANY SNAPSHOT to mam with admin option;

grant CREATE ANY CLUSTER to mam with admin option;

grant CREATE ANY LIBRARY to mam with admin option;

grant CREATE ANY SYNONYM to mam with admin option;

grant CREATE ANY TRIGGER to mam with admin option;

grant DROP ANY DIRECTORY to mam with admin option;

grant DROP ANY PROCEDURE to mam with admin option;

grant RESTRICTED SESSION to mam with admin option;

grant ALTER ANY PROCEDURE to mam with admin option;

grant ALTER RESOURCE COST to mam with admin option;

grant CREATE ANY SEQUENCE to mam with admin option;

grant CREATE ANY SNAPSHOT to mam with admin option;

grant DROP PUBLIC SYNONYM to mam with admin option;

grant EXECUTE ANY LIBRARY to mam with admin option;

grant GRANT ANY PRIVILEGE to mam with admin option;

grant SELECT ANY SEQUENCE to mam with admin option;

grant CREATE ANY DIRECTORY to mam with admin option;

grant CREATE ANY PROCEDURE to mam with admin option;

grant CREATE DATABASE LINK to mam with admin option;

grant GLOBAL QUERY REWRITE to mam with admin option;

grant UNLIMITED TABLESPACE to mam with admin option;

grant CREATE PUBLIC SYNONYM to mam with admin option;

grant DROP ROLLBACK SEGMENT to mam with admin option;

grant EXECUTE ANY PROCEDURE to mam with admin option;

grant FORCE ANY TRANSACTION to mam with admin option;

grant SELECT ANY DICTIONARY to mam with admin option;

grant ALTER ROLLBACK SEGMENT to mam with admin option;

grant CREATE ROLLBACK SEGMENT to mam with admin option;

grant DROP PUBLIC DATABASE LINK to mam with admin option;

grant CREATE PUBLIC DATABASE LINK to mam with admin option;

exit;

-----------------end---------------------------------------------

Oracle安装手册相关推荐

  1. Oracle 11gR2 GI基本安装手册

    Oracle 11gR2 GI基本安装手册 目 录 1 文档简介 3 1.1 编写目的 3 1.2 适用范围 3 1.3 名词解释 3 1.4 格式约定 3 1.5 特别说明 3 2 安装环境准备 4 ...

  2. redhat oracle环境变量配置文件,Redhat7.2(7.1)下oracle8.17的安装手册-数据库专栏,ORACLE...

    redhat7.2(7.1)下oracle8.17的安装手册 一. 软件配置过程 1. 安装glibc 2.1包 glibc2.1版本(gnu c library,18m)下载地址: ftp://ft ...

  3. 浪潮ps9.0 oracle,浪潮ERP-PS V9.1安装手册.doc

    浪潮ERP-PS V9.1安装手册 阅读指南 本安装手册的使用对象为浪潮ERP-PS V9.1软件的系统管理员和使用用户,认真阅读本手册,会帮助您正确安装浪潮ERP-PS V9.1及相应的数据库软件. ...

  4. Oracle em13c安装手册

    Oracle em13c安装手册 一.环境准备 操作系统:Oracle Linux Server release 7.6 数据库:Oracle19.3 EM版本:emcc13.4 注:OEM 13c ...

  5. 浪潮小机装oracle数据库,浪潮ERP-PS V10.2安装手册.doc

    浪潮ERP-PS V10.2安装手册 阅读指南 本安装手册的使用对象为浪潮ERP-PS V10.2软件的系统管理员和使用用户,认真阅读本手册,会帮助您正确安装浪潮ERP-PS V10.2及相应的数据库 ...

  6. Oracle 10g 10.2.0.1 在Oracle Linux 5.4 32Bit RAC安装手册(一抹曦阳)

    Oracle 10g 10.2.0.1 在Oracle Linux 5.4 32Bit RAC安装手册(一抹曦阳).pdf下载地址 ,step by step http://download.csdn ...

  7. oracle discoverer 10g手册 下载,Discoverer Desktop安装手册

    <>><>> 密级:机密 总页数:10页 Discoverer Desktop安装手册 (V 1.0) 版权所有Jusin Hao(luckyfriends),转载 ...

  8. RedHat 7.3 Oracle 12.2.0.1 RAC 安装手册(转)

    1  准备工作 1.1   关于GRID的一些变化 1.1.1  简化的基于映像的Oracle Grid Infrastructure安装 从Oracle Grid Infrastructure 12 ...

  9. Oracle RAC (11.2.0.4版本) For AIX 6.1安装手册

    [部分引用别人的文档修改而成,实际经过安装验证的文档] Oracle Rac 11GR2(11.2.0.4) For AIX6.1+ASM安装手册 部分截图采用了网上别人的图片以及部分章节 2 安装环 ...

最新文章

  1. 神爱程序员,于是带来Python
  2. 企业网站建设量身定做的三项基本要素
  3. php用户之间的数据,什么是位于用户与操作系统之间的一层数据管理软件
  4. Elixir 初尝试 5 -- 遇见Actor
  5. arm搭建云手机教程_教你从0开始部署阿里云服务器,阿里云服务器搭建网站教程...
  6. Ansible AdHoc playbook API + 动态生成Inventory +结果关注
  7. 使用JUnit测试预期异常
  8. 为什么表格后面打不出0_同样的LOL游戏,为什么BO5和BO3的结局差距如此之大?...
  9. linux 内存优化
  10. python opencv 将lena图像嵌入空白画布处
  11. 室内GPS定位初露峥嵘
  12. lwj_C#_作业 ListT应用
  13. 华为可信专业级认证是什么?
  14. 科学计算机壁纸,科幻题材电脑插画桌面壁纸
  15. homepod换wifi网络_HomeKit的最佳入口——HomePod使用体验
  16. 求n的阶乘并显示过程
  17. 日期格式不一致问题处理
  18. 网络策划是做什么的,网络策划营销公司教你做策划
  19. SQL Server 2012 SP1 补丁发布
  20. 09-slash_backslash

热门文章

  1. 一文看懂“摩根系”,摩根士丹利、摩根大通、大摩、小摩到底有什么关系?
  2. 机器学习服务助应用内文本语种在线和离线检测
  3. 在 dart fluter 中使用 typedef
  4. HTML+CSS+JS网页设计期末课程大作业 web前端开发技术 web课程设计 后台管理系统。
  5. 高德地图定位及显示位置
  6. 信息安全实验六:RSA数字签名算法 2019.06.01
  7. 2010年高考作文题目大全
  8. (转载)JAVA小知识
  9. 用户画像-User Profile
  10. c++ http gzip压缩解压缩