Android CGLib动态代理 Flutter charts knockoutjs jqgrid NEJ css最后一个子元素 matlab停止运行命令 oracle可视化工具 linux查看防火墙 javaweb是前端还是后端 matlab读入图片 mysql事务 python输出中文 python开发界面 stringjava java基础编程 java中instanceof java中的集合 黑客攻防实战入门 linux格式化命令 xp画图工具 java语言程序设计 dep tt语音官网 PCCAD 小票打印 js切割字符串 hzfs 目标聚光灯 dnf选择角色卡死 数据库同步解决方案 安卓人脸识别 resample 电脑防护软件 剪影的意思 手机解锁器 纸艺大师 cad虚线显示不出来
当前位置: 首页 > 学习教程  > 编程语言

Linux systemctl service firewall

2020/9/19 14:33:45 文章标签:

记录下常用命令

View all units

systemctl list-unit-files
proc-sys-fs-binfmt_misc.automount             static  
dev-hugepages.mount                           static  
dev-mqueue.mount                              static  
proc-fs-nfsd.mount                            static  
proc-sys-fs-binfmt_misc.mount                 static  
sys-fs-fuse-connections.mount                 static                 brandbot.path                                 enabled 
systemd-ask-password-console.path             static  
systemd-ask-password-plymouth.path            static  
systemd-ask-password-wall.path                static  
session-1.scope                               static  
acpid.service                                 enabled 
amazon-ssm-agent.service                      enabled 
amzn2-early-relabel-modules.service           enabled 
arp-ethers.service                            disabled
atd.service                                   enabled 
auditd.service                                enabled 

View service

systemctl list-units -t service --state active
acpid.service                      loaded active running ACPI Event Daemon
amazon-ssm-agent.service           loaded active running amazon-ssm-agent
atd.service                        loaded active running Job spooling tools
auditd.service                     loaded active running Security Auditing Service
chronyd.service                    loaded active running NTP client/server
cloud-config.service               loaded active exited  Apply the settings specified in cloud-config
cloud-final.service                loaded active exited  Execute cloud user/final scripts
cloud-init-local.service           loaded active exited  Initial cloud-init job (pre-networking)
cloud-init.service                 loaded active exited  Initial cloud-init job (metadata service crawler)

restart daemon

systemctl deamon-reload

service operations

systemctl enable docker
systemctl start docker
systemctl stop docker
systemctl restart docker

User and Group

view system groups

cat /etc/group
root:x:0:
bin:x:1:
daemon:x:2:
sys:x:3:
adm:x:4:ec2-user
tty:x:5:
disk:x:6:
lp:x:7:
mem:x:8:
kmem:x:9:
wheel:x:10:ec2-user
cdrom:x:11:
mail:x:12:postfix
man:x:15:
dialout:x:18:
floppy:x:19:

create group

groupadd docker

add user to group

usermod -aG docker user-name

view user groups

groups
ec2-user adm wheel systemd-journal docker

Firewall

open ports

sudo firewall-cmd --permanent --add-port=6443/tcp
sudo firewall-cmd --permanent --add-port=10250/tcp

本文链接: http://www.dtmao.cc/news_show_200114.shtml

附件下载

相关教程

    暂无相关的数据...

共有条评论 网友评论

验证码: 看不清楚?