1 算数运算符 运算符语义范例结果+正数+10+10-负数-10-10+加1+12-减10-55*乘2*36/除10/22%取余7%21++前++int = 10, result = ++int;result =11, int = 11++后++int = 10, result = int++;result =10, int = 11--前--in…
1,基本数据类型 1.1 整形 类型占用存储空间范围byte1个字节(一个字节8位)-128 ~ 127short2个字节 -32768(-2^15) ~ 32768(-2^15 -1) int4个字节(注意,int在开发中用的最多) -2,147,483,648(-2^31) ~ 2,147,483,648(-2^31 -1) long8个字节 …
# 套接字本端关闭, 这个参数决定了它在FIN-WAIT-2 状态的时间,默认60秒,这里调整为2 net.ipv4.tcp_fin_timeout = 2 # 开启重用 默认为0表示不开启,1为开启 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_tw_recycle = 0 # 表示当keepalive启用时, T…
1, Nginx 部署 1.1 脚本一键部署方式,以1.18.0为例 #!/bin/bash . /etc/init.d/functions ver='nginx-1.18.0' # 检查依赖关系 rpm -qa|grep openssl-devel &>/dev/null if [ $? -eq 0 ];then action 'open…
效果图 代码 #!/bin/bash #功能: 查看本机IP地址 # define colors. RED='\E[31m' GREEN='\E[32m' YELLOW='\E[33m' RES='\033[0m' nic_name='ens33' ipaddr=`ifconfig ${nic_name}|awk 'NR==2{print $2,$…
1 获取软件 软件url: MySQL :: Download MySQL Community Server (Archived Versions) 2 创建mysql系统账户 # useradd -r -s /sbin/nologin mysql -M 3 解压缩软件 # tar xf mysql-5.7.31-linux-glibc2.12-x…
1, alias别名 #!/bin/bash . /etc/init.d/functions # define colors. RED='\e[31m' GREEN='\E[32m' YELLOW='\E[33m' RES='\033[0m' # progess function function progess(){ b='' for ((i=0…
1 验证图片 上图是需要验证指纹信息 2 取消方法 2.1 修改客户端/etc/ssh/ssh_config配置文件 修改/etc/ssh/ssh_config文件中的第35行 StrictHostKeyChecking 参数改为no 这里的配置文件是CentOS7.6的配置文件 2.2 修改后重启sshd服务 systemctl restart …
scp命令:Linux & Linux 之间文件上传下载 1 文件上传 scp /root/video.mp4 root@192.168.91.128:/root 2 文件下载 scp root@192.168.91.128:/root/video.mp4 ./ 说明: 以root身份下载远端nfs服务器上面/root/video.mp4文…
1.1 dd命令 说明: 快速生成文件命令 [root@demo1 ~]# dd if=/dev/zero of=video.mp4 bs=10M count=1 1+0 records in 1+0 records out 10485760 bytes (10 MB) copied, 0.224864 s, 46.6 MB/s [root@dem…