I used putty to connect to redhat and successfully installed oracle11g by following the steps below. (Optional, not all of them are operated, especially the part that modifies the operating system parameters at the beginning)
original:
http://www.2cto.com/database/201307/229218.html
Main part: (1, 2, 3, 5, 6, operating system parameters and other parts are omitted)
4. Create the required operating system groups and users
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
Set oracle user password
passwd oracle
7. Create an installation directory (you can choose a directory with more space to create it according to the situation)
mkdir -p /u01/app/
chown -R oracle:oinstall /u01/app/
chmod -R 775 /u01/app/
8. Create the /etc/oraInst.loc file with the following contents
nventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall
Change file permissions
chown oracle:oinstall /etc/oraInst.loc
chmod 664 /etc/oraInst.loc
9. Set oracle environment variables
su - oracle
you ~ / .bash_profile
Add the following at the end
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl
Note that, in addition to ORACLE_BASE and ORACLE_SID, (/etc/profile and .bash_profile) do not set any oracle-related environment variables (ORACLE_HOME, PATH, LD_LIBRARY_PATH, etc.).
make the settings take effect
source /home/oracle/.bash_profile
Check environment variables:
env
10. Unzip the oracle installation file
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
11. Copy the Response File Template
mkdir etc
cp /home/oracle/database/response/* /home/oracle/etc/
Set response file permissions
su - root
chmod 700 /home/oracle/etc/*.rsp
12. Install Oracle software silently
su - oracle
Modify the response file /home/oracle/etc/db_install.rsp for installing Oracle software
oracle.install.option=INSTALL_DB_SWONLY //29 line installation type
ORACLE_HOSTNAME=java-linux-test //37 line host name
UNIX_GROUP_NAME=oinstall //42 line install group
INVENTORY_LOCATION=/u01/app/oracle/oraInventory //47 line INVENTORY directory
SELECTED_LANGUAGES=en,zh_CN,zh_TW //Line 78 select language
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 //83 行 oracle_home
ORACLE_BASE=/u01/app/oracle //88 行 oracle_base
oracle.install.db.InstallEdition=EE //99 line oracle version
oracle.install.db.isCustomInstall=true //108 lines of custom installation
oracle.install.db.DBA_GROUP=dba //142 line dba user group
oracle.install.db.OPER_GROUP=oinstall //147 line oper user group
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE //160 row database type
oracle.install.db.config.starterdb.globalDBName=orcl //165行 globalDBName
oracle.install.db.config.starterdb.SID=orcl //170行 SID
oracle.install.db.config.starterdb.memoryLimit=512 //192 lines automatically manage the minimum memory of memory (M)
oracle.install.db.config.starterdb.password.ALL=oracle //Line 233 sets all database users to use the same password
DECLINE_SECURITY_UPDATES=true //Line 385 sets security updates
Perform a silent installation of Oracle software
cd database
./runInstaller -silent -force -responseFile /home/oracle/etc/db_install.rsp
During the installation, if it prompts [WARNING], ignore it, and the installation program is still in progress. If [FATAL] appears, the installation program has stopped.
View the installation log information to understand the installation progress
cd $ORACLE_BASE/oraInventory/logs
tail -100f installActions*.log
A prompt similar to the following appears to indicate that the installation is complete:
#-------------------------------------------------------------------
...
/u01/app/oracle/product/11.2.0/db_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
4. Return to this window and hit "Enter" key to continue
Successfully Setup Software.
#-------------------------------------------------------------------
Execute root.sh as root user
su root
/u01/app/oracle/product/11.2.0/db_1/root.sh
Increase oracle environment variable
su - oracle
you ~ / .bash_profile
Add the following at the end
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/JRE/lib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export LIBPATH=${CLASSPATH}:$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib
export ORACLE_OWNER=oracle
export SPFILE_PATH=$ORACLE_HOME/dbs
export ORA_NLS10=$ORACLE_HOME/nls/data
make the settings take effect
source /home/oracle/.bash_profile
13. Configure the network silently
$ORACLE_HOME/bin/netca /silent /responseFile /home/oracle/etc/netca.rsp
14. Install database silently
Modify the response file /home/oracle/etc/dbca.rsp to install only the database
GDBNAME="orcl.java-linux-test" //The name of the global database on line 78=SID+host domain name
SID="orcl" //149行 SID
CHARACTERSET="AL32UTF8" //415 lines of encoding
NATIONALCHARACTERSET="UTF8" //425 lines of encoding
Do a silent install of the database
$ORACLE_HOME/bin/dbca -silent -responseFile /home/oracle/dbca.rsp
Instance check after database creation
ps -ef | grep ora_ | grep -v grep | wc -l
ps -ef | grep ora_ | grep -v grep
Monitoring and checking after the library is built
lsnrctl status
If the following error occurs
lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
Solution: Execute the following command under the root user
su - root
setenforce 0
15. Modify the oracle startup configuration file
su - oracle
vi /etc/oratab
racl:/u01/app/oracle/product/11.2.0/db_1:Y //Change "N" to "Y"
This enables this instance, the listener, to be started via dbstart.
dbstart $ORACLE_HOME
At this point, all oracle processes are closed and the listener is also stopped.
dbshut $ORACLE_HOME
Check the listener status again.
lsnrctl status
If using archive logs
sqlplus / as sysdba
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database archivelog;
SQL> alter database flashback on; (execute if you want to enable database flashback)
SQL> alter database open;
SQL> execute utl_recomp.recomp_serial(); (recompile all possible invalid objects)
SQL> alter system archive log current; (manual archive test)
Database user checks for default installations
SQL> set lines 256 pages 500
SQL> select USER_ID,USERNAME,ACCOUNT_STATUS,DEFAULT_TABLESPACE from dba_users order by