使用root使用者

su -
## OR ##
sudo -i

升級到最後一版的kernel

## Fedora 30/29/28/27/26/25/24/23 and CentOS 8 / RHEL 8 ##
dnf update kernel*

## CentOS/RHEL 7/6/5 ##
yum update kernel*

reboot

掛載VBox介面底下的VirtualBox Guest Additions

掛載VirtualBox Guest Additions的光碟裝置

mkdir /media/VirtualBoxGuestAdditions
mount -r /dev/cdrom /media/VirtualBoxGuestAdditions

安裝來源安裝包

On CentOS/Red Hat (RHEL) 8/7/6/5, EPEL

## CentOS 8 and Red Hat (RHEL) 8 ##
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

## CentOS 7 and Red Hat (RHEL) 7 ##
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

## CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
 
## CentOS 5 and Red Hat (RHEL) 5 ##
rpm -Uvh http://archives.fedoraproject.org/pub/archive/epel/epel-release-latest-5.noarch.rpm

Install following packages

## Fedora 30/29/28/27/26/25/24/23 ##
dnf install gcc kernel-devel kernel-headers dkms make bzip2 perl libxcrypt-compat

## CentOS/RHEL 8/7/6/5 ##
yum install gcc kernel-devel kernel-headers dkms make bzip2 perl

增加系統環境變數

## Current running kernel on Fedora 30/29/28/27/26/25/24/23, CentOS 8/7/6 and Red Hat (RHEL) 8/7/6 ##
KERN_DIR=/usr/src/kernels/`uname -r`

## Current running kernel on CentOS 5 and Red Hat (RHEL) 5 ##
KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m`

## Fedora example ##
KERN_DIR=/usr/src/kernels/4.15.6-300.fc27.x86_64/build

## CentOS and Red Hat (RHEL) example ##
KERN_DIR=/usr/src/kernels/3.10.0-693.17.1.el7-x86_64/build

## Export KERN_DIR ##
export KERN_DIR

安裝Guest Additions

cd /media/VirtualBoxGuestAdditions

# Then run following command
./VBoxLinuxAdditions.run

最後重開機

Hits: 635

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料