免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3328 | 回复: 10
打印 上一主题 下一主题

在OS X 10.5.X版安裝Oracle 10g R2 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-03-20 18:15 |只看该作者 |倒序浏览
--Works for OS X 10.5.x only
原貼 Original link
http://blog.rayapps.com/2009/04/ ... -on-mac-os-x-intel/

原本軟件愈新,支持應更全面,但這個只支持OS X 10.5.X版,不要裝在OS X 10.6.2,
我認識幾個英文字,便用了這英文版,但照原版仍是缺了幾點,我會在適當位置加上本人的。

How to install Oracle Database 10g on Mac OS X Intel

Then you need to create oracle user as well as increase default kernel parameters. Open Terminal and switch to root user:
sudo -i
Create oinstall group and oracle user (I used group and user number 600 to ensure that they do not collide with existing groups and users):
dscl . -create /groups/oinstall
dscl . -append /groups/oinstall gid 600
dscl . -append /groups/oinstall passwd "*"
dscl . -create /users/oracle
dscl . -append /users/oracle uid 600
dscl . -append /users/oracle gid 600
dscl . -append /users/oracle shell /bin/bash
dscl . -append /users/oracle home /Users/oracle
dscl . -append /users/oracle realname "Oracle software owner"
mkdir /Users/oracle
chown oracleinstall /Users/oracle
Change password for oracle user:
passwd oracle
Change default kernel parameters:
vi /etc/sysctl.conf
and enter values recommended by Oracle:
kern.sysv.semmsl=87381
kern.sysv.semmns=87381
kern.sysv.semmni=87381
kern.sysv.semmnu=87381
kern.sysv.semume=10
kern.sysv.shmall=2097152
kern.sysv.shmmax=2197815296
kern.sysv.shmmni=4096
kern.maxfiles=65536
kern.maxfilesperproc=65536
net.inet.ip.portrange.first=1024
net.inet.ip.portrange.last=65000
kern.corefile=core
kern.maxproc=2068
kern.maxprocperuid=2068
After this reboot your computer so that these new kernel parameters would be taken into effect. After reboot open again Terminal and now login as oracle user:
su - oracle

0---------------------
附加1: mkdir  /users/oraInventory
---------------------0

Set shell settings in .bash_profile
vi .bash_profile
and enter
export DISPLAY=:0.0
export ORACLE_BASE=$HOME
umask 022
ulimit -Hn 65536
ulimit -Sn 65536
As you see I prefer to install all Oracle related files under home directory of oracle user therefore I am setting ORACLE_BASE to home directory. And also include ulimit settings – I forgot to do this initially and got strange TNS service errors because of that.

0---------------------
附加2: 試執行make程式,
$make
-bash: make: command not found
便要安裝xcode, 可在以下link下載,用apple id登入,沒有便即時註冊,不用錢,下載超快, 700kb只是30分鐘。
http://developer.apple.com/technologies/xcode.html
要找: xcode313_2736_developerdvd.dmg
下完執行安裝它
---------------------0

Now execute this script so that these settings are applied to current shell:
. ./.bash_profile
Now download db.zip installation archive and place it somewhere and unzip it:
mkdir Install
cd Install
# download db.zip to this directory
unzip db.zip
cd db/Disk1

---------------------
附加3:或者不用以上mkdir Install, 在那兒解了db.zip便去那兒執行:
cd <folder of db>/Disk1
./runInstaller
---------------------
Now you are ready to start installation:
./runInstaller
Installation
In installation wizard I selected the following options:
    •    Advanced Installation – so that I can change some default options
    •    Standard Edition – as I don’t need additional features of Enterprise Edition
    •    Create Database / General Purpose
    •    Global database name: orcl, SID: orcl
    •    Character set: UTF-8 AL32UTF8
    •    Create database with sample schemas
    •    Selected “Use the same password for all the accounts” – do not specify default “manager” password as it will not be allowed
    •    Password Management – selected this to unlock necessary sample accounts (e.g. HR schema account that I use as default test schema)
At the end of installation you will be instructed to run one shell script from root.

0﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣
附加4:未完前,會提原你執行以下兩句:
/users/orainventory/orainstroot.sh
/users/oracle/oracle/product/10.2.0/db_1/root.sh
as root after installed
方法如下:
mac-pro:Users user$ sudo -i
Password:
user-mac-pro:~ root# /users/orainventory/orainstroot.sh
Changing permissions of /Users/oraInventory to 770.
Changing groupname of /Users/oraInventory to oinstall.
The execution of the script is complete
user-mac-pro:~ root# /users/oracle/oracle/product/10.2.0/db_1/root.sh
Running Oracle 10g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /Users/oracle/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
user-mac-pro:~ root#

﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣0

Hopefully installation will complete successfully.

论坛徽章:
59
2015七夕节徽章
日期:2015-08-24 11:17:25ChinaUnix专家徽章
日期:2015-07-20 09:19:30每周论坛发贴之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38荣誉版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年纪念徽章
日期:2015-07-20 11:05:27IT运维版块每日发帖之星
日期:2015-07-20 11:05:34操作系统版块每日发帖之星
日期:2015-07-20 11:05:36程序设计版块每日发帖之星
日期:2015-07-20 11:05:40数据库技术版块每日发帖之星
日期:2015-07-20 11:05:432015年辞旧岁徽章
日期:2015-07-20 11:05:44
2 [报告]
发表于 2010-03-20 19:49 |只看该作者
可以把贴图抓下来啊。贴上来。

论坛徽章:
0
3 [报告]
发表于 2010-03-22 01:33 |只看该作者
可以把贴图抓下来啊。贴上来。
renxiao2003 发表于 2010-03-20 19:49



    我會試一下,
Last login: Mon Mar 22 01:11:42 on console
macyl:~ macyl$ uname -a
Darwin macyl.local 9.7.0 Darwin Kernel Version 9.7.0: Sat May 16 12:00:42 AST 2009; Based on Voodoo nu-1228.12.14/BUILD/obj/RELEASE_I386 i386
macyl:~ macyl$ su - oracle
Password:
macyl:~ oracle$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 22 01:32:09 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area  612368384 bytes
Fixed Size                    2085872 bytes
Variable Size                  171969552 bytes
Database Buffers          432013312 bytes
Redo Buffers                    6299648 bytes
Database mounted.
Database opened.
SQL>


SQL> select * from tbl1;

INFO
--------------------
testing
??????

SQL>

但也是記不了中文。 
INFO
--------------------
testing
?????

??是中字。

找答案中。

论坛徽章:
0
4 [报告]
发表于 2010-03-22 05:53 |只看该作者
本帖最后由 bcthe 于 2010-03-22 06:22 编辑
可以把贴图抓下来啊。贴上来。
renxiao2003 发表于 2010-03-20 19:49


要請教你,Oracle certified master, 不會不用中字吧?
你那NLS_CHARACTERSET AS UTF8 AND NLS_NCHAR_CHARACTERSET as AL16UTF16.
是如何設定呢?
在那個file?

Last login: Mon Mar 22 01:31:19 on ttys000
macyl:~ macyl$ uname -r
9.7.0
macyl:~ macyl$ uname -a
Darwin macyl.local 9.7.0 Darwin Kernel Version 9.7.0: Sat May 16 12:00:42 AST 2009; Based on Voodoo : xnu-1228.12.14/BUILD/obj/RELEASE_I386 i386
macyl:~ macyl$ su - oracle
Password:
macyl:~ oracle$ sqlplus

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 22 06:17:43 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Enter user-name: sys
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name: system
Enter password:
ERROR:
ORA-28000: the account is locked


Enter user-name: ^C            
macyl:~ oracle$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 22 06:21:46 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn / as sysdba
Connected.
SQL> select * from tbl1;

INFO
--------------------
testing
??????

SQL> insert into tbl1 values ('可以把贴图抓下来');
insert into tbl1 values ('可以把贴图抓下来')
                         *
ERROR at line 1:
ORA-12899: value too large for column "SYS"."TBL1"."INFO" (actual: 72, maximum:
20)


SQL> insert into tbl1 values ('可以把贴');
insert into tbl1 values ('可以把贴')
                         *
ERROR at line 1:
ORA-12899: value too large for column "SYS"."TBL1"."INFO" (actual: 36, maximum:
20)


SQL> insert into tbl1 values ('可以');

1 row created.

SQL> select * from tbl1;

INFO
--------------------
testing
??????


SQL>

论坛徽章:
59
2015七夕节徽章
日期:2015-08-24 11:17:25ChinaUnix专家徽章
日期:2015-07-20 09:19:30每周论坛发贴之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38荣誉版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年纪念徽章
日期:2015-07-20 11:05:27IT运维版块每日发帖之星
日期:2015-07-20 11:05:34操作系统版块每日发帖之星
日期:2015-07-20 11:05:36程序设计版块每日发帖之星
日期:2015-07-20 11:05:40数据库技术版块每日发帖之星
日期:2015-07-20 11:05:432015年辞旧岁徽章
日期:2015-07-20 11:05:44
5 [报告]
发表于 2010-03-22 13:26 |只看该作者
设置在ORACLE用户主目录下的.bash_profile里。

论坛徽章:
59
2015七夕节徽章
日期:2015-08-24 11:17:25ChinaUnix专家徽章
日期:2015-07-20 09:19:30每周论坛发贴之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38荣誉版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年纪念徽章
日期:2015-07-20 11:05:27IT运维版块每日发帖之星
日期:2015-07-20 11:05:34操作系统版块每日发帖之星
日期:2015-07-20 11:05:36程序设计版块每日发帖之星
日期:2015-07-20 11:05:40数据库技术版块每日发帖之星
日期:2015-07-20 11:05:432015年辞旧岁徽章
日期:2015-07-20 11:05:44
6 [报告]
发表于 2010-03-22 13:27 |只看该作者
看看你的CONSOLE中的LANG环境变量。

论坛徽章:
0
7 [报告]
发表于 2010-03-22 22:28 |只看该作者
看看你的CONSOLE中的LANG环境变量。
renxiao2003 发表于 2010-03-22 13:27

看吧。
macyl:~ macyl$ env | more
MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/share/man
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/bash
TMPDIR=/var/folders/ZR/ZRMGUhfkGVSZUdeg56m6AU+++TI/-Tmp-/
Apple_PubSub_Socket_Render=/tmp/launch-LPVNWT/Render
TERM_PROGRAM_VERSION=240.2
USER=macyl
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-bgbbDT/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0:0
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local
/mysql/bin
PWD=/Users/macyl
LANG=zh_TW.UTF-8
SHLVL=1
HOME=/Users/macyl
LOGNAME=macyl
DISPLAY=/tmp/launch-tZ57by/:0
SECURITYSESSIONID=72b840
_=/usr/bin/env
macyl:~ macyl$

也不知如何設 nls_characterset = al32utf8.utf

论坛徽章:
0
8 [报告]
发表于 2010-03-22 22:35 |只看该作者
设置在ORACLE用户主目录下的.bash_profile里。
renxiao2003 发表于 2010-03-22 13:26


還是不行,.bash_profile 加了
set NLS_LANG=CHINESE_TAIWAN.AL32UTF8

    結果如下:
SQL> create table tbl2 (info nvarchar2(30));

Table created.

SQL> desc tbl2;
Name                                           Null?    Type
----------------------------------------- -------- ----------------------------
INFO                                                    NVARCHAR2(30)

SQL> insert into tbl2 values ('工作');

1 row created.

SQL> select * from tbl2;

INFO
------------------------------
??????

SQL>

论坛徽章:
59
2015七夕节徽章
日期:2015-08-24 11:17:25ChinaUnix专家徽章
日期:2015-07-20 09:19:30每周论坛发贴之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38荣誉版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年纪念徽章
日期:2015-07-20 11:05:27IT运维版块每日发帖之星
日期:2015-07-20 11:05:34操作系统版块每日发帖之星
日期:2015-07-20 11:05:36程序设计版块每日发帖之星
日期:2015-07-20 11:05:40数据库技术版块每日发帖之星
日期:2015-07-20 11:05:432015年辞旧岁徽章
日期:2015-07-20 11:05:44
9 [报告]
发表于 2010-03-23 08:56 |只看该作者
嗯。你看看你的SHELL的环境变量LANG是什么。
你的SHELL里LANG=zh_TW.UTF-8
而NLS_LANG=CHINESE_TAIWAN.AL32UTF8
两个不匹配的啊。

论坛徽章:
0
10 [报告]
发表于 2010-03-23 17:26 |只看该作者
嗯。你看看你的SHELL的环境变量LANG是什么。
你的SHELL里LANG=zh_TW.UTF-8
而NLS_LANG=CHINESE_TAIWAN.AL ...
renxiao2003 发表于 2010-03-23 08:56



     是嗎,要請教, 如何設呢?
你使用中的是如何的?

zh_tw 不是對 chinese_taiwan?

這個,回家亥試一下.
NLS_LANG="TRADITIONAL CHINESE_TAIWAN".ZHT16BIG5;export NLS_LANG
# oracle xe end
export NLS_LANGUAGE=zh_TW.BIG5
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP