随笔分类 -  运维

摘要:1.提前安装好docker和docker-compose 2.在~目录下新建halo目录并进入 mkdir ~/halo && cd ~/halo 3.在halo目录新建 docker-compose.yml文件 vi docker-compose.yml 我这里使用的是外部的mysql,文件内容 阅读全文
posted @ 2023-12-22 03:20 猝死的路上 阅读(261) 评论(0) 推荐(0)
摘要:官方文档 https://docs.docker.com/engine/install/centos/ 1.查看centos系统版本,本篇文章是在 centos7 上安装docker,注意系统版本 cat /etc/redhat-release 回显 CentOS Linux release 7.9 阅读全文
posted @ 2023-12-22 03:06 猝死的路上 阅读(205) 评论(0) 推荐(0)
摘要:1.查找cpu使用率最高的进程,称为主进程 查看各种应用的cpu使用情况,按下大写P,从高到低排序 能看到占用cpu最多的那个主进程Pid,比如 13478 top -c 2.查找cpu使用率最高的进程里哪个线程占用cpu 最高,能得到一个线程Pid,比如 15678 top -Hp [主进程pid 阅读全文
posted @ 2023-12-22 00:24 猝死的路上 阅读(173) 评论(0) 推荐(0)
摘要:在centos7下启动的java应用,有时候需要结束某一个进程,如何根据应用名字快速找到应用的进程 使用-jar启动的应用 java -jar test.jar 应用名称为 test,那下面的命令可以找到 test.jar的pid并结束进程 ps ax | grep java | grep test 阅读全文
posted @ 2023-12-17 22:49 猝死的路上 阅读(192) 评论(0) 推荐(0)
摘要:在根目录下使用如下命令 du -sh * | sort -n 得到结果 du: cannot access ‘proc/28012’: No such file or directory du: cannot access ‘proc/28071/task/28071/fd/4’: No such 阅读全文
posted @ 2023-12-15 09:10 猝死的路上 阅读(82) 评论(0) 推荐(0)
摘要:1.去oracle官网下载jdk1.8,需要注册,下载后缀为 .tar.gz,比如 jdk-8u381-linux-x64.tar.gz 2.上传到服务器,解压 建立文件夹,将java安装到指定目录 mkdir -p /home/java8 由于java的安装包解压后默认套了一层,解压后默认会有 j 阅读全文
posted @ 2023-12-11 11:58 猝死的路上 阅读(125) 评论(0) 推荐(0)
摘要:server { listen 80; #填写证书绑定的域名 server_name <yourdomain>; #将所有HTTP请求通过rewrite指令重定向到HTTPS。 rewrite ^(.*)$ https://$host$1; location / { index index.html 阅读全文
posted @ 2023-11-01 18:07 猝死的路上 阅读(103) 评论(0) 推荐(0)
摘要:开端口 firewall-cmd --zone=public --add-port=3389/tcp --permanent firewall-cmd --reload 查看端口 firewall-cmd --list-port 关端口 firewall-cmd --zone=public --re 阅读全文
posted @ 2023-11-01 17:51 猝死的路上 阅读(33) 评论(0) 推荐(0)
摘要:use mysql; select host,user from user; update user set host='%' where user = root; flush privileges; 刷新才有效 阅读全文
posted @ 2023-11-01 17:50 猝死的路上 阅读(542) 评论(0) 推荐(0)
摘要:配置文件位置 /etc/sysconfig/network-scripts/ifcfg-ens32 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static 关键 DEFROUTE=yes IPV4_FAILURE_FATAL= 阅读全文
posted @ 2023-11-01 17:48 猝死的路上 阅读(34) 评论(0) 推荐(0)
摘要:unzip 1.zip -d . 阅读全文
posted @ 2023-11-01 17:46 猝死的路上 阅读(31) 评论(0) 推荐(0)
摘要:服务器 单个云盘容量不够了,买了扩容服务,需要运行以下命令才能扩容成功 yum install -y cloud-utils-growpart growpart /dev/vda 1 resize2fs /dev/vda1 lsblk 查看是否扩容 df -Th 第二次扩容,先运行命令 df -Th 阅读全文
posted @ 2023-11-01 17:42 猝死的路上 阅读(34) 评论(0) 推荐(0)
摘要:之前一直用密码登录的,突然登录不上,并且提示 Unable to authenticate using any of the configured authentication methods 原因是服务器使用了密钥登录,把密钥配置上就可以了 阅读全文
posted @ 2023-11-01 17:36 猝死的路上 阅读(410) 评论(0) 推荐(0)