Install Oracle9i on Solaris

Source: Internet
Author: User

First, I will explain my experiment environment: an Ultra 10, the system is Solaris 8, and Xmanager is used on XP. (My sub-memory is 256 MB, and it was used for one day and one night, so everyone should have a strong psychological preparation !) You don't need to elaborate on the installation of Solaris! Let's go to the question!
1. Add system parameters and corresponding users/groups
1. Modify system parameters and edit the/etc/system file.
# Cp/etc/system. bkp // It is recommended to back up the data before modification.
# Vi/etc/system
Forceload: sys/shmsys
Set shmsys: shminfo_shmmax = 67108864 // these values are not fixed and can be specified by yourself.
Set shmsys: shminfo_shmmin = 1
Set shmsys: Sh minfo_shmmni = 400
Set shmsys: shminfo_shmseg = 200
Forceload: sys/semsys
Set semsys: seminfo_semmns = 400
Set semsys: seminfo_semmni = 100
Set semsys: seminfo_semms = 200
Set ulimit = 3000000
2. Modify the file/etc/services
# Vi/etc/services
Orasrv 1600/tcp # oracle
Listener 1700/tcp # oracle
3. Create a user/group
# Groupadd dba // Add a dba group
# Useradd-c oracle-g dba-d/home/oracle-m-s/bin/bash oracle // Add an oracle user
# Passwd oracle // modify the user's password
# Sync
# Sync // after saving the modified file, restart the system to make the parameter take effect.
# Reboot
2. Modify the user's Environment Variables
Su-oracle
$ Vi. bash_profile
# Bash profile
Umask 022
ULIMIT = 3000000
ORACLE_SID = ota // set based on actual conditions
ORACLE_BASE =/home/oracle
ORACLE_HOME = $ ORACLE_BASE/product/ 9.2
ORACLE_TERM = sun5
Export ULIMIT ORACLE_SID ORACLE_BASH ORACLE_HOME ORACLE_TERM
PATH = $ PATH/ORACLE_HOME/bin :.
Export PATH
$. Bash_profile // save the file and run the command to make the environment variable take effect.
$ Mkdir product // The oracle installer will also add
$ Cd product
$ Mkdir 9.2
Iii. Install oracle9i
1. log out and log in as an oracle user to check disk space.
2. Place the first CD of oracle9i in the CD-ROM and start Installation
$ Cd/
$/Cdrom/disk1/runInstaller // close all windows that access the optical drive during installation, and do not enter the CD directory to execute the runInstaller program; otherwise, you cannot change the disk.
3. oracle Universal Installer starts the WELCOME interface and click "NEXT"
4. Go to the "Inventory" Page, use the default path, and click OK.
5. go to the "Unix Group Name" Page, enter "dba" for the Group Name, click NEXT, and a dialog box pops up. Run/tmp/orainstRoot as prompted. sh script. generate oraInst in/var/opt/oracle. run/tmp/oraInstall/orainstRoot as the root user. sh script. create the oraInvertory directory in/home/oracle.
6. Go to the "File Locations" page, where "Destination..." is the path indicated by the default ORACLE_HOME. click NEXT.
7. Go to the "Available Products" Page, select the first item "Oracle9i Database", click "products versions" in the lower right corner, and select "Simplified Chinese" and NEXT.
8. Go to the "Installation Types" Page. To maximize the Installation, select "Enterprise Edition", select "Custom" for free, and click "NEXT.
9. Go to the "Datebase Configuration" Page. Note: Select "Customized" to create a database, such as the data file size and location. NEXT.
10. Go to the "Operating System Groups" Page and enter dba in the osdba and OSOPER boxes.
11. Specify the Global Database Name and SID. Click NEXT. // note that the Name and SID must be the same as the specified one, ota
12. If "Custom" is selected in step 1, a product list is displayed. Click NEXT after the selection is complete.
13. On the "Summary" Page, summarize the content to be installed. Click NEXT after confirmation.
14. Start the installation. The installation takes a long time. You will be prompted to change the disk. In the prompt, change the PATH to/cdrom/disk2 &/cdrom/disk3.
15. after "Install Successful", a dialog box will prompt you to run/home/oracle/product/9.2/root as root. sh script, Enter the full pathname of the local bin directory: y. // generate some commands in/usr/local/bin and generate the oratab file in/var/opt/oracle.
16. Start to create a database. // this step is very slow on my m machine. It is really intolerable. Haha!
17. The "Net Configuration Assistant" interface is displayed, and the "perform typical configuration" item is selected for typical network Configuration.
18. installation is complete.
4. oracle startup and Shutdown
Different from the 8i, Oracle9i removes the SVRMGRL tool. You can only use sqlplus to start and stop a database.
$ Sqlplus/nolog
SQL> connect/as sysdba
Connected.
SQL> startup (or shutdown)
Start listening
$ Lsnrctl start
Stop listening
$ Lsnrctl stop
5. Oracle server starts automatically when the operating system is started
(The following method is for reference only. You may not try every instance !)
1. Modify the file/var/opt/oracle/oratab
Su-oracle
$ Cd/var/opt/oracle
$ Vi oratab // change the last N in ota:/home/oracle/product/9.2: N to Y
2. Write the startup script/etc/init. d/dbora.
Su-root
$ Cd/etc/init. d
$ Vi dbora
ORACLE_HOME =/home/oracle/product/9.2
ORACLE_OWNER = oracle
If [! "$1"]; then echo "no parameter"; exit; fi
If [! -F $ ORACLE_HOME/bin/dbstart-o! -D $ ORACLE_HOME]
Then
Echo "Oracle startup: cannot start"
Exit
Fi
Case "$1" in
'Start ')
Su-$ ORACLE_OWNER-c "$ ORACLE_HOME/bin/dbstart"
Su-$ ORACLE_OWNER-c "Isnrctl start listener"
;;
'Stop ')
Su-$ ORACLE_OWNER-c "$ ORACLE_HOME/bin/dbshut &"
Su-$ ORACLE_OWNER-c "lsnrctl stop listener &"
Sleep 30 # give datebase some time to shutdown
;;
Esac
$ Ln-s/etc/init. d/dbora/etc/rc0.d/K10dbora
$ Ln-s/etc/init. d/dbora/etc/rc2.d/S99dbora
$ Reboot // restart system check
Vi. Common Oracle commands
Dbca-used to create, delete, and manage oracle instances
Oemapp dbassist-Database Configuration Assistant is used for Database management (create, modify, delete)
Netca-Net8 Configuration Assistant is used to configure network services of database servers.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.