先cd 到/usr/lib 目录下。
可以先备份下本机的lib目录
scp 10.14.55.184:/usr/lib/lib* .
把另一台库文件全 scp 过来。
其目的,我不说。你也知了。
注意:
要换到oracle 这个账号下去,用这个账号登录才行的。
总基本按照精品zenqf兄在RHEL5.1下的步骤来的,有些不同之处,略做修改。这里引用他的大部分东东,做个笔记。
环境
1.安装CENTOS 5.1
我是用的手动制定模块安装的,基本把开发所需的都装了
2.查询所需安装包是否完整(缺少补啥)
rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel
3.检查内存和磁盘
# grep MemTotal /proc/meminfo
MemTotal:512236 kB
# grep SwapTotal /proc/meminfo
SwapTotal:1574360 kB
#df -h
4.OS参数要求vi /etc/sysctl.conf , 在行末添加以下内容
#use for oracle
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
再运行sysctl -p应用以上参数
5.vi /etc/security/limits.conf 行末添加以下内容
#use for oracle
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
6. vi /etc/pam.d/login 行末添加以下内容
session required pam_limits.so
7. vi /etc/selinux/config 确保以下内容
SELINUX=disabled
关闭SELIINUX
8.vi /etc/profile,在最后加入:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
9.复制 oracle 10.2.0.1安装文件过来
10.因为默认centos5.1不支持10.2,0.1,修改安装文件
# vi /10201_database_linux32/database/install/oraparam.ini
### #[Certified Versions]
Linux=redhat-3,SuSE-9,redhat-4,centos-5,UnitedLinux-1.0,asianux-1,asianux-2]
再添加
[Linux-centos-5.0-optional]
TEMP_SPACE=80
SWAP_SPACE=150
MIN_DISPLAY_COLORS=256
11.修改目录权限
#chmod -R 777 10201_database_linux32
二.Oracle安装
# 由于Oracle未对CentOS作支持,改用Redhat标识
vim /etc/redhat-release
Red Hat Enterprise Linux AS release 3 (higkoo)
1.创建和配置用户
#/usr/sbin/groupadd oinstall
#/usr/sbin/groupadd dba
#/usr/sbin/useradd -m -g oinstall -G dba oracle
#id oracle
为Oracle用户设置密码:
#passwd oracle
2.创建安装目录
# mkdir -p /oracle
# chown -R oracle:oinstall /oracle
# chmod -R 775 /oracle
3.修改 Oracle 用户 .bash_profile
# su - oracle
$ vi ./.bash_profile
添加
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
4.开始安装
# su - oralce
$ cd /tmp/10201_database_linux32/databases
$ export DISPLAY=0:0
$ export LANG=en_US
$ ./runInstaller
很多人安装的时候中文会出现问题,这是由于oracle带的java环境导致的,可以通过换java环境或者更改字库等方法解决,因为我用英文安装,所以这一步省了。
三、安装完成后,重新启动遇到问题,oracle 的listener进程无法启动。
提示打开 /ade/vikrkuma_new/oracle/bin/tnslsnr 失败
vi /oracle/product/10.2.0.1/bin/dbstart
查找:
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
将其改为:
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME
后面可以自己做一个自启动脚本,需要的可以找相关文档。
在这里所有的验证都通过了! (两行*号之间的大家不用看,如果检测不通过,则可以参考)
*************************************************************************
插一段话,如果没有出现上面的界面,最好重新检查还缺少什么东西。如果出现下面的界
面,就先停止安装。
在这里有2个警告,4个要求没有通过。
我们看看都什么警告和要求:
Checking operating system requirements ...
Expected result: One of redhat-3,redhat-4,SuSE-9,asianux-1,asianux-2
Actual Result: redhat-Red Hat Enterprise Linux Server release 5 (Tikanga)
Check complete. The overall result of this check is: Failed <<<<
Problem: Oracle Database 10g is not certified on the current operating system.
Recommendation: Make sure you are installing the software on the correct platform.
这里说不支持RHEL5系统,如果按照上面的第二种则会出现,按照第一种方式修改则通过检测
Checking operating system package requirements ...
Check complete. The overall result of this check is: Not executed <<<<
OUI-18001: The operating system 'Linux Version redhat-Red Hat Enterprise Linux Server
release 5 (Tikanga)' is not supported.
Recommendation: Install the required packages before continuing with the installation.
这里说不支持RHEL5系统,如果按照上面的第二种则会出现,按照第一种方式修改则通过检测
Checking kernel parameters
Check complete. The overall result of this check is: Not executed <<<<
OUI-18001: The operating system 'Linux Version redhat-Red Hat Enterprise Linux Server
release 5 (Tikanga)' is not supported.
Recommendation: Perform. operating system specific instructions to update the kernel
parameters.
这里说不支持RHEL5系统,如果按照上面的第二种则会出现,按照第一种方式修改则通过检测
Checking Recommended glibc version
Check complete. The overall result of this check is: Not executed <<<<
OUI-18001: The operating system 'Linux Version redhat-Red Hat Enterprise Linux Server
release 5 (Tikanga)' is not supported.
Recommendation: You may actually have installed packages which have obsoleted these, in
which case you can successfully continue with the install. If you have not, it is
recommended that you do not continue. Refer to the readme to find out how to get the missing
packages.
这里说不支持RHEL5系统,如果按照上面的第二种则会出现,按照第一种方式修改则通过检测
Checking available swap space requirements ...
Expected result: 1416MB
Actual Result: 0MB
Check complete. The overall result of this check is: Failed <<<<
Problem: The system does not have the required swap space.
Recommendation: Make more swap space available to perform. the install.
这里是交换空间要求为1416MB,而我的系统为0,现在我把它改为1800MB.
执行图形中的命令即可。
Checking Network Configuration requirements ...
Actual Result: :java.lang.NullPointerException:Exception/Error Occurred
Check complete. The overall result of this check is: Not executed <<<<
Recommendation: Oracle supports installations on systems with DHCP-assigned public IP
addresses. However, the primary network interface on the system should be configured with a
static IP address in order for the Oracle Software to function properly. See the
Installation Guide for more details on installing the software on systems configured with
DHCP.
这里不支持动态的ip地址,修改上面提到的/etc/hosts文件即可。
Vi /etc/hosts
内容:192.168.130.189 mzl.net dbserver
保存后在终端运行命令:
#hostname
是否主机名变成了mzl.net,如果没有改变则要运行以下命令
#service network restart
“Error in invoking target ‘client_sharedlib’ of makefile ‘/home/oracle/oracle/product/10.2.0/db_1/network/lib/ins_net_client.mk’
June 10th, 2010 at 11:03 am Linux, oracle client_sharedlib, libclntsh, oracle
今天同事在安装oracle的时候总是报这个错误:
"Error in invoking target 'client_sharedlib' of makefile '/home/oracle/oracle/product/10.2.0/db_1/network/lib/ins_net_client.mk'.
我帮忙查了好久,一直都没发现是什么问题,最后不得不放狗,得到提示,查看ORACLE_HOME下面的install/make.log,在的最后,发现了这样的信息:
/usr/bin/make -f ins_net_client.mk client_sharedlib ORACLE_HOME=/home/oracle/oracle/product/10.2.0/db_1//home/oracle/oracle/product/10.2.0/db_1/bin/genclntsh
/home/oracle/oracle/product/10.2.0/db_1/rdbms/lib/kpudfo.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
genclntsh: Failed to link libclntsh.so.10.1
make: *** [client_sharedlib] Error
然后在这里找到有人提出可能的原因:把32位的oracle装64位的操作系统,或者是把64位oracle装32位的系统。
最后问清楚,这个家伙果然是把64位的oracle想装在32位的系统上了。。。
换回32位系统,一切正常
CentOS 下安装 Oracle 10g切换背景色
Bash代码: CentOS 下安装 Oracle 10g
# 挂载CentOS系统安装光盘
dvdFile="//FileServerIp/Share/CentOS-5.5-x86_64-bin-DVD.iso"
dvdDir="/mnt/CentOS_Final"
mount -t iso9660 -o loop "${dvdFile}" "${dvdDir}"
# 将安装光盘添加到安装源
cat >> /etc/yum.repos.d/CentOS-Media.repo <<_yumSource
[AutoInstaller]
name=CentOS-$releasever - Media
baseurl=file:///mnt/CentOS_Final/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
_yumSource
# 使用光盘作安装源,安装依赖库
yum -y --disablerepo=\* --enablerepo=AutoInstaller --nogpgcheck --skip-broken install compat-db* compat-libc* compat-gcc* libXp.so.6 libc-* libaio* openmotif glibc-devel* libgcc* gnome-lib* libXtst vnc-server xterm xorg-x11-twm
# 创建安装目录,解压安装包
mkdir -p /data/setupfiles/Oracle /data/oracle
cd /data/setupfiles/Oracle/
zcat /mnt/wol-fileshare-s/OPVol/Oracle/10201_database_linux_x86_64.cpio.gz | cpio -idmv
# 添加用户,设定用户密码
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle -d /data/oracle/home
id oracle
passwd oracle
# 初始化安装目录
mkdir -p /data/oracle/app /data/oracle/data
chown -R oracle:oinstall /data/oracle/app /data/oracle/data
chmod -R 775 /data/oracle/app /data/oracle/data
# 设置oracle用户的环境变量
vim ~oracle/.bash_profile
LANG=UTF-8
ORACLE_SID=orcl
ORACLE_BASE=/data/oracle/app
ORACLE_HOME=/app/oracle/product/10.2.0/db_1
JAVA_HOME=$ORACLE_HOME/jdk
PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
export LANG ORACLE_SID ORACLE_BASE ORACLE_HOME JAVA_HOME PATH
# 配置VNC登录选项,Oracle安装需要使用界面
vim /etc/sysconfig/vncservers
VNCSERVERS="0:oracle"
VNCSERVERARGS[2]="-geometry 1280x1024 -nolisten tcp -nohttpd -localhost"
su - oracle
vncserver
logout
vncserver -kill :1
service vncserver start
# 由于Oracle未对CentOS作支持,改用Redhat标识
vim /etc/redhat-release
Red Hat Enterprise Linux AS release 3 (higkoo)
# 修改内核参数
vim /etc/sysctl.conf
kernel.shmall = 4294967296
kernel.shmmax = 68719476736
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
sysctl -p
# 修改Oracle用户环境
vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536