终于用上了Linode的机房的vps,弄好了系统之后发现,内核不支持pptp.机房技术答复说,需要更换系统内核,我已centos7为例,其他版本的系统请参考文章结尾处的链接
下面是操作步骤:
1.查看当前的内核的信息
[root@li1548-187 teddylu]# uname -a Linux li1548-187 4.8.6-x86_64-linode78 #1 SMP Tue Nov 1 14:51:21 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
2.安装发行版的系统内核
[root@li1548-187 teddylu]# yum install kernel grub2
3.确认发行版的内核版本
[root@li1548-187 teddylu]# ls /boot/vmlinuz*
/boot/vmlinuz-0-rescue-153a217486fe4be8a8dbd28db67ed581 /boot/vmlinuz-3.10.0-327.36.3.el7.x86_64
4.设置grub
[root@li1548-187 teddylu]# cat /etc/default/grub GRUB_TIMEOUT=10 GRUB_CMDLINE_LINUX="console=ttyS0,19200n8" GRUB_DISABLE_LINUX_UUID=true GRUB_SERIAL_COMMAND="serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1" GRUB_TERMINAL=serial [root@li1548-187 default]# grub2-mkconfig -o /boot/grub/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-327.36.3.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-327.36.3.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-153a217486fe4be8a8dbd28db67ed581 Found initrd image: /boot/initramfs-0-rescue-153a217486fe4be8a8dbd28db67ed581.img done
5.在Grub2模式下,启动系统
然后reboot系统
ps:如果你在重启的过程中看到下面的错误提示,可以忽略
1 2 3 4 5 |
error: file `/boot/grub/i386-pc/all_video.mod' not found. Loading Linux linux ... Loading initial ramdisk ... Press any key to continue... |
6.登陆系统之后,查看更改后的内核的信息
[root@li1548-187 teddylu]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@li1548-187 teddylu]# uname -a
Linux li1548-187 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
7.检查系统是否可以安装pptp
[root@li1548-187 teddylu]# modprobe ppp-compress-18 && echo ok
ok
[root@li1548-187 teddylu]# cat /dev/net/tun
cat: /dev/net/tun: File descriptor in bad state
参考:
https://www.linode.com/docs/tools-reference/custom-kernels-distros/run-a-distribution-supplied-kernel-with-kvm