DebianVPS system optimization

Source: Internet
Author: User
Tags ssh server dropbear
Generally, the systems installed by the provider are all self-contained apache Shenma, which occupies the hard disk and occupies the memory. if they are accidentally conflicted, they will be mounted to Shenma ...... That is to cry. So, this adult ...... This dish compares the standard version of Debian with the mini version and uninstalls all unnecessary programs! Note that the following asterisks are used to uninstall related components.

Generally, the systems installed by the provider are all self-contained apache Shenma, which occupies the hard disk and occupies the memory. if they are accidentally conflicted, they will be mounted to Shenma ...... That is to cry. So, this adult ......
This dish compares the standard version of Debian with the mini version and uninstalls all unnecessary programs!


Note that the following asterisks are used to uninstall related components and reduce garbage;
Redundant service software (which can be started by yourself, with a greater impact ):


 

Apache2-* // apache server. we usually reinstall or change Nginx.

Bind9 -* // Dns server. we generally do not set up a DNS server on our own VPS, so we can unmount it decisively.

Xinetd // Xinetd is a service daemon. for example, if the ftp server is not enabled normally, the ftp server is automatically started when someone accesses port 21. VPS not required

Samba -* // Samba allows the linux system to use the windows sharing function, which is obviously not required by VPS.

Nscd -* // DNS cache software, same as bind9, not required

Portmap // Port forwarding, which is not required by Web servers

Sendmail-* // Used to send emails. generally, php-sendmail is used.

Sasl2-bin // A permission program not only occupies resources, but also easily makes an error when creating a system account and deletes it decisively


Redundant system components (not self-starting, but occupying the hard disk may cause conflicts or something ):


 

Lynx // Text browser, which is not commonly used ~~

Memtester // Test whether the memory is bad. I am not so bored ......

Unixodbc odbcinst -* // Odbc database, mainly used for windows, not used for websites

Python -* // The well-known Python language, which is very likely to be used if it is used normally in linux, but not available on Web servers

Sudo // Grant the root permission to authorized normal users, which is not required by VPS.

Tcpdump  // TCP packet capture. do you use it?

Ttf -* // The font used in the desktop environment. we only need the command line ......


Replaceable system components:


 

Ksyslog or rsyslog-> inetutils-syslogd // This is the system log. The first two functions are complete, but the system usage is redundant (in fact, it is acceptable if both functions are not installed)

Vim-*-> nano // The vim editor is well-known, but I really don't use it. Although the resources are a little smaller than those of emacs, I still cannot beat nano ......

Bash-> dash or pdksh // The bash console is also a little bloated, but it is not necessary to replace it for convenience.

Openssh-> dropbear // This is the SSH server. if you prefer to open a bunch of accounts to FanQ on SSH, you can change it. with Dropbear, each SSH server can save several MB of memory.

 


We write all the operations as scripts:
First, the system is upgraded:
Apt-get update & apt-get upgrade



Completely redundant software
Apt-get-y purge apache2-* bind9-* xinetd samba-* nscd-* portmapsendmail-* sasl2-bin



Redundant system components
Apt-get-y purge lynx memtester unixodbc python-* odbcinst-* sudotcpdump ttf -*



The software you want to replace.
Finally, remember to clean it up:
Apt-get autoremove & apt-get clean



Post optimization results:
Reference:
Root @ bvm1 :~ # Ps-
PID TTY TIME CMD
1? 00:00:00 init
1433? 00:00:00 syslogd
1457? 00:00:00 cron
1463? 00:00:00 sshd
1485? 00:00:00 sshd
1504 pts/0 00:00:00 bash
3139 pts/0 00:00:00 ps
Root @ bvm1 :~ # Free-m
Total used free shared buffers cached
Mem: 256 10 245 0 0 0
-/+ Buffers/cache: 10 245
Swap: 0 0 0


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.