Recent Changes - Search:

Softwares

.

Systemctl-Control-the-systemd-system-and-service-manager

Main.Systemctl-Control-the-systemd-system-and-service-manager History

Hide minor edits - Show changes to output

October 07, 2012, at 01:12 PM by 115.184.90.79 -
Added lines 25-38:



Another Example:

[fedora@fedora system]$ pwd
/usr/lib/systemd/system

[fedora@fedora system]$ ls -l mysqld.service
-rw-r--r--. 1 root root 1408 Aug 6 12:02 mysqld.service
[fedora@fedora system]$

August 27, 2012, at 05:45 AM by 115.241.18.88 -
Added lines 95-96:
!!/usr/lib/systemd/system
Added line 105:
Added line 111:
Added lines 119-166:

@]

!!From the man help page systemctl -h

[@

Unit Commands:
list-units List loaded units
start [NAME...] Start (activate) one or more units
stop [NAME...] Stop (deactivate) one or more units
reload [NAME...] Reload one or more units
restart [NAME...] Start or restart one or more units
try-restart [NAME...] Restart one or more units if active
reload-or-restart [NAME...] Reload one or more units is possible,
otherwise start or restart
reload-or-try-restart [NAME...] Reload one or more units is possible,
otherwise restart if active
isolate [NAME] Start one unit and stop all others
kill [NAME...] Send signal to processes of a unit
is-active [NAME...] Check whether units are active
status [NAME...|PID...] Show runtime status of one or more units
show [NAME...|JOB...] Show properties of one or more
units/jobs or the manager
reset-failed [NAME...] Reset failed state for all, one, or more
units
load [NAME...] Load one or more units

Unit File Commands:
list-unit-files List installed unit files
enable [NAME...] Enable one or more unit files
disable [NAME...] Disable one or more unit files
reenable [NAME...] Reenable one or more unit files
preset [NAME...] Enable/disable one or more unit files
based on preset configuration
mask [NAME...] Mask one or more units
unmask [NAME...] Unmask one or more units
link [PATH...] Link one or more units files into
the search path
is-enabled [NAME...] Check whether unit files are enabled

Job Commands:
list-jobs List jobs
cancel [JOB...] Cancel all, one, or more jobs

Status Commands:
dump Dump server status
dot Dump dependency graph for dot(1)
August 27, 2012, at 05:40 AM by 115.241.18.88 -
Added lines 95-116:
[@

[root@fedora system]# pwd
/usr/lib/systemd/system
[root@fedora system]# ll |grep httpd
-rw-r--r--. 1 root root 450 Apr 30 15:22 httpd-event.service
-rw-r--r--. 1 root root 434 Apr 30 15:22 httpd.service
-rw-r--r--. 1 root root 454 Apr 30 15:22 httpd-worker.service
[root@fedora system]# systemctl show httpd.service |grep -i state
LoadState=loaded
ActiveState=inactive
SubState=dead
UnitFileState=disabled
[root@fedora system]# systemctl status httpd.service
httpd.service - The Apache HTTP Server (prefork MPM)
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
Active: inactive (dead)
CGroup: name=systemd:/system/httpd.service

[root@fedora system]#

@]
August 24, 2012, at 02:45 PM by 101.62.104.194 -
Deleted lines 81-82:
(:Googlemm:)
Added lines 94-97:


(:Googlemm:)
----
August 24, 2012, at 02:44 PM by 101.62.104.194 -
Added lines 81-83:

(:Googlemm:)
Deleted lines 95-96:
----
(:Googlemm:)
August 15, 2012, at 05:43 PM by 115.242.228.192 -
Changed line 93 from:
to:
----
August 15, 2012, at 04:40 PM by 115.242.228.192 -
Changed line 62 from:
(:tableend:)
to:
Changed line 79 from:
to:
(:tableend:)
August 15, 2012, at 04:39 PM by 115.242.228.192 -
Added lines 1-94:
(:Google1:)
(:Googletxt:)
----
!!systemctl - Control the systemd system and service manager

!!Finding openssh-server install files on fedora - 17

(:table border=1 width=50% bgcolor=yellow cellspacing=0 :)
(:cellnr:)
[@
[fedora@localhost system]$ rpm -ql openssh-server-5.9p1-22.fc17.i686
/etc/pam.d/sshd
/etc/ssh/sshd_config
/etc/sysconfig/sshd
/usr/lib/fipscheck/sshd.hmac
/usr/lib/systemd/system/sshd.service
/usr/libexec/openssh/sftp-server
/usr/sbin/sshd
/usr/sbin/sshd-keygen
/usr/share/man/man5/moduli.5.gz
/usr/share/man/man5/sshd_config.5.gz
/usr/share/man/man8/sftp-server.8.gz
/usr/share/man/man8/sshd.8.gz
/var/empty/sshd
@]
(:tableend:)


!!Enabling sshd.service

(:table border=1 width=50% bgcolor=yellow cellspacing=0 :)
(:cellnr:)
[@
[fedora@localhost system]$ sudo systemctl enable sshd.service
ln -s '/usr/lib/systemd/system/sshd.service' '/etc/systemd/system/multi-user.target.wants/sshd.service'
[fedora@localhost system]$ sudo systemctl status sshd.service
sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
Active: inactive (dead)
CGroup: name=systemd:/system/sshd.service

@]
(:tableend:)


!!Starting sshd.service

(:table border=1 width=50% bgcolor=yellow cellspacing=0 :)
(:cellnr:)
[@
[fedora@localhost system]$ sudo systemctl start sshd.service
@]
(:tableend:)



!!Checking Status for sshd.service

(:table border=1 width=50% bgcolor=yellow cellspacing=0 :)
(:cellnr:)
[@
(:tableend:)
[fedora@localhost system]$ sudo systemctl status sshd.service
sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
Active: active (running) since Wed, 15 Aug 2012 21:55:35 +0530; 3s ago
Process: 3544 ExecStartPre=/usr/sbin/sshd-keygen (code=exited, status=0/SUCCESS)
Main PID: 3548 (sshd)
CGroup: name=systemd:/system/sshd.service
└ 3548 /usr/sbin/sshd -D

Aug 15 21:55:35 localhost.localdomain sshd[3548]: Server listening on 0.0.0.0 port 22.
Aug 15 21:55:35 localhost.localdomain sshd[3548]: Server listening on :: port 22.
[fedora@localhost system]$ pgrep ssh
3548
[fedora@localhost system]$

@]


!!Verification using netstat

(:table border=1 width=50% bgcolor=yellow cellspacing=0 :)
(:cellnr:)
[@
[fedora@localhost system]$ sudo netstat -nlp |grep 22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3548/sshd
tcp6 0 0 :::22 :::* LISTEN 3548/sshd
[fedora@localhost system]$

@]
(:tableend:)

(:Googlemm:)
Edit - History - Print - Recent Changes - Search
Page last modified on October 07, 2012, at 01:12 PM