2021年2月21日 星期日

用shell 快速安裝CentOS 7 桌面環境、遠端桌面環境

為了要在CentOS 7 寫php程式,開始要了解 CentOS 7 桌面環境。

檔案名稱:CentOS7Gnome.sh
檔案內容:
#!/bin/bash
yum -y groups install "GNOME Desktop" "Graphical Administration Tools"
systemctl set-default graphical.target
reboot

如何使用
$sudo chmod 777 CentOS7Gnome.sh
$sudo sh CentOS7Gnome.sh

檔案名稱:CentOS7Xfce.sh
檔案內容:
#!/bin/bash
yum install epel-release -y
yum groupinstall "Xfce" -y
systemctl set-default graphical.target
reboot

如何使用
$sudo chmod 777 CentOS7Xfce.sh
$sudo sh CentOS7Xfce.sh

檔案名稱:CentOS7GnomeXrdp.sh
檔案內容:
#!/bin/bash
yum -y groups install "GNOME Desktop" "Graphical Administration Tools"
systemctl set-default graphical.target
rpm -Uvh http://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install xrdp tigervnc-server -y
systemctl enable xrdp.service
reboot

如何使用
$sudo chmod 777 CentOS7GnomeXrdp.sh
$sudo sh CentOS7GnomeXrdp.sh

檔案名稱:CentOS7XfceXrdp.sh
檔案內容:
#!/bin/bash
#!/bin/bash
yum install epel-release -y
yum groupinstall "Xfce" -y
systemctl set-default graphical.target
rpm -Uvh http://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install xrdp tigervnc-server -y
systemctl enable xrdp.service
reboot

如何使用
$sudo chmod 777 CentOS7XfceXrdp.sh
$sudo sh CentOS7XfceXrdp.sh




沒有留言:

張貼留言

Laravel 12 Model 資料庫中的資料表,並提供與資料庫互動的介面

相關系列文章: 1. 在 windows 10 安裝 laravel 12 studentManagement環境與設定 2. laravel 12 route 路由 3. laravel 12 Blade Templates 網頁模版 4. laravel 12 Control...