1. Create users and user groups
# Groupadd dba-g [Group ID] dba
# Groupadd dba-g [Group ID] oinstall
# Useradd-c [comment]-g [main user group]-G [user group]-d/ora11g-m-u [user id]-o
Ii. Decompress authorization
The oracle Installation File is uploaded to linux. The current root user changes the oracle Installation File and the "users" and "groups" in the directory ":
# Chown-Roracle: oinstall [directory or file]
# Chmod-R 775 [directory or file]
Note: You must change the user and group permissions in the directory where the installation file is located. Otherwise, you cannot decompress the installation file. The decompressed package may contain two compressed files. Check the package carefully.
After the File Permission is changed, enter the oracle user:
# Su oracle
Decompress the oracle linux file:
# Unzip [file name]
3. Check the installation package
Check whether the following packages are installed. If not, install them first:
01 binutils-2.17.50.0.6-2.el5
02. compat-libstdc ++-33-3.2.3-61
03 elfutils-libelf-0.125-3.el5
04 elfutils-libelf-devel-0.125
05. glibc-2.5-12
06 glibc-common-2.5-12
07, glibc-devel-2.5-12
08, gcc-4.1.1-52
09. gcc-c ++-4.1.1-52
Libaio-0.3.106
11. libaio-devel-0.3.106
12. libgcc-4.1.1-52
13. libstdc ++-4.1.1
14. libstdc ++ devel-4.1.1-52.e15
15. make-3.81-1.1
16. sysstat-7.0.0
17. unixODBC-2.2.11
18. unixODBC-devel-2.2.11
# Rpm-qa | grep [make gcc glibc compatopenmotif21 setarch, etc.]
You can use # yum install [software name] to install the software.
Iv. Run and install
Before installation, first set the DISPLAY environment variable, which is used to display linux images. To install oracle, you must set this environment variable.
Set the xservice permissions for all users under the root user:
# Xhost +
Switch oracle users:
# Su oracle
Set the display environment variable:
Note: The environment variable DISPLAY =: 0.0, ": 0.0" indicates the local machine.
# ExportDISPLAY =: 0.0
You can run the decompressed Installation File below:
# Cd database // enter the decompressed installation directory
Run the installation file:
# Cd runInstaller
The following information is displayed:
1. Fill in personal information
2. Set port and other information, skip
3. Select create and configure a database.
4. Select the oracle configuration type and the server type. Desktop: Minimal configuration, server: standard configuration
5. select a single instance for Installation
6. Select "typical installation"
7. Configure the installation path and password.
8. Select "all"
9. Next Step
9. Confirm the installation information.
10. Installing
11. It's so tired!
V. Set Environment Variables
Since oracle cannot be used immediately after the installation is complete, you need to set the environment variable to use it:
Go to the oracle user and go to the main directory:
# Su oracle
# Cd ~
Edit the environment variable file:
# Vi. bash_profile
Add the following code to the file:
PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin
ExportORACLE_BASE =/u01/app/oracle
ExportORACLE_HOME = $ ORACLE_BASE/product/11.2.0/dbhome_1
ExportORACLE_SID = orcl
Note: The installation directory structure is different, and the directory specified by the environment variable is also different. Please set it with caution.
Save and make it take effect immediately:
# Source. bash_profile
Vi. Configure an instance
Start the netca interface:
# Netca
1. Select to configure an oracle instance
2. Add an oracle instance
3. Enter the Instance name
7. Start an ORACLE instance
View instance status:
# Lsnrctl status
Start an instance:
# Lsnrctl start
For details, you can use # lsnrdbms help to view all the lsnrctl Command Options.
8. Start the database
If the database is not started, you cannot log on to the database or verify the user name and password. To start the database, you must first start the database in the sqlplus environment without logging on to the database server.
Log on to the sqlplus environment without user logon and parameters:
# Sqlplus/nolog
Connect to the database as sysdba:
# SQL> conn/assysdba
Start the database:
# SQL> startup
9. Create an ORACLE user
Oracle has two users: system and sys. Users can directly log on to the system user to create other users, because the system has the permission to create other users. When installing oracle, the user or system administrator can first create a user for himself.
Log on to an oracle user:
# Sqlplus system/
Create user
# SQL> createuser [username] identified by [userpasswd]