RHEL(Centos)VNC使用
vnc 配置
yum install vnc
rpm -qa|grep vnc
vnc-4.1.2-14.el5_3.1
gtk-vnc-0.3.8-3.el5
gtk-vnc-python-0.3.8-3.el5
vnc-server-4.1.2-14.el5_3.1
1)vncpasswd 设置访问密码,不设置密码时为机器的用户密码
2)启动vncserver后
****启动信息如下注意[:2] 用于连接和关闭使用
[root@localhost ~]# vncserver
vnc 配置
yum install vnc
rpm -qa|grep vnc
vnc-4.1.2-14.el5_3.1
gtk-vnc-0.3.8-3.el5
gtk-vnc-python-0.3.8-3.el5
vnc-server-4.1.2-14.el5_3.1
1)vncpasswd 设置访问密码,不设置密码时为机器的用户密码
2)启动vncserver后
****启动信息如下注意[:2] 用于连接和关闭使用
[root@localhost ~]# vncserver
New 'localhost.localdomain:2 (root)' desktop is localhost.localdomain:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:2.log
3)kill掉vnc进程,命令如下:
vncserver -kill :2
4)在用户目录下,编辑vnc启动文件,格式如下
vi .vnc/xstartup
#!/bin/sh
Log file is /root/.vnc/localhost.localdomain:2.log
3)kill掉vnc进程,命令如下:
vncserver -kill :2
4)在用户目录下,编辑vnc启动文件,格式如下
vi .vnc/xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
5)再次启动vnc
默认启动
vncserver 启动
启动时设置分辨率
vncserver -geometry 640x480
6)进入vnc([:2]是localhost.localdomain:2.log里面的2)
vncview ip:2
或vncview :2
按ctrl -c可关闭掉vnc弹出的窗口
默认启动
vncserver 启动
启动时设置分辨率
vncserver -geometry 640x480
6)进入vnc([:2]是localhost.localdomain:2.log里面的2)
vncview ip:2
或vncview :2
按ctrl -c可关闭掉vnc弹出的窗口
查看帮助
[root@localhost ~]# vncserver -h
usage: vncserver [:<number>] [-nohttpd] [-name <desktop-name>] [-depth <depth>]
[-geometry <width>x<height>]
[-pixelformat rgbNNN|bgrNNN]
<Xvnc-options>...
[-geometry <width>x<height>]
[-pixelformat rgbNNN|bgrNNN]
<Xvnc-options>...
vncserver -kill <X-display>
一、安装相关samba软件
yum install samba samba-client
二、关闭selinux
[root@localhost ~]# cat /etc/sysconfig/selinux
yum install samba samba-client
二、关闭selinux
[root@localhost ~]# cat /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 - No SELinux policy is loaded.
SELINUX=disabled
三、编辑smb配置
[root@localhost ~]# vi /etc/samba/smb.conf
workgroup = WORKGROUP
wins support = yes
[homes]
comment = Home Directories
browseable = no
writable = yes
path = /home/%S
valid users = %S
; valid users = MYDOMAIN\%S
四、启动samba并开启防火墙的samba端口 139及445
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
三、编辑smb配置
[root@localhost ~]# vi /etc/samba/smb.conf
workgroup = WORKGROUP
wins support = yes
[homes]
comment = Home Directories
browseable = no
writable = yes
path = /home/%S
valid users = %S
; valid users = MYDOMAIN\%S
四、启动samba并开启防火墙的samba端口 139及445
五、添加用户smb用户
smbpasswd -a username
smbpasswd -a username
六、linux下查看共享-U用户 -L sambaIP
smbclient -U a -L //192.168.6.166
smbclient -U a -L //192.168.6.166
七、开机自启动
[root@localhost ~]# chkconfig --level 35 smb on
[root@localhost ~]# chkconfig --list|grep smb
smb 0:off 1:off 2:off 3:on 4:off 5:on 6:off
[root@localhost ~]# chkconfig --level 35 smb on
[root@localhost ~]# chkconfig --list|grep smb
smb 0:off 1:off 2:off 3:on 4:off 5:on 6:off
访问时会弹出输入用户名密码界面,输入即可
php报500错误时
打开php.ini里的错误提示
display_errors = On
本文转自 qwjhq 51CTO博客,原文链接:http://blog.51cto.com/bingdian/284929