Several experiences of Linux system configuration optimization

Several experiences of Linux system configuration optimization
About hard disk partitions
Xiaobian's experience is that when installing Linux, a separate partition must be established to store users' private data, and can be used to backup system configuration files for future configuration. Editing the /etc/inittab file Most Linux distributions set up six virtual consoles, in fact three is enough and saves valuable memory space. Edit the /etc/inittab file and add # in front of the following three lines.
4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6
Then execute init q to make the system re-read the /etc/inittab file and close it tty4, tty5, tty6 virtual consoles. If you do not consider the security of the system, you can use the fourth virtual console to view various system information, edit the /etc/syslog.conf file, and add in the last line:
.?/dev/tty4

Finally, execute killall -HUP syslog .
Editing the /Etc/Inputrc file
Just edit the /etc/inputrc file, set the environment variable of INPUTRC, and use the command completion function of the Tab key to realize the function similar to the DOSKEY of MSDOS. In this way, various operations on files and directories are equally convenient and fast. Edit the /etc/rc.local file If you need to customize your own login information, be careful to modify the /etc/rc.d/rc.local file, because every time you execute the /etc/rc.d/rc.local file, you need to modify it /etc/issue and /etc/issue.net files, we can edit and customize our own /etc/issue file to speed up the Linux boot process and add the following:
echo "base=0xd8000000 size=0x800000 type=write-combining" >> /proc/mtrr # Enable NumLock for tty in /dev/tty[1-3]; do setleds -D +num < done
Customize Vim's environment
in Linux In the environment, there are many editors, mainly emacs, vim, joe, etc. For those who have never used UNIX or Linux, the author's suggestion is to find a few related reference books, and first understand how to use these editors , so that after installing Linux, you will not be at a loss when editing and viewing some configuration files.
Edit the /Etc/Mtools.conf file
Generally , both Windows 98 and Linux operating systems are installed on your own machine. By installing the mtools package, you can install the corresponding file system without installing the corresponding file system. Between file systems, operations such as reading, writing, moving, and displaying files are implemented. Assuming that Windows 98 is installed under the /dev/hda1 and /dev/hda5 partitions, modify the /etc/mstools.conf file and add the following content:
drive c: file="/dev/hda1" drive d: file="/dev/ hda5"

so that you can execute commands such as mdir c:.
Copy various configuration files
According to the purpose of the machine, edit and copy the corresponding configuration files, such as: samba configuration file /etc/smb.conf, domain name server configuration file, DHCP configuration file /etc/dhcpd. conf etc. In general, once these files are configured, they rarely change, which saves a lot of time. Note that the original configuration file must be backed up, and if the configuration file is changed, it must be backed up!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326395868&siteId=291194637