【阿里雲服務器】ECS輕量服務器 Ubuntu圖形界面配置



1、購買服務器

阿里雲的官方網站為:https://www.aliyun.com/

里面有各種套餐,學生建議購買學生雲,大概9元每月。

2、修改主機名

  第一次通過瀏覽器連接會發現用戶名是一堆亂碼,首先修改root密碼:

# sudo passwd
_______________________________________________________
admin@iZwz954fergdge453fe29tdZ:~$ sudo passwd
sudo: unable to resolve host iZwz954fergdge453fe29tdZ
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

  然后修改主機名,然后重啟:

# su
# vim /etc/hostname 
# reboot

3、安裝圖形界面

  更新和升級軟件庫:(注意:以下操作都要在root用戶下進行

# apt-get update
# apt-get upgrade

  安裝 VNC :

# apt-get install vnc4server

  啟動 VNC 並設置密碼:

# vncserver

  安裝gnome桌面

# sudo apt-get install x-window-system-core
# sudo apt-get install gdm
# sudo apt-get install ubuntu-desktop
# sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

  修改 VNC 配置文件

# vi ~/.vnc/xstartup
_______________________________________________________
# 修改后的內容為:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
export XKL_XMODMAP_DISABLE=1
 unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &

  殺掉原桌面進程,生成新會話:

# vncserver -kill :1
# vncserver :1

  開啟 VNC 與 Windows的共享復制粘貼

# vncconfig -nowin&

  在Windows下安裝 VncViwer

  打開VNC Viewer,然后File->New connection,輸入:

VNC Server: 服務器公網IP:1
Name:隨便取名

  雙擊生成的連接並輸入密碼,即可遠程登錄服務器圖像界面。

4、美化一下終端

# gedit /etc/profile
_______________________________________________________
# 在最后加入
PS1='\[\033[1;31;1m\]\u:\[\033[1;32;1m\]\W\[\033[1;33;1m\]\$\[\033[1;37;1m\]'
_______________________________________________________
# source /etc/profile

# gedit /root/.bashrc
_______________________________________________________
# 在最后加入
source /etc/profile
_______________________________________________________
# source /root/.bashrc



免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM