orainstRoot.sh 的具体内容
时间: 2024-02-19 13:57:15 浏览: 15
以下是 orainstRoot.sh 文件的基本内容:
```
#!/bin/sh
# orainstRoot.sh
# This script is used to create the oraInventory directory.
# This needs to be run as root user.
#
# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Oracle Version 11.2.0.1.0
#
# Created By : Oracle
# Created On : Tue Sep 14 10:07:51 EDT 2010
# Modified By:
# Modified On:
#
# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
#
# NAME
# orainstRoot.sh - root script to run before installation
#
# DESCRIPTION
# This script creates the Oracle Inventory directory and sets the
# correct permissions on it for the inventory owner.
#
# NOTES
# This script must be run as root.
#
# Syntax:
# orainstRoot.sh [ -debug ]
#
# If -debug is specified, this script will start in debugging mode,
# printing out additional information to aid in debugging.
#
# initialize variables
debug=0
oraInventoryOwner=oracle
oraInventoryGroup=oinstall
oraInventory=/u01/app/oraInventory
```
上述代码定义了 orainstRoot.sh 脚本的基本信息和变量。在这个示例中,oraInventoryOwner 变量设置为 oracle,oraInventoryGroup 设置为 oinstall,oraInventory 设置为 /u01/app/oraInventory。该脚本还包括注释和用于调试的选项。在运行时,此脚本将创建 oraInventory 目录,并为其分配正确的权限,以便 oraInventoryOwner 和 oraInventoryGroup 用户能够访问它。