安装centos6.5 i686,安装vnc,配置中文界面

2022-09-01 15:19:22 浏览数 (1)

大家好,又见面了,我是你们的朋友全栈君。

一、安装centos6.5 i686,安装vnc,配置中文界面

1、安装centos6.5 i686,安装vnc,配置中文界面

1.1、安装vmware tools

可以调节屏幕分辨率,同时把时间自动同步到宿主机的时间

1.2、重启后修改分辨率,修改运行级别为3,然后重启 开机启动图形模式(5)、文本模式(3),文本模式没有x window运行,图形模式即使切换到文本模式控制台,x window仍然运行

1.3、修改网络配置 cat eth0的配置文件时,dhcp的,但是ifconfig eth0没有ip,修改network conneciton为bridged,ifconfig eth0没有ip,ping百度的ip仍然ping不通

使用hostonly模式—– 无需修改宿主机的vmnet1的ip为192.168.0.1;修改centos的eth0 # cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:e0:81:ba:b8:25 TYPE=Ethernet UUID=acf36ffa-66fc-43ce-9720-91a3da8a7441 ONBOOT=no NM_CONTROLLED=yes BOOTPROTO=dhcp

# vi /etc/sysconfig/network-scripts/ifcfg-eth0 ##修改前记得备份 DEVICE=eth0 HWADDR=00:e0:81:ba:b8:25 TYPE=Ethernet UUID=acf36ffa-66fc-43ce-9720-91a3da8a7441 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPADDR=192.168.0.3 NETMASK=255.255.255.0 GATEWAY=192.18.0.1 IPV6INIT=no USERCTL=no

# service network restart ##修改network conneciton为host only,此时防火墙、selinux都在打开,ping 192.168.0.1ping不通,使用secureCRT直接连接

1.4、安装并配置vnc 1.4.1、挂载iso,制作yum # mount /dev/cdrom /mnt mount: mount point /mnt does not exist # mkdir /mnt # umount /mnt # mount /dev/cdrom /mnt # cp -rf CentOS-Base.repo CentOS-Base.repo.bak # vi CentOS-Base.repo [base] name=CentOS-releasever – Base #mirrorlist=http://mirrorlist.centos.org/?release=releasever&arch=

# yum clean all # yum makecache ##错误原因,没有找到repodata目录,定位repodata Loaded plugins: fastestmirror, refresh-packagekit, security Determining fastest mirrors file:///mnt/Packages/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/Packages/repodata/repomd.xml Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

# vi CentOS-Base.repo [base] name=CentOS-releasever – Base #mirrorlist=http://mirrorlist.centos.org/?release=releasever&arch=

# yum clean all # yum makecache Loaded plugins: fastestmirror, refresh-packagekit, security Determining fastest mirrors base | 4.0 kB 00:00 … base/group_gz | 212 kB 00:00 … base/filelists_db | 4.9 MB 00:00 … base/primary_db | 3.4 MB 00:00 … base/other_db | 2.1 MB 00:00 …

Metadata Cache Created

1.4.2、安装vnc # yum list tiger* Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile Available Packages tigervnc.i686 1.1.0-5.el6_4.1 base tigervnc-server.i686 1.1.0-5.el6_4.1 base tigervnc-server-applet.noarch 1.1.0-5.el6_4.1 base tigervnc-server-module.i686 1.1.0-5.el6_4.1 # yum -y install tigervnc.i686 tigervnc-server.i686 # yum list tiger* Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile Installed Packages tigervnc.i686 1.1.0-5.el6_4.1 @base tigervnc-server.i686 1.1.0-5.el6_4.1 @base Available Packages tigervnc-server-applet.noarch 1.1.0-5.el6_4.1 base tigervnc-server-module.i686 1.1.0-5.el6_4.1

1.4.3、配置vnc ##编辑配置文件 # vi /etc/sysconfig/vncservers VNCSERVERS=”1:root” VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp”

# service vncserver start Starting VNC server: 1:root VNC password for user root is not configured [FAILED] # vncpasswd # service vncserver start Starting VNC server: 1:root xauth: creating new authority file /root/.Xauthority xauth: (stdin):1: bad display name “eos.north.m.mrcode.com:1” in “add” command

New ‘eos.north.m.mrcode.com:1 (root)’ desktop is eos.north.m.mrcode.com:1

Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/eos.north.m.mrcode.com:1.log [ OK ] ##配置完各个用户根目录下的”.vnc/xstartup”后,执行service vncserver restart 重新启动vncserver使配置生效 # vi ~/.vnc/xstartup #!/bin/sh export LANG #unset SESSION_MANAGER #exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xistartup ] && exec /etc/vnc/xstartup [ -r

# service vncserver restart

##vnc viewer连接centos服务端时,注意防火墙对应的端口是否开放/或者关闭防火墙,否则会报10060(超时错误),使用下面命令配置规则允许对应端口tcp包通过: # iptables -I INPUT 1 -p tcp –dport 5901 -j ACCEPT

##保存防火墙配置,并且重启防火墙 # service iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ] # service iptables restart iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: [ OK ] iptables: Applying firewall rules: [ OK ]

1.4.4、修改i18n为zh_CN.gbk # vi /etc/sysconfig/i18n #LANG=”en_US.UTF-8″ LANG=”zh_CN.gbk” SYSFONT=”latarcyrheb-sun16″

# echo 中国 ##安装系统时,已经安装中文支持 中国 sftp> put E:1worklib1yangsqminecreatedbreadme.txt # vi ~/readme.txt ##发现是乱码 1.脢媒戮脻驴芒鲁玫脢录禄炉脛卢脠脧脛驴脗录脦陋拢潞 /oracle—oracle_base脛驴脗录 /oradata–脢媒戮脻脦脛录镁麓忙路脜 /archive–麓忙路脜鹿茅碌碌脠脮脰戮

##重启系统

# init 6

# vi ~/readme.txt 1.数据库初始化默认目录为: /oracle—oracle_base目录 /oradata–数据文件存放 /archive–存放归档日志

1.4.5、使用vncview连接到centos

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/141973.html原文链接:https://javaforall.cn

0 人点赞