標籤: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 -lhlrwxrwxrwx. 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.rpmhttp://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpmhttp://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.pngsudo cp product_logo_16.png /usr/share/icons/hicolor/16x16/apps/google-earth.pngsudo cp product_logo_24.png /usr/share/icons/hicolor/24x24/apps/google-earth.pngsudo cp product_logo_256.png /usr/share/icons/hicolor/256x256/apps/google-earth.pngsudo cp product_logo_32.png /usr/share/icons/hicolor/32x32/apps/google-earth.pngsudo cp product_logo_48.png /usr/share/icons/hicolor/48x48/apps/google-earth.pngsudo cp product_logo_64.png /usr/share/icons/hicolor/64x64/apps/google-earth.pngsudo 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 nouveauoptions 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" EndSubSectionEndSection
重起後即可選擇解析度。
七 修改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 折騰小記