双磁盘安装win10和centos 7之后的一些配置工作

来源:互联网 发布:变声器玩游戏知乎 编辑:程序博客网 时间:2024/06/05 21:18

1、在CentOS 7中为firefox安装flash插件

在adobe官网 http://get.adobe.com/cn/flashplayer/  下载 flash插件 rpm包  flash-plugin-11.2.202.400-release.x86_64.rpm运行以下命令即可安装flash插件:[root@bogon ~]# rpm -ivh flash-plugin-11.2.202.400-release.x86_64.rpm安装完毕后,重启系统 flash即可使用。

2、在双磁盘上引导双系统,在磁盘0上安装了win10,在磁盘1上安装了centos 7.在windows 10上试图以easybcd引导,结果失败,怀疑是windows系统的引导程序无法识别linux mbr,只好在centos上添加win10的引导。

在centos和添加对windows的引导:切换到 root用户[root@bogon ~]# su root[root@bogon ~]# cd /etc/grub.d/[root@bogon ~]# vi 40_custom   #在40_custom文件中中添加最后几行内容#!/bin/shexec tail -n +3 $0# This file provides an easy way to add custom menu entries.  Simply type the# menu entries you want to add after this comment.  Be careful not to change# the 'exec tail' line above.menuentry 'Windows 10'{set root=(hd1,1)  #这里hd1表示第二个磁盘(hd0表示第一个磁盘),1表示第一个分区chainloader +1    # 此处 +1 是指示GRUB读入分区的第一个扇区的引导记录。  }然后执行命令:[root@bogon ~]# grub2-mkconfig -o /boot/grub2/grub.cfg[root@bogon ~]# reboot #重新开机即可看到 windows启动项。问题:怎么看windows系统在哪个磁盘哪个分区呢?[root@bogon guoyajie]# fdisk -l磁盘 /dev/sdb:1000.2 GB, 1000204886016 字节,1953525168 个扇区Units = 扇区 of 1 * 512 = 512 bytes扇区大小(逻辑/物理):512 字节 / 4096 字节I/O 大小(最小/最佳):4096 字节 / 4096 字节磁盘标签类型:dos磁盘标识符:0xf55ede0c   设备 Boot      Start         End      Blocks   Id  System/dev/sdb1            2048   629189590   314593771+   7  HPFS/NTFS/exFAT/dev/sdb2       629189591  1291449220   331129815    7  HPFS/NTFS/exFATPartition 2 does not start on physical sector boundary./dev/sdb3      1291449221  1743806463   226178621+   7  HPFS/NTFS/exFATPartition 3 does not start on physical sector boundary./dev/sdb4      1743806464  1953523711   104858624    5  Extended/dev/sdb5   *  1743808512  1745905663     1048576   83  Linux  #带 *的分区为mbr所在分区    从文件系统类型可以看出为linux mbr所在分区。/dev/sdb6      1745907712  1953523711   103808000   8e  Linux LVM    可以看出 我的系统安在了扩展分区上。磁盘 /dev/sda:128.0 GB, 128035676160 字节,250069680 个扇区Units = 扇区 of 1 * 512 = 512 bytes扇区大小(逻辑/物理):512 字节 / 512 字节I/O 大小(最小/最佳):512 字节 / 512 字节磁盘标签类型:dos磁盘标识符:0x8d0e8f94   设备 Boot      Start         End      Blocks   Id  System/dev/sda1   *        2048     1026047      512000    7  HPFS/NTFS/exFAT   #这个是windows mbr所在分区,显然为第二个磁盘的第一个分区。/dev/sda2         1026048   145950524    72462238+   7  HPFS/NTFS/exFAT/dev/sda3       145952768   147574783      811008   27  Hidden NTFS WinRE/dev/sda4       147575029   250066943    51245957+   7  HPFS/NTFS/exFAT磁盘 /dev/mapper/cl-root:53.7 GB, 53687091200 字节,104857600 个扇区Units = 扇区 of 1 * 512 = 512 bytes扇区大小(逻辑/物理):512 字节 / 4096 字节I/O 大小(最小/最佳):4096 字节 / 4096 字节磁盘 /dev/mapper/cl-swap:8321 MB, 8321499136 字节,16252928 个扇区Units = 扇区 of 1 * 512 = 512 bytes扇区大小(逻辑/物理):512 字节 / 4096 字节I/O 大小(最小/最佳):4096 字节 / 4096 字节磁盘 /dev/mapper/cl-home:44.3 GB, 44283461632 字节,86491136 个扇区Units = 扇区 of 1 * 512 = 512 bytes扇区大小(逻辑/物理):512 字节 / 4096 字节I/O 大小(最小/最佳):4096 字节 / 4096 字节

3、 双系统引导设置好后还想 让windows为默认启动系统

1、查看/boot/grub2/grub.cfg文件,其中的 menuentry 标签中的就是开机的时候,在屏幕上显示的待选择的系统。2、修改文件 /boot/grub2/grubenvsaved_entry=Windows 10   #saved_entry的值即为开机默认启动项的值,等号后面的内容就是 /boot/grub2/grub.cfg 文件中menuentry标签开头的字符串,这里填windows对应条目即可。

4、centos7 上安装五笔输入法
默认的汉语输入法为拼音输入法,这里介绍一下极点五笔输入法的安装:

[root@bogon ~]# yum install ibus-table-chinese-wubi-jidian.noarch -y#安装完毕后,重启系统,然后 系统工具->设置->区域语言->输入源->中文汉言 可以看到五笔输入法。

5、输入法悬浮框有时候无法显示,可以通过以下命令重启

[root@bogon ~]# ibus-daemon -rdx #这个命令有时候不起作用

6、yum提示Another app is currently holding the yum lock; waiting for it to exit

rm -f /var/run/yum.pid

7、CentOS 7中安装vlc视频播放器

[root@bogon ~]# wget https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/e/epel-release-7-10.noarch.rpm     #文件路径可能会变这个要灵活应对,可以先输入https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/e/ 寻找[root@bogon ~]# wget http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm[root@bogon ~]# yum -y localinstall epel-release-7-9.noarch.rpm[root@bogon ~]# yum -y localinstall nux-dextop-release-0-5.el7.nux.noarch.rpm[root@bogon ~]# yum -y install vlc

注意root用户安装VLC,但是root用户却无法播放。必须切换为其它用户才能进行播放操作。