您的位置:首页 > 数据库 > Oracle

Solaris 10下安装Oracle 11g (官方文档)

2013-05-16 17:54 471 查看
系统要求配置和信息查询

启用图形化界面:

$ xhost fully_qualified_remote_host_name
例如:

$ xhost somehost.us.example.com
如果没安装软件,可以用SSH/rlogin/telnet等连接:

$ telnet fully_qualified_remote_host_name
如果不是root帐号,可以用以下命令切换到root用户:

$ su - root
password:
#
内存要求:最少1GB,建议2GB;用以下命令查看内存大小:

# /usr/sbin/prtconf | grep "Memory size"


用以下命令查看配置的SWAP大小:

# /usr/sbin/swap -l
Swap大小要符合以下要求:

RAM

Swap Space

Between 1 GB and 2 GB

1.5 times the size of the RAM

Between 2 GB and 16 GB

Equal to the size of the RAM

More than 16 GB

16 GB

用以下命令查看可用的内存和SWAP大小:

# sar -r -i n #n是下次重复的延迟秒数;i是重复的次数;
查看系统架构是否可以运行软件:

# /bin/isainfo -kv
/tmp目录至少要1GB空间,查看/tmp目录大小命令:

# df -k /tmp
查看挂载的目录大小命令:

# df -k
安装版本

需要磁盘空间 (GB)

Enterprise Edition

4.7

Standard Edition

4.6

Standard Edition One

4.6

Custom (Enterprise Edition + custom install options)

4.7

查看系统版本:

# uname -r
查看升级信息:

$ cat /etc/release
要求以下系统软件包:

SUNWarc
SUNWbtool
SUNWhea
SUNWlibC
SUNWlibm
SUNWlibms
SUNWsprot
SUNWtoo
SUNWi1of
SUNWi1cs (ISO8859-1)
SUNWi15cs (ISO8859-15)
SUNWxwfnt
SUNWcsl

查看方法:

# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibms SUNWsprot \
SUNWtoo SUNWi1of SUNWi1csSUNWi15cs SUNWxwfnt
安装软件包方法:

# pkgadd -R SUNWxwfnt
all


编译器要求:

Oracle Solaris Studio 12 (C and C++ 5.9) is supported with Pro*C/C++, OracleCall Interface, Oracle C++ Call Interface, and Oracle XML Developer's Kit (XDK)for Oracle Database 11g Release 2.

系统补丁要求:

Installation Type or Product

Requirement

All installations

Patches for Oracle Solaris 10:

120754-06: SunOS 5.10_x86 libmtsk
119961-05: SunOS 5.10_x86: Assembler
119964-14: SunOS 5.10_x86 Shared library patch for C++_x86
137104-02
139575-03
139556-08
141445-09 (11.2.0.2)
141415-04

Database Smart Flash Cache (An Enterprise Edition only feature.)

The following patches are required for Oracle Solaris on x86-64 (64-bit) if you are using the flash cache feature:

140797-01

140900-01

141017-01

141415-10

141737-05

查看补丁方法(到https://support.oracle.com 下载补丁包):

# /usr/sbin/patchadd -p | grep
patch_number(without versionnumber)
例如

# /usr/sbin/patchadd -p | grep 119963
创建用户和用户组

以下用户组是要求创建的:

The Oracle Inventory group (typically, oinstall)
The OSDBA group (typically, dba)
The Oracle software owner (typically, oracle)
The OSOPER group (Optional. Typically, oper)

查看oinstall用户组是否存在的命令:

# more /var/opt/oracle/oraInst.loc
如果存在,会输出类似以下内容:

inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall
查看dba组是否存在:

# grep dba /etc/group
用以下命令创建用户组oinstall和dba:

# /usr/sbin/groupadd
oinstall
# /usr/sbin/groupadd dba
查看oracle用户是否存在:

# id -a oracle
如果存在Oracle帐号但它不属于oinstall和dba组,则用以下命令修改它:

# /usr/sbin/usermod -g
oinstall -G dba oracle
如果不存在oracle帐号,用以下命令创建:

# /usr/sbin/useradd -d /export/home/oracle -m -s /bin/bash -g
oinstall-G dba oracle
用以下命令修改oracle用户密码:

# passwd -r files oracle
在Solaris 10上设置内核参数



Resource Control

Recommended Value

project.max-sem-ids

100

process.max-sem-nsems

256

project.max-shm-memory

4294967295

project.max-shm-ids

100

查看resource control值:

$ id -p
uid=100(oracle) gid=100(dba) projid=1 (group.dba)
$ prctl -n project.max-shm-memory -i project
group.dba
$ prctl -n project.max-sem-ids -i project
group.dba


For Solaris 10 and later, you need to create the resource called“project” and associate it with the user account “oracle:oinstall”. Belowplease find the example for your information.

%projadd -p 100 -c 'Oracle 11gR2' -U oracle -G oinstall -K'project.max-shm-memory=(privileged,16G,deny)' user.oracle

% usermod -Kproject=user.oracle oracle

I’vemodified the project name called “user.oracle” and assigned 16.0GB into it. You should be able to create database via DBCA without getting “out ofmemory” now. Please check.



如果要修改resource control值,用以下命令:

To modify the value of max-shm-memory to 6 GB:

b. # prctl -n project.max-shm-memory-v 6gb -r -i project
group.dba

To modify the value of max-sem-ids to 256:

# prctl -n project.max-sem-ids -v 256 -r -i project
group.dba
用以下命令查看为oracle用户创建的项目是否正常:

# su - oracle
$ id -p
uid=100(oracle) gid=100(dba) projid=100(group.dba)
$ exit
设置最大shared memory到2GB:

# projmod -sK "project.max-shm-memory=(privileged,2G,deny)"group.dba
查看/etc/project内容:

# cat /etc/project
一般输出以下类似内容:

system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
group.dba:100:Oracle default
project:::project.max-shmmemory=(privileged,2147483648,deny)
用以下命令检查resource control是否激活和进程所有权:

# su - oracle
$ id -p
uid=100(oracle) gid=100(dba) projid=100(group.dba)
$ prctl -n project.max-shm-memory -i process $$
process: 5754: -bash
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory privileged 2.00GB - deny







设置shell limits

建议设置成以下表格里对应的值:

Shell Limit

Recommended Value

TIME

-1 (Unlimited)

FILE

-1 (Unlimited)

DATA

Minium value: 1048576

STACK

Minium value: 32768

NOFILES

Minium value: 4096

VMEMORY

Minium value: 4194304

用以下命令可以查看shell limit值:

ulimit -t
ulimit -f
ulimit -d
ulimit -s
ulimit -n
ulimit -v
创建目录

查看目录大小

# df -k
创建安装目录

# mkdir -p /u01/app/oracle
创建数据文件目录

# mkdir –p /u02/oradata
更改目录所有者

# chown -R oracle:oinstall /u01/app/oracle
# chown -R oracle:oinstall /u02/oradata
更改目录权限

# chmod -R 775 /u01/app/oracle
# chmod -R 775 /u02/oradata
修改Oracle用户环境变量

用以下命令使图形界面可用:

$ xhost fully_qualified_remote_host_name
例如

$ xhost somehost.us.example.com
用以下命令切换到oracle帐号:

$ su - oracle
用以下命令查看shell类型:

$ echo $SHELL
运行shell启动脚本,用以下命令:

1. Bash Shell下:

$ ../.bash_profile

2. Bourne或Korn Shell下:

$ . ./.profile

3. C Shell下:

% source ./.login

如果本地没安装软件,则用以下设置远程系统DISPLAY:

Bourne, Bash or Korn shell:

· $ export DISPLAY=local_host:0.0

C shell:

% setenv DISPLAY local_host:0.0
以下检查DISPLAY是否设置正常:

Run the following command on the remote system to check if the shell andthe DISPLAY environmental variable are set correctly:

echo $SHELL
echo $DISPLAY
Now to enable X applications, run the following commands on the localcomputer:

$ xhost + fully_qualified_remote_host_name
To verify that X applications display is set properly, run a X11 basedprogram that comes with the operating system such as xclock:

$ xclock
In this example, you can find xclock at /usr/X11R6/bin/xclocks. If the DISPLAY variable
is set properly, thenyou can see xclock on your computer screen.

设置/tmp目录

To determine the free disk space on each mounted file system use the following command:

b. # df -h /tmp

If necessary, enter commands similar to the following to create a temporary directory on the file system that you identified, and set the appropriate permissions on the directory:

d. $ sudo mkdir /mount_point/tmp
e. $ sudo chmod a+wr /mount_point/tmp
f. # exit

Enter commands similar to the following to set the TMP and TMPDIR environment variables:

Bourne, Bash, or Korn shell:

o $ TMP=/mount_point/tmp
o $ TMPDIR=/mount_point/tmp
o $ export TMP TMPDIR

C shell:

o % setenv TMP /mount_point/tmp
% setenv TMPDIR /mount_point/tmp
设置ORACLE_BASE/ORACLE_SID

Bourne, Bash, or Korn shell:

· $ ORACLE_BASE=/u01/app/oracle
· $ ORACLE_SID=sales
· $ export ORACLE_BASE ORACLE_SID

C shell:

· % setenv ORACLE_BASE /u01/app/oracle
% setenv ORACLE_SID sales
挂载安装光盘

Switch user to root:

2. $ su - root

If necessary, enter a command similar to the following to eject the currently mounted disc, then remove it from the drive:

4. # eject

Insert the disc into the disc drive.
To verify that the disc mounted automatically, enter a command similar to the following:

7. # ls /dvd/dvd0

If this command fails to display the contents of the disc, then enter a command similar to the following:

9. # /usr/sbin/mount-r -F hsfs /dev/dsk/cxtydzs2 /dvd
In this example, /dvd is the disc mount point directory and /dev/dsk/cxtydzs2 is the device
name for the disc device, for example/dev/dsk/c0t2d0s2.

If Oracle Universal Installer displays the Disk Location dialog box, then enter the disc mount point directory path. For example:

Disc mounted automatically:

o /dvd/dvd0

Disc mounted manually:

/dvd
开始安装 (图形化界面)

To start Oracle Universal Installer, enter the following command:

2. $ /mount_point/db/runInstaller
If Oracle Universal Installer doesnot start, then refer to Oracle DatabaseInstallation Guide for
information about how totroubleshoot X Window display problems.

The following table describes the recommended action for each Oracle Universal Installer screen. Use the following guidelines to complete the installation:

If you need more assistance, or to choose an option that is not a default, click Help for additional information.

If you encounter errors while installing or linking the software, then refer to Oracle Database Installation
Guide for information about troubleshooting.

Note:

If you have completed the taskslisted previously, then you can complete the installation by choosing thedefault values on most screens.



Screen

Recommended Action

Configure Security Updates

Enter your e-mail address, preferably your My Oracle Support e-mail address or user name in the Emailfield.

You can select the I wish to receive security updates via My Oracle Support check box to receive security updates.

Enter your My Oracle Support password in the My Oracle Support Password field.

Click Next.

Download Software Updates

Starting with Oracle Database 11g Release 2 (11.2.0.2), you can use the Software Updates feature to dynamically download and apply latest updates. Select one of the following options and click Next:

Use My Oracle Support credentials for download: Select this option to download and apply the latest software updates.

Click Proxy Settings to configure a proxy for Oracle Universal Installer to use to connect to the Internet. Provide the proxy server information for your site, along with a user account that has access to the local area network through which
the server is connecting. Starting with Oracle Database 11g Release 2 (11.2.0.3), you can enter the Proxy Realm information if required. The proxy realm information is case-sensitive.

Click Test Connection to ensure that your proxy settings are correctly entered, and the installer can download the updates.

Use pre-downloaded software updates: Select this option to apply previously downloaded software updates.

Skip Software Updates: Select this option if you do not want to apply any updates.

Apply Software Updates

This screen is displayed if you select to download the software updates or provide the pre-downloaded software downloads location.

If you selected Use My Oracle Support credentials for download in the previous screen, selectDownload and apply all updates, and then click Next.

If you selected Use pre-downloaded software updates in the previous screen, select Apply all updates, and then click Next.

Select Installation Option

Select Create and configure a database from the following list of available options, then click Next:

Create and configure a database
Install database software only
Upgrade an existing database

System Class

Select Server Class from the following options to install the database, and click Next.

Desktop Class: Choose this option if you are installing on a laptop or desktop class system.

Server Class: Choose this option if you are installing on a server class system, such as what you would use when deploying Oracle in a production data center.

Grid Installation Options

Select Single instance database installation for the type of database installation you want to perform, and click Next.

Single instance database installation: This option installs the database and the listener.

Real Application Clusters database installation: This option installs Oracle Real Application Clusters.

Oracle RAC One Node database installation: This option installs the Oracle RAC One Node database.

Note: Oracle RAC One Node is supported only with Oracle Clusterware.

Select Install Type

Select Typical Install as the installation type from the following options, and click Next:

Typical Install: This installation method is selected by default. It lets you quickly install Oracle Database using minimal input.

Advanced Install: This installation method enables to perform more complex installations.

Typical Install Configuration

Enter the following information according to requirements:

Oracle base: The Oracle base path appears by default. You can change the path based on your requirement.

Software location: In the Software Location section, accept the default value or enter the Oracle home directory path in which you want to install Oracle components. The directory path should not contain spaces.

Storage Type: Select File System, or Oracle Automatic Storage Management as the database storage option.

Database file location: If you select File System as your storage type, then click Browse and specify a database file location.

ASMSNMP Password: If you select Oracle Automatic Storage Management as your Storage Type, then specify the password for the ASMSNMP user.

Database edition: Select the database edition to install.

OSDBA Group: The OSDBA group is selected by default. You can also select the OSDBA group from the list.

Global database name: Specify the Global Database Name using the following syntax:

database_name.domain

For example, sales.us.example.com

Administrative password: Enter the password for the privileged database account.

Confirm Password: Reenter, and confirm the password for the privileged database account.

Click Next to continue.

Create Inventory

This screen is displayed only during the first installation of Oracle products on a system.

Specify the full path of the Oracle Inventory directory. Ensure that the operating system group selected is oinstall. Click Next to continue.

Perform Prerequisite Checks

Verify that all the prerequisite checks succeed, and then click Next.

Oracle Universal Installer checks the system to verify that it is configured correctly to run Oracle software. If you have completed all the preinstallation steps in this guide, all the checks should pass.

If a check fails, then review the cause of the failure listed for that check on the screen. If possible, rectify the problem and rerun the check. Alternatively, if you are satisfied that your system meets the requirements, then you can select the check box
for the failed check to manually verify the requirement.

Note: Oracle recommends that you use caution in checking the Ignore All option. If you check this option, then Oracle Universal Installer may not confirm that your system can install Oracle Database successfully.

Summary

Review the information displayed on this screen, and then click Install.

Note: Starting with Oracle Database 11g Release 2 (11.2), you can save all the installation steps into a response file by clicking Save Response File. Later, this file can be used for a silent installation.

Install Product

This screen states the progress of a database installation. After the database is installed, you are prompted to execute some root configuration script for new inventory as the root user. Click Next.

This screen then displays the status information for the configuration assistants that configure the software and create a database.

Finally, a message is displayed at the end of Database Configuration Assistant process, and click OK.

Execute the root.sh script as the root user to complete the installation and click OK.

Finish

This screen is shown automatically when all the configuration tools are successful.

Click Close.

个人版完成实验后放出
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: