Oracle linux 5.8Install oracle 10g database
1. Download oracle luinux 5.8g and oracle 10g database software
two。 Operating system installation
(1)。 Graphical interface installation
(2)。 System partition
/ Root partition (17G)
/ boot install oracle partition (512m)
Swap switching Partition (4G)
(3)。 Disable the firewall
(4)。 Disable Selinux
3. Build yum network source
[root@oracle10g ~] # cd / etc/yum.repos.d/
[root@oracle10g yum.repos.d] # wget http://public-yum.oracle.com/public-yum-el5.repo
[root@oracle10g yum.repos.d] # vim public-yum-el5.repo
[ol5_u8_base]
Name=Oracle Linux $releasever Update 8 installation media copy ($basearch)
Baseurl= http://yum.oracle.com/repo/OracleLinux/OL5/8/base/$basearch/
Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Gpgcheck=1
Enabled=1-on
[root@oracle10g yum.repos.d] # yum repolist
4. Install the system dependency package
[root@oracle10g ~] # yum install binutils compat-* gcc-* glibc-* libXp libXt libXtst libaio* libgcc libstdc++-* libgomp make numactl-devel sysstat elfutils-libelf-devel unixODBC-*-y
5. Modify kernel parameters
[root@oracle10g ~] # vim / etc/sysctl.conf
Kernel.shmall = 2097152
Kernel.shmmax = 2147483648
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Fs.file-max = 65536
Net.ipv4.ip_local_port_range = 1024 65000
Net.core.rmem_default = 262144
Net.core.rmem_max = 262144
Net.core.wmem_default = 262144
Net.core.wmem_max = 262144
[root@oracle10g ~] # sysctl-p-- the added parameter takes effect
6. User restrictions on the system
[root@oracle10g ~] # vim / etc/security/limits.conf
Oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536
[root@oracle10g ~] #
7. User restrictions on shell
[root@oracle10g ~] # vim / 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
[root@oracle10g] #. / etc/profile
8. User login verification module
[root@oracle10g ~] # vim / etc/pam.d/login
Session required / lib/security/pam_limits.so
Session required pam_limits.so
[root@oracle10g ~] #
9. Parse the host and IP address, modify the system version
[root@oracle10g ~] # vim / etc/hosts
192.168.2.143 oracle1
[root@oracle10g ~] # vim / etc/redhat-release
Red Hat Enterprise Linux Server release 4 (Tikanga)
[root@oracle10g ~] # vim / etc/oracle-release
Oracle Linux Server release 4
[root@oracle10g ~] #
10. Create users and user groups
[root@oracle10g ~] # groupadd-g 500oinstall
[root@oracle10g] # groupadd-g 501 dba
[root@oracle10g] # useradd-u 500-g oinstall-G dba-d / home/oracle oracle
[root@oracle10g ~] # echo 500 > / proc/sys/vm/hugetlb_shm_group-- writes the UID of an oracle user to a file
[root@oracle10g] # chown-R oracle:oinstall / home/oracle
[root@oracle10g ~] # password oracle-- set password
11. Create directories and set environment variables
[root@oracle10g ~] # mkdir / u01/oracle/product/10.2.0.1/db_1-p
[root@oracle10g] # chown-R oracle:oinstall / u01 /
[root@oracle10g ~] # vim / home/oracle/.bash_profile
Export ORACLE_BASE=/u01/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1/db_1
Export ORACLE_SID=orcl10g
Export PATH=$ORACLE_HOME/bin:$PATH
[root@oracle10g] #. / home/oracle/.bash_profile
twelve。 Extract the oracle 10g software and install it
[root@oracle10g ~] # xhost +
Access control disabled, clients can connect from any host
[root@oracle10g ~] # su-oracle
[oracle@oracle10g ~] $zcat 10201_database_linux_x86_64.cpio.gz | cpio-idvm
[oracle@oracle10g ~] $cd database/
[oracle@oracle10g database] $. / runInstaller
[root@oracle10g ~] # sh / u01/oracle/oraInventory/orainstRoot.sh
Changing permissions of / u01/oracle/oraInventory to 770.
Changing groupname of / u01/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@oracle10g ~] # sh / u01/oracle/product/10.2.0.1/db_1/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= / u01/oracle/product/10.2.0.1/db_1
Enter the full pathname of the local bin directory: [/ usr/local/bin]:
Copying dbhome to / usr/local/bin...
Copying oraenv to / usr/local/bin...
Copying coraenv to / usr/local/bin...
Creating / etc/oratab file...
Entries will be added to the / etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
[root@oracle10g ~] #
13. Create a database
[oracle@oracle10g database] $dbca
14. Create a monitor
[oracle@oracle10g database] $netca
[oracle@oracle10g database] $lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0-Production on 12-NOV-2016 16:56:10
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL > status
Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=oracle10g) (PORT=1521)
STATUS of the LISTENER
-
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0-Production
Start Date 12-NOV-2016 16:52:01
Uptime 0 days 0 hr. 4 min. 11 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File / u01/oracle/product/10.2.0.1/db_1/network/admin/listener.ora
Listener Log File / u01/oracle/product/10.2.0.1/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=oracle10g) (PORT=1521))
(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=EXTPROC0)
Services Summary...
Service "PLSExtProc" has 1 instance (s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler (s) for this service...
Service "orac10g" has 1 instance (s).
Instance "orac10g", status READY, has 1 handler (s) for this service...
Service "orac10gXDB" has 1 instance (s).
Instance "orac10g", status READY, has 1 handler (s) for this service...
Service "orac10g_XPT" has 1 instance (s).
Instance "orac10g", status READY, has 1 handler (s) for this service...
The command completed successfully
LSNRCTL >
14. Log in to oracle database
[oracle@oracle10g database] $sqlplus system/system@orac10g
SQL*Plus: Release 10.2.0.1.0-Production on Sat Nov 12 16:56:48 2016
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit Production
With the Partitioning, OLAP and Data Mining options
SQL > select * from dual
D
-
X
SQL > create table t (a number)
Table created.
SQL > insert into t values (1)
1 row created.
SQL > select * from t
A
-
one
SQL >