标签:
Oracle001使用RedHat 系统在线安装时提示This system is not registered with RHN.如下:
[root@localhost ~]# yum install httpd
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package httpd available.
Nothing to do
解决方案:
1.卸载redhat自带的yum组件
[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
2.安装CentOS的yum包
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm
[root@localhost ~]# rpm -ivh *.rpm
warning: yum-3.2.22-37.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:yum-metadata-parser ########################################### [ 33%]
2:yum-fastestmirror ########################################### [ 67%]
3:yum ########################################### [100%]
3. 下载更新源,并存放在系统目录中
[root@localhost ~]# wget http://www.linuxidc.com/files/2011/05/06/CentOS-Base.repo
[root@localhost ~]#mv CentOS_Base.repo /etc/yum.repos.d/CentOS-Base.repo
4.生成缓存并进行安装
[root@localhost ~]# yum makecache
[root@localhost ~]# yum install httpd
oracle11g 安装时经常会提示缺少系统包,最好用yum安装一下。
yum可以使用网络在线安装,也可以使用本地光盘或者iso文件,两者均可。
首先要下载自己版本对应的repo文件,然后再配置,再安装,如下:
Oracle Linux 4, Update 6 or Newer
# cd /etc/yum.repos.d
# mv Oracle-Base.repo Oracle-Base.repo.disabled
# wget http://public-yum.oracle.com/public-yum-el4.repo
Oracle Linux 5
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-el5.repo
Oracle Linux 6
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo
Oracle VM 2
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ovm2.repo
2. 最后修改下载的文件,把Change enabled=0 改为 enabled=1
3. 现在就可以使用yum 安装和更新补丁了
4) yum install libaio-devel
yum install unixODBC-devel
yum install sysstat
但是还是不能更新,来招狠的吧,直接用本地iso文件作为yum源,如下:
在使用yum安装之前是必须配置yum源的, 在不能联网的情况下, 可使用DVD光盘或ISO文件做本地yum源. 下面以RHEL5.4为例, 其它版本类似.
1. 建立ISO文件存放目录(/u01/software/iso)和ISO文件的挂载目录(/u01/software/rhel5)
# mkdir /u01/software/iso
# mkdir /u01/software/rhel5
如果有现成的ISO文件可以直接上传至/u01/software/iso目录下.
2. 如果是DVD光盘(插入服务器后自动映射在/dev/cdrom下), 则先制作ISO文件
# cp /dev/cdrom /u01/software/iso/rhel-server-5.4-i386-dvd.iso
或
# dd if=/dev/cdrom of=/u01/software/iso/rhel-server-5.4-i386-dvd.iso
3. 挂载ISO文件
# mount -t iso9660 -o loop /u01/software/iso/rhel-server-5.4-i386-dvd.iso /u01/software/rhel5
# df -h
Filesystem Size Used Avail Use% Mounted on
...
/u01/software/iso/rhel-server-5.4-i386-dvd.iso
2.8G 2.8G 0 100% /u01/software/rhel5
# ll /u01/software/rhel5
4. 确保系统中已经安装了yum相关软件包
# rpm -qa |grep yum
没有就麻烦啦,先安装yum吧,不过一般都默认安装了。
5. 编辑repo文件, 先把原自带的repo文件去掉或重命名,就是让别的repo文件失效,只使用本地的源
# mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.enc
# vi /etc/yum.repos.d/rhel5.repo
-------------------------------------------------------------------------------
[Server]
name=rhel5server
baseurl=file:///u01/software/rhel5/Server
enable=1
gpcheck=1
gpgkey=file:///u01/software/rhel5/RPM-GPG-KEY-redhat-release
-------------------------------------------------------------------------------
注意这里的baseurl指向Server目录, 如果还要安装诸如集群和虚拟机等软件, 则还需建立指向Cluster,ClusterStorage,VT的baseurl.
6. 测试
# system-config-packages (在XWindow下, 选择安装需要的软件包)
# yum install lrzsz (下载安装lrzsz软件包,自动查找解决依赖关系)
[oracle@localhost test]$ cat test1 this is a file ,name is test1 [oracle@localhost test]$ cat test2 this is test2 name is test2 [oracle@localhost test]$ ll total 32 drwxr--r-x 2 root root 4096 Dec 20 23:04 package1 drwxr-xr-x 2 root root 4096 Dec 20 23:07 package2 -rw-r--r-- 1 root root 30 Dec 20 23:16 test1 -rwxr--r-x 1 root root 28 Dec 20 23:16 test2 [oracle@localhost test]$ su root Password: [root@localhost test]# ll total 32 drwxr--r-x 2 root root 4096 Dec 20 23:04 package1 drwxr-xr-x 2 root root 4096 Dec 20 23:07 package2 -rw-r--r-- 1 root root 30 Dec 20 23:16 test1 -rwxr--r-x 1 root root 28 Dec 20 23:16 test2 [root@localhost test]# chmod 744 package1 [root@localhost test]# ll total 32 drwxr--r-- 2 root root 4096 Dec 20 23:04 package1 drwxr-xr-x 2 root root 4096 Dec 20 23:07 package2 -rw-r--r-- 1 root root 30 Dec 20 23:16 test1 -rwxr--r-x 1 root root 28 Dec 20 23:16 test2 [root@localhost test]# su - oracle [oracle@localhost ~]$ cd /test/ [oracle@localhost test]$ ll total 32 drwxr--r-- 2 root root 4096 Dec 20 23:04 package1 drwxr-xr-x 2 root root 4096 Dec 20 23:07 package2 -rw-r--r-- 1 root root 30 Dec 20 23:16 test1 -rwxr--r-x 1 root root 28 Dec 20 23:16 test2 [oracle@localhost test]$ cd package1 -bash: cd: package1: Permission denied [oracle@localhost test]$ cd package1/ package2/ test1 test2 [oracle@localhost test]$ cd package2 [oracle@localhost package2]$ touch oracle1 touch: cannot touch `oracle1‘: Permission denied [oracle@localhost package2]$ 总结:当是一个目录时,假如只有读的权限还是不够的,一定需要具备XR两个权限才能进入该目录 当是一个文件时,假如只有读的权限,那么就可以读取你面的内容 |
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
【ERROR】while loading shared libraries: /u01/app/oracle/product/11.2.0/lib/libclntsh.so.11.1: cannot问题: [oracle@mydb]$ lsnrctl status lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2.0/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied 解答: 什么原因导致这些错误呢?原凶就是在安装LINUX时开启了SELinux,记得关闭SELinux 解决方法: (1)查看selinux的状态为Enforcing模式(setenforce 1设置SELinux 成为Enforcing模式,即开启SElinux) [root@mydb]# getenforce Enforcing (2)setenforce 0 设置SELinux 成为permissive模式(即临时关闭SElinux) [root@mydb]# setenforce 0 (3)查看selinux的状态为Permissive模式(setenforce 0设置SELinux 成为Permissive模式) [root@mydb]# getenforce Permissive 5、查看Selinux的配置文件是否修改 [root@mydb bin]# vi /etc/sysconfig/selinux # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=disabled # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted
注意:
|
linux下如何关闭防火墙?如何查看防火墙当前的状态 http://blog.csdn.net/liqfyiyi/article/details/7698032 从配置菜单关闭防火墙是不起作用的,索性在安装的时候就不要装防火墙 查看防火墙状态: /etc/init.d/iptables status 暂时关闭防火墙: /etc/init.d/iptables stop 禁止防火墙在系统启动时启动 /sbin/chkconfig --level 2345 iptables off 重启iptables: /etc/init.d/iptables restart 题外话: BT或者骡子速度慢用不着关防火墙,只要把相应端口开放就可以了 在文件 /etc/sysconfig/iptables 在系统原始配置的:RH-Firewall-1-INPUT规则链增加类似这样的行: -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 39764 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 39764 -j ACCEPT 如果发现原有-j REJECT一类的语句,上面两句要放在它的前面 重启后生效 开启: chkconfig iptables on 关闭: chkconfig iptables off 或者 /sbin/chkconfig --level 2345 iptables off 2) 即时生效,重启后失效 service 方式 开启: service iptables start 关闭: service iptables stop iptables方式 查看防火墙状态: /etc/init.d/iptables status 暂时关闭防火墙: /etc/init.d/iptables stop 重启iptables: /etc/init.d/iptables restart |
让listener能够识别出数据库: 1. sqlplus /as sysdba 2. alter system register 3. lsnrctl start 4. lsnrctl status |
http: nmehl_connect_internal: connect failed to (localhost.localdomain:1158)
今天打开oracle em后发现无法使用IE浏览器登录,emctl 进入日志后,发现emdctl.trc文件报以下警告信息:
2013-07-24 09:46:40,320 Thread-4124116736 WARN http: nmehl_connect_internal: connect failed to (vmware2:1158): Connection refused (error = 111) 2013-07-24 09:47:01,340 Thread-770500352 WARN http: nmehl_connect_internal: connect failed to (vmware2:1158): Connection refused (error = 111) 2013-07-24 09:47:32,320 Thread-1596827392 WARN http: nmehl_connect_internal: connect failed to (vmware2:1158): Connection refused (error = 111) 2013-07-24 13:01:13,226 Thread-3029894912 WARN http: nmehl_connect_internal: connect failed to (vmware2:1158): Connection refused (error = 111) 2013-07-24 13:01:19,245 Thread-3235116800 WARN http: nmehl_connect_internal: connect failed to (vmware2:1158): Connection refused (error = 111) 2013-07-24 13:10:17,248 Thread-3960440576 WARN http: nmehl_connect_internal: connect failed to (vmware2:1158): Connection refused (error = 111) 发现通过火狐浏览器是可以登录的,通过了解发现是IE浏览器安全性的问题 [oracle@vmware2 log]$ emctl unsecure dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. https://vmware2:1158/em/console/aboutApplication Configuring DBConsole for HTTP... Done. DBCONSOLE successfully stopped... Done. Agent is already stopped... Done. Unsecuring dbconsole... Started. DBConsole is now unsecured... Done. Unsecuring dbconsole... Sucessful. DBCONSOLE successfully restarted... Done. [oracle@vmware2 log]$ pwd /app/oracle/product/11.2.0/db_1/vmware2_tdb/sysman/log 分类: 数据库开发技术
11G Dbconsole 在启动时报以下错误: WARN http: snmehl_connect: connect failed to (ehrprod:1158): Connection refused (error = 111) 解决办法是查找emagent的进程,kill掉,再启,最后终于OK了。 [oracle@ehrprod persistence]$ ps -ef | grep emagent oracle 19843 1 0 14:03 pts/0 00:00:09 /u01/oracle/product/10.2.0.1/bin/emagent oracle 29162 15448 0 17:04 pts/1 00:00:00 grep emagent [oracle@ehrprod persistence]$ kill -9 19843 [@more@] |
http://www.cnblogs.com/mophee/archive/2013/06/03/3115805.html
1.安装好Oracle数据库后: 执行 dbstart和dbshut会提示:
[oracle@oracle11g ~]$ dbstart 错误原因是:dbstart和dbshut脚本文件中ORACLE_HOME_LISTNER的设置有问题,分别打开两个文件找到:ORACLE_HOME_LISTNER=$1,修改为 ORACLE_HOME_LISTNER=$ORACLE_HOME,命令如下: [oracle@oracle11g ~]$ vi $ORACLE_HOME/bin/dbstart
[oracle@oracle11g ~]$ vi $ORACLE_HOME/bin/dbshut
修改后保存退出,第一个问题已解决; 2.如何在Linux启动时自动启动Oracle监听和实例
首先要解决上面的问题,才能继续哟! 第一步:修改/etc/oratab文件,命令如下: [oracle@oracle11g ~]$ vi /etc/oratab //起到了开关的作用当启动或者关闭时都会读改文件,可以自己cat看下 找到:accp:/u01/oracle:N 修改为: accp:/u01/oracle:Y 第二步:把lsnrctl start和dbstart添加到rc.local文件中,命令如下: [oracle@oracle11g ~]$ vi /etc/rc.d/rc.local // 表示修改启动项 添加: su oracle -lc "/u01/produc/bin/lsnrctl start"//-l 表示切换用户的同时改变工作目录,-c表示执行命令后切换原来的身份 su oracle -lc /u01/product/bin/dbstart
注意:第一个命令有空格,所以要用引号的 重启试试吧! |
如果此进在windows的IE浏览器中仍无法访问linux中安装的oracle的em和isqlplus。 多半原因是由于iptables中对端口做了限制访问。用iptables -L查看是否不允许访问。若是用以下方法解决。 解决方法1:直接用命令加,只是命令加是当前生效。 iptables -I INPUT -p tcp --dport 1158 -j ACCEPT iptables -I INPUT -p tcp --dport 5560 -j ACCEPT 再次从客户端访问,成功! 解决方法2:修改/etc/sysconfig/iptables文件。增加2行。 -A INPUT -m state --state NEW -m tcp -p tcp --dport 1158 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 5560 -j ACCEPT 重启防火墙,这里有两种方式重启防火墙 a) 重启后生效 开启: chkconfig iptables on 关闭: chkconfig iptables off b) 即时生效,重启后失效 开启: service iptables start 关闭: service iptables stop 再次从客户端访问,成功! 解决方法3:若是测试机,可直接关闭iptables。 service iptables stop 再次从客户端访问,成功! |
|
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener IBM/AIX RISC System/6000 Error: 79: Connection refused 然后手动启动数据库报如下错误: $ lsnrctl start HOSTS文件中的内容出错,重复几个IP对应一个域名 |
EM Configuration issue. /u01/app/product/11.2.0/db_1/jiagulun_jiagulun not found. 上面的错误是在你已经创建oracle数据以后再去改hosts 的文件所报的错误,因为在创建oracle的时候已经使用了里面的配置,所以修改该文件 一定要在创建oracle之前就应该改变的地方 通过连接文件来做也是可以的,下面的示例是大小写原因所导致的,但是这样的方式也是没有问题的;只是导致的问题一样,而原因不一样 emctl 错误一例: OC4J Configuration issue 新装的系统经常会碰到这个问题,建完库以后想看看EM是不是正常启动 [oracle@node2 dbs]$ emctl status dbconsole
OC4J Configuration issue. /u01/app/oracle/product/11.2.3/db_1/oc4j/j2ee/OC4J_DBConsole_node2_MOMORAC not found. 很简单,是因为DB_UNIQUE_NAME 大小写导致的,或者建库的时候,最好各种name都用大写,省的麻烦 简单处理,创建个链接
[oracle@node2 j2ee]$ ln -s OC4J_DBConsole_node2_momorac OC4J_DBConsole_node2_MOMORAC 再次查看
[oracle@node2 j2ee]$ emctl status dbconsole 还是大小写,再去建个链接
[oracle@node2 j2ee]$ cd /u01/app/oracle/product/11.2.3/db_1/ 然后再次检查
[oracle@node2 db_1]$ emctl status dbconsole |
标签:
原文地址:http://blog.csdn.net/u011218159/article/details/43898779