![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux 脚本
Cory_Hu
热爱Linux,Django,桌面运维,服务器运维,网络运维,网络安全运维
展开
-
Gitlab 安装和维护
Gitlab 安装和维护1. 安装1.1 yum安装1.2 脚本安装2. 备份3. 恢复1. 安装本实例ip地址:192.168.10.101.1 yum安装# 官网安装文档:https://about.gitlab.com/install/#centos-7# 安装依赖yum install -y curl policycoreutils-python openssh-server perl# GitLab使用postfix发送邮件yum install postfixsystem原创 2021-12-12 21:55:57 · 331 阅读 · 0 评论 -
备份目录或文件并定义保存时间
文件backup.sh#!/bin/bash# d:destination_dir 备份到的目的目录,默认/data/backup# s:source_dir 需要备份的源目录或者文件,必须指定# t:time 保留多少时间,单位是天,默认30天# 逻辑:先备份,后清理# 例如:backup.sh -s /etc/ -d /data/backup/etc -t 15destination_dir="/data/backup"time=30while getopts "tds:" opt;原创 2021-09-25 19:14:29 · 273 阅读 · 0 评论