- 博客(6)
- 收藏
- 关注
原创 apache
rpm -qa | grep httpd yum install httpd -y systemctl start httpd 打开浏览器即可看到测试页面 chkconfig httpd on vim /etc/httpd/conf/httpd.conf
2022-03-28 17:01:49
769
原创 Windows server 2012 用户与组
用户信息存储路径: C:\Windows\System32\config\SAM 用户每次登录时,到此处进行匹配验证。 C:\Users 相当于Linux中的 /home 命令创建用户:net user username password /add 改密码: net user username password_new 删用户: net user username /del 查看用户信息:net user 本地安全策略——账户策略——密码策略: 弱密码、简单密码、强密码、复杂密码
2022-03-16 11:25:19
2690
1
原创 shell脚本案例总动员
案例1 检测一个地址是否ping通,并返回提示。 #!/bin/bash url=$1 //用于接收变量 ping -c2 $url >/dev/null if [ $? -eq 0 ]; then //注意$? 这个特殊变量的用法。该变量用于查看上一个命令的返回值。 echo "$url is ok" //返回值为0,则没有错误。 else echo "$url is bad" fi 结果如下: ...
2022-03-15 15:57:10
702
原创 centos8安装python。附:hello world
yum install epel-release yum list | grep python3 | more //列出可安装项 yum install python39.x86_64 //从中选择一个安装 //安装完成 python3 --version python3 --help //查看已安装的python的基本信息 vim test.py python3 test001.py //执行 ...
2022-03-13 20:59:31
2429
原创 shell变量
先定义后使用 使用变量时需在前加上$ 变量赋值时,等号左右不能有空格 变量名不能有空格、标点符号、已有的关键字 案例1 #!/bin/bash str='hello_i am wq' echo $str 案例2 #!/bin/bash useradd test01; echo 'useradd test01 success' mkdir /home/test01/123 echo 'mkdir /home/test01/123 success' 双 引号能够识别变量,单引号不.
2022-03-10 17:14:19
953
原创 firewalld控制
systemctl status firewalld systemctl enable firewalld firewall-cmd --list-all //查看防火墙已有的所有规则 firewall-cmd --version //查看防火墙版本 firewall-cmd --state //查看防火墙状态 firewall-cmd --reload //更新防火墙规则 firewall-cmd --get-acti...
2022-03-10 10:11:22
3814
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅