linux命令静默运行 linux怎么设置静态路由( 三 )


echo "export LD_LIBRARY_PATH"/home/oracle/.bash_profile
echo "export LANG=en_US.UTF-8 "/home/oracle/.bash_profile
echo "export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK"/home/oracle/.bash_profile
echo "CLASSPATH=$ORACLE_HOME/JRE "/home/oracle/.bash_profile
echo "CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib"/home/oracle/.bash_profile
echo "CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib"/home/oracle/.bash_profile
echo "CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib"/home/oracle/.bash_profile
echo "export CLASSPATH"/home/oracle/.bash_profile
echo "THREADS_FLAG=native; export THREADS_FLAG"/home/oracle/.bash_profile
echo "nls_date_format='yyyy-mm-dd hh24:mi:ss' "/home/oracle/.bash_profile
echo "export nls_date_format "/home/oracle/.bash_profile
echo "export TEMP=/tmp "/home/oracle/.bash_profile
echo "export TMPDIR=/tmp "/home/oracle/.bash_profile
echo "umask 022 "/home/oracle/.bash_profile
source ~/.bash_profile
二、上传或者下载oracle安装包并解压,例如放置在/opt/目录下
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
直接在目录解压,会在当前目录中生成database目录
三、修改应答文件安装数据库软件
修改前建议先备份下
cp /opt/database/response/*.rsp /opt/database/rspbak
3.1、生成修改响应文件(/opt/database/response/db_install.rsp)
备注:清空源文件 , 复制粘贴如下内容(标红处需要修改对应的设置需求):
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME= linux.tk
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION= /u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_BASE= /u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:10.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES
3.2、开始安装
1)、用oracle用户登录操作
# su - oracle
$ cd /opt/database
$ ./runInstaller -silent -responseFile /opt/database/response/db_install.rsp
2)、在安装过程中可以新开会话,使用tailf 命令查看进度
# tailf /u01/app/oraInventory/logs/installActions2022-XX-XX_03-28-06PM.log
提示安装结束,需要在root用户执行两个脚本,如下:
# /u01/app/oraInventory/orainstRoot.sh
# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
四、修改应答文件安装数据库实例(/opt/database/response/dbca.rsp)
安装实例前,需要新建一个实例存放的目录(/home/OracleData/),如下:
# mkdir /home/OracleData
# chown -R oracle:oinstall /home/OracleData/
4.1、修改应答文件
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME ="ora"
SID ="ora"
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD ="***012"
SYSTEMPASSWORD ="***012"
DATAFILEDESTINATION =/home/OracleData/
RECOVERYAREADESTINATION = /u01/app/oracle/flash_recovery_area
CHARACTERSET = "ZHS16GBK"
TOTALMEMORY = "2048"
4.2、建实例,登录oracle用户
# su - oracle
$ dbca -silent -responseFile /opt/database/response/dbca.rsp
此安装过程是有进度显示,不用tailf查看,不过也可以查看对应的log日志查看进度
4.3、删除实例

推荐阅读