亚洲欧美精品沙发,日韩在线精品视频,亚洲Av每日更新在线观看,亚洲国产另类一区在线5

<pre id="hdphd"></pre>

  • <div id="hdphd"><small id="hdphd"></small></div>
      學習啦 > 學習電腦 > 操作系統(tǒng) > 操作系統(tǒng)基礎知識 > Ubuntu Linux8.04怎么設置與優(yōu)化

      Ubuntu Linux8.04怎么設置與優(yōu)化

      時間: 孫勝龍652 分享

      Ubuntu Linux8.04怎么設置與優(yōu)化

        現(xiàn)如今,電腦的使用越來越普遍,幾乎每家每戶都有電腦,而電腦的操作離不開操作系統(tǒng),在這里,學習啦小編就向大家介紹Ubuntu Linux 8.04怎么設置與優(yōu)化。

        1. 換內(nèi)核

        系統(tǒng)默認的 kernel 2.6.24-16-generic,這個內(nèi)核是通用內(nèi)核沒針對特定用戶做過優(yōu)化,而我的臺式機還有一個更好的內(nèi)核可以選,2.6.24-16-rt (realtime)這個內(nèi)核的特點是任務搶占式,能大大加快 程序之間的啟動時間跟切換時間。安裝方法:

        sudo apt-get install linux-rt

        2. 關閉IPv6

        方法:

        編輯 /etc/modprobe.d/aliases

        修改

        alias net-pf-10 ipv6

        為

        alias net-pf-10 off

        然后注釋掉 /etc/hosts文件中所有與IPV6有關的內(nèi)容

        # The following lines are desirable for IPv6 capable hosts

        ::1 ip6-localhost ip6-loopback

        #fe00::0 ip6-localnet

        #ff00::0 ip6-mcastprefix

        #ff02::1 ip6-allnodes

        #ff02::2 ip6-allrouters

        #ff02::3 ip6-allhosts

        這將會禁止所有使用IPV6的網(wǎng)絡接口。

        再新建一個/etc/modprobe.d/bad_list文件,內(nèi)容為:

        alias net-pf-10 off

        3. 優(yōu)化apt 源

        $cd /etc/apt

        $sudo su

        #mv sources.list sources.list-bak

        #sed -e ‘/^#/d’ -e ’s/deb-src/#deb-src/’ sources.list-bak > sources.list

        上面命令的結(jié)果是備份sources.list 為 sources.list-bak,同時去掉了sources.list 中的注釋語句,再注釋掉 deb-src目錄。

        太多的注釋語句看得我眼花繚亂,并且我也不需要軟件的源碼。

        4. 優(yōu)化會話啟動項

        菜單系統(tǒng)--首選項--會話,去掉你不需要的服務。

        5.程序啟動優(yōu)化

        使啟動程序并行,加速啟動過程。

        編輯 /etc/init.d/rc

        修改

        CONCURRENCY=none

        為:

        CONCURRENCY=shell

        小心別寫錯,錯了就無法啟動系統(tǒng)了。

        6.增加DNS cache

        dns cache dnsmasq 也是個不錯的選擇,但pdnsd 更小巧些,單機用這個就夠了,而且也不是所有人都需要自己做cache的,我這里杭州網(wǎng)通的dns 服務器實在太慢了,才自己做cache 加快dns 解析速度的。

        sudo apt-get instll pdnsd 安裝pdnsd

        編輯 /etc/pdnsd.conf 在 global 段下方加入

        server {ip="x.x.x.x"; /* 此處填你的第一個dns 服務器的 IP */

        timeout=30;

        interval=900;

        uptest=none;

        ping_timeout=500;

        purge_cache=off;

        caching=on;

        }server {

        ip="x.x.x.x"; /* 此處填你的第二個dns 服務器的 IP*/

        timeout=30;

        interval=900;

        uptest=none;

        ping_timeout=500;

        purge_cache=off;

        caching=on;

        }編輯/etc/resolv.conf文件

        改第一行內(nèi)容為 “nameserver 127.0.0.1”

        7.安裝RAR壓縮/解壓縮程序

        sudo apt-get install rar unrar

        做個軟鏈接

        sudo ln -fs /usr/bin/rar /usr/bin/unrar

        這樣,以后只要在命令行輸入unrar,就可以解壓或者壓縮文件了,安裝完成后,歸檔管理器也同時集成了rar組件。

        8.清理系統(tǒng)垃圾

        sudo apt-get autoclean清理舊版本的軟件緩存

        sudo apt-get clean清理所有軟件緩存

        sudo apt-get autoremove刪除系統(tǒng)不再使用的孤立軟件

      301599