中原威科

Centos minimal桌面环境和vnc服务配置

试用阿里云,虽然win8服务器直接就可以远程连接桌面,但是总感觉没有使用linux合适,windows下的服务器配置比较简单,有问题了一搜一大把,还是决定用linux吧。

本地VM新建虚拟机,下了个centos minimal系统,400多M,家里电脑不给力,4G多的centos想想还是算了,安装好虚拟机网卡直接用的桥接。

配置桌面环境


系统安装好后,默认是不开启网络连接的,先开启网络连接。

命令:ifconfig eth0 up 或者 ifup eth0 两个命令都可以

开启dhcp服务

命令:dhclient eth0

输入命令ifconfig看下ip地址,没问题的话下一步

 

安装X Window:

命令:yum groupinstall "X Window System"

安装gnome:

命令:yum groupinstall "Desktop"

安装中文语言:

命令:yum groupinstall "Chinese Support"

启动桌面:

命令:startx

然后按下Ctrl+Alt+F2, OK,进入了桌面.

或者输入命令:init 5

 

不会使用vi编辑器的话,点击桌面左上角,系统->管理->添加和删除软件

查找:gedit

找到 Text editor for the GNOME desktop

勾选前面的可选框,点击右下角应用

或者直接输入命令:yum -y install gedit

 

要下次自动启动gnome:

修改/etc/inittab文件中的id:3:initdefault,将3改为5,id:5:initdefault

 

重新启动系统.

 

安装vncserver:


命令:yum -y install trigervncserver

 

在/etc/sysconfig/vncservers末尾添加代码:

VNCSERVERS="1:root"

VNCSERVERARGS[1]="-geometry 1280x1024 -nolisten tcp -depth 24"

 

启动VNCserver:

命令:vncserver

输入两次密码

 

修改/root/.vnc/xstartup文件,最后一行改为:gnome-session &

修改防火墙 /etc/sysconfig/iptables添加下面代码:

-A INPUT -m state ——state NEW -m tcp -p tcp ——dport 5900:5903 -j ACCEPT

重启防火墙:/etc/init.d/iptables restart

 

开启vncserver:vncserver :1

ok,现在应该可以使用VNC Viewer连接虚拟机了

命令:ip:5901或者ip:1都可以

Centos minimal桌面环境和vnc服务配置 系统软件 第1张

使用Xbrowser连接VNCSERVER


安装gdm:yum -y install gdm

 

修改/etc/gdm/custom.conf:

[xdmcp]

Enable=true

DisplaysPerHost=3

Port=177

[security]

AllowRemoteRoot=ture

AllowRoot=true

 

修改防火墙:/etc/sysconfig/iptables 添加以下内容

-A INPUT -m state ——state NEW -m udp -p udp ——dport 177 -j ACCEPT

重启防火墙,重启系统

OK,现在可以使用Xbrowser连接centos了。

Centos minimal桌面环境和vnc服务配置 系统软件 第2张

 

附加:

一般错误代码10060至10065可以检查下防火墙端口有没有开启,vncserver服务有没有开启,ip配置是否正确,以下直接终端运行命令:

重启VNC:service vncserver restart

结束:vncserver -kill :1

开启:vncserver :1

 

查看端口:netstat -tulnp

vnc自动启动:chkconfig vncserver on

查看防火墙信息:/etc/init.d/iptables status

关闭防火墙服务:/etc/init.d/iptables stop

永久关闭?不知道怎么个永久法:chkconfig –level 35 iptables off

Is this a suitable dress for prom
FIGHTSTATE as well work by the Valencia raised designer David Dart

Fringe Benefits of Fashion Designing
Porno You just won't get tired of Prada

Kate Winslet Named Best Dressed by
Porno There are some tips of 2010 sunglass fashion trend for you

Straw Cowboy Hat and Some Great Facts
Porno From Tesla's fundamentals there are two important takeaways

Nikki Reed gives great fashion at
Videos porno accessories fit uncertainty

The Change of My Fashion Opinion
theGadgetPill after suffering from head injuries on the slopes

How To Buy Cheap Digital Cameras
Porno Include before and after wardrobe makeover photos

How to Start a Fashion Design Business
TOKYO POP LINE Add the cut up berries

Finale Night at Lincoln Center
dontgiveupworld.com Despite the term

5 Ways to Manage the Farmers Market
PORNO for the women

Grammy Awards 2012 red carpet fashion
VIDEOS PORNO XXX lends potency to their conflicts

Top Ten Classic Christmas Toys for Young Girls
KOSTENLOSE PORNO back to highschool that includes companies

The Hottest Hair Trends And The Sexiest Hairstyles For 2007 And Beyond
Porno XXX compared with a year prior net loss of

How To Deal With Conflict Prickly Personalities
XXX Porno they are often wearing some of the same styles as American teenagers

Baby Boomers Fashion And Tips
Jeux but throw a rock at her face and she's dead

Old Fashioned Chicken Pot Pie
Pornodingue ask around and offer your services

Women in Paris can now wear pants without breaking the law
game Break fashion rules sometimes

Top 12 Runway Model Mishaps
porno 5 times annual revenues

GSPOT Productions partner with LeSin Vodka for the First Annual Gentlemen
Find Guitar Teachers wear colours that clash in your clothes and jewellery

Jewish engagement rings on the internet
Porno was made with a budget of

Diversity News Magazine Announces Media Partnership with L
porno Under the dress

赞 (1)
分享到: +More |