技术改变生活

博客园 首页 新随笔 联系 订阅 管理
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页

2020年4月27日 #

摘要: 1 [root@localhost array]# cat function_array.sh 2 #!/bin/bash 3 4 num=(2 3 4) 5 array() { 6 echo "all parameters: $*" 7 local newarray=(`echo $*`) #其中 阅读全文
posted @ 2020-04-27 21:32 小阿峰 阅读(613) 评论(0) 推荐(0) 编辑

2020年4月25日 #

摘要: for_null.sh内容: 1 #!/bin/bash 2 #for null line 3 #version 1.0 by feng 4 5 IFS=$'\n' 6 for i in `cat $1` 7 do 8 if [ ${#i} -eq 0 ];then 9 echo "the line 阅读全文
posted @ 2020-04-25 23:54 小阿峰 阅读(585) 评论(0) 推荐(0) 编辑

摘要: vim while_create_user.sh 1 #!/usr/bin/bash 2 3 #while create user 4 5 #v1.0 by xfeng 6 7 while read line 8 9 do 10 11 if [ ${#line} -eq 0 ];then #变量的字 阅读全文
posted @ 2020-04-25 22:10 小阿峰 阅读(347) 评论(0) 推荐(0) 编辑

摘要: 1、创建用户 useradd01.sh 1 #!/bin/bash 2 3 ############################### 4 5 #useradd # 6 7 #v1.0 by userf 2019.08.0 # 8 9 ############################## 阅读全文
posted @ 2020-04-25 22:09 小阿峰 阅读(127) 评论(0) 推荐(0) 编辑

摘要: cat yum_if.sh 1 #!/bin/bash 2 3 4 #if for many branches yum 5 #version 1 by feng 6 7 yum_server=192.168.0.117 8 Os_version=$(cat /etc/redhat-release | 阅读全文
posted @ 2020-04-25 14:43 小阿峰 阅读(176) 评论(0) 推荐(0) 编辑

2020年4月24日 #

摘要: jumpserver原理图 前端到跳板机jumpserver的alice用户密码,和jumpserver到后端服务器的密码可以不同。用户可以通过jumpserver登陆后端服务器但是不能登陆到jumpserver服务器本身,需要在jumpserver服务器上设置登陆用户登陆后的初始化环境中定义登陆到 阅读全文
posted @ 2020-04-24 23:59 小阿峰 阅读(701) 评论(0) 推荐(0) 编辑

该文被密码保护。 阅读全文
posted @ 2020-04-24 22:52 小阿峰 阅读(3) 评论(0) 推荐(0) 编辑

摘要: docker image ls docker image tag nginx:0223 nginx:5888 docker image ls docker image inspect nginx:v1 docker image save nginx:v1 > nginx_20200424.tar l 阅读全文
posted @ 2020-04-24 00:25 小阿峰 阅读(157) 评论(0) 推荐(0) 编辑

2020年4月23日 #

摘要: 查看路由: #route #route -n #ip route show | column -t 获取帮助 [root@x101 ~]# man ip route[root@x101 ~]# ip route help [root@x101 ~]# route -n Kernel IP routi 阅读全文
posted @ 2020-04-23 23:30 小阿峰 阅读(11680) 评论(0) 推荐(0) 编辑

摘要: 如果禁用驱动程签名强制成功,就会显示“操作成功完成”,以后安装所有的驱动程,都不会被驱动程序签名阻止了。 进入命令提示符窗口后,在光标处,输入bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS命令 如果禁用驱动程签名强制成功,就会显示“操作成 阅读全文
posted @ 2020-04-23 09:44 小阿峰 阅读(2244) 评论(0) 推荐(0) 编辑

2020年4月17日 #

摘要: [root@localhost linshi]# docker run -itd --name cmdb6 --cpuset-cpus 0 --cpu-shares 512 harbor.yd.szcomtop.com/library/cmdb:1.6 /bin/bash 44772fac861ab 阅读全文
posted @ 2020-04-17 16:49 小阿峰 阅读(200) 评论(0) 推荐(0) 编辑

摘要: taskset 命令 taskset 设定 cpu 亲和力,taskset 能够将一个戒多个迚程绑定到一个戒多个处理器上运行。 参数: -c, --cpu-list 以列表栺式显示和挃定 CPU -p, --pid 在已经存在的 pid 上操作 例 1:设置只在 cupID 是 1 和 2 的 cp 阅读全文
posted @ 2020-04-17 16:32 小阿峰 阅读(102) 评论(0) 推荐(0) 编辑

2020年4月9日 #

摘要: 2. nginx.conf配置文件 Nginx配置文件主要分成四部分:main(全局设置)、server(主机设置)、upstream(上游服务器设置,主要为反向代理、负载均衡相关配置)和 location(URL匹配特定位置后的设置),每部分包含若干个指令。main部分设置的指令将影响其它所有部分 阅读全文
posted @ 2020-04-09 15:35 小阿峰 阅读(247) 评论(0) 推荐(0) 编辑

2020年4月8日 #

摘要: 变量自增语法:a=a+1 字符串拼接语法:a=$0" "a shell的终端打印echo hello worldecho "hello world"echo 'hello world'echo "hello world \!"echo 'hello world !'使用不带引号的echo时,没法在所 阅读全文
posted @ 2020-04-08 17:36 小阿峰 阅读(143) 评论(0) 推荐(0) 编辑

摘要: shell格式的if语句: [root@www file_test]# cat if.sh #!/bin/bash#if testif [ $# -eq 0 ];then exitfiif [ $1 -eq 1 ];then echo "the num is : abc"elif [ $1 -gt 阅读全文
posted @ 2020-04-08 15:09 小阿峰 阅读(288) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页