In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Compile and install keepalived
Install keepalived 1.2.6 first using source code
Cd/usr/local/src
Wget http://www.keepalived.org/software/keepalived-1.2.6.tar.gz
Tarzxf keepalived-1.2.6.tar.gz
Cdkeepalived-1.2.6
. / configure--prefix=/usr/local/keepalived
Make
Makeinstall
If the keepalived you set up is installed to / usr/local/keepalived, all configuration files are located in this directory. One problem I haven't figured out is that Linux always installs programs in the / usr/local directory by default, and all programs share the / usr/local/sbin directory. This has an impact on some people's operating habits. Why not consider using a separate directory for each software?
1. Create a service startup script to control it using the service command
Cp / usr/local/keepalived/etc/rc.d/init.d/keepalived / etc/init.d/keepalived
Chmod+x / etc/init.d/keepalived
Because we use a non-default path (/ usr/local) to install keepalived, we need to modify several paths to ensure that keepalived can start properly. The files that need to be modified are as follows:
two。 Modify / etc/init.d/keepalived, look for about 15 lines of. / etc/sysconfig/keepalived, change to:
. / usr/local/keepalived/etc/sysconfig/keepalived, that is, point to the correct file location
Also add the following under the above line (import the path of the keepavlied main program into the environment variable PATH):
PATH= "$PATH:/usr/local/keepalived/sbin"
ExportPATH
3. Modify the / usr/local/keepalived/etc/sysconfig/keepalived file to set the correct service startup parameters
KEEPALIVED_OPTIONS= "- D-f/usr/local/keepalived/etc/keepalived/keepalived.conf"
4. After the above modifications, the basic installation of keepalived can be completed, and start the test:
Service keepalived restart
5. Don't forget to set this service to boot
Chkconfigkeepalived on
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.