OracleLinux6.1 64位 下配置VNC和Samba
Oracle Linux 6.1 (64位) 下配置VNC和SambaVNC Server配置首先验证是否安装了VNC Server,新版本改名叫tigerVNC,虎年的原因.yum list | grep vnc如果没有,在安装介质或者网络上找到并且安装;tigervnc-server.x86_64设置vnc server密码;vncserver或者vncpasswd;注意,如果你想在哪个用户下使用远程桌面,就要在哪个用户下使用vncpasswd,生成$home/.vnc/pwd 文件.关闭或者配置iptables;VNC Server 用到了三个端口:5801、5901、6001。[root@localhost /]# cd /etc/sysconfig[root@localhost sysconfig]# vi iptables添加如下三行-A INPUT -m state --state NEW -m tcp -p tcp --dport 5801 -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 6001 -j ACCEPT注意,一定要在-A INPUT -j REJECT --reject-with icmp-host-prohibited的前面,否则不会生效。重新启动 iptables。[root@localhost sysconfig]# /etc/rc.d/init.d/iptables restartFlushing firewall rules: [ OK ]Setting chains to policy ACCEPT: filter [ OK ]Unloading iptables modules: [ OK ]Applying iptables firewall rules: [ OK ]Loading additional iptables modules: ip_conntrack_netbios_ns ip_conntrack_ftp [ OK ]
配置/etc/sysconfig/vncservers# VNCSERVERS="2:myusername" VNCSERVERS="1:root 2:oracle"# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost" VNCSERVERARGS[2]="-geometry 1024x768"复制root目录下的xstartup到你想要远程的用户根目录下的.vnc下,chown给你的用户;使用VNC view连接远程桌面,安装过程略,可以在网上很容易下载到VNC view;
然后你设置的输入密码;
进入系统
配置成功!配置Samba验证是否安装了Samba;过程略,如果没有,在网上下载或者在安装介质上安装;配置防火墙使用samba或者关闭防火墙;过程略;查看和修改/etc/samba/smb.confworkgroup = workgroup
[samba]comment = samba sharepath = /home/oracle/install_filespublic = yeswritable = yesprintable = novalid users = oracle
创建测试目录;mkdir /home/oracle/install_fileschmod 1777 /home/oracle/install_files为samba添加用户和密码smbpasswd -a oracleNew SMB password:Retype new SMB password:Added user oracle.重启服务.service smb restart如果想随机启动,使用chkconfig;chkconfig smb on; [开启在状态2、3、4、5下该服务].在windows下正常访问即可!完成.