![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux
fangdengfu123
性别男,爱好女,哈哈哈
展开
-
执行 systemctl start firewalld 命令后出现Failed to start firewalld.service: Unit is masked
firewalld服务被锁定,不能添加对应端口。执行命令,即可实现取消服务的锁定# systemctl unmask firewalld下次需要锁定该服务时执行# systemctl mask firewalld...转载 2018-09-05 13:26:40 · 2647 阅读 · 0 评论 -
linux 使用 firewalld
开放端口:--permanent 代表永久生效,没有此参数,重启后失效# 开放单个端口firewall-cmd --zone=public --add-port=80/tcp --permanent# 开放多个端口firewall-cmd --zone=public --add-port=1000-2000/tcp --permanent重新加载防火墙配置:firewal...原创 2018-09-05 13:37:14 · 122 阅读 · 0 评论 -
linux 添加用户
添加用户:adduser testusername设置初始密码:passwd testusername# 根据系统提示设置New password: (enter your password)BAD PASSWORD: The password contains the user name in some formRetype new password: (retype p...原创 2018-09-06 08:49:24 · 1763 阅读 · 0 评论 -
linux 不定期整理
改变文件所有人:chown username filename -R查看端口占用:netstat -tunlp查看资源占用:top使用zip压缩文件夹:zip -r file.zip ./file查看存储占用比例:df# 查看当前文件夹下的各个文件占用磁盘空间du -ah --max-depth=1查看内核版本:uname -r# 查...原创 2018-09-06 08:57:44 · 134 阅读 · 0 评论 -
ubuntu配置静态ip
编辑 /etc/network/interfaces添加和静态ip有关的参数iface eth0 inet staticaddress 192.168.0.10netmask 255.255.255.0gateway 192.168.0.1编辑 /etc/resolv.conf,设置dnsnameserver 202.96.134.133nameserver 202.10...原创 2018-09-06 09:00:22 · 1333 阅读 · 0 评论 -
CentOS7 安装go1.8
安装 wgetyum install wget使用wget获取安装包wget -c https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gzwget -c https://storage.googleapis.com/golang/go1.10.1.linux-amd64.tar.gz解压tar -C...原创 2018-09-06 15:06:17 · 1411 阅读 · 0 评论 -
CentOS7 安装Docker-ce
卸载老版本的 docker 及其相关依赖sudo yum remove docker docker-common container-selinux docker-selinux docker-engine安装 yum-utils,它提供了 yum-config-manager,可用来管理yum源sudo yum install -y yum-utils添加yum源sudo...原创 2018-09-06 15:10:54 · 144 阅读 · 0 评论 -
使用nginx + xshell5实现内网穿透 (反向隧道)
首先需要工具:一台公网服务器(我的是centos),客户端工具xshell配置centos开启反向隧道功能:# 编辑sshd配置文件vim /etc/ssh/sshd_config# 开启反向隧道GatewayPorts clientspecified# 保存退出# 重启服务systemctl restart sshd.service使用nginx转发80端口请求:...原创 2018-09-17 09:23:23 · 5417 阅读 · 0 评论