Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet481/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   474   475   476   477   478   479   480   481   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 374 
]
You'll just have to make sure both web servers have the same 
virtual_router_id

I'll go over some tips for setting up the other server shortly, so don't worry if you 
haven't configured 
keepalived
 on your second server yet.
Another option in this block that's important is 
priority
. This number must 
absolutely be different on each server. The 
keepalived
 instance with the highest 
priority
 value is always considered the primary server. In my example, I set this 
number to 
100
. Using 
100
 for the priority is fine, so long as no other server is using 
that number. Other servers should have a lower priority. For example, you can 
set the second web server's priority to 
80
. If you set up a third or fourth one, you 
could set their priority to 
60
 and 
40
, respectively. Those are just arbitrary numbers 
I picked off the top of my head. As long as each server has a different priority, and 
the server you'd like to be the primary has the highest priority, you're in good shape. 
The 
advert_int
 option configures how frequently advertisements are sent, and is 
configured in seconds. In our example code, advertisements are sent every 5 seconds, 
which informs the other server that it's still alive and active. 
In the final block, we're setting the virtual IP address:
    virtual_ipaddress { 
    192.168.1.200 

I chose 
192.168.1.200
 as a hypothetical example; you should choose an IP address 
outside of your DHCP range that's not being used by any device.
Now that you've configured 
keepalived
, let's test it out and see whether it's working. 
On your primary server, start 
keepalived
:
sudo systemctl start keepalived 
After you start the daemon, take a look at its status to see how it's doing:
sudo systemctl status keepalived 
If there are no errors, the status of the daemon should be 
active (running)
. If for 
some reason the status is something else, take a look at the log entries shown after 
you execute the 
status
 command, as 
keepalived
 is fairly descriptive regarding any 
errors it finds in your 
config
 file. 
If all went well, you should see the IP address you chose for the floating IP listed in 
your interfaces. Execute 
ip a
 at your prompt to see them. Do you see the floating 
IP? If not, keep in mind it can take a handful of seconds for it to show up. Wait 30 
seconds or so and check your interface list again.


Chapter 14

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   474   475   476   477   478   479   480   481   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish