码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS 7 折腾小记

时间:2015-07-13 22:27:33      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:centos7 linux cento

一 安装4.1.1内核

1 安装软件
编译安装新内核,依赖于开发环境和开发库
# yum grouplist //查看已经安装的和未安装的软件包组,来判断我们是否安装了相应的开发环境和开发库;
# yum groupinstall "Development Tools" //一般是安装这两个软件包组,这样做会确定你拥有编译时所需的一切工具
# yum install ncurses-devel //你必须这样才能让 make *config 这个指令正确地执行
# yum install qt-devel //如果你没有 X 环境,这一条可以不用
# yum install hmaccalc zlib-devel binutils-devel elfutils-libelf-devel

如果是开发模式安装的系统,这些包应该都安装了。


2 解压内核到/usr/src/kernels 目录 重命名为:linux-4.1.1

原因是安装以后是这样的:

ls /usr/lib/modules/4.1.1/build -lh
lrwxrwxrwx. 1 root root 28 Jul 10 16:41 /usr/lib/modules/4.1.1/build -> /usr/src/kernels/linux-4.1.1

cp /boot/config-3.10.0-229.7.2.el7.x86_64 ./config<pre name="code" class="python"># sh -c 'yes "" | make oldconfig'
make oldconfig会读取当前目录下的.config文件,在.config文件里没有找到的选项则提示用户填写。有的文档里介绍使用make memuconfig


make -j8 bzImage  //生成内核文件<pre name="code" class="python">make -j4 modules  //编译模块
make -j4 modules_install  //编译安装模块

-j后面的数字是线程数,用于加快编译速度,一般的经验是,逻辑CPU,就填写那个数字,例如有8核,则为-j8。 3 安装内核:

# make install

二 安装google浏览器

首先到官网下载 google-chrome-stable_current_x86_64.rpm

rpm -ivh 安装报错 lsb >= 4.0

网上找到安装方法:

sudo yum localinstall google-chrome-stable_current_x86_64.rpm

三 添加非官方源 

http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
直接可以使用yum 安装vlc等软件


四 删除旧内核

rpm -qa | grep kenrl 

执行:

sudo yum remove kernel-3.10.0-123.8.1.el7.x86_64
sudo yum remove kernel-devel-3.10.0-123.8.1.el7.x86_64

五  安装google earth

$ cd -
$ wget https://dl.google.com/dl/earth/client/current/google-earth-stable_current_x86_64.rpm
$ rpm2cpio google-earth-stable_current_x86_64.rpm | cpio -div
$ sudo cp -r opt/google/earth /opt/google/
$ sudo cp etc/cron.daily/google-earth /etc/cron.daily/
$ rm -rf usr opt etc
$ sudo ln -s /opt/google/earth/free/googleearth /usr/bin/google-earth
进入/opt/google/earth/free/googleearth 执行:

sudo cp product_logo_128.png /usr/share/icons/hicolor/128x128/apps/google-earth.png
sudo cp product_logo_16.png /usr/share/icons/hicolor/16x16/apps/google-earth.png
sudo cp product_logo_24.png /usr/share/icons/hicolor/24x24/apps/google-earth.png
sudo cp product_logo_256.png /usr/share/icons/hicolor/256x256/apps/google-earth.png
sudo cp product_logo_32.png /usr/share/icons/hicolor/32x32/apps/google-earth.png
sudo cp product_logo_48.png /usr/share/icons/hicolor/48x48/apps/google-earth.png
sudo cp product_logo_64.png /usr/share/icons/hicolor/64x64/apps/google-earth.png
sudo cp google-earth.desktop /usr/share/applications/


六 安装Nvidia 驱动

到官网找到具型号 下载:NVIDIA-Linux-x86_64-352.21.run

blacklist.conf的位置是在/usr/lib/modprobe.d/dist-blacklist.conf

在最后添加:

blacklist nouveau
options nouveau modeset=0
注释掉:#blacklist nvidiafb

systemctl isolate multi-user.target 切换到三模式安装

如果重起后发现分辨率只有800x640 则需要修改

/etc/X11/xorg.conf

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "CRT-0"
    HorizSync       31.0 - 84.0  #修改
    VertRefresh     56.0 - 77.0  #修改  下面的添加

    Mode    "1920x1080"
            DotClock        148.500000
            HTimings        1920 2008 2052 2200
            VTimings        1080 1084 1089 1125
            Flags   "+HSync" "+VSync"
    EndMode
    Mode    "1680x1050"
            DotClock        146.250000
            HTimings        1680 1784 1960 2240
            VTimings        1050 1053 1059 1089
            Flags   "-HSync" "-VSync"
    EndMode
Section "Device" 添加一行:Option "UseEDID" "false"

Section "Screen"

# Removed Option "metamodes" "nvidia-auto-select +0+0 {viewportin=1366x768}"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "nvidia-auto-select +0+0 {viewportin=1920x1080}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    Modes       "1920x1080"
    EndSubSection
EndSection

重起后即可选择分辨率。

七 修改panel

/usr/share/gnome-shell/modes/classic.json修改panel的右为中

 "panel": { "left": ["activities", "appMenu"],
               "center": ["a11y", "keyboard", "volume", "bluetooth",
                         "network", "battery", "dateMenu", "userMenu"],
               "right": []
             }

待续...




版权声明:本文为博主原创文章,未经博主允许不得转载。

CentOS 7 折腾小记

标签:centos7 linux cento

原文地址:http://blog.csdn.net/hanglinux/article/details/46868213

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!