Oracle 10.2 was installed on RHEL4 with VM last week, and many problems were encountered in the middle.
Summary: I have posted a post. If you have any shortcomings, please correct me. Thank you!
References:
Oracle Official Website: http://download.oracle.com/docs/html/B10813_01/toc.htm
Non-Oracle Official Website: http://www.puschitz.com/Installi... uxErrorsAndProblems
1. Log On As A root user and perform the following operations:
1. Check hardware requirements
* Mainly includes:
- **************************************** ******
- * Memory:> = 512 MB *
- * Swap space: 1.0 GB or 2 times the memory size *
- * Temporary space (/tmp>):> = 400 M *
- * Space required for the software:> = 2.5 GB *
- * Database file:> = 1.2 GB *
- **************************************** ******
Copy code
# Cat/etc/issue
# Uname-r
# Grep "model name"/proc/cpuinfo
# Grep MemTotal/proc/meminfo
# Grep SwapTotal/proc/meminfo
# Free
# Df-k/tmp
# Df-k
2. check software requirements (install software packages)
Note: although the official documentation only requires the following software packages (the specific version numbers may be different ),
But in fact, in actual installation, more is often needed.
Binutils-2.15.92.0.2-10.EL4
Compat-db-4.1.25-9
Control-center-2.8.0-12
Gcc-3.4.3-9.EL4
Gcc-c ++-3.4.3-9. EL4
Glibc-2.3.4-2
Glibc-common-2.3.4-2
Gnome-libs-1.4.1.2.90-44.1
Libstdc ++-3.4.3-9. EL4
Libstdc +-devel-3.4.3-9.EL4
Make-3.80-5
Pdksh-5.2.14-30
Sysstat-5.0.5-1
Xscreensaver-4.18-5.rhel4.2
2.1 First, find the above RPM package on your RHEL disc;
2.2 then, execute the following command:
# Rpm-Uvh binutils *
# Rpm-Uvh compat-db *
# Rpm-Uvh control-center *
# Rpm-uv h gcc-3.4 *
# Rpm-Uvh gcc-c ++ *
# Rpm-uv h glibc-2.3 *
# Rpm-Uvh glibc-common *
# Rpm-Uvh gnome-libs *
# Rpm-Uvh libstdc ++-3.4 *
# Rpm-Uvh libstdc ++-devel *
# Rpm-Uvh make *
# Rpm-Uvh pdksh *
# Rpm-Uvh sysstat *
# Rpm-Uvh xscreensaver *
Note: If you are prompted to install other commands when executing the preceding commands, copy the corresponding package from the RHEL4 installation disk and continue the installation.
3. Create a user, group, and installation directory for the database to be installed.
3.1 create users and related groups
#/Usr/sbin/groupadd oinstall
#/Usr/sbin/groupadd dba
#/Usr/sbin/useradd-g oinstall-G dba oracle
# Passwd oracle
3.2 Create and authorize related directories
- # Mkdir-p/usr/app/oracle (the Oracle base directory)
- # Mkdir-p/usr/oradata (an optional Oracle datafile directory)
- # Chown-R oracle: oinstall/usr/app/oracle/usr/oradata
- # Chmod-R 77
Copy code
4. Configure Kernel Parameters
4.1 modify and Check core parameters
4.1.1 modify parameters
# Vi/etc/sysctl. conf
Note: add the following content to the end of the file:
Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
Kernel. shmall = 2097152
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
4.1.2 enable new parameters
#/Sbin/sysctl-p
4.1.3 check parameters
#/Sbin/sysctl-a | rpm sem
#/Sbin/sysctl-a | rpm shm
#/Sbin/sysctl-a | rpm file-max
#/Sbin/sysctl-a | rpm ip_local_port_range
4.2 set shell restrictions for oracle users
4.2.1 edit limits. conf
# Vi/etc/security/limits. conf
Note: add the following rows.
# Nofile (maximum number of file descriptors that can be opened) and nproc (maximum number of processes available to a single user)
* Soft nproc 2047
* Hard nproc 16384
* Soft nofile 1024
* Hard nofile 65536
4.2.2 edit/etc/pam. d/login and add one line:
# Vi/etc/pam. d/login
Session required/lib/security/pam_limits.so
4.2.3 edit/etc/profile and add the following parts:
- # 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
Copy code
5. Load the CD or upload and decompress the file.
5.1 if CD is loaded:
# Mount/media/cdrom
5.2 if you upload and Extract files
5.2.1 upload: ftp commands or ftp tools are available
5.2.2 decompression:
# Unzip 10201_database_linux32.zip-d/tmp/oracle
5.2.3 change owner and permissions:
# Chown oracle/tmp/oracle
# Chmod-R + 755/tmp/oracle
5.3 set it to be installed on an Oracle-installed machine by an oracle user
- # Xhost localhost: oracle
Copy code
2. Log On As an oracle user and perform the following operations
1. Configure oracle user environment variables
1.1 switch to Oracle user
# Su-oracle
$ Cd
1.2 set Environment Variables
$ Vi. bash_profile (Add the following content after the file)
Export ORACLE_BASE =/usr/app/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/10.2.0/db_1
Export ORACLE_SID = SHDB
Export PATH = $ PATHHOME/binORACLE_HOME/bin
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib
Export LANG = zh_CN.GBK
Export NLS_LANG = "SIMPLIFIED CHINESE_CHINA". ZHS16GBK
1.3 make environment variables take effect
$ Source. bash_profile
1.4 set the local character set type
$ Export LC_CTYPE = en_US.UTF-8
2. Start Installation
Note: To facilitate subsequent installation, it is best to open two shell windows before installation, one with root login, and the other with oracle Login
2.1 $./runInstaller
2.2 perform the following operations according to the installation prompt. In the middle, the root user needs to execute two scripts:
# $ ORACLE_BASE/oraInventory/orainstRoot. sh
# $ ORACLE_HOME/root. sh
Note: Replace $ ORACLE_BASE and $ ORACLE_HOME with the actual directory.
2.3 do not create a database during installation;
Nothing else. You only need to follow the prompts to perform the corresponding operations until the installation is successful.
Iii. Installation Problems
1 Q: After the./runInstaller is executed, the installation interface cannot be displayed, and the following error message is displayed:
Bytes ---------------------------------------------------------------------------------------------
Xlib: connection to ": 0.0" refused by server
Xlib: No protocol specified
Error: Can t open display: 0.0
A: run the following command as root on the machine where Oracle is installed:
- # Xhost localhost: oracle
Copy code
2 Q: Garbled characters are displayed on the pop-up page during installation.
Bytes ---------------------------------------------------------------------------------------------
A: Set the local character set type as an oracle user
$ Export LC_CTYPE = en_US.UTF-8
3 Q: A OUI-10066 error is prompted during installation:
Not all the dependencies for the component Oracle Database 10g 10.2.0.1.0 cocould be found.
Missing component oracle.doc 10.2.0.1.0.
Bytes ---------------------------------------------------------------------------------------------
A: it may be that the oracle Installation File is not completely decompressed. decompress it and install it again.
Note: If you decompress the package with root, change its owner to oracle.
4 Q: INFO:/bin/sh:/usr/bin/gcc: No such file or directory
......
INFO: cannot stat 'ntcontab. o'
INFO: No such file or directory
......
Exception Name: MakefileException
Exception String: Error in invoking target 'ntcontab. o'
Makefile '/usr/app/oracle/product/10.2.0/db_1/network/lib/ins_net_client.mk'
Bytes ---------------------------------------------------------------------------------------------
A: Check whether all patches in Linux are installed, especially the gcc package.
4. Create and configure a database (use an oracle user to log on to RHEL)
1. Create a database
1.1 log on to RHEL as an oracle user and enter:
$ Dbca
1.2 When entering the database SID, be sure to keep the value consistent with the $ ORACLE_SID value in the oracle configuration file.
Otherwise, the database cannot be started after it is created (see the following section for details ).
2. Configure the service name
Modify listener. ora
$ Vi $ ORACLE_HOME/network/admin/tnsname. ora
Add the following content:
--------------------------------------------------------------------------
# Note: Set the HOST value to the IP address of the machine on which you want to install the database.
SHDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.135.128) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = SHDB)
)
)
3. Configure the Database Listener
3.1 modify listener. ora
$ Vi $ ORACLE_HOME/network/admin/listener. ora
Enter the following content:
--------------------------------------------------------------------------
# Note: Set the HOST value to the IP address of the machine on which you want to install the database.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC0 ))
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.135.128) (PORT = 1521 ))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME =/usr/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = SHDB)
(ORACLE_HOME =/usr/app/oracle/product/10.2.0/db_1)
)
)
3.2 start the listener
$ Lsnrctl start
4. Start the database
$ Sqlplus/as sysdba
$ Startup
If the database can be started normally, the configuration ends here.
V. database configuration problems
1 TNS-01155: Incorrectly specified SID_LIST
NL-00303: syntax error in NV string
Bytes ---------------------------------------------------------------------------------------------
A: it may be that the sid set in profile is inconsistent with the SID of the DB you created.
(1) check whether the database SID is consistent with the ORACLE_SID of. bash_profile.
$ Echo $ ORACLE_SID
$ Ls $ ORACLE_HOME/dbs/init *. ora
(2) modify the ORACLE_SID of. bash_profile to create the SID of the DB for you, save and take effect.
$ Source. bash_profile
(3) create a pfile
$ Sqlplus/nolog
SQL> connect/as sysdba
SQL> create pfile = '/usr/app/oracle/product/10.2.0/db_1/initSHDB. ora 'from spfile = '/usr/app/oracle/product/10.2.0/db_1/dbs/spfileSHDB. ora ';
SQL> startup pfile = '/usr/app/oracle/product/10.2.0/db_1/initSHDB. ora'
Or
SQL> startup nomount pfile = '/usr/app/oracle/product/10.2.0/db_1/initSHDB. ora'
Or
SQL> startup
Note: Modify the pfile and spfile paths to the actual locations of the two files.
2 Q: ORA-01102: cannot mount database in EXCLUSIVE mode
Bytes ---------------------------------------------------------------------------------------------
A: An exception may be caused by Database loading or sharing, and the following problems may occur:
(1) The files "lk <sid>" and "sgadef <sid>. dbf" used to lock the memory exist.
Oracle $ cd $ ORACLE_HOME/dbs
Oracle $ ls-l sgadef <sid>. dbf
* Delete it if it exists.
Oracle $ rm sgadef <sid>. dbf
Oracle $ ls-l lk <sid>
* Delete it if it exists.
Oracle $ rm lk <sid>
(2) background processes such as pmon, smon, lwgw, and dbwr still exist.
Oracle $ ps-ef | grep ora _ | grep $ ORACLE_SID
* If there are residual pmon background processes, kill-9 to remove them.
Oracle $ kill-9 pid
(3) The shared memory opened by Oracle has not been released
① Clear shared memory segments
Oracle $ ipcs-m -- show that the owner is an Oracle user
Oracle $ ipcrm-m <Shared_Memory_ID>
② Clear signal set
Oracle $ ipcs-s -- show that the owner is an Oracle user
Oracle $ ipcrm-s <Semaphore_ID>
Http://www.itpub.net/thread-910255-1-1.html