首页
学习
活动
专区
工具
TVP
发布

葫芦

专栏作者
307
文章
851411
阅读量
34
订阅数
linux 什么是Docker Machine?
Docker Machine is a tool that lets you install Docker Engine on virtual hosts, and manage the hosts with docker-machine commands. You can use Machine to create Docker hosts on your local Mac or Windows box, on your company network, in your data center, or on cloud providers like Azure, AWS, or DigitalOcean.
葫芦
2021-06-29
2.1K0
linux ssh指定私钥登陆linux主机
ssh指定私钥登陆linux主机 服务端 ssh-keygen -t rsa -b 4096 一路回车 cat .ssh/id_rsa.pub >> .ssh/authorized_keys 将公钥追加到authorized_keys 客户端 下载私钥,指定私钥登陆 scp root@192.168.*.*:/root/.ssh/id_rsa ./192.168.*.*.rsa localhost:~ wangzi$ mv 23.pem 192.168.*.*.rsa localhost:~ wangz
葫芦
2021-01-18
5.5K0
teg saltstack部署
yum install https://repo.saltstack.com/yum/redhat/salt-repo-2017.7-1.el7.noarch.rpm
葫芦
2019-11-26
5950
linux k8s权威踩坑指南
解决:无法连接数据库,书籍中mysql是latest,但是当时是15-16年左右,原来jdbc驱动可用,但是现在yaml文件中没有版本号,默认依然是latest,但是现在的jdbc驱动不能连接latest版本的mysql,故进行滚动升级命令如下:
葫芦
2019-05-20
1.5K0
linux shell创建临时文件
[root@aoi ~]# cat d #!/bin/bash #creating and using a temp file tempfile=`mktemp wz19.XXXXXX` exec 3>$tempfile echo "This script write to temp file $tempfile" echo "This is the first line" >&3 echo "This is the second line" >&3 echo "This is the last line" >&3 exec 3>&- echo "Done creating temp file. The contents are:" cat $tempfile rm -f $tempfile 2> /dev/null [root@aoi ~]# sh d This script write to temp file wz19.gnxX9K Done creating temp file. The contents are: This is the first line This is the second line This is the last line [root@aoi ~]# ls -al wz19* ls: cannot access wz19*: No such file or directory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mktemp -t wz.XXXXXX会将文件创建在系统临时文件夹下 [root@aoi ~]# mktemp -t wz.XXXXXX /tmp/wz.cs6mCq [root@aoi ~]# cat s #!/bin/bash tempfile=`mktemp -t tmp.XXXXXX` echo "This is a test file." > $tempfile echo "This is the second line of the test." >>$tempfile echo "The temp file is located at: $tempfile" cat $tempfile rm -f $tempfile [root@aoi ~]# sh s The temp file is located at: /tmp/tmp.xpLNt9 This is a test file. This is the second line of the test. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [root@aoi dir.BEEbII5]# cat ../a #!/bin/bash tempdir=`mktemp -d dir.XXXXXXX` cd $tempdir tempfile1=`mktemp temp.XXXXXX` tempfile2=`mktemp temp.XXXXXX` exec 7> $tempfile1 exec 8> $tempfile2 echo "Sending data to directory $tempdir" echo "This is a test line of data for $tempfile1" >&7 echo "This is a test line of data for $tempfile2" >&8 [root@aoi dir.BEEbII5]# ll total 8 -rw-------. 1 root root 44 Nov 20 08:24 temp.D3JWPR -rw-------. 1 root root 44 Nov 20 08:24 temp.n0IElP [root@aoi dir.BEEbII5]# cat temp.D3JWPR This is a test line of data for temp.D3JWPR [root@aoi dir.BEEbII5]# cat temp.n0IElP This is a test line of data for temp.n0IElP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tee filename 它将从STDIN 过来的数据同时发给两个目的地。一个目的地是STDOUT一个是 tee命令指定的文件名 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [root@aoi dir.BEEbII5]# date | tee wz Wed Nov
葫芦
2019-05-10
2.7K0
linux rsync + inotify搭建实时网页发布同步系统
#如果不加这行strict modes = false,可能会出现@ERROR: auth failed on module mysql strict modes = false #只允许192.168.1.0 网段下的客户端同步,也可指定IP。www.linuxidc.com 多个IP用逗号且无空格连接,如192.168.1.2,192.168.1.3 #也可用:hosts deny = 0.0.0.0/32 hosts allow = 192.168.0.166/32 log file = /var/log/rsyncd.log #pid file = /var/run/rsyncd.pid #指定rsync的pid文件,可不用。#motd file = /etc/rsyncd.motd #欢迎信息文件名称和存放位置(此文件没有,可以自行添加) #lock file = /var/run/rsync.lock #指定支持max connections参数的锁文件,默认值 #max connections = 10   # 最大连接数为10 [web]  #指定认证的备份模块名为mysql,在client端需要指定 #备份路径 path= /var/www #验证用户,这行如果不用,则可匿名访问,多个用户用逗号“,”分隔 #不建议用root。 auth users = wangzi #备份以什么用户ID和组ID进行,也可用root #但建议用mysql用户去读,只要设置有足够权限的用户即可,不建议用root. uid = root gid = root # 可以忽略一些无关的IO错误 ignore errors #不允许列文件 list = false #密码验证文件:username:password secrets file = /etc/rsyncd.secrets #关闭只读,可以上传 read only = no write only = no #pid file = /var/run/rsyncd.pid #log file = /var/log/rsyncd.log #lock file = /var/run/rsync.lock #trict modes = false,可能会出现@ERROR: auth failed on module mysql #只允许192.168.1.0 网段下的客户端同步,也可指定IP。www.linuxidc.com 多个IP用逗号 #motd file = /etc/rsyncd.motd #欢迎信息文件名称和存放位置(此文件没有,可以自行>添加) #lock file = /var/run/rsync.lock #指定支持max connections参数的锁文件,默认值
葫芦
2019-05-09
1.4K0
linux svn简明配置
安装配置svn #yum install subversion #mkdir /opt/u01 #svnadmin create /opt/u01/liezi #消除空行和#号开头行命令“cat /opt/u01/liezi/conf/authz | sed -n '/#/!p'| sed -n '/^$/!p'" #cat /opt/u01/liezi/conf/authz | sed -n '/#/!p'| sed -n '/^$/!p' [aliases] [groups] [dongwei:/] zhuhailiang=rw daiyanwei=rw #cat /opt/u01/liezi/conf/svnserve.conf | sed -n '/#/!p'| sed -n '/^$/!p' [general] anon-access = none auth-access = write password-db = passwd authz-db = authz [sasl] [root@saga www]# cat /opt/u01/dongwei/conf/passwd | sed -n '/#/!p'| sed -n '/^$/!p' [users] admin=password 启动svn #svnserve -d -r /opt/u01/ man svnserve -d, --daemon Causes svnserve to run in daemon mode. svnserve backgrounds itself and accepts and serves TCP/IP connections on the svn port (3690, by default). -r root, --root=root Sets the virtual root for repositories served by svnserve. The pathname in URLs provided by the client will be interpreted rela- tive to this root, and will not be allowed to escape this root.
葫芦
2019-05-09
6.9K0
linux linux服务器间文件互传及共享办法
2号linux de>ftp 10.10.10.1 根据提示输入用户名密码 get 单个文件 mget 多个文件 ls 查看远端主机目录 !ls 查看本地所在目录,ftp文件下载文件后会下载到本地de> 1号linux 搭好vsftp配置可参考本站文章 VSFTP给单用户绑定多个目录内有如何搭建vsftp的配置。
葫芦
2019-05-09
2.4K0
linux 监控 句柄
已分配文件句柄的数目     已使用文件句柄的数目      文件句柄的最大数目    
葫芦
2019-04-17
2.7K0
linux 监控 内存使用率
/proc/meminfo   used=total-(buffers+cached+free)
葫芦
2019-04-17
3K0
linux 监控 cpu使用率
示例:点击 -> 性能监控 [root@wangzi go]# cat /proc/stat cpu 25187586 4339 20108620 1703341684 3875717 0 58452 0 0 0 pytho代码: #!/usr/bin/env python # coding=utf-8 # author: brownwang # mail: 277215243@qq.com # datetime:2019/3/31 1:03 PM # web: https://www.bthlt.com
葫芦
2019-04-17
3.5K0
linux 监控 硬盘各分区使用量
示例:点击 -> 性能监控 通过df命令统计: [root@wangzi go]# df |grep -v ^Filesystem|awk -F ' ' '{print $6"|"$3"|"$4}' /|6999556|42168392 /dev|0|498596 /dev/shm|24|508080 /run|412|507692 /sys/fs/cgroup|0|508104 /run/user/0|0|101624 python代码: #!/usr/bin/env python # coding=ut
葫芦
2019-04-17
1.9K0
linux 监控 网卡IO
示例:点击 -> 性能监控 通过/proc/net/dev获取网卡 IO,第1列和第9列分别代表了in 和out。 [root@wangzi go]# cat /proc/net/dev Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets e
葫芦
2019-04-17
6.2K0
linux 监控 TCP状态数量的推荐方法
/proc/net/tcp 第四列 01代表了 TCP_ESTABLISHED 06代表代表time_wait 08代表close_wait
葫芦
2019-04-17
2.7K0
linux AWK统计出账
#!/bin/awk -f BEGIN{ MAX = 0 MIN = 9999999 CCID=ENVIRON["ccid"] T=ENVIRON["date"] O=ENVIRON["opened"] SQLNAME=ENVIRON["SQL"] price=ENVIRON["price"] cost_total = ENVIRON["cost"] no_close = 0 invalid_ebit_co
葫芦
2019-04-17
2.8K0
linux free swap为负异常处理
  当用户提交程序,然后产生进程在机器上运行。机器会判断当前物理内存是否还有空闲允许进程调入内存运行,如果有则直接调入内存进行;如果没有,则会根据优先级选择一个进程挂起,把该进程交换到swap中等待,然后把新的进程调入到内存中运行。根据这种换入和换出,实现了内存的循环利用,让用户感觉不到内存的限制。从这也可以看出swap扮演了一个非常重要的角色,就是暂存被换出的进程。
葫芦
2019-04-17
4.3K0
linux dd && cat
BROWNWANG-MB0:~ wangzi$ cat install.log |grep 1277 > 2.txt BROWNWANG-MB0:~ wangzi$ dd if=./install.log|grep 1277 > 1.txt 198709+1 records in 198709+1 records out 101739268 bytes transferred in 1.953107 secs (52090982 bytes/sec)
葫芦
2019-04-17
6.5K0
linux linux tmp目录下 文件误删除恢复
场景:   /tmp/zonesvr_3.2.1.1.pid 被误删除了,想要恢复。
葫芦
2019-04-17
8.7K0
linux Apache discuz 关闭目录浏览
<Directory "/opt/lampp/icons">     Options Indexes MultiViews     AllowOverride None     Require all granted </Directory>
葫芦
2019-04-17
8800
linux 查看进程绝对路径的几种方式
查看进程绝对路径的几种方式: pwdx pid ls -lhrnt /proc/pid ps -ef | grep tagent [user00@host ~]$ ps -ef|grep tagent
葫芦
2019-04-17
3.3K0
点击加载更多
社区活动
腾讯技术创作狂欢月
“码”上创作 21 天,分 10000 元奖品池!
Python精品学习库
代码在线跑,知识轻松学
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档