Check Hardware Requirements
Minimal Memory: 1024 MB
To determine the amount of RAM memory installed on your system, enter the following command.
$ /usr/sbin/prtconf
Minimal Swap Space:
To determine the amount of Swap Space installed on your system, enter the following command.
$ /usr/sbin/swap -s
Between 1024 MB and 2048 MB 1.5 times the size of RAM
Between 2049 MB and 8192 MB Equal to the size of RAM
More than 8192 MB 0.75 times the size of RAM
Minimal Disk Space in /tmp: 400 MB
To determine the amount of disk space available in the /tmp directory, enter the following command:
$ df -h /tmp
Check Software Limits
Oracle10 includes native support for files greater than 2 GB. Check your shell to determine whether it will impose a limit.
To check current soft shell limits, enter the following command:
$ ulimit -Sa
To check maximum hard limits, enter the following command:
$ ulimit -Ha
The file (blocks) value should be multiplied by 512 to obtain the maximum file size imposed by the shell. A value of unlimited is the operating system default and is the maximum value of 1 TB.
Setup the Solaris Kernel
In Solaris 10, you are not required to make changes to the /etc/system file to implement the System V TPC. Solaris 10 uses the resource control facility for its implementation.
|
Parameter |
Resource Control |
Recommended Value |
|
noexec_user_stack |
NA |
1 |
|
semsys:seminfo_semmni |
project.max-sem-ids |
100 |
|
semsys:seminfo_semmsl |
process.max-sem-nsems |
256 |
|
shmsys:shminfo_shmmax |
project.max-shm-memory |
4294967295 |
|
shmsys:shminfo_shmmni |
project.max-shm-ids |
100 |
Create Unix Group <dba>
$ groupadd -g 400 dba
$ groupdel dba
Create Unix User <oracle>
$ useradd -u 400 -c "Oracle Owner" -d /export/home/oracle \
-g "dba" -m -s /bin/ksh oracle
# passwd oracle
Setup ORACLE environment ($HOME/.profile) as follows
# Setup ORACLE environment
ORACLE_HOME=/export/home/oracle/oracle/product/
ORACLE_SID=tais; export ORACLE_SID
TNS_ADMIN=/home/oracle/config/
ORA_NLS10=${ORACLE_HOME}/nls/data; export ORA_NLS10
CLASSPATH=${CLASSPATH}:${ORACLE_HOME}/jdbc/lib/classes12.zip
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_OWNER=oracle; export ORACLE_OWNER
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
LD_LIBRARY_PATH=/usr/lib:${ORACLE_HOME}/lib:${ORACLE_HOME}/lib32; export LD_LIBRARY_PATH
# Set up the search paths
PATH=/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/sfw/sbin
PATH=$PATH:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/sadm/bin
PATH=$PATH:/usr/sfw/bin:/usr/X11/bin:/usr/j2se/bin
PATH=$PATH:$ORACLE_HOME/bin
su root
In a root terminal,
# chown -R oracle:dba /export/home/oracle/oracle
# chown -R oracle:dba /export/home/oracle/oracle/product/
# chmod -R 775 /export/home/oracle/oracle
# chmod -R 775 /export/home/oracle/oracle/product/10.2.0/db_2/oradata
chown这个很重要,写不对的话……即便安装完成了,你的数据库也无法启动,因为刚才所建立的名字为oracle的帐户无权对相关目录进行操作。(根据情况,也可以在安装完oracle数据库后再做此操作)
Installation
unzip 10201_database_linux32.zip -d /export/home/Desktop
# cd /database
# ./runInstaller
Installation Steps
1. Select "Advanced Installation" and click Next.
2. Leave "Inventory directory path" and "group name" as it is and click
Next.
3. Leave "Enterprise Edition" selected and click Next.
4. Verify that the following information is true:
Name: OraDb10g_home1
Path: Installation Steps
1. Select "Advanced Installation" and click Next.
2. Leave "Inventory directory path" and "group name" as it is and click
Next.
3. Leave "Enterprise Edition" selected and click Next.
4. Verify that the following information is true:
Name: OraDb10g_home1
Path: /export/home/oracle/oracle/product/10.2.0/db_1
Be careful that it is not /export/home/oracle/oracle/product/10.2.0/db_1
5. It will check the prerequisites. Do not start if there are any errors and be
careful about memory and environment variable warnings.
6
6. Leave "Create a database" selected and click Next.
7. Select Advanced and click Next.
8. Click Install and it will install the database system. Then DBCA starts
automatically, conguring the components you installed so far.
9. Select General Purpose and click Next.
10. Set orcl for Database Name and SID and click Next.
11. Leave "Congure the Database with Enterprise" checkbox selected and
click Next.
12. Assisgn a common password for SYS account, such as "oracle" and click
next.
13. Select Filesystem and click Next.
14. Select "Oracle-Managed Files" and click Next.
15. Leave recovery area as it is and click Next.
16. If you face a "Database Content" dialog, click Next with no additional
setting.
17. Set Use Unicode (AL32UTF8) as Database Character set and UTF16 as
National Character Set on the "Character Sets" tab./oracle/product/10.2.0/db_1
Be careful that it is not /export/home/oracle/oracle/product/10.2.0/db_1
5. It will check the prerequisites. Do not start if there are any errors and be
careful about memory and environment variable warnings.
6
6. Leave "Create a database" selected and click Next.
7. Select Advanced and click Next.
8. Click Install and it will install the database system. Then DBCA starts
automatically, conguring the components you installed so far.
9. Select General Purpose and click Next.
10. Set orcl for Database Name and SID and click Next.
11. Leave "Congure the Database with Enterprise" checkbox selected and
click Next.
12. Assisgn a common password for SYS account, such as "oracle" and click
next.
13. Select Filesystem and click Next.
14. Select "Oracle-Managed Files" and click Next.
15. Leave recovery area as it is and click Next.
16. If you face a "Database Content" dialog, click Next with no additional
setting.
17. Set Use Unicode (AL32UTF8) as Database Character set and UTF16 as
National Character Set on the "Character Sets" tab.
18. Click Next and OK until you get a conrmation to create the database.
19. Close the information after the database is created. Click Exit.
20. The "Conguration assistant"s will start the components you installed
earlier.
21. You will face a dialog which wants you to execute two sh scripts. Open a
new terminal (as root) and run those scripts:
sh /export/home/oracle/oracle/oraInventory/orainstRoot.sh
sh /export/home/oracle/oracle/product/10.2.0/db_1/root.sh
22. Click OK after you run the scripts.
23. Click Exit.
Starting the services
Now, the Oracle instance should be installed and working. Let's check it:
su - oracle
sqlplus / as sysdba
If it says "Connected to an idle instance", it means that the instance is not
started. Do the following:
lsnrct start
emctl start dbconsole
sqlplus / as sysdba
startup (in sqlplus session)
Starting Oracle Instance up on System Startup
Open a text editor (as root) and put the content below in it, saving the file as
/etc/init.d/dbora :
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME/export/home/oracle/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl stop dbconsole"
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
;;
esac Flagging the orcl instance to be started
Edit the /var/opt/oracle/oratab file to verify that the entry for your database is correct. Lines starting with a pound sign are considered comments and are ignored. Each non-comment line contains the name of one Oracle instance, its Oracle home, and a Y or N. A Y indicates that the database should be started automatically on server reboot, and an N indicates that it should not. The three fields should be separated by colons. A sample /var/opt/oracle/oratab file looks like this: #
# /var/opt/oracle/oratab
# ======================
#
dev101ee:/export/home/oracle/oracle/product/10.1.0/db_1:Y
2)Then, open a root terminal and give the _le executable rights:
chmod 755 /etc/init.d/dbora
3)After creating the dbora file, you need to link it to /etc/rc2.d and /etc/rc0.d:
ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
浙公网安备 33010602011771号