Oracle server .bash_profile

配置Oracle环境变量
本文介绍如何在#.bash_profile#文件中正确配置Oracle环境变量,包括PATH、ORACLE_BASE、ORACLE_HOME等关键路径,以及如何解决ORA-21561错误。同时,提供了设置/etc/hosts文件的方法。
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export ORACLE_BASE=/opt/app/oracle
export ORACLE_HOME=$ORACLE_BASE/11.2.0
export ORACLE_SID=wmdw
export PATH=$ORACLE_HOME/bin:$HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export NLS_LANG=american_america.ZHS16GBK

export PATH
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

ORA-21561: OID generation failed

设置/etc/hosts 本机及远端地址




[root@localhost ~]# cd Downloads/ [root@localhost Downloads]# yum install java-1.8.0-openjdk-devel Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * epel: ftp-stud.hs-esslingen.de * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Resolving Dependencies --> Running transaction check ---> Package java-1.8.0-openjdk-devel.x86_64 1:1.8.0.412.b08-1.el7_9 will be installed --> Processing Dependency: java-1.8.0-openjdk(x86-64) = 1:1.8.0.412.b08-1.el7_9 for package: 1:java-1.8.0-openjdk-devel-1.8.0.412.b08-1.el7_9.x86_64 --> Running transaction check ---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.332.b09-1.el7_9 will be updated ---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.412.b08-1.el7_9 will be an update --> Processing Dependency: java-1.8.0-openjdk-headless(x86-64) = 1:1.8.0.412.b08-1.el7_9 for package: 1:java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64 --> Running transaction check ---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.332.b09-1.el7_9 will be updated ---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.412.b08-1.el7_9 will be an update --> Processing Dependency: tzdata-java >= 2023d for package: 1:java-1.8.0-openjdk-headless-1.8.0.412.b08-1.el7_9.x86_64 --> Running transaction check ---> Package tzdata-java.noarch 0:2022a-1.el7 will be updated ---> Package tzdata-java.noarch 0:2024a-1.el7 will be an update --> Finished Dependency Resolution /var/cache/yum/x86_64/7/base/gen/comps.xml: no element found: line 1, column 0 Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: java-1.8.0-openjdk-devel x86_64 1:1.8.0.412.b08-1.el7_9 updates 9.9 M Updating for dependencies: java-1.8.0-openjdk x86_64 1:1.8.0.412.b08-1.el7_9 updates 325 k java-1.8.0-openjdk-headless x86_64 1:1.8.0.412.b08-1.el7_9 updates 33 M tzdata-java noarch 2024a-1.el7 updates 187 k Transaction Summary ================================================================================ Install 1 Package Upgrade ( 3 Dependent packages) Total download size: 44 M Is this ok [y/d/N]: y Downloading packages: No Presto metadata available for updates (1/4): java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64.rpm | 325 kB 00:00 (2/4): java-1.8.0-openjdk-devel-1.8.0.412.b08-1.el7_9.x86_ | 9.9 MB 00:21 (3/4): tzdata-java-2024a-1.el7.noarch.rpm | 187 kB 00:00 (4/4): java-1.8.0-openjdk-headless-1.8.0.412.b08-1.el7_9.x | 33 MB 01:12 -------------------------------------------------------------------------------- Total 608 kB/s | 44 MB 01:13 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : tzdata-java-2024a-1.el7.noarch 1/7 Updating : 1:java-1.8.0-openjdk-headless-1.8.0.412.b08-1.el7_9.x86_64 2/7 warning: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/jre/lib/security/java.policy created as /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/jre/lib/security/java.policy.rpmnew warning: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/jre/lib/security/java.security created as /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/jre/lib/security/java.security.rpmnew restored /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/jre/lib/security/java.policy.rpmnew to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/jre/lib/security/java.policy restored /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/jre/lib/security/java.security.rpmnew to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/jre/lib/security/java.security Updating : 1:java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64 3/7 Installing : 1:java-1.8.0-openjdk-devel-1.8.0.412.b08-1.el7_9.x86_64 4/7 Cleanup : 1:java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64 5/7 Cleanup : 1:java-1.8.0-openjdk-headless-1.8.0.332.b09-1.el7_9.x86_64 6/7 Cleanup : tzdata-java-2022a-1.el7.noarch 7/7 Verifying : 1:java-1.8.0-openjdk-headless-1.8.0.412.b08-1.el7_9.x86_64 1/7 Verifying : tzdata-java-2024a-1.el7.noarch 2/7 Verifying : 1:java-1.8.0-openjdk-devel-1.8.0.412.b08-1.el7_9.x86_64 3/7 Verifying : 1:java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64 4/7 Verifying : tzdata-java-2022a-1.el7.noarch 5/7 Verifying : 1:java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64 6/7 Verifying : 1:java-1.8.0-openjdk-headless-1.8.0.332.b09-1.el7_9.x86_64 7/7 Installed: java-1.8.0-openjdk-devel.x86_64 1:1.8.0.412.b08-1.el7_9 Dependency Updated: java-1.8.0-openjdk.x86_64 1:1.8.0.412.b08-1.el7_9 java-1.8.0-openjdk-headless.x86_64 1:1.8.0.412.b08-1.el7_9 tzdata-java.noarch 0:2024a-1.el7 Complete! [root@localhost Downloads]# history 1 yum -y install gcc gcc-c++ openssl-devel 2 cd Downloads/ 3 wget https://nodejs.org/dist/v6.9.2/node-v6.9.2.tar.gz 4 ls 5 cd .. 6 ls 7 mkdir node 8 cd node 9 tar -xzf ~/Downloads/node-v6.9.2.tar.gz -C ./ 10 ls -l 11 cd .. 12 cd Downloads/ 13 cd node-v6.9.2.tar.gz 14 ls 15 cd node-v6.9.2.tar.gzcd .. 16 cd .. 17 cd node 18 ls 19 cd node-v6.9.2/ 20 ./configure 21 make -j$(nproc) 22 history 23 make install 24 node -v 25 npm -v 26 node --version 27 gcc --version 28 cd .. 29 mkdir -p /data/redis 30 cd /data/redis 31 wget https://download.redis.io/releases/redis-7.0.2.tar.gz 32 ls 33 tar -zxvf redis-7.0.2.tar.gz 34 ls -l 35 cd redis-7.0.2 36 make 37 sudo mkdir -p /etc/redis 38 sudo mkdir -p /var/lib/redis 39 ls -l 40 sudo cp redis.conf /etc/redis/ 41 cd .. 42 l -l 43 ls -l 44 cd .. 45 ls -l 46 cd .. 47 ls -l 48 cd etc/ 49 ls -l 50 cd redis 51 ls -l 52 vi redis.conf 53 redis-server /etc/redis/redis.conf 54 redis-server /redis.conf 55 cd .. 56 cd data 57 cd redis 58 sudo cp /data/redis/redis-7.0.2/src/redis-server /usr/bin/ 59 sudo cp /data/redis/redis-7.0.2/src/redis-cli /usr/bin/ 60 sudo cp /data/redis/redis-7.0.2/src/redis-benchmark /usr/bin/ 61 sudo cp /data/redis/redis-7.0.2/src/redis-check-aof /usr/bin/ 62 sudo cp /data/redis/redis-7.0.2/src/redis-check-rdb /usr/bin/ 63 sudo cp /data/redis/redis-7.0.2/src/redis-sentinel /usr/bin/ 64 cd /user/bin 65 cd .. 66 cd user 67 pwd 68 cd root 69 cd bin 70 ls 71 cd .. 72 ls 73 cd bin 74 ls -l 75 redis-server /etc/redis/redis.conf 76 cd .. 77 cd etc 78 ls -l 79 vi sysctl.conf 80 sysctl -p 81 cd .. 82 redis-server /etc/redis/redis.conf 83* redis-cil ping./ 84 cd bin 85* 86 ls l 87 ls -l 88 redis-server /etc/redis/redis.conf 89 cd .. 90 ls -l 91 cd root 92 cd Downloads/ 93 yum install java-1.8.0-openjdk-devel 94 history [root@localhost Downloads]# ls -l total 25904 -rw-r--r--. 1 root root 26522709 Dec 7 2016 node-v6.9.2.tar.gz [root@localhost Downloads]#
最新发布
10-24
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值