02 2023 档案
摘要:
sshd限制 1.修改ssh端口 vim /etc/ssh/sshd_config #Port 22 Port 20199 #指定端口 Port 20100 #ListenAddress 0.0.0.0 #ListenAddress :: 2.添加ssh白名单 [root@small ~]# vim
阅读全文

摘要:
[root@prod-php-s010 www]# sqlite3 /var/lib/grafana/grafana.db sqlite> .tables sqlite> select * from user; sqlite> update user set password = '59acf18b
阅读全文

摘要:
history命令是被保存在内存中的,当退出或者登录shell时,会自动保存或读取。在内存中,历史命令仅能够存储1000条历史命令,该数量是由环境变量 HISTSIZE进行控制。默认是不显示命令的执行时间,命令的执行时间,history 已经记录,只是没有显示。 # 不记录命令 export HIS
阅读全文

摘要:
location /dyl-server/ { if ($request_method = 'OPTIONS') { add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods GET,POST,
阅读全文

摘要:
#安装工具 yum -y install nc #监听端口 nc -lp 8080 #案例:大数据服务走8080端口,外网监听。安全组开过了。但是访问不了。关掉服务,nc开启8080,外网访问,还是访问不了。说明跟服务没关系,后面发现8080端口为特殊端口,需要备案。问题解决
阅读全文

摘要:
#参数 -b:以批处理模式操作; -c:显示完整的治命令; -d:屏幕刷新间隔时间; -I:忽略失效过程; -s:保密模式; -S:累积模式; -i<时间>:设置间隔时间; -u<用户名>:指定用户名; -p<进程号>:指定进程; -n<次数>:循环显示的次数。 #交互命令 M:根据驻留内存大小进行
阅读全文

摘要:
#!/bin/bash #ENDPOINTS="https://192.168.1.207:2379,https://192.168.1.208:2379,https://192.168.1.209:2379" ENDPOINTS="127.0.0.1:2379" CACERT="/etc/kube
阅读全文

摘要:
#查看某个表结构 desc `dyl_uims`.`t_auth_dept`; #查看某个表某个字段的数据,如果表太大,记得加条件。否则容易卡住。 select system_id from `dyl_uims`.`t_auth_dept` limit 100;
阅读全文

摘要:
[root@master ~]# cat /usr/bin/cleanimg #!/bin/bash num=`docker ps -a|grep Exit|wc -l` if [ (docker ps -a|grep Exit|awk
阅读全文

摘要:
#问题:新机器加入K8S集群报错 [kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz’ failed with error: Get“http://localhost:10248/healt
阅读全文

摘要:
[root@bigdata04 ~]# cat /data/res/search.sh #!/bin/bash source /etc/profile mem=`free -h |awk 'NR==2{print $NF}' | awk -FG '{print $1}' |cut -d '.' -f
阅读全文

摘要:
[root@ajsh-dev006 systemd]# cat /usr/lib/systemd/system/zk.service [Unit] Description=zookeeper.service After=network.target [Service] User=root Group
阅读全文

摘要:
[root@ajsh-dev006 systemd]# cat /usr/lib/systemd/system/kafka.service [Unit] Description=kafka [Service] User=root LimitNOFILE=65535 LimitNPROC=65535
阅读全文

摘要:
[root@bigdata01 ~/install]# vim change-yarn-site.sh #!bin/bash #此脚本对大数据集群所有节点的yarn-site.xml文件根据集群配置自动更改对应配置。 HOST_LIST=`grep 'bigdata' /etc/hosts |awk
阅读全文

摘要:
[root@master deployment]# yum -y install mtr [root@master deployment]# mtr 36.134.8.76 My traceroute [v0.85] master (0.0.0.0) Tue Dec 6 15:46:38 2022
阅读全文

摘要:
##通过服务yaml文件配置 kind: Deployment .... spec: .... spec: hostAliases: - ip: "120.26.68.89" hostnames: - "asrexz.exiaozhi.com"
阅读全文

摘要:
#需要用到四层负载。首先确定你的nginx支持四层负载。确定开启stream模块 [root@test-node5 conf.d]# nginx -V configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module --wi
阅读全文

摘要:
[root@lecode-pre74 ~]# setenforce 0 setenforce: SELinux is disabled [root@lecode-pre74 ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux
阅读全文

摘要:
导出sql文件可以使用mysqldump。主要有如下几种操作: 导出整个数据库(包括数据库中的数据): mysqldump -h主机 -u username -ppassword dbname > dbname.sql; 导出数据库中的数据表(包括数据表中的数据): mysqldump -h主机 -
阅读全文
