- 博客(55)
- 资源 (1)
- 收藏
- 关注

原创 CentOS7离线安装Expect
CentOS7离线安装Expect1.在系统版本相同的能联网的虚拟机里用Yumdownloader【yum -y install yum-utils】下载expect 和tcl的rpm包于服务器上,但是不安装[root@lw ~]# yumdownloader expect [root@lw ~]# yumdownloader tcl[root@lw ~]# ll总用量 4136-rw-r--r-- 1 root ro...
2020-08-20 00:35:51
2988

原创 Shell脚本一键自动部署项目
Shell脚本一键自动部署项目#!/bin/bash#定义根目录、代码仓库、项目域名信息read -p '请输入项目名称[中文名称]:' Chinese_Project_Nameread -p '请输入项目目录[eg:/home/www...
2020-01-16 16:05:07
1263

原创 PXE+Kickstart 无人值守装机
PXE一键装机 PXE(Preboot eXecute Environment,预启动执行环境),主要用于在无人值守安装系统中引导客户端主机安装 Linux 操作系统。Kickstart 是一种无人值守的安装方式,其工作原...
2020-01-14 10:43:48
970

原创 自定义虚拟机安装(KVM)
自定义虚拟机安装一、创建虚拟交换机原理:调用 dnsmasq 提供DNS、DHCP等功能创建配置文件 /etc/libvirt/qemu/networks/vbr.xml<network> <name>vbr</na...
2018-09-07 19:56:43
487

原创 VMware设置nat上网(笔记本-dhcp)
VMware设置nat上网(笔记本-dhcp) [root@localhost Desktop]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.0 (Maipo) (1)安装好Red Hat Enterprise Linux Server release 7.0 (Maipo) 版本的linu...
2018-08-26 02:07:21
621
1
原创 Docker-compose一键部署Zabbix监控平台
地址:http://IP: 8080,默认账号密码:Admin/停止:docker-compose stop。查看日志:docker-compose logs。启动:docker-compose start。构建:docker-compose up -d。查看进程:docker-compose top。删除:docker-compose down。查看状态:docker-compose ps。
2025-03-14 09:23:56
635
原创 基于Jenkins+Kubernetes+GitLab+Harbor构建CICD平台
基于Jenkins+Kubernetes+GitLab+Harbor构建CICD平台
2024-06-02 22:36:54
1712
1
原创 SonarQube结合GitLab CI/CD自动检测代码【图文详述】
一、实验环境1)服务器系统:CentOS Linux release 7.9.20092)GItLab版本:GitLab Community Edition14.9.03)SonarQube版本:Community Edition版本 9.2.3备注:Docker mc1arke/sonarqube-with-community-branch-plugin 版本二、修改服务器系统参数1)cat /etc/sysctl.conf#末尾添加如下两行vm.max_map_c...
2022-03-30 01:53:30
13633
4
原创 Curl命令行分析本地到服务器的网络访问情况
使用curl分析服务器到百度服务器的网络访问情况[root@test ~]# curl -o /dev/null -s -w @curl_file https://www.baidu.com
2021-06-05 16:13:51
717
原创 Shell脚本一键安装VNC Server实现本地图形化远程访问CentOS7系统
安装VNC Server实现本地远程图形化访问CentOS7系统#安装VNC Server实现本地远程图形化访问#系统环境#1)CentOS Linux release 7.6.1810 (Core)#2)3.10.0-1160.6.1.el7.x86_64#1、安...
2020-11-23 17:37:21
778
原创 CentOS7系统离线更新Firefox版本
CentOS7系统离线更新Firefox版本1、Firefox官网下载Linux对应版本的Firefox,https://www.firefox.com.cn。因为宿主机是64位,所以下载 Firefox-latest-x86_64.tar.bz22、上传软件包Firefox-latest-x86_64.tar.bz2到服务器,路径为/home/Firefox-latest-x86_64.tar.bz23、解压...
2020-09-29 17:03:46
1311
原创 安装CentOS7系统dracut-initqueue timeout-starting…starting timeout scripts 报错解决
安装CentOS7系统dracut-initqueue timeout-starting…starting timeout scripts 报错解决1、报错加载完后出现如图dracut:/# 界面dracut:/# cd /devdracut:/# ls | grep sdsdasda4sdbsdb1sdb2sdb3备注:一般来说U盘是/dev/sda4,如果不确定的话,拔掉U盘,看哪个消失就是哪个。2、然后重启dracut:/# reboot3...
2020-09-23 19:51:16
3451
原创 CentOS7设置Tomcat开机自启动脚本
CentOS7设置Tomcat开机自启动脚本服务器环境:[root@lmzf ~]# cat /etc/redhat-releaseCentOS Linux release 7.4.1708 (Core)1.编写开机自启动脚本 [root@lmzf ~]#cat /etc/init.d/tomcat#!/bin/bash## tomca...
2020-09-01 15:45:29
694
原创 CentOS 7 环境下ping加时间戳实时输出到文件
CentOS 7 环境下ping加时间戳实时输出到文件1.服务器环境[root@lw ~]# cat /etc/redhat-releaseCentOS Linux release 7.3.1611 (Core)2.撰写脚本[root@lw ~]# cat ping.test.sh#(1)-i 2 间隔2s#(2)awk '{ print $0"\t" strftime("%D_%H:%M:%S",systime()) } ' 时间戳...
2020-08-20 00:49:50
1619
原创 MySQL5.7日期报错解决---MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘
一、报错提示MySQL:[Err] 1292 - Incorrect datetime value: '0000-00-00 00:00:00' for column 'CREATE_TIME' at row 1二、解决方法[root@lmzf_test ~]# cat /etc/my.cnf...[mysqld]sql_mode=strict_trans_tables,no_zero_in_date,error_for_division_by_zero,no_auto_creat
2020-08-18 16:37:06
2221
原创 Linux源码安装Golang环境
Linux(CentOS7)源码安装Golang环境1.官网【https://studygolang.com/dl】下载Golang安装包[root@lw ~]# wget https://studygolang.com/dl/golang/go1.14.7.linux-amd64.tar.gz2.解压安装包[root@lw ~]# tar xf go1.14.7.linux-amd64.tar....
2020-08-12 17:07:40
685
原创 Linux检测远程端口是否打开的六种方法
Linux检测远程端口是否打开的四种方法方法一:Telnet命令#端口通显示如下(实验IP为自定义IP)[root@java-test-server ~]# telnet 88.88.88.88 80Trying 202.122.38.84...Connected to 202.122.38.84.Escape character is '^]'.#端口不通[root@java-test-serv...
2020-08-08 14:22:49
12600
原创 Linux 系统、网络配置相关命令
Linux 系统、网络配置相关命令一、确认多网卡服务器对应的配置文件1.针对物理机,可使用ethtool命令,此时em1网卡对应的网口会闪烁2.mii-tool命令[root@lingfeng ~]# mii-tool em1em1: negotiated 1000baseT-FD flow-control, link ok二、Dmidecode查看Linux服务器是虚拟机还是物理机1.物理机...
2020-07-01 16:44:01
288
原创 CentOS7使用ISO镜像自建Yum源-离线安装软件
CentOS7使用ISO镜像自建Yum源-离线安装软件1、下载CentOS光盘镜像 CentOS7镜像,163源的镜像http://mirrors.163.com/centos/7/isos/x86_64/ 下载地址:[root@lw ~]# wget http://mirrors.163.com/centos/7/isos/x86_64/CentOS-7-x86_64-Everything-2003.iso...
2020-06-02 13:49:36
702
1
原创 Linux服务器与网络时间不同步解决办法
Linux服务器与网络时间不同步解决办法1.查看时区[root@lw ~]# timedatectl如果不是北京时区,修改为北京时间[root@lw ~]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime2.时间同步脚本撰写[root@lw ~]# cat /mnt/TimeSync.sh #!/bin/bashntpdate us.pool.ntp....
2020-05-19 12:03:34
2137
原创 统计Nginx之access.log的URL访问量
统计nginx_access.log的URL访问量1.nginx_access.log的日志格式cat /usr/local/nginx/conf/nginx.conf...log_format main '$remote_addr - $remote_user [$time_local] "$request" ' ...
2020-05-12 20:39:00
1033
原创 ELK之源码安装Elasticsearch以及报错汇总
ELK之源码安装Elasticsearch1、服务器环境[root@elk ~]# cat /etc/redhat-releaseCentOS Linux release 7.2.1511 (Core)[root@elk ~]# uname -r3.10.0-327.4.5.el7.x86_64[root@elk ~]# free -m total used free...
2020-05-10 14:46:10
464
原创 Logrotate 切割nginx日志
Logrotate 切割nginx日志1.在目录/etc/logrotate.d/下创建nginx文件 cat/etc/logrotate.d/nginx/home/wwwlogs/nginx_access.log { #避免权限报...
2020-05-08 14:15:55
364
原创 CentOS7环境之RPM方式离线安装MySQL5.7
CentOS7环境之RPM方式离线安装MySQL5.71.官网下载tar压缩包并解压出RPM安装包 下载地址:https://dev.mysql.com/downloads/mysql/ Select Version(5.7.x)---> Red Hat Ente...
2020-03-10 23:14:20
3160
原创 Gitlab-CI:Gitlab-runner自动部署GItlab项目
Gitlab-CI:Gitlab-runner自动部署GItlab项目1.准备环境(1)Gitlab服务器[root@gitlab ~]# cat /etc/redhat-releaseCentOS Linux release 7.2.1511 (Core...
2020-03-01 21:58:25
901
原创 Linux利用script命令记录用户的服务器操作行为
Linux利用script命令记录用户的服务器操作行为1.在服务器上创建文件夹[root@lw ~]# mkdir -p /opt/logs/scripts2.授予权限,目录需要其他用户有写的权限[root@lw ~]# chmod -R 743 /opt/logs/scripts3.在/etc/profile末尾添加...
2019-11-02 01:03:26
313
转载 通过登入IP记录Linux所有用户登录所操作的日志(转载)
通过登入IP记录Linux所有用户登录所操作的日志(转载)转载于:https://blog.csdn.net/b108074013/article/details/481659811.首先在/etc/profile.d/文件夹下面添加如下脚本[root@lw ~]# vim /etc/profile.d/user_all_history.sh# His...
2019-10-16 22:18:54
233
原创 Shell脚本一键实现客户端登录服务器钉钉报警
shell脚本一键实现客户端登录服务器钉钉报警vim /etc/ssh/sshrc#!/bin/bash#获取登录者的用户名user=$USER#获取登录者的IP地址IP=${SSH_CLIENT%% *}#获取登录的时间time=$(date +%F%t%k:%M)#获取服务器的IP地址server='1.9.1.5...
2019-10-10 22:34:26
610
原创 Centos7本地挂载yum源
Centos7本地挂载yum源1.挂载镜像[root@lmzf ~]# mkdir -p /mnt/centos7[root@lmzf ~]# mount /root/CentOS-7-x86_64-DVD-1708.iso /mnt/centos72.开机永久挂载[root@lmzf ~]...
2019-09-28 19:46:50
1356
原创 通过浏览器实现Linux终端的访问-ttyd
浏览器实现Linux终端的访问-TTYD一、下载、授权、执行[root@lmzf ~]# wget -c -O ttyd https://github.com/tsl0922/ttyd/releases/download/1.5.2/ttyd_linux.x86_64 [root@lmzf ~]# chmod +x...
2019-09-25 20:36:48
3298
原创 Shell脚本一键添加svn仓库账户密码信息
shell脚本一键添加svn仓库账户密码信息#!/bin/bash#列出svn目录下的项目for dir in $(ls /home/svn/)do [ -d /home/svn/$dir ] && echo $dirdone#进入要设定账户密码的项目目录read -p "请输入svn项目文件夹名: " di...
2019-08-19 16:47:53
734
原创 Sed在指定行后添加字符串
Sed在指定行后添加字符串1.原文档[root@lmzf ~]# cat svn.txtdevelop = www,yuj,hzy,chent,wmw,hello,welcome2.在develop行后面添加字符串“,golive”[root@lmzf ~]# sed -i '/^develop/{s/$...
2019-07-12 15:20:11
5986
1
Docker技术入门与实战
2018-08-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人