Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Construction LVM-based raw device Oracle10g Database on Oracle Linux 5.11     - Linux dual physical network card set to a virtual NIC (Linux)

- Java implementation of stacks and queues (Programming)

- Custom Android UI template Comments (Programming)

- To create and manage virtual machines on Ubuntu Redhat (Linux)

- Linux System Tutorial: Fix ImportError: No module named wxversion error (Linux)

- Tomcat itself through simple movement separation (Server)

- Kubernetes cluster deployment (Server)

- The method to mount the CD under Linux (Linux)

- Achieve single backup of MySQL by innobackupex (Database)

- Linux server dual-card dual-IP and single-card dual-IP configuration method (ReHat / CentOS) (Server)

- Ubuntu 15.04 installation Powercommands 2.0 (Linux)

- WordPress plug-ins installed in Ubuntu, enter the subject of FTP and not create directory problem (Server)

- Oracle database file path changes (Database)

- How to customize your Linux desktop: Gnome 3 (Linux)

- Linux operating system Start Tutorial: Xmanager Remote Access Linux graphical interface (Linux)

- How to choose the first programming language based on the life you want (Programming)

- File compression and packaging commands under Linux (Linux)

- HTTPS and SSH and use the difference between the way: Git User's Manual (Linux)

- Dockerfile use to build a mirror-based CentOS 7 (Linux)

- Android shutdown (reboot) process (Programming)

 
         
  Construction LVM-based raw device Oracle10g Database on Oracle Linux 5.11
     
  Add Date : 2018-11-21      
         
         
         
  Software: VMware11

Operating System: Oracle Linux 5.11 x64
Database: Oracle 10.2.0.5 x64
Host Name: odb.test.local
IP address: 192.168.223.100 # using a virtual machine host network
Examples: odb

First, the system is installed
Process slightly, the installation process, select GNOME Desktop environment, "Development Libraries", "Development Tools", "Legacy Software Development" remember the election on installation, and other according to the default, such as JAVA, do not install OFFICE like.
Second, the system basic configuration
1. Insert the CD-ROM is configured as a local yum install source
[Root @ odb ~] # cd /etc/yum.repos.d/
[Root @ odb yum.repos.d] # cat local.repo
[Local]
name = local
baseurl = file: /// media / cdrom / Server
gpgcheck = 0
enable = 1
 
2. Disable selinux, iptables Service
[Root @ odb ~] # sed -i 's / = enforcing / = disabled / g' / etc / sysconfig / selinux
[Root @ odb ~] # chkconfig iptables off
[Root @ odb ~] # chkconfig ip6tables off
Other system services according to the actual situation of disabled
 
3. Install oracle-validated package, carry out pre-oracle environment configuration
[Root @ odb ~] # yum -y install oracle-validated.x86_64
[Root @ odb ~] # oracle-validated-verify
Automatically after executing the command oracle install the necessary software environment configuration, such as installing missing packages, add sysctl configuration, ulimited related, etc., as the oracle user, like the dba group is automatically created when the system is installed, use this than the much more convenient to use CentOS
[Root @ odb ~] # sed -i '1i RedHat 4' / etc / redhat-release
[Root @ odb ~] # sed -i '$ a 192.168.223.100 odb.test.local odb' / etc / hosts
 
4. Install rlwrap software (can sqlplus when using this software increases up and down history records and other functions)
[Root @ odb ~] # tar -xf rlwrap-0.42.tar.gz -C / tmp /
[Root @ odb ~] # cd /tmp/rlwrap-0.42/
[Root @ odb rlwrap-0.42] # ./configure; make all; make install
 
5. Install vmware-tools, process slightly
6. Installation and Configuration vncserver
[Oracle @ odb ~] # yum -y install vncserver
[Oracle @ odb ~] # cd / etc / sysconfig /
[Oracle @ odb sysconfig] # vim vncservers
VNCSERVERS = "1: root"
VNCSERVERARGS [1] = "- geometry 1024x768 -depth 24"
After a good save after configuration,
[Root @ odb ~] # vncserver # first performance will be prompted to enter vnc password, and automatically generate the initial configuration in the user directory
[Root @ odb ~] # cd .vnc
[Root @ odb .vnc] # vim xstartup
#! / Bin / sh
 
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec / etc / X11 / xinit / xinitrc
 
[-x / Etc / vnc / xstartup] && exec / etc / vnc / xstartup
[-r $ HOME / .Xresources] && xrdb $ HOME / .Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24 + 10 + 10 -ls -title "$ VNCDESKTOP Desktop" &
#twm &
gnome-session &
It is easy to modify, the upper two rows of red uncommented, comment out the last line, add the use of gnome-session & on the line
 
7. Set the oracle installation directory, basic environment
[Root @ odb ~] # mkdir -p / opt / oracle /
[Root @ odb ~] # chown -R oracle: oinstall / opt / oracle /
[Root @ odb ~] # chmod -R 775 / opt / oracle /
Add oracle environment variables
[Oracle @ odb ~] $ su - oracle
[Oracle @ odb ~] $ vim .bash_profile # add the following
 
export ORACLE_SID = odb
export ORACLE_BASE = / opt / oracle
export ORACLE_HOME = $ ORACLE_BASE / product / 10.2.0 / db_1
export PATH = $ PATH: $ ORACLE_HOME / bin
export ORACLE_TERM = xterm
export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ ORACLE_HOME / lib
export CLASSPATH = $ ORACLE_HOME / jre: $ ORACLE_HOME / jlib: $ ORACLE_HOME / rdbms / jlib
alias sqlplus = 'rlwrap sqlplus'
alias rman = 'rlwrap rman'
 
Three, Oracle database software installation
Preliminary work done in preparation for the formal installation of oracle database using vnc client to connect to the server (how to connect this can not be taught, and their information search bar), when connected, open a new terminal
[Root @ odb ~] # xhost +
access control disabled, clients can connect from any host
[Root @ odb ~] # export DISPLAY =: 1
[Root @ odb ~] # su - oracle
 
[Oracle @ odb ~] $ cpio -idmv [Oracle @ odb ~] $ cd database /
[Oracle @ odb database] $ ./runInstaller
Back is the graphical installation process, and do not bother to say, if some pass, you can modify the prompts, you can choose to only install the software when installed in the environment inspection.
After installing the patch installation
[Oracle @ odb ~] $ unzip /mnt/hgfs/Oracle/Oracle10g/linux.x64/p8202632_10205_Linux-x86-64.zip -d.
[Oracle @ odb ~] $ cd Disk1 /
[Oracle @ odb Disk1] $ ./runInstaller
It is a graphical interface, process too lazy to say
 
Fourth, the raw device environment configuration
1. Online scsi add a virtual hard disk, and use the following methods to restart the system to recognize when not to
[Root @ odb ~] # echo "- - -"> / sys / class / scsi_host / host0 / scan
2. Create a logical volume group and related
[Root @ odb ~] # fdisk / dev / sdb # to create a separate partition
[Root @ odb ~] # pvcreate / dev / sdb1
[Root @ odb ~] # vgcreate oradata / dev / sdb1
Then create oracle database need lvm logical volumes
lvcreate -L 8M -n lv_spfile oradata
lvcreate -L 20M -n lv_control01 oradata
lvcreate -L 20M -n lv_control02 oradata
lvcreate -L 20M -n lv_control03 oradata
lvcreate -L 100M -n lv_redo01 oradata
lvcreate -L 100M -n lv_redo02 oradata
lvcreate -L 100M -n lv_redo03 oradata
lvcreate -L 1g -n lv_system01 oradata
lvcreate -L 1g -n lv_sysaux01 ​​oradata
lvcreate -L 1g -n lv_users01 oradata
lvcreate -L 1g -n lv_undo01 oradata
lvcreate -L 1g -n lv_temp01 oradata
Once created using lvscan glance
[Root @ odb ~] # lvscan
  / Dev / hdc: open failed: No medium found
  ACTIVE '/ dev / oradata / lv_spfile' [8.00 MB] inherit
  ACTIVE '/ dev / oradata / lv_control01' [20.00 MB] inherit
  ACTIVE '/ dev / oradata / lv_control02' [20.00 MB] inherit
  ACTIVE '/ dev / oradata / lv_control03' [20.00 MB] inherit
  ACTIVE '/ dev / oradata / lv_redo01' [100.00 MB] inherit
  ACTIVE '/ dev / oradata / lv_redo02' [100.00 MB] inherit
  ACTIVE '/ dev / oradata / lv_redo03' [100.00 MB] inherit
  ACTIVE '/ dev / oradata / lv_system01' [1.00 GB] inherit
  ACTIVE '/ dev / oradata / lv_sysaux01' [1.00 GB] inherit
  ACTIVE '/ dev / oradata / lv_users01' [1.00 GB] inherit
  ACTIVE '/ dev / oradata / lv_undo01' [1.00 GB] inherit
  ACTIVE '/ dev / oradata / lv_temp01' [1.00 GB] inherit
  ACTIVE '/ dev / VolGroup00 / LogVol00' [14.06 GB] inherit
  ACTIVE '/ dev / VolGroup00 / LogVol01' [5.81 GB] inherit
3. Bind the raw device, and set the boot automatically load
[Root @ odb ~] # vim / etc / sysconfig / rawdevices
/ Dev / raw / raw1 / dev / oradata / lv_spfile
/ Dev / raw / raw2 / dev / oradata / lv_control01
/ Dev / raw / raw3 / dev / oradata / lv_control02
/ Dev / raw / raw4 / dev / oradata / lv_control03
/ Dev / raw / raw5 / dev / oradata / lv_redo01
/ Dev / raw / raw6 / dev / oradata / lv_redo02
/ Dev / raw / raw7 / dev / oradata / lv_redo03
/ Dev / raw / raw8 / dev / oradata / lv_sysaux01
/ Dev / raw / raw9 / dev / oradata / lv_system01
/ Dev / raw / raw10 / dev / oradata / lv_users01
/ Dev / raw / raw11 / dev / oradata / lv_undo01
/ Dev / raw / raw12 / dev / oradata / lv_temp01
[Root @ odb ~] # chkconfig rawdevices on
[Root @ odb ~] # /etc/init.d/rawdevices start

[Root @ odb ~] # ll / dev / raw *
total 0
cr - r ----- 1 root root 162, 1 Jan 18 21:52 raw1
cr - r ----- 1 root root 162, 10 Jan 18 21:52 raw10
cr - r ----- 1 root root 162, 11 Jan 18 21:52 raw11
cr - r ----- 1 root root 162, 12 Jan 18 21:52 raw12
cr - r ----- 1 root root 162, 2 Jan 18 21:52 raw2
cr - r ----- 1 root root 162, 3 Jan 18 21:52 raw3
cr - r ----- 1 root root 162, 4 Jan 18 21:52 raw4
cr - r ----- 1 root root 162, 5 Jan 18 21:52 raw5
cr - r ----- 1 root root 162, 6 Jan 18 21:52 raw6
cr - r ----- 1 root root 162, 7 Jan 18 21:52 raw7
cr - r ----- 1 root root 162, 8 Jan 18 21:52 raw8
cr - r ----- 1 root root 162, 9 Jan 18 21:52 raw9
 
4. Set the raw device is a group and access rights (direct modification is useless after the restart will automatically recover root is a group)
[Root @ odb ~] # vim /etc/udev/rules.d/60-raw.rules
ACTION == "add", KERNEL == "raw *", OWNER = "oracle", GROUP = "dba", MODE = "0660"
[Root @ odb ~] # start_udev
Starting udev: [OK]
[Root @ odb ~] # ll / dev / raw *
crw-rw ---- 1 oracle dba 162, 0 Jan 18 21:52 / dev / rawctl
 
/ Dev / raw:
total 0
crw-rw ---- 1 oracle dba 162, 1 Jan 18 21:52 raw1
crw-rw ---- 1 oracle dba 162, 10 Jan 18 21:52 raw10
crw-rw ---- 1 oracle dba 162, 11 Jan 18 21:52 raw11
crw-rw ---- 1 oracle dba 162, 12 Jan 18 21:52 raw12
crw-rw ---- 1 oracle dba 162, 2 Jan 18 21:52 raw2
crw-rw ---- 1 oracle dba 162, 3 Jan 18 21:52 raw3
crw-rw ---- 1 oracle dba 162, 4 Jan 18 21:52 raw4
crw-rw ---- 1 oracle dba 162, 5 Jan 18 21:52 raw5
crw-rw ---- 1 oracle dba 162, 6 Jan 18 21:52 raw6
crw-rw ---- 1 oracle dba 162, 7 Jan 18 21:52 raw7
crw-rw ---- 1 oracle dba 162, 8 Jan 18 21:52 raw8
crw-rw ---- 1 oracle dba 162, 9 Jan 18 21:52 raw9
 
5. Create a data file points to the raw device soft link
[Root @ odb ~] # mkdir -p / opt / oracle / oradata / odb
ln -s / dev / raw / raw1 / opt / oracle / oradata / odb / spfile
ln -s / dev / raw / raw2 / opt / oracle / oradata / odb / control01
ln -s / dev / raw / raw3 / opt / oracle / oradata / odb / control02
ln -s / dev / raw / raw4 / opt / oracle / oradata / odb / control03
ln -s / dev / raw / raw5 / opt / oracle / oradata / odb / redo01
ln -s / dev / raw / raw6 / opt / oracle / oradata / odb / redo02
ln -s / dev / raw / raw7 / opt / oracle / oradata / odb / redo03
ln -s / dev / raw / raw8 / opt / oracle / oradata / odb / sysaux01
ln -s / dev / raw / raw9 / opt / oracle / oradata / odb / system01
ln -s / dev / raw / raw10 / opt / oracle / oradata / odb / users01
ln -s / dev / raw / raw11 / opt / oracle / oradata / odb / undo01
ln -s / dev / raw / raw12 / opt / oracle / oradata / odb / temp01
After creating the soft connection, it is recommended is a group and permissions of these files can also change what links
[Root @ odb ~] # chown -R oracle: oinstall / opt / oracle / oradata / odb /
[Root @ odb ~] # chmod -R 775 / opt / oracle / oradata / odb /
 
6. Create a raw device mapping file DBCA_RAW_CONFIG.txt
[Root @ odb ~] # su - oracle
[Oracle @ odb ~] $ vim DBCA_RAW_CONFIG.txt
spfile = / opt / oracle / oradata / spfile
control1 = / opt / oracle / oradata / odb / control01
control2 = / opt / oracle / oradata / odb / control02
control3 = / opt / oracle / oradata / odb / control03
redo1_1 = / opt / oracle / oradata / odb / redo01
redo2_1 = / opt / oracle / oradata / odb / redo02
redo3_1 = / opt / oracle / oradata / odb / redo03
sysaux = / opt / oracle / oradata / odb / sysaux01
system = / opt / oracle / oradata / odb / system01
users = / opt / oracle / oradata / odb / users01
undotbs1 = / opt / oracle / oradata / odb / undo01
temp = / opt / oracle / oradata / odb / temp01
 
7. The first run netca create LISTENTER TNSNAMES and the like, the process is slightly
8. Run DBCA to create the database
[Oracle @ odb ~] $ export DBCA_RAW_CONFIG = / home / oracle / DBCA_RAW_CONFIG.txt
[Oracle @ odb ~] $ dbca
Slightly behind the installation process, recommended to choose custom installation, the installation process if not to the raw device file, you can manually specify the soft link file location
 
These are the bare LVM-based installation ORACLE database approach.
     
         
         
         
  More:      
 
- Ubuntu GCC, G ++ and fortran Version Switch (Linux)
- Java, extends and implements Usage (Programming)
- Linux / Unix: chroot command examples to explain (Linux)
- How to restart after a crash Cinnamon (Linux)
- Ubuntu 14.04 Install WordPress on Nginx (Server)
- Django 1.8 TEMPLATE_DIRS configuration and STATICFILES_DIRS (Server)
- CoreOS Linux introduces Kubernetes kubelet (Server)
- Ubuntu 14.04 installed NVIDIA graphics driver (Linux)
- Whisker Menu 1.4.3 Install menu Linux (Linux)
- Linux environment MySQL master-slave synchronization (Database)
- Python substring format (Programming)
- Linux dmidecode command detail (Linux)
- Modular JavaScript (Programming)
- Linux (SUSE) mount NTFS mobile hard practice (Linux)
- Handle large data problems Bit-map method (Programming)
- Linux system Passwd file detailed analysis (Linux)
- TPCC-MySQL Benchmark (Database)
- Eight kinds of techniques to solve hard problems Linux (Linux)
- NGINX Plus now fully supports HTTP / 2 (Server)
- Ubuntu 14.04 / 12.04 subscribe users to install software Liferea 1.10.10 (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.