In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to optimize the startup of Linux". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The following is a description of the running order and level:
The boot process of a Linux system can be divided into several stages. Let's mainly look at the stage after the kernel is loaded. You can run the runlevel command to determine the current run level of your system. The / sbin/init program is called when the kernel is loaded and starts running, which runs as root and is set to "run level" as required at the start of boot. System service
The rc script is responsible for starting all the services the user needs. As the name suggests, a service is a useful tool provided by the system. There may be a lot of services to start. Most Linux systems start sshd (secure Shell service), syslog (Syslog tool) and lpd (print service), but there will be more services to start.
Too many services will increase the boot time, and optimizing the shutdown of unwanted services will increase the startup time.
Enter system-config-services to see which services the system starts.
Turn off unused services:
(this section may be risky, if you are not sure of the service, please do not shut it down, this optimization is for desktop users)
NetworkManager shuts down
NetworkManagerDispatcher shuts down
Anacron shuts down
Atd shuts down
Apmd shuts down
Avahi-daemon shuts down
Avahi-dnsconfd shuts down
Bluetooth hcid sdpd hidd dund pand is off (you don't use a Bluetooth device)
Capi shuts down
Cupsd is off (you do not use a printer device)
Dc client dc server is off (you don't use Apache)
Firstboot shuts down
Gpm is off (mouse support in terminal can be turned on in 3 and off in 5)
Hplip hpiod hpssd is off (if you don't use a printer device to turn it on)
Ip6tables shuts down
Irqbalance is off (multicore CPU is on)
Irda irattach off (using infrared on)
Im sensors shuts down
Mdmonitor shuts down
Mdmpd shuts down
Netplugd shuts down
Netfs shuts down
Ntpd shuts down
Pcscd shuts down
Portmap shuts down
Rpcgssd rpcidmapd rpcsvcgssd shuts down
Sendmail shuts down
Smb shuts down
* learn about linux services
Please read the Fedora service administration guide first. Learn what a service / background process (services/daemons) is, what is a run level (runlevels), and the various tools for managing services (sevices).
You can use the chkonfig or ntsysv command to manage the service (services) from the command line, or use the system-config-services command with a graphical user interface. GNOME user: system-Administration-Server Settings-Services.
Individual service introduction
Now let's introduce the functions of the various services (services) included in FedoraCore6 and provide suggestions for use. This is not an exhaustive list. Be careful: don't turn off services you don't know or know about (services).
Do not shut down the following services (unless you have a good reason):
Acpid,haldaemon,messagebus,klogd,network,syslogd
Make sure that runlevels 3 and 5 are modified.
NetworkManager,NetworkManagerDispatcher
NetworkManager is a background process that automatically switches network connections. Many laptop users need to enable this feature, which allows you to switch between wireless and wired networks. Most desktop users should turn off the service. Some DHCP users may need to turn it on.
Acpid
ACPI (full name AdvancedConfigurationandPowerInterface) service is a power management interface. It is recommended that all laptop users turn it on. Some servers may not require acpi. The general operations supported are: "Power switch", "Battery Monitoring", "Notebook Lid switch", "Notebook display brightness", "hibernation", "Hang up", and so on.
Anacron,atd,cron
There is a small difference between these schedulers. It is recommended to turn on cron, especially if your computer will be running for a long time. For the server, you should learn more to determine which scheduler should be opened. In most cases, laptops / desktops should turn off atd and anacron. Note: some tasks require anacron to perform, such as cleaning / tmp or / var.
Apmd
Some notebooks and old hardware use apmd. If your computer supports acpi, you should turn off apmd. If acpi is supported, the work of apmd will be done by acpi.
Autofs
The service automatically mounts removable storage (such as USB hard drives). If you use mobile media (such as removable hard drives, USB drives), it is recommended to enable this service.
Avahi-daemon,avahi-dnsconfd
Avahi is the implementation of the zeroconf protocol. It can find devices and services based on DNS protocol in the local area network without zeroconf services. It's the same as mDNS. Unless you have a compatible device or a service that uses the zeroconf protocol, you should turn it off. I'll turn it off.
Bluetooth,hcid,hidd,sdpd,dund,pand
Bluetooth (Bluetooth) is for wireless portable devices (non-wifi,802.11). Many laptops provide Bluetooth support. There are Bluetooth mouse, Bluetooth headset and Bluetooth-enabled mobile phone. Many people do not have Bluetooth devices or Bluetooth-related services, so it should be turned off. Other Bluetooth-related services are: hcid manages all visible Bluetooth devices, hidd supports input devices (keyboard, mouse), dund supports dial-up networking via Bluetooth, and pand allows you to connect to Ethernet via Bluetooth.
Capi
Useful only for users using ISDN devices. Most users should turn it off.
Cpuspeed
The service can dynamically adjust the frequency of CPU at run time to save energy (power). Many notebook CPU supports this feature, and now more and more desktops also support this feature. If your CPU is one of the Petium-M,Centrino,AMDPowerNow,Transmetta,IntelSpeedStep,Athlon-64,Athlon-X2,IntelCore2, you should turn it on. Turn off your CPU if you want it to run at a fixed frequency.
Cron
See anacron.
Cupsd,cups-config-daemon
Related to the printer. If you have a CUPS-compatible printer that can be driven in Fedora, you should turn it on.
Dc_client,dc_server
Disk caching (Distcache) is used for distributed session caching. Mainly used in SSL/TLS servers. It can be used by Apache. Most desktops should turn it off.
Dhcdbd
This is an interface that allows the DBUS system to control DHCP. You can keep the default off state.
Diskdump,netdump
Disk dumps (Diskdump) are used to help debug kernel crashes. After the kernel crashes, it will save a "dump" file for analysis. The function of network dump (Netdump) is similar to that of Diskdump, except that it can be stored over the network. Unless you are diagnosing kernel-related problems, they should be turned off.
Dund
See bluetooth.
Firstboot
This service is unique to the Fedora installation process. It performs specific tasks that need to be performed only once on the first startup after installation. It can be shut down.
Gpm
Terminal mouse pointer support (no graphical interface). If you don't use a text terminal (CTRL-ALT-F1,F2..), turn it off. However, I turned it on at runlevel 3 and turned it off at runlevel 5.
Hidd
See bluetooth.
Hplip,hpiod,hpssd
The HPLIP service implements HP printer support on Linux systems, including Inkjet,DeskJet,OfficeJet,Photosmart,BusinessInkJet and some LaserJet printers. This is the product of the Hewlett-Packard Linux Printing Project (HPLinuxPrintingProject) sponsored by HP. If you have a compatible printer, enable it.
Iptables
It is the Linux standard firewall (software firewall). If you are directly connected to the Internet (e. G. cable,DSL,T1), it is recommended to turn it on. If you use a hardware firewall (for example, DmurLink.Netgear.Linksys, etc.), you can turn it off. It is strongly recommended to open it.
Ip6tables
If you don't know if you are using IPv6, in most cases you are not using it. This service is a software firewall for IPv6. Most users should turn it off. Read here to learn how to turn off IPv6 support for Fedora.
Irda,irattach
IrDA provides communication support between infrared devices (notebooks, PDA''s, mobile phones, calculators, etc.). Most users should turn it off.
Irqbalance
In multiprocessor systems, enabling this service can improve system performance. Most people don't use multiprocessor systems, so turn it off. But I don't know how it works on multicore CPU''s or hyperthreaded CPU''s systems. Turning it off on a single CPU system should not be a problem.
Isdn
This is a way to access the Internet. Unless you use the ISDN cat to surf the Internet, you should turn it off.
Kudzu
The service is hardware probed and configured. If you replace the hardware or need to detect a hardware change, turn it on. But most desktops and servers can shut it down and start it only when needed.
Lm_sensors
The service can detect the value of the motherboard sensor or the status of specific hardware (typically used in laptops). You can use it to check the real-time status of the computer and understand the health status of the computer. It is popular among GKrellM users. Check out lm_sensors 's home page for more information. If there is no special reason, it is recommended to close it.
Mctrans
If you use SELinux, turn it on. By default, FedoraCore turns on SELinux.
Mdmonitor
This service is used to monitor SoftwareRAID or LVM information. It is not a critical service and can be turned off.
Mdmpd
This service is used to monitor Multi-Path devices (this type of storage device can be accessed by more than one controller or method). It should be shut down.
Messagebus
This is Linux's IPC (InterprocessCommunication, interprocess communication) service. Specifically, it interacts with DBUS and is an important system service. It is strongly recommended to open it.
Netdump
See diskdump.
Netplugd
Netplugd is used to monitor the network interface and execute specified commands when the state of the interface changes. It is recommended that you leave it off by default.
Netfs
This service is used to automatically mount the shared file space on the network when the system starts, such as NFS,Samba and so on. If you connect to another server on your local area network and share files, turn it on. Most desktop and laptop users should turn it off.
Nfs,nfslock
This is the standard file sharing method for Unix/Linux/BSD series operating systems. Unless you need to share data in this way, turn it off.
Ntpd
The service automatically updates the system time over the Internet. If you can keep your Internet connection permanently, it is recommended to turn it on, but it is not necessary.
Pand
See bluetooth.
Pcscd
The service provides smart card (the same size as a small chip embedded in a credit card and identification card) and smart card reader support. If you don't have a card reader device, turn it off.
Portmap
This service complements NFS (file sharing) and NIS (authentication). Unless you are using the NFS or NIS service, turn it off.
Readahead_early,readahead_later
The service provides performance by preloading specific applications into memory. If you want the program to start faster, open it.
Restorecond
Used to monitor and reload the correct file context (filecontexts) for SELinux. It is not required, but it is strongly recommended to turn it on if you are using SELinux.
Rpcgssd,rpcidmapd,rpcsvcgssd
For NFSv4. Unless you need or use NFSv4, turn it off.
Sendmail
Unless you manage a mail server or you want to deliver or support a shared IMAP or POP3 service on the local area network. Most people don't need a mail transfer agent. If you use a web page (hotmail/yahoo/gmail) or use an email program (such as Thunderbird,Kmail,Evolution, etc.). You should shut it down.
Smartd
The SMARTDiskMonitoring service is used to monitor and predict disk failures or disk problems (prerequisite: the disk must support SMART). Most desktop users do not need the service, but it is recommended to turn it on, especially the server.
Smb
SAMBA service is a necessary service for sharing files between Linux and Windows. If a Windows user needs to access a file on Linux, enable it. See how to configure Samba under FedoraCore6.
Sshd
SSH allows other users to log in to your system and execute programs, either on the same network as you or as remote users. There are potential security risks to turn it on. If you don't need to log in from another machine or remotely, you should turn it off.
Xinetd
(this service may not be installed by default.) it is a special service. It can start multiple services based on requests received on a specific port. For example, a typical telnet program connects to port 23. If a telent request is detected by xinetd at port 23, xinetd will start the telnetd service to respond to the request. For ease of use, you can open it. Run chkconfig--list to see which services are managed by xinetd by examining the xinetd-related output.
This is the end of the content of "how to optimize the startup of Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.