官方安装文档http://docs.oracle.com/cd/E16655_01/install.121/e17760/toc.htm
在edelivery上下载solaris 10 x86和oracle12c forsolaris x86的介质
[img]http://www.orasql.com/bbs/download/file.php?id=88[/img]
[img]http://www.orasql.com/bbs/download/file.php?id=89[/img]
也可在官网下载相应的介质
用virtualbox新建一个虚拟机,内存设置为1800m(不然会报page_unlock的错误)
把光盘加载上去,根据提示一步一步安装solaris。
配置root用户ssh
vi /etc/ssh/sshd_config
PermitRootLogin no
改为:
PermitRootLogin yes
重启ssh
svcadm restart ssh
ssh 远程连接服务器
ssh root@192.168.3.101
检查系统信息
[code]# id
uid=0(root) gid=0(root)
# uname -a
SunOS unknown 5.10 Generic_147148-26 i86pc i386 i86pc
# /bin/isainfo -kv
64-bit amd64 kernel modules
# cat /etc/release
Oracle Solaris 10 1/13 s10x_u11wos_24a X86
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
Assembled 17 January 2013
# /usr/sbin/prtconf | grep "Memory size"
Memory size: 1800 Megabytes
# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 8.1G 3.9G 4.1G 49% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 1.6G 524K 1.6G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
8.1G 3.9G 4.1G 49% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 1.6G 1008K 1.6G 1% /tmp
swap 1.6G 32K 1.6G 1% /var/run
/dev/dsk/c0t0d0s7 11G 11M 11G 1% /export/home[/code]
检查必须的包
[code]# pkginfo -i SUNWarc SUNWbtool SUNWcsl SUNWdtrc SUNWeu8os SUNWhea SUNWi1cs SUNWi15cs SUNWi1of SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWxwfnt
system SUNWarc Lint Libraries (usr)
system SUNWbtool CCS tools bundled with SunOS
system SUNWcsl Core Solaris, (Shared Libs)
system SUNWdtrc DTrace Clients
system SUNWhea SunOS Header Files
system SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
system SUNWlibC Sun Workshop Compilers Bundled libC
system SUNWlibm Math & Microtasking Library Headers & Lint Files (Usr)
system SUNWlibms Math & Microtasking Libraries (Usr)
system SUNWsprot Solaris Bundled tools
system SUNWtoo Programming Tools
system SUNWxwfnt X Window System platform required fonts
ERROR: information for "SUNWeu8os" was not found
ERROR: information for "SUNWi1cs" was not found
ERROR: information for "SUNWi15cs" was not found[/code]
安装未安装的包
[code]# pwd
/cdrom/sol_10_113_x86/Solaris_10/Product
# pkgadd -d . SUNWeu8os SUNWi1cs SUNWi15cs
Processing package instance <SUNWeu8os> from </cdrom/sol_10_113_x86/Solaris_10/Product>
American English/UTF-8 L10N For OS Environment User Files(i386) 1.5,REV=2004.11.24.10.12
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Using </usr> as the package base directory.
## Processing package information.
## Processing system information.
4 package pathnames are already properly installed.
## Verifying package dependencies.
WARNING:
The <SUNWeuluf> package "UTF-8 L10N For Language
Environment User Files" is a prerequisite package and
should be installed.
Do you want to continue with the installation of <SUNWeu8os> [y,n,?] y
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of <SUNWeu8os> [y,n,?] y
Installing American English/UTF-8 L10N For OS Environment User Files as <SUNWeu8os>
## Installing part 1 of 1.
8766 blocks
Installation of <SUNWeu8os> was successful.
Processing package instance <SUNWi1cs> from </cdrom/sol_10_113_x86/Solaris_10/Product>
X11 ISO8859-1 Codeset Support(i386) 2.0,REV=2004.10.17.15.04
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Using </> as the package base directory.
## Processing package information.
## Processing system information.
8 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of <SUNWi1cs> [y,n,?] y
Installing X11 ISO8859-1 Codeset Support as <SUNWi1cs>
## Installing part 1 of 1.
232 blocks
Installation of <SUNWi1cs> was successful.
Processing package instance <SUNWi15cs> from </cdrom/sol_10_113_x86/Solaris_10/Product>
X11 ISO8859-15 Codeset Support(i386) 2.0,REV=2004.10.17.15.04
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Using </> as the package base directory.
## Processing package information.
## Processing system information.
6 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of <SUNWi15cs> [y,n,?] y
Installing X11 ISO8859-15 Codeset Support as <SUNWi15cs>
## Installing part 1 of 1.
1460 blocks
Installation of <SUNWi15cs> was successful.[/code]
创建用户组及目录
[code]# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba -d /export/home/oracle -m oracle
# passwd oracle
# pwd
/export/home/oracle
# mkdir app
# chown oracle:oinstall app
# cd app
# mkdir db12
# mkdir oradata
# chown oracle:oinstall db12
# chown oracle:oinstall oradata
# chmod -R 775 *
# ls -l
total 4
drwxrwxr-x 2 oracle oinstall 512 Aug 20 13:03 db12
drwxrwxr-x 2 oracle oinstall 512 Aug 20 13:04 oradata[/code]
设置环境变量
[code]# pwd
/export/home/oracle
# cat .profile
PATH=/usr/bin:/usr/ucb:/etc:.
ORACLE_BASE=/export/home/oracle/app
ORACLE_HOME=/export/home/oracle/app/db12
ORACLE_SID=orcl12c
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:/usr/local/bin:/usr/ccs/bin:$ORACLE_HOME/bin
TMP=/tmp
TMPDIR=/tmp
export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH TMP TMPDIR
# . ./.profile[/code]
上传oracle安装介质
[code]sftp> cd /export/home/oracle/app
sftp> put -r "/Users/steven/Documents/Enmo/ETL/informatica/solaris.x64_12cR1_database_1of2.zip" "/Users/steven/Documents/Enmo/ETL/informatica/solaris.x64_12cR1_database_2of2.zip"
Uploading solaris.x64_12cR1_database_1of2.zip to /export/home/oracle/app/solaris.x64_12cR1_database_1of2.zip
100% 1333557KB 12463KB/s 00:01:47
/Users/steven/Documents/Enmo/ETL/informatica/solaris.x64_12cR1_database_1of2.zip: 1365562445 bytes transferred in 107 seconds (12463 KB/s)
Uploading solaris.x64_12cR1_database_2of2.zip to /export/home/oracle/app/solaris.x64_12cR1_database_2of2.zip
100% 1109093KB 11798KB/s 00:01:34
/Users/steven/Documents/Enmo/ETL/informatica/solaris.x64_12cR1_database_2of2.zip: 1135711417 bytes transferred in 94 seconds (11798 KB/s)[/code]
解压
unzip solaris.x64_12cR1_database_2of2.zip
unzip solaris.x64_12cR1_database_1of2.zip
# cd database
# ./runInstall
取消MOS帐号接收更新 ,next
跳过更新,next
创建并初始化数据库,next
选择 Server clasee,next
选择单实例,next
典型安装,next
填写安装选项:
[img]http://www.orasql.com/bbs/download/file.php?id=90[/img]
下一步
检查环境,根据情况忽略,next
[img]http://www.orasql.com/bbs/download/file.php?id=91[/img]
install
[img]http://www.orasql.com/bbs/download/file.php?id=94[/img]
root身份运行如下脚本
[img]http://www.orasql.com/bbs/download/file.php?id=95[/img]
[code]# pwd
/export/home/oracle/oraInventory
# ./orainstRoot.sh
Changing permissions of /export/home/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /export/home/oracle/oraInventory to oinstall.
The execution of the script is complete.
# cd /export/home/oracle/app/db12
# ./root.sh
Performing root user operation for Oracle 12c
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /export/home/oracle/app/db12
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.[/code]
创建数据库(在这之前会自动创建监听)
要求剩余空间大于8g,如果小于4g会直接报错。
[img]http://www.orasql.com/bbs/download/file.php?id=97[/img]
忽略之后,开始创建数据库
[img]http://www.orasql.com/bbs/download/file.php?id=96[/img]
安装完成
[img]http://www.orasql.com/bbs/download/file.php?id=87[/img]
sqlplus 登录到数据库
在这里要注意ORACLE_SID的大小写问题。
[code]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Tue Aug 20 15:26:17 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
orcl12c
SQL> select BANNER from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
PL/SQL Release 12.1.0.1.0 - Production
CORE 12.1.0.1.0 Production
TNS for Solaris: Version 12.1.0.1.0 - Production
NLSRTL Version 12.1.0.1.0 - Production
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> ALTER SESSION SET CONTAINER = pdb1;
Session altered.
SQL> show con_name;
CON_NAME
------------------------------
PDB1
SQL>[/code]
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
Oracle DataGuard高可用性解决方案详解
孙莹
572次阅读
2025-03-26 23:27:33
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
531次阅读
2025-04-15 17:24:06
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
435次阅读
2025-04-18 14:18:38
XTTS跨版本迁移升级方案(11g to 19c RAC for Linux)
zwtian
429次阅读
2025-04-08 09:12:48
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
427次阅读
2025-04-22 00:20:37
墨天轮个人数说知识点合集
JiekeXu
427次阅读
2025-04-01 15:56:03
Oracle SQL 执行计划分析与优化指南
Digital Observer
424次阅读
2025-04-01 11:08:44
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
403次阅读
2025-04-22 00:13:51
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
391次阅读
2025-04-20 10:07:02
Oracle 19c RAC更换IP实战,运维必看!
szrsu
363次阅读
2025-04-08 23:57:08