I was actually building a baseline APEX VM based on my personal preferences late last year.
To safe others and me the searching here is a quick writeup of the steps involved.
Start by making UEK4 repository for Oracle Linux 7 known to yum.
Use your favorite editor to edit the file /etc/yum.repos.d/public-yum-ol7.repo.
Then either add below lines to the file or replace the ones for ol7_UEKR3 with them.
Actually you cn copy the repository ol7_UEKR3 and just replace every 3 with a 4.
[ol7_UEKR4] name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/UEKR4/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1Now run yum update and verify that you actually get the version 4.
Depending on your internet connection's bandwidth this is a good time to grab a coffee.
You should at least see below line, otherwise you won't get the new kernel.
kernel-uek x86_64 4.1.12-32.el7uek ol7_UEKR4 43 MReview the output from yum and then confirm with y.
Wait until yum has downloaded and installed all pending packages.
After everything has been installed reboot to activated the new kernel.
If you're running the system within VirtualBox like I do remember to reinstall the VirtualBox Guest Additions. You need to do this every time you boot into another kernel because they are compiled against the currently active kernel.
In the VirtualBox VM window go to Devices->Insert Guest Additions CD image.
Then mount the cdrom device if it isn't mounted automatically, then reinstall the additions.
[root@ol7db12c ~]# mount /dev/cdrom /media/cdrom mount: /dev/sr0 is write-protected, mounting read-only [root@ol7db12c ~]# /media/cdrom/VBoxLinuxAdditions.run Verifying archive integrity... All good. Uncompressing VirtualBox 5.0.12 Guest Additions for Linux............ VirtualBox Guest Additions installer Removing installed version 5.0.12 of VirtualBox Guest Additions... Removing existing VirtualBox non-DKMS kernel modules[ OK ] Copying additional installer modules ... Installing additional modules ... Removing existing VirtualBox non-DKMS kernel modules[ OK ] Building the VirtualBox Guest Additions kernel modules Building the main Guest Additions module[ OK ] Building the shared folder support module[ OK ] Building the OpenGL support module[ OK ] Doing non-kernel setup of the Guest Additions[ OK ] Starting the VirtualBox Guest Additions [ OK ] Installing the Window System drivers Could not find the X.Org or XFree86 Window System, skipping.
Have fun with the new kernel!