Psychological preparation: 1. when I installed oracle on Linux for the first time, I felt a lot of trouble. As a result, I gave up the first time I didn't install it halfway. Because I was used to the next step on the window interface, it was actually quite simple to think about it now, just be patient. 2. download the software from Baidu. I won't repeat it. 3. Linux machines are all virtual machines, operating systems, RedHat, centos, and casual during their own exercises. Preparations before installation: Software: Oracle 10.2 For Linux edition (32bit) Hardware: Memory: min. 512 M (command: grep memtotal/proc/meminfo) Swap memory: twice the memory (1 GB) (command: grep swaptotal/proc/meminfo) Hard Disk Space: The/tmp directory is 3.5 MB (command: DF-k/tmp). The installation directory is GB to GB, depending on the version (command: DF-K ). Operating System: Red Hat Enterprise Linux as/es 3.0 (Update 4 or later), Red Hat Linux 4.0, SuSE Linux Enterprise Server 9.0 with SP 2 or later, Asianux 1.0, asianux 2.0 (command: CAT/etc/issue) Determine the minimum kernel version: Red Hat Enterprise Linux 3.0 and Asianux 1.0: 2.4.21-27.el Red Hat Enterprise Linux 4.0 and Asianux 2.0: 2.6.9-5.el SuSE Linux Enterprise Server 9.0: 2.6.5-7.201 (Command: # uname-R)
Mandatory software installation package:
Red Hat Enterprise Linux 3.0 and Asianux 1.0: Make-3.79.1 Gcc-3.2.3-34 Glibc-2.3.2-95.20 Compat-db-4.0.14-5 Compat-gcc-7.3-2.96.128 Compat-gcc-C ++-7.3-2.96.128 Compat-libstdc ++-7.3-2.96.128 Compat-libstdc ++ devel-7.3-2.96.128 Openmotif21-2.1.30-8 Setarch-1.3-1 Red Hat Enterprise Linux 4.0 and Asianux 2.0: Binutils-2.15.92.0.2-13.EL4 Compat-db-4.1.25-9 Compat-libstdc ++-296-2.96-132.7.2 Control-center-2.8.0-12 Gcc-3.4.3-22.1.EL4 Gcc-C ++-3.4.3-22.1.el44 Glibc-2.3.4-2.9 Glibc-common-2.3.4-2.9 Gnome-libs-1.4.1.2.90-44.1 (not found in the disc, not installed not found impact) Libstdc ++-3.4.3-22.1 Libstdc +-devel-3.4.3-22.1 Make-3.80-5 Pdksh-5.2.14-30 Sysstat-5.0.5-1 Xscreensaver-4.18-5.rhel4.2 (not found in the disc, not installed not found impact) Setarch-1.6-1
SuSE Linux Enterprise Server 9: Binutils-2.15.90.0.1.1-32.5 Gcc-3.3.3-43.24 Gcc-C ++-3.3.3.3-43.24 Glibc-2.3.3-98.28 Gnome-libs-1.4.1.7-671.1 Libstdc +++ 3.3.3-43.24 Libstdc +-devel-3.3.3-43.24 Make-3.80-184.1 Pdksh-5.2.14-780.1 Sysstat-5.0.1-35.1 Xscreensaver-4.16-2.6
You can use the following command to check: Rpm-Q package_name Note that package_name does not contain any version number, for example, check make-3.79. Rpm-Q make If the above software is not installed, install. Start XWindow, open the application/system settings/add and delete programs If not, install the package. Command: rpm-IVH libaio-0.3.102-1.i386.rpm Installation Process: 1. Create users and groups. The required users are Oracle, the group is dBA, And the oinstall First, check whether the orainst. Loc file exists. This is generated when oracle is created. View the command: # More/etc/orainst. Loc If a list exists, it indicates that it already exists, for example: Inventory_loc =/u01/APP/Oracle Inst_group = oinstall If the path settings are incorrect, you can modify the relevant path information. If not, run the following command: #/Usr/sbin/groupadd oinstall #/Usr/sbin/groupadd DBA Check whether oracle users exist, Command: # ID oracle. If yes, similar content appears: Uid = 501 (Oracle) gid = 501 (oinstall) groups = 501 (oinstall), 502 (DBA) Yes, but it does not belong to the two rated groups. You can use the following command to modify it: #/Usr/sbin/usermod-G oinstall-g dba [, Guest] Oracle (-G is the primary group,-G is the secondary group, and a user can belong to different groups) If it does not exist, create the following command: Command: #/usr/sbin/useradd-G oinstall-g dba Oracle # Passwd Oracle
2. Configure Kernel Parameters You can run the command to view the relevant kernel parameters, such as #/sbin/sysctl-A | grep SEM to view the relevant SEM parameters and modify them. If you need a large number of parameter settings, you can directly modify the parameter file, open the/etc/sysctl. conf file in text mode, copy the following parameters, save and exit. (Parameters are for reference only) 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 = 1048576 Net. Core. rmem_max = 1048576 Net. Core. wmem_default = 262144 Net. Core. wmem_max = 262144 If the system parameter settings are smaller than the preceding parameter values, edit the/etc/sysctl. conf file and add or modify these parameters. Then, run the following command to activate the change: /Sbin/sysctl-P
To provide performance, you need to restrict Kernel Parameters by adding the following content to the file/etc/security/limits. conf: Oracle soft nproc 2047 Hard nproc 16384 Oracle soft nofile 1024 Oracle hard nofile 65536
Add the following content to the/etc/PAM. d/login file: Session required/lib/security/pam_limits.so Session required pam_limits.so If it is Bourne, Bash, or Korn shell, modify the/etc/profile file as follows: If [\ $ user = "oracle"]; then If [\ $ shell = "/bin/KSh"]; then Ulimit-P 16384 Ulimit-N 65536 Else Ulimit-u 16384-N 65536 Fi Fi If it is a C shell, the change value of the environment variable file/etc/CSH. login is as follows: If ($ user = "oracle") then Limit maxproc 16384 Limit descriptors 65536 Endif 3. Create a directory: Run the following command to check whether the base directory exists: # More/var/opt/Oracle/orainst. Loc. If the following similar content appears, it indicates that it exists. Inventory_loc =/u01/APP/Oracle/orainventory Inst_group = oinstall If it does not exist, run the following command to create a directory for storing software ): Mkdir-P/u01/Oracle Chown-r ORACLE: oinstall/u01/Oracle Chmod-r 755/u01/Oracle (Chown is used to set the user group and user to which the directory belongs) (Chmod sets the directory read and write permissions) Oracle Database File storage directory. This does not exist. It is generally set to/u02/oradata Mkdir-P/u02/oradata Chown-r ORACLE: oinstall/u02/oradata Chmod-r 755/u02/oradata Create related data recovery file directories Create an ASM directory group
4. Set Environment Variables View the shell type. Command: # echo $ Shell Switch to the Oracle user, # Su-Oracle Open the parameter file VI. bash_profile and delete the three settings oracle_sid, ORACLE_HOME, or oracle_base (to avoid conflict ). Set display. Command: $ display = local_host: 0.0; export display Local_host: Host Name or IP address Environment variable setting command: $ Oracle_base =/u01/Oracle $ Oracle_sid = orcl $ Export oracle_base oracle_sid Or add it to the file with the following command: $ Su Oracle $ VI ~ /. Bash_profile Modify the following configuration file Export oracle_base =/u01 Export ORACLE_HOME =/u01/Oracle Export oracle_sid = orcl Export Path = $ ORACLE_HOME/bin: $ path ESC (exit the VI editing environment) : WQ (exit the VI Application and save the changes) (Note: The base directory is the basic directory of Oracle, and Oracle is the directory of database products) Make sure that the environment variables of ORACLE_HOME and tns_admin are not set by the user. Do not set these values because of other errors during installation. BASH Shell: Unset ORACLE_HOME Unset tns_admin C shell: Unsetenv ORACLE_HOME Unsetenv tns_admin
5. other settings: # Export tns_admin = $ ORACLE_HOME/Network/admin # Export nls_.zhs16gbk # Export. zhs16gbk To check whether the settings are correct, run the following command: $ Umask $ ENV | more
6. Interface Installation 1) copy the file to/tmp, decompress (unzip/home/Oracle/10201_database_linux32.zip), log on to the Oracle user, and run the runinstaller command under the database. The command is $./runinstaller.
After running [Oracle @ localhost database] $./runinstaller Starting Oracle universal installer... Checking installer requirements... Checking operating system versions: Must be a redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2 Failed < This is because you need to check the version. Ignore it. (Execute the following statement) [Oracle @ localhost database] $./runinstaller-Ignoresysprereqs >>> Ignore the required prerequisites for failing to pass. Continue... Prepare to start Oracle universal installer/tmp/OraInstall2011-12-17_05-37-25AM from the following address. Please wait... [Oracle @ localhost database] $ Oracle universal installer, version 10.2.0.1.0 official Copyright (c) 1999,200 5, Oracle. All rights reserved. Exception Java. lang. unsatisfiedlinkerror:/tmp/OraInstall2011-12-17_05-37-25AM/JRE/1.4.2/lib/i386/libawt. so: libxp. so.6: cannot open shared object file: no such file or directory occurred .. Java. Lang. unsatisfiedlinkerror:/tmp/OraInstall2011-12-17_05-37-25AM/JRE/1.4.2/lib/i386/libawt. So: libxp. so.6: cannot open shared object file: no such file or directory At java. Lang. classloader $ nativelibrary. Load (native method) At java. Lang. classloader. loadlibrary0 (unknown source) At java. Lang. classloader. loadlibrary (unknown source) At java. Lang. runtime. loadlibrary0 (unknown source) At java. Lang. system. loadlibrary (unknown source) At sun. Security. Action. loadlibraryaction. Run (unknown source) At java. Security. accesscontroller. doprivileged (native method) At sun. AWT. nativelibloader. loadlibraries (unknown source) At sun. AWT. debughelper. <clinit> (unknown source) At java. AWT. component. <clinit> (unknown source) At oracle. sysman. OII. oiif. oiifm. oiifmgraphicinterfacemanager. <init> (oiifmgraphicinterfacemanager. Java: 222) At oracle. sysman. OII. oiic. oiicsessioninterfacemanager. createinterfacemanager (oiicsessioninterfacemanager. Java: 193) At oracle. sysman. OII. oiic. oiicsessioninterfacemanager. getinterfacemanager (oiicsessioninterfacemanager. Java: 202) At oracle. sysman. OII. oiic. oiicinstaller. getinterfacemanager (oiicinstaller. Java: 436) At oracle. sysman. OII. oiic. oiicinstaller. runinstaller (oiicinstaller. Java: 926) At oracle. sysman. OII. oiic. oiicinstaller. Main (oiicinstaller. Java: 866) Exception in thread "Main" Java. Lang. noclassdeffounderror At oracle. sysman. OII. oiif. oiifm. oiifmgraphicinterfacemanager. <init> (oiifmgraphicinterfacemanager. Java: 222) At oracle. sysman. OII. oiic. oiicsessioninterfacemanager. createinterfacemanager (oiicsessioninterfacemanager. Java: 193) At oracle. sysman. OII. oiic. oiicsessioninterfacemanager. getinterfacemanager (oiicsessioninterfacemanager. Java: 202) At oracle. sysman. OII. oiif. oiifm. oiifmalert. <clinit> (oiifmalert. Java: 151) At oracle. sysman. OII. oiic. oiicinstaller. runinstaller (oiicinstaller. Java: 984) At oracle. sysman. OII. oiic. oiicinstaller. Main (oiicinstaller. Java: 866) Solution: http://blog.csdn.net/gltyi99/article/details/6736951)
The reason is: the graphical dynamic link library libxp. so.6 that supports printing is missing This error is due to the lack of the system installation package, in versions earlier than rhel5, you can install the xorg-x11-deprecated-libs package, this installation package can be found in the third Disk of the system Cd (for Redhat as4.2, redHat as4.4 is the fourth installation disc) The files I downloaded are as follows: (csdn has been downloaded) LibXp-1.0.0-8.1.el5.i386.rpm Then, [Oracle @ localhost ora Installation File] $ rpm-IVH libXp-1.0.0-8.1.el5.i386.rpm Warning: libXp-1.0.0-8.1.el5.i386.rpm: Header V3 DSA Signature: nokey, key ID e8562897 Error: can't create transaction lock on/var/lib/RPM/_ db.000
This error occurs because/var/lib/the directory has insufficient disk space or has no permissions. Solution: Use the root user for installation. (After the root has installed this, switch back to the Oracle user) Then proceed [Oracle @ localhost database] $./runinstaller-ignoresysprereqs Starting Oracle universal installer... Checking installer requirements... Checking operating system versions: Must be a redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2 Failed < >>> Ignore the required prerequisites for failing to pass. Continue... Prepare to start Oracle universal installer/tmp/OraInstall2011-12-17_05-57-12AM from the following address. Please wait... [Oracle @ localhost database] $ Oracle universal installer, version 10.2.0.1.0 official Copyright (c) 1999,200 5, Oracle. All rights reserved. Xlib: connection to ": 0.0" refused by Server Xlib: no protocol specified Can't connect to X11 window server using ': 0.0' as the value of the display variable. 0.0 0.0 OUI-10025: unable to start interactive Setup session due to the following error: Can't connect to X11 window server using ': 0.0' as the value of the display variable .. Set the display environment variable to OUI-10026: depending on the Unix shell in use, you can use one of the following commands as an example of setting the display environment variable: -For CSH: % setenv display 192.168.1.128: 0.0 -For SH, KSh and Bash: $ display = 192.168.1.128: 0.0; export display Run the following command to view the shell used: Echo $ Shell Run the following command to view the current settings of the display environment variable: Echo $ display -Ensure that the client user has the permission to connect to the X server. OUI-10027: to allow client users to access X server, open xterm, dtterm, or xconsole as the user that starts the session, and type the following command: % Xhost + To test whether the display environment variables are correctly set, run the X11-based program that comes with the local operating system, such as 'xclock ': % <Complete xclock path... see the following section> If xclock cannot run successfully, contact your PC-X server or operating system vendor for help. The typical path of 'xclock 'is'/usr/x11r6/bin/xclock' Solution :() First [Root @ localhost ~] # Hostname-I 127.0.0.1 Check your local IP address. The local IP address is 127.0.0.1. Then Root sets display: [Root @ localhost ~] # Export display = 127.0.0.1: 0.0 Or :( (the following method, for me, doesn't apply for others to refer to http://www.itpub.net/thread-805362-1-1.html) ECT to X11 window server using '192. 100.10.27: 100' as the value of the display variable ------------------------------------ Your error is actually caused by this problem. If you install it in Linux terminal mode, set the display, because Oracle requires a graphical installation interface. Assume that your laptop IP address is 10.10.10.10. Add the following in/etc/profile of Linux: Export display = 10.10.10.10: 0.0 indicates that all images output by Linux are transferred to your notebook. This prompt is very clear! After the display settings are complete, run xhost + IP (install the IP address of the Oracle host, and allow all connections to the X server .) [Root @ localhost ~] # Xhost + 192.168.1.111 Xhost: Unable to open display "192.168.1.111: 0.0" Then, open a new terminal [Root @ localhost ~] # Xhost 192.168.1.111 192.168.1.111 being added to access control list [Root @ localhost ~] # Su-Oracle [Oracle @ localhost ~] $ 2) Select advance install and click Next. 3) Specify the inventory directory and Certificate: point to the previously set directory, such as/u01/APP/Oracle, please point to the correct directory according to the actual situation. The operating system group name should be oinstall. 4) if this is the first time oracle is installed on this machine, you will receive a pop-up window prompting you to run the orainstroot. Sh script as a root user. Log on as a root user, change it to the directory specified in the window, execute the script, and continue the operation. If you do not receive the script, a prompt will be displayed later. 5) Specify the file location: point to the previously set directory, for example,/u01/APP/Oracle, please point to the correct directory according to the actual situation. 6) Select the installation type: select the version as needed. The default value is Enterprise Edition. 7) Inspection of prerequisites related to specific products: If you have been following the steps in this Guide, all inspections should pass smoothly. If one or more checks fail, rectify the problem before continuing. 8) Select Database Configuration: accept the default values create a starter database and general purpose. 9) specify database configuration options: Enter the Global Database Name of the database. This name should contain oracle_sid and server domain name (for example, demo1.orademo.org, where demo1 is oracle_sid and orademo.org is a domain name ). 10) when you enter the global database name, the SID box is automatically filled. Here it is orcl. Accept the default database character set, or select Simplified Chinese zhs16gbk. Do not select create database with sample schemas. 11) Select "Use Database Control for database management. 12) Specify the database file storage option: Select File System and enter the path name (/u02/oradata in this example) to be used for the database file ). 13) Specify the backup and recovery options: do not enable automatic backups. 14) Specify the password for the database mode: Select use the same password for all the accounts, select a password, and enter the password twice for confirmation. Alternatively, you can select the one in the following format to name the password. 15) Summary: displays the summary of installed products. Click Install. 16) installation: This screen has gone through several stages of installing and linking Oracle software. 17) When the installation process ends, a window is displayed, showing the configuration information. Write down the Enterprise Manager URL and click OK to close the window. 18) a "setup privileges" window pops up, prompting you to run the configuration script as the root user. Log on as a root user, switch to the directory indicated in this window, and then execute the root. Sh script. This script prompts you to enter the location of the local bin directory. Press enter to accept the default value. When the script is complete, return to the setup privileges window and click OK. 19) End of installation: Write down the URL shown in the summary and click exit when preparing. 20) You can also install the database software and then create a database through dbca. This improves the installation process. Connection test: Start listening: LSNRCTL start Start the database: sqlplus "/As sysdba" Startup Create a temporary table, add data, query, and delete the table.
Detach a database 1. run $ ORACLE_HOME/bin/localconfig Delete 2. rm-RF $ oracle_base/* # basic Oracle directory 3. rm-F/etc/orainst. Loc/etc/oratab # local Detailed Directory, group setting # Do you want dbstart and dbshut scripts to start and close the database? 4. rm-RF/etc/Oracle 5. rm-F/etc/inittab.css D # initial parameter file 6. rm-F/usr/local/bin/coraenv/usr/local/bin/dbhome/usr/local/bin/oraenv
Reference documentation (if you are familiar with English, the Oracle documentation is the best when installing it ): Http://unix-cd.com/unixcd12/article_5428.html Http://www.cnblogs.com/SharkXu/archive/2007/03/19/Oracle10g_Linux_Install.html Http://www.oracle.com/technology/global/cn/pub/articles/smiley_10gdb_install.html#config
This article is transferred from lihello. Http://www.lihello.com/contentShow.aspx? SID = 5 |