赞
踩
ssh william@127.0.0.1
podman login -u bosai host.domain8.rhce.cc
podman search host.domain8.rhce.cc/
podman pull host.domain8.rhce.cc/rhel8/rsyslog-custom-cert
podman create -d --name logserver host.domain8.rhce.cc/rhel8/rsyslog-custom-cert
podman ps -a
- mkdir .config/systemd/user -p
- cd .config/systemd/user/
- podman generate systemd --name logserver --files
- vim container-logserver.service
default.target
- systemctl --user daemon-reload
- systemctl --user --now enable container-logserver.service
- loginctl enable-linger william
- exit
ps -u william
ssh william@127.0.0.1
- podman stop logserver
- podman rm logserver
- mkdir /home/william/container_journal
- podman create -d --name logserver -v /home/william/container_journal:/var/log/journal:Z host.domain8.rhce.cc/rhel8/rsyslog-custom-cert
- odman ps -a
- cd .config/systemd/user/
- rm -rf *
- ls
- podman generate systemd --name logserver --files
- vim container-logserver.service
- systemctl --user daemon-reload
- systemctl --user --now enable container-logserver.service
- loginctl enable-linger william
- cd ..
- podman exec -it logserver bash
如果在配置文件.config/systemd/user/container-logserver.service末尾没有default.target在末尾增添
default.target
- logger -p local5.info "This is an RHCSA exam"
- cat /var/log/journal/rhcsa.log
cat /home/william/container_journal/rhcsa.log
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。