码迷,mamicode.com
首页 > 其他好文 > 详细

systemd

时间:2015-05-27 18:48:55      阅读:123      评论:0      收藏:0      [点我收藏+]

标签:

systemd

systemd

chkconfig –level 3 httpd on systemctl enable httpd.service
chkconfig –level 3 httpd off systemctl disable httpd.service
service httpd status systemctl status httpd.service
service httpd start systemctl start httpd.service
service httpd stop systemctl stop httpd.service
service httpd restart systemctl restart httpd.service
chkconfig –list systemctl list-units –type=service
systemctl list-units --type=service
systemctl list-unit-files
for i in `systemctl list-unit-files  | grep enabled | grep abrt | cut -d ‘ ‘ -f 1`; do
 systemctl disable $i;
done
systemctl disable sshd
systemctl disable postfix
systemctl disable bluetooth
/etc/inittab
5 ==> 3
sudo systemctl set-default multi-user.target
sudo systemctl set-default graphical.target
/usr/lib/systemd/system/: 存放 unit 的文件
/etc/systemd/system/: 开机执行的文件

systemctl disable postfix

rm ‘/etc/systemd/system/multi-user.target.wants/postfix.service‘

systemctl enable sshd

ln -s ‘/usr/lib/systemd/system/sshd.service‘ ‘/etc/systemd/system/multi-user.target.wants/sshd.service‘

cat /usr/lib/systemd/system/postfix.service

[Unit]
Description=Postfix Mail Transport Agent
After=syslog.target network.target
Conflicts=sendmail.service exim.service
[Service]
Type=forking
PIDFile=/var/spool/postfix/pid/master.pid
EnvironmentFile=-/etc/sysconfig/network
ExecStartPre=-/usr/libexec/postfix/aliasesdb
ExecStartPre=-/usr/libexec/postfix/chroot-update
ExecStart=/usr/sbin/postfix start
ExecReload=/usr/sbin/postfix reload
ExecStop=/usr/sbin/postfix stop
[Install]
WantedBy=multi-user.target

systemd

标签:

原文地址:http://www.cnblogs.com/sunznx/p/4534110.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!