Summary of installing Oracle 11 GB with RedHat Linux and using PLSQL developer on winows

Source: Internet
Author: User
Tags stop script

 

1 Virtual Machine hard drive should not be set to the default 8g as big as possible

2. It is not difficult to install oracle. Is not familiar with Linux Command operations

3. When installing the Linux system, remember to set the resolution to 1024*760 first. Otherwise, the virtual machine cannot perform full screen operations.

4. Do not create a database for quick installation
Run the following command:
Netca (or netmgr) -- configure the listener
Dbca -- create a database

5. Common operation commands

Sqlplus/nolog
Connect/As sysdba

Start Database

Shutdwon ABORT:

Start and Stop a listener
Isnrctl start
LSNRCTL stop

 

There is a bug in 6.11G. An error will be reported when the sqlplus command is started after the database is installed.
Solution:

Modify the/etc/sysconfig/SELinux file in the RedHat system:
# SELinux = enforcing
SELinux = disabled

-- The following is a temporary solution
Switch user Su-Root
[Root @ localhost ~] # Getenforce
Enforcing
[Root @ localhost ~] # Setenforce 0
[Root @ localhost ~] # Getenforce
Permissive
[Root @ localhost ~] # Su-Oracle
[Oracle @ localhost ~] $ Sqlplus "/As sysdba"

SQL> startup

SQL> quit (exit SQL Mode)
$ LSNRCTL start (start listener) Close Oracle
$ LSNRCTL stop (close the listener. Before that, close the application.Program)
$ Sqlplus/nolog

SQL> shutdwon immediate

SQL> shutdwon abort

 
7. Installation Steps of oracle11g for RHL As5:
 
 
 
Server Configuration:
 
Xeon 3.0 GHz * 2
 
4 gb ecc ddr memory
 
300 gb scsi utrl 320 15 K hard drive X 2
 
 
 
 
 
 
Prerequisites:
 
 
 
Memory and swap space; For details, see the official database \ doc \ install directory documentation
 
Available Ram swap space required
 
Between 1024 MB and 2048 MB 1.5 times the size of RAM
 
Between 2049 MB and 8192 MB equal to the size of RAM
 
More than 8192 MB 0.75 times the size of RAM
 
 
 
 
 
1. Prepare servers and operating systems:
 
1. Physical memory: 4 GB
 
2. 4 GB swap space
 
3. Disable Secure Linux
 
4. You have installed the following packages (for simplicity, it is best to install all the packages when installing Redhat as 4 ):
 
A, X Window System
 
B. GNOME Desktop Environment
 
C. Editors
D. graphical Internet
 
E. Text-based Internet
 
F. server configuration tools
 
G. Development Tools
 
H. Administration Tools
 
I, System Tools
 
 
 
 
 
2. Preparations before installation
 
 
 
 
 
 
 
1. Check hardware
 
Memory
 
# Grep memtotal/proc/meminfo
 
Swap space
 
# Grep swaptotal/proc/meminfo
 
Disk Space
 
# DF-ah
 
 
 
2. Download Software
 
Oracle Database 11g software download location:
Http://otn.oracle.com/software/products/database/oracle10g/index.html
 
 
 
3. Modify the host file
 
View the/etc/hosts file must contain a fully qualified name for the server
 
 
 
 
 
 
 
4. Check the installation package
 
 
 
1. Check whether the following packages are installed. If not, install them first:
 
 
 
Binutils-2.17.50.0.6-2.el5
 
 
 
Compat-libstdc ++-33-3.2.3-61
 
 
 
Elfutils-libelf-0.125-3.el5
 
 
 
Elfutils-libelf-devel-0.125
 
 
 
Glibc-2.5-12
 
 
Glibc-common-2.5-12
 
 
 
Glibc-devel-2.5-12
 
 
 
Gcc-4.1.1-52
 
 
 
Gcc-C ++-4.1.1-52
 
 
 
Libaio-0.3.106
 
 
 
Libaio-devel-0.3.106
 
 
 
Libgcc-4.1.1-52
 
 
 
Libstdc ++-4.1.1
 
 
 
Libstdc +-devel-4.1.1-52.e15
 
 
 
Make-3.81-1.1
 
 
 
Sysstat-7.0.0
 
 
UnixODBC-2.2.11
 
 
 
UnixODBC-devel-2.2.11
 
 
 
 
 
 
 
# Rpm-Qa | grep make GCC glibc compat openmotif21 setarch and so on
 
 
 
 
 
 
 
5. Make a link (for old version requirements, do not set the new version of oracle11 ):
 
Ln-S/usr/lib/libstdc ++. so.6.0.3/usr/lib/libstdc ++. so.5
 
 
 
# Check if this link is not used. If a database is created during installation, the database cannot be connected.
 
 
 
 
 
 
 
Iii. parameter settings
 
 
 
 
 
1. Set core parameters
Add the following lines to the/etc/sysctl. conf file:
 
 
 
# Kernel. core_uses_pid = 1
 
Kernel. Shmall = 2097152
 
Kernel. shmmax = 2147483648 -- (in bytes, physical memory x 1024x1024x2, double the memory size)
 
Kernel. shmmni = 4096
 
# Semaphores: semmsl, semmns, semopm, semmni
 
Kernel. SEM = 250 32000 100 128
 
FS. File-max = 65536
 
Net. ipv4.ip _ local_port_range = 1024 65000
 
Net. Core. rmem_default = 8388608
 
Net. Core. rmem_max = 8388608
 
Net. Core. wmem_default = 262144
 
Net. Core. wmem_max = 262144
 
 
 
ESC: WQ!
 
 
 
 
# Sysctl-P # Run the following command to change the core parameter
 
 
 
 
 
 
 
2. Set shell limits (system resource limit) to improve the running efficiency of the software.
 
 
 
 
 
A. Add the following red lines to the/etc/security/limits. conf file:
 
 
 
Oracle soft nofile 65536
 
Oracle hard nofile 65536
 
Oracle soft nproc 16384
 
Hard nproc 16384
 
 
 
 
 
 
 
B. Add the following lines to the/etc/PAM. d/login file, if not:
 
Session required/lib/security/pam_limits.so
 
Session required pam_limits.so
 
 
 
 
C. Add the following statement after/etc/profile:
 
VI/etc/profile
 
If [$ user = "oracle"]; then
 
If [$ shell = "/bin/KSh"]; then
 
Ulimit-P 16384
 
Ulimit-N 65536
 
Else
 
Ulimit-u 16384-N 65536
 
Fi
 
Fi
 
 
 
 
 
3. Create users and groups and related directories
 
-- Create a DBA/Rule/oinstall Group
 
/Usr/sbin/groupadd DBA
 
/Usr/sbin/groupadd Partition
 
/Usr/sbin/groupadd oinstall
 
 
 
 
 
-- Create an oracle user and set the user group
 
 
/Usr/sbin/usermod-G oinstall-g dba Oracle
 
/Usr/sbin/useradd-G oinstall-g dba Oracle
 
Passwd Oracle
 
 
 
# ID Oracle
 
Uid = 501 (Oracle) gid = 501 (oinstall) groups = 501 (oinstall), 502 (DBA)
 
 
 
-- Create related installation Directories
 
 
 
 
 
Mkdir-P/opt/Oracle/product
 
Mkdir-P/opt/Oracle/product/orahome
 
 
 
Mkdir-P/opt/orainventory # (the default inventory folder)
 
Mkdir-P/opt/Oracle/oradata # (change the right file owner)
 
Mkdir-P/var/opt/Oracle
 
 
 
 
-- Set directory owner and permissions
 
Chown-r oracle. oinstall/opt/Oracle
 
Chown-r oracle. oinstall/opt/Oracle/oradata
 
 
 
Chown-r oracle. oinstall/opt/Oracle/product/orahome
 
 
 
Chown-r oracle. DBA/opt/orainventory
 
Chown oracle. DBA/var/opt/Oracle
 
Chmod-r 775/opt/Oracle
 
Chmod-r 755/var/opt/Oracle
 
 
 
 
 
 
 
4. Set the installation environment variables
 
 
 
# Su-Oracle -- Su to the Oracle user,
 
 
 
Modify user configurations
$ VI. bash_profile
 
 
 
Add the following parameters to configure the Oracle software environment parameters:
 
 
 
# Get the aliases and functions
 
If [-f ~ /. Bashrc]; then
 
.~ /. Bashrc
 
Fi
 
 
 
 
 
 
 
Export oracle_base =/opt/Oracle
 
Export ORACLE_HOME = $ oracle_base/product/orahome
 
 
 
Export oracle_sid = orcl
 
 
 
Export oracle_owner = Oracle
 
Export oracle_term = VT100
 
 
 
Export Path = $ path: $ ORACLE_HOME/bin: $ home/bin
Export Path = $ ORACLE_HOME/bin: $ ORACLE_HOME/Apache/bin: $ path
 
LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/local/lib
 
Export LD_LIBRARY_PATH
 
Classpath = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib
 
Classpath = $ classpath: $ ORACLE_HOME/Network/jlib
 
Export classpath
 
 
 
 
 
 
 
Note:
 
 
 
11G: ora_nls33 = $ ORACLE_HOME/NLS/admin/Data
 
 
 
10g: ora_nls33 = $ ORACLE_HOME/ocommon/NLS/admin/Data
 
9i: ora_nls33 =/Oracle/APP/ora92/ocommon/NLS/admin/Data
 
 
 
Save and exit
 
 
 
 
-- Execute the following command to make the configuration take effect immediately or use Oracle user login to make the configuration take effect
 
$ Source $ home/. bash_profile
 
 
 
Iv. Formal Installation
 
 
 
Open another terminal window as root
 
 
 
-- This step is critical. If you do not run this step, the graph-based installation interface cannot be started when the Oracle user runs #./runinstaller.
 
(If you do not perform this step, you only need to start the installation program on the Oracle desktop .)
 
 
 
Xhost +
 
 
 
Xhost + localhost
 
 
 
Log On As an oracle user. If the X mode is used, set the display as follows:
 
Display =: 0.0; export display
 
# Export display = 192.168.1.170: 0.0
 
 
If you install cygwin remotely, start cygwin.
 
Run
 
# Startx
 
 
 
Method 1:
 
 
 
Mount the optical drive as root
 
# Mount/dev/CDROM/mnt
 
 
 
Log on to the system as an oracle user to install Oracle
 
# Su-Oracle
 
Unzip linux_x86_11gr1_database.zip
 
CD database/
 
./Runinstaller
 
 
 
./Runinstaller-ignoresysprereqs # earlier version detection (optional)
 
 
 
 
 
 
 
Method 2:
 
1. Unzip command: unzip 10201_database_linux32.zip
2. decompress the package and generate a database directory containing the installation file.
 
Note: It is best to create a folder on the root to store the installation files of Oracle. However, you must note that,
 
Before installing Oracle, you need to change the owner of this folder to the user oracle. The folder permission should be changed to 777,
 
To avoid problems during installation.
 
 
 
3. Custom Oracle installation files and permissions (optional)
 
 
 
 
 
Chmod 777/Oracle
 
Chown-r oracle. oinstall/Oracle
 
 
 
Mount/Media/CDROM
 
/Media/CDROM/runinstaller
 
 
 
 
 
 
 
 
 
During installation:
 
 
 
Enter the appropriate ORACLE_HOME and Instance name during installation.
 
 
The management endpoint and sqlplus endpoint are displayed.
 
 
 
 
 
 
 
Select advanced Installation
 
In Select installation type, select Custom
 
Run as root during installation
 
#/Oracle/orainventory/orainstroot. Sh
 
/Opt/Oracle/product/orahome/root. Sh
 
After installation.
 
 
 
 
 
 
 
5. Start script generation and settings:
 
 
 
1. Supplement:
 
To enable RedHat Linux to automatically start oracle at startup, follow these steps:
 
Run root. Sh under $ ORACLE_HOME to generate a file/etc/oratab.
 
Edit/etc/oratab and set the restart flag of all instances to 'y', for example:
 
Ora10g:/home/Oracle/orahome_1: Y
 
 
Run the/etc/init. d/dbora script as follows:
 
 
 
#! /Bin/sh
 
# Description: Oracle auto start-stop script.
 
# Chkconfig:-20 80
 
#
 
# Set ora_home to be equivalent to the $ ORACLE_HOME
 
# From which you wish to execute dbstart and dbshut;
 
#
 
# Set ora_owner to the user ID of the owner of
 
# Oracle Database in ora_home.
 
Ora_home =/home/Oracle/orahome_1
 
Ora_owner = Oracle
 
If [! -F $ ora_home/bin/dbstart]
 
Then
 
Echo "Oracle startup: cannot start"
 
Exit
Fi
 
Case "$1" in
 
'Start ')
 
# Start the Oracle databases:
 
# The following command assumes that the Oracle Login
 
# Will not prompt the user for any values
 
Su-$ ora_owner-C $ ora_home/bin/dbstart
 
Su-$ ora_owner-c "$ ora_home/bin/LSNRCTL start"
 
;;
 
'Stop ')
 
# Stop the Oracle databases:
 
# The following command assumes that the Oracle Login
 
# Will not prompt the user for any values
 
Su-$ ora_owner-c "$ ora_home/bin/LSNRCTL stop"
 
Su-$ ora_owner-C $ ora_home/bin/dbshut
 
;;
 
'Restart ')
$0 stop
 
$0 start
 
;;
 
Esac
 
 
 
Grant execution permission
 
 
 
Chown root. Root/etc/rc. d/init. d/dbora
 
Chmod 750/etc/init. d/dbora
 
 
 
 
 
 
 
Initialize New Service:
 
 
 
Chkconfig dbora Reset
 
Chkconfig -- list dbora
 
Dbora 0: off 1: off 2: off 3: On 4: off 5: on 6: Off
 
 
 
 
 
 
 
Note: When the system is not in runlevels 3 and 5, use
 
 
Service dbora start service
 
 
 
Service dbora STOP service.
 
 
 
Make the following link:
 
Ln-S/etc/init. d/dbora/etc/rc0.d/k10dbora
 
Ln-S/etc/init. d/dbora/etc/rc3.d/s99dbora
 
 
 
Run the following command:
 
Chkconfig -- level 345 dbora on
 
 
 
 
 
 
 
2. VI $ ORACLE_HOME/bin/dbstart
 
# Set this to bring up Oracle Net Listener
 
Oracle_home_listner = $ ORACLE_HOME
 
If there is no ASM (Automatic Storage), delete the content. ASM needs to load the content before loading the instance.
 
 
 
 
3. restart the computer. The startup will be slow because em, database, listener, and agent must be started automatically.
 
In this case, OK. Oracle will also start/stop when the machine is switched on and off next time.
 
 
 
The help of installation is reference:

Http://blog.chinaunix.net/u2/67466/showart_585666.html

 

 

 

Putty is successfully logged on to Windows.

 

Log on to Windows with PLSQL developer (create a new user and create a table)

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.