Ubuntu Linux 8.04 Settings and Optimization

  
                  

1. Change the kernel

system default kernel 2.6.24-16-generic, this kernel is a general-purpose kernel has not been optimized for specific users, and my desktop has a better kernel Can choose, 2.6.24-16-rt (realtime) This kernel is characterized by task preemption, which can greatly speed up the startup time and switching time between programs. Installation method:

sudo apt-get install linux-rt


2. Close IPv6

Method:

Edit /etc/modprobe. d/aliases

Modify

alias net-pf-10 ipv6

for

alias net-pf-10 off

< BR> Then comment out all IPV6-related content in the /etc/hosts file

# 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


This will disable all network interfaces that use IPV6.


Create a new /etc/modprobe.d/bad_list file with the contents:

alias net-pf-10 off

3. Optimize apt source< Br>

$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

The result of the above command is to back up sources.list to sources.list-bak, Also remove the comment statement in sources.list and comment out the deb-src directory.

Too many comment statements are dazzling, and I don't need the source code for the software.


4. Optimize Session Startup Items

Menu System--Preferences--Session, remove services you don't need.


5. Program startup optimization

Make the startup program parallel and speed up the startup process.

Edit /etc/init.d/rc

Modify

CONCURRENCY=none

For:

CONCURRENCY=shell

Be careful not to write wrong, if you are wrong, you will not be able to start the system.


6.Add DNS cache

dns cache dnsmasq is also a good choice, but pdnsd is more compact, this is enough for a single machine, and not everyone needs it. Do cache, I am here Hangzhou Netcom's dns server is too slow, only to do their own cache to speed up dns resolution.

sudo apt-get instll pdnsd install pdnsd

Edit /etc/pdnsd.conf Add


server {ip="xxxx"; /below the global segment * Fill in the IP of your first dns server here */


timeout=30;


interval=900;


Uptest=none;


ping_timeout=500;


purge_cache=off;


caching=on;

< BR>}server {


ip="xxxx"; /* Fill in your second dns server IP*/


timeout=30; Br>


interval=900;


uptest=none;


ping_timeout=500;


purge_cache=off ;


caching=on;


}Edit /etc/resolv.conf file

Change the first line to "nameserver 127.0.0.1"


7.Install RAR compression/decompression program

sudo apt-get install rar unrar

Be a soft link

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

This way, as long as you enter unrar in the command line, you can extract or compress the file. After the installation is complete, the archive manager also integrates the rar component. .


8.Clean up system garbage

sudo apt-get autoclean clean up old version of software cache


sudo apt-get clean clean up all software cache< Br>


sudo apt-get autoremove to remove isolated software that is no longer used by the system

Copyright © Windows knowledge All Rights Reserved