108.elasticsearch安装
发表于
linux
分类,标签:
21
12月
2023
0
elasticsearch1.官网下载包https://www.elastic.co/cn/downloads2.解压并修改配置文件tar -zxvf elasticsearch-7.10.2.tar.gz -C /optcd /opt/elasticsearch-7.10.2/config3.修改配置文件vim /opt/elasticsearch-7.10.2/config/elasticsearch.yml#增加以下配置cluster.name: my-applicationnode.name: es-master#node.master: true#node.data: true#bootstrap.memory_lock:&nbs...
107.dockerfile制作
发表于
linux
分类,标签:
19
12月
2023
vim DockerfileFROM fnndsc/ubuntu-python3USER rootWORKDIR /data/wwwroot/predictRUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas==1.0.5 && pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xlrd==1.1.0 && pip install -i https://pypi.tuna.tsinghua.edu.cn/s...
105.ubuntu常用工具安装
发表于
linux
分类,标签:
07
12月
2023
启动dockerdocker run -dit -v /data/countly:/usr/local/src --name countly ubuntu升级 apt-get update安装updateapt-get install openssh-server安装gccsudo apt install build-essential 安装procps包 psapt-get install procps安装其他apt-get install vimapt-get install net-toolsap...
104.使无进程docker容器保持运行
发表于
linux
分类,标签:
07
12月
2023
docker容器无进程启动docker run -i -t c1717d73fd69 /bin/bashk8s中添加循环使容器保持运行image: k8s-jingxiang-registry.cn-hangzhou.cr.aliyuncs.com/yaozh.com/nullpython3:v2name: pod-predictimagePullPolicy: IfNotPresentcommand: [ "/bin/sh", "-c", "--" ]args: [ "while true; do sleep 30;...
102.git常用命令
发表于
linux
分类,标签:
06
12月
2023
#从本地push代码到仓库git add --allgit commit -m "tkm2"git push --set-upstream origin develop#强制更新git fetch --allgit checkout -b master origin/mastergit reset --hard origin/mastergit pull origin master#查看分支git branch -a#切换分支git checkout m...
99.docker备份脚本
发表于
linux
分类,标签:
17
11月
2023
#!/bin/bashsource /etc/profilesource ~/.bash_profileset -o nounsetfile=`date "+%Y_%m_%d" -d "1 day ago"`docker cp confluence:/var/atlassian/confluence/backups/backup-"$file".zip /confluenceback/docker exec confluence /bin/bash -c 'find /var/atlassian/confluence/ba...
98.linux虚拟机忘记密码
发表于
linux
分类,标签:
09
11月
2023
1.进入编辑模式,开机后按E键,进入编辑模式后,找到LANG=zh_CN.UTF-8,在末尾加上init=/bin/sh2.挂载根目录mount -o rw,remount /3.选择修改的用户的密码passwd root输入两次密码4.关闭虚拟机的SELINUX安全机制vim etc/selinux/configSELINUX=disabled5.在根目录下创建一个隐藏文件,让修改的密码生效touch /.autorelabel6.重启系统exec /sbin/init...
96.简单的备份脚本
发表于
linux
分类,标签:
02
11月
2023
#!/bin/bashcd /data/wwwroot/www_backtar -zcvf leiuk.com_`date +%Y%m%d%H%M`.tar.gz /data/wwwroot/leiuk.comfind /data/wwwroot/www_back -type f -mtime +30 -name "*.tar.gz" -exec rm -f {} \;scp -P 10260 ./leiuk.com_`date +%Y%m%d%H%M`.tar.gz root@hostname:/home/lei/www_back...
94.k8s常用命令
发表于
linux
分类,标签:
02
11月
2023
常用查询命令:kubecctl get hpa #查询容器弹性使用情况kubectl get pod | grep top #获取top的pod信息kubectl get nodes #获取节点信息kubectl top pod | grep top #查询top的pod资源情况kubectl top nodes #查询节点资源使用率kubectl describe nodes | grep top #查询top占用节点资源情况...
91.yum安装的mysql8忘记root密码
发表于
linux
分类,标签:
12
09月
2023
如果你忘记了MySQL8的root密码,你可以通过以下步骤来重置它。请注意,这些步骤适用于使用YUM安装的MySQL8的情况。如果你使用了不同的安装方法,可能需要稍微不同的步骤。停止MySQL服务:首先,停止MySQL服务以确保在重置密码时不会发生并发访问。使用以下命令停止MySQL服务:systemctlstopmysqld以跳过权限检查的方式启动MySQL:这将启动MySQL服务,但跳过权限检查,以便你可以登录并重置密码:mysqld_safe--skip-grant-tables&使用root用户登录到MySQL:执行以下命令登录到MySQL服务器,此时不需要密码:mysql-uroot选择MySQL数据库:在MySQL命令行中,使用以下命令选择MySQL数据库:usemysql;重置root密码:现在你可以重置root用户的密码。执行以下SQL语句来修改密...