Bài 3
ll /boot
uname -a
hostname
id
Init system
systemd: system daemon
ps -p 1
ps aux
ps auxf
ls -al /sbin/init
..
runlevel
systemctl get-default
systemctl list-dependencies
su -
sudo su
systemctl status nginx
systemctl is-enable nginx # kiểm tra xem đã enable hay chưa?
systemctl list-dependencies | grep nginx
systemctl list-units --type service
systemctl cat nginx.service
ls -al /lib/systemd/system/nginx.service
systemctl status nginx.service
systemctl status nginx # mặc định không cần đuôi .service?
systemctl stop nginx
systemctl enable nginx
systemctl disable nginx
systemctl daemon-reload
...
systemctl isolate multi-user.target # chuyển giữa các level
systemctl cat nginx
systemctl stop nginx
systemctl mask nginx # prevent
systemctl status nginx
systemctl start nginx
systemctl unmask nginx
.....
systemctl stop apache2
systemctl start nginx
systemctl status nginx
systemctl reload nginx # Main PID không thay đổi; worker mới thì mới được áp dụng
# reload là chương trình vẫn chạy (connection cũ vẫn chạy), chỉ apply các worker mới (connnect mới sẽ nhận các tham số mới)
systemctl status nginx
systemctl reset nginx # Main PID thay đổi
Nhận xét
Đăng nhận xét