了解xhost 命令 :http://http://techbbs.zol.com.cn/1/9_3850.html
Xlib: connection to “:0.0” refused by server
Xlib: No protocol specified
Error: Can’t open display: :0.0
解决:
在root下执行会xhost+
会出现第二个错误,原因是display没有配置,因为实在远程上操作,所以先解决第二个错误
2 .
xhost:unable to open display”“
参考网址:http://blog.sina.com.cn/s/blog_a32eff280100ykyq.html
解决:
用root登陆linux,启动vnc服务
设置不少于6位的密码
根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc在第一个tty上启动的),vnc的启动信息见附件1;
执行xhost +,并且提示“access control disabled, clients can connect from any host”才正确。
参考网址:http://www.freebsddiary.org/tightvnc.php
3.
无法使用命令 /usr/bin/xdpyinfo 自动检查显示器颜色。请检查是否设置了 DISPLAY 变量。 未通过 <<<<
参考网址:http://www.shangxueba.com/jingyan/1644111.html
解决:1.在root下执行
#xdpyinfo 记录下name of display:后的字符串,如 127.0.0.1:1.0
2. #xhost +
返回信息为: access control disabled,clients can connect from any host
3.切换到Oracle用户:
#su - oracle
4.在Oracle用户下执行命令:
export DISPLAY=:1.0 // 这个地方1.0是在启动vnc 时出现启动是什么的
5.在Oracle下执行xdpyinfo命令,如果能正常显示,说明设置成功
4.
如果都通过了依旧没反应 那么就需要 su-oracle 中启动才可以
不是在root中切换 而是直接 su - oracle 密码如果不知道
就在root下 passwd oracle 重置密码就可以了
再试下就能成功
5输入启动命令报错.
oracle@SANYFCBS ~]$ sqlplus “/as sysdba”; sqlplus: error while loading shared libraries:
/opt/ora11/product/11.1/lib/libclntsh.so.11.1: cannot restore segment
prot after reloc: Permission denied
解决方法:
检查:[root@SANYFCBS selinux]#getenforce
Enforcing
[root@SANYFCBS selinux]# /usr/sbin/setenforce 0
[root@SANYFCBS selinux]# vi /etc/selinux/config
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
**总的来说在图形界面会好安一些,远程连接费劲