Step 1: run the following command as the root user to create a user, group, and set the password usrsbingroupaddoinstallus.
Step 1: run the following command as the root user to create a user, group, and set the password/usr/sbin/groupadd oinstall/us
Install Oracle 10g technical documents in CentOS
Step 1: run the following command as the root user to create a user, group, and set the password.
/Usr/sbin/groupadd oinstall
/Usr/sbin/groupadd dba
/Usr/sbin/useradd-m-g oinstall-G dba oracle
Id oracle # Check whether an oracle user exists
Passwd oracle # Set Password
Step 2: run the following command as the root user to assign Permissions
Mkdir-p/u01/oracle # Installation Software Directory
Mkdir-p/u02/oradata # store oracle Database Files
Chown-R oracle: oinstall/u01/oracle/u02/oradata # assign Permissions
Chmod-R 775/u01/oracle/u02/oradata
Step 3: run the following command as the root user to allocate Kernel Parameters
# Vim/etc/sysctl. conf
Add at the end
Kernel. shmmax = 4294967295
Kernel. shmall = 268435456
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 = 4194304
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 262144
# Sysctl-p (make the parameter configuration take effect immediately)
The specific variables are described as follows:
Kernel. shmmax = 4294967295 // This parameter defines the maximum size of the shared memory segment (in bytes ). The default value is 32 M. For oracle, the default value is too low. Here it is set to 4G 4*1024*1024*1024-1 = 4294967295.
Kernel. shmall = 268435456 // This parameter indicates the total amount of shared memory that the system can use at one time (in page ). The default value is 2097152, which does not need to be modified. Set 256 m 256*1024*1024 = 268435456 here.
Kernel. shmmni = 4096 // This kernel Parameter is used to set the maximum number of shared memory segments within the system range. The default value of this parameter is 4096. Usually no need to change
Kernel. sem = 250 32000 100 128 // indicates the set semaphore
Fs. file-max = 65536 // indicates the maximum number of file handles. File handle setting indicates the number of files that can be opened in linux
Net. ipv4.ip _ local_port_range = 1024 65000 // port range
Net. core. rmem_default = 4194304 // default Receiving Window Size
Net. core. rmem_max = 4194304 // maximum size of the Receiving Window
Net. core. wmem_default = 262144 // default sending window size
Net. core. wmem_max = 262144 // maximum size of the sending window
Step 4: run the following command as the root user (for security reasons, set step 4): Restrict oracle users' access to resources
A: restrict user access to resources.
# Vim/etc/security/limits. conf Add the following content after the file
# Add this line
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
B. Restrict SHELL access to resources
# Add the following content to the end of 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
C. Verify the user
# Vim/etc/pam. d/login
Session required pam_limits.so
Session required/lib/security/pam_limits.so
Step 5: Set environment variables for oracle users
In centos, the user configuration file must be stored in/home/oracle/. bash_profile.
# Vim/home/oracle/. bash_profile
Add at the end of the file:
Export ORACLE_BASE =/u01/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/dbhome_1
Export ORACLE_SID = oratest
Export PATH = $ ORACLE_HOME/bin:/usr/local/bin:/sbin: $ PATH
Export ORACLE_TERM = xterm
Export TNS_ADMIN = $ ORACLE_HOME/network/admin
Export ORA_NLS10 = $ ORACLE_HOME/nls/data
ExportLD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/local/lib: $ ORACLE_HOME/mongom/lib
ExportCLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib: $ ORACLE_HOME/network/jlib
Export THREADS_FLAG = native
Export NLS_LANG = 'American _ america '. utf8
Export NLS_DATE_FORMAT = 'yyyy-MM-DD HH24: MI: ss'
Alias net = 'CD/u01/oracle/product/11.2.0/dbhome_1/network/admin'
Alias bd = 'CD/u01/oracle/diag/rdbms/yttestnew/dw01/trace /'
Alias rman = 'maid'
Alias dbs = 'CD/u01/oracle/product/11.2.0/dbhome_1/dbs'
The specific situation can be adjusted according to its own directory
Then source/home/oracle/. bash_profile is used to make it take effect.
Step 6: Install necessary software installation packages as a root user. Using yum can reduce a lot of trouble. We recommend that you install these installation packages as much as possible. Otherwise, there will be a lot of unnecessary troubles in the future.
Yum install yum-fastestmirror-y
Yum install compat-db *
Yum install compat-libc *
Yum install compat-gcc *
Yum install libXp. so.6
Yum install libc -*
Yum install libaio *
Yum install openmotif
Yum install glibc-devel *
Yum install libgcc *
Yum install gnome-lib *
Step 7: Use the root user to first set the permission to share the current X11, that is, the current screen
# Xhost +
Step 8: use oracle to define the DISPLAY variable so that the DISPLAY is output to X11, that is, the current 0.0 DISPLAY devices.
$ Export DISPLAY =: 0.0
If Step 7 is not performed, the following error is reported in Step 8:
Xlib: connection to ": 0.0" refused by server
Xlib: Noprotocol specified
Solution:
1. log out of oracle and log in with root;
2. Enter the following in the root command line:
[Root @ localhost ~] # Xhost local: oracle non-network local connections being added to accesscontrol list