Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet240/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   236   237   238   239   240   241   242   243   ...   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)

[
 181 
]
Another thing you may notice in the screenshot is that the name of the 
ssh
 unit is 
actually 
ssh.service
, but you don't need to include the 
.service
 part of the name, 
since that is implied by default. Sometimes, while viewing the status of a process 
with 
systemctl
, the output may be condensed to save space on the screen. To avoid 
this and see the full log entries, add the 
-l
 option:
systemctl status -l ssh 
Another thing to pay attention to is the 
vendor preset
 of the unit. Most packages in 
Ubuntu that include a service file for 
systemd
 will enable it automatically, but other 
distributions typically don't start and enable units by default (such as CentOS). In 
the case of the 
ssh
 example, you can see that the 
vendor preset
 is set to 
enabled
. This 
means that once you install the 
openssh-server
 package, the 
ssh.service
 unit will 
automatically be enabled. You can confirm this by checking the 
Active
 line (where 
the example output says 
active (running)
), which tells us that the unit is running. 
The 
Loaded
 line clarifies that the unit is 
enabled
, so we know that the next time 
we start the server, 
ssh
 will be loaded automatically. Although 
systemd
 units are 
typically enabled and started automatically in Ubuntu when installing their package
this can still vary. When you install a new package, make sure you check the status 
of the unit whenever you install a new package, so you'll be aware of its settings.
Starting and stopping a unit is just as easy; all you have to do is change the keyword 
you use with 
systemctl
 to 
start
 or 
stop
 in order to have the desired effect:
sudo systemctl stop ssh 
sudo systemctl start ssh 
There are additional keywords, such as 
restart
 (which takes care of the previous 
two command examples at the same time), and some units even feature 
reload

which allows you to activate new configuration settings without needing to bring 
down the entire application. An example of why this is useful is with Apache, which 
serves web pages to local or external users. If you stop Apache, all users will be 
disconnected from the website you're serving. If you add a new site, you can use 
reload
 rather than 
restart
, which will activate any new configuration you may have 
added without disturbing the existing connections. We'll take a look at Apache in 
Chapter 14

Serving Web Content
, so don't worry too much about Apache right now. 
It's just a good example of a unit with additional functionality. Not all units feature 

reload
 option, so you should check the documentation of the application that 
provides the unit to be sure.


Controlling and Managing Processes

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   236   237   238   239   240   241   242   243   ...   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