排序
密码保护:Ansible一键部署LNMP
本文仅供个人练习Ansiblenginx.yaml- hosts: web tasks: - name: nginx repo file copy: src=./conf/nginx.repo dest=/etc/yum.repos.d/nginx.repo - name: install nginx yum: name=nginx stat...
centos7 防火墙firewall命令
基本使用启动:systemctl start firewalld 关闭:systemctl stop firewalld 查看状态:systemctl status firewalld 开机禁用:systemctl disable firewalld 开机启用:systemctl enable firewal...
Nginx-基础总结(下)
根据域名自定义跳转if ( $host = 'www.baidu.com' ) { rewrite ^/(.*)$ http://baidu.com/$1 permanent; }浏览器的类型,作出相应的跳转# 根据浏览器头部 URL 重写到指定目录 if ($http_user_age...
基于NFS创建动态存储storageclass
什么是StorageClass Kubernetes提供了一套可以自动创建PV的机制,即:Dynamic Provisioning.而这个机制的核心在于:StorageClass这个API对象. StorageClass对象会定义下面两部分内容:1,PV的属性.比...
全网备份脚本
1、客户端脚本这里我拿nfs服务器充当客户端#/bin/bash Backup_dir="/backup" IP_info=$(hostname -i) #cerate backup dir mkdir -p $Backup_dir/$IP_info #tar backup data cd / tar ...
NGINX日志切割
前言Nginx日志对于统计、系统服务排错很有用。Nginx日志主要分为两种:access_log(访问日志)和error_log(错误日志)。access.log 记录哪些用户,哪些页面以及用户浏览器,IP等访问信息;error.log ...
Nginx负载均衡
角色外网IP内网IP主机名LB0110.0.0.5172.16.1.5lb01web0110.0.0.7172.16.1.7web01web0210.0.0.8172.16.1.8web02web01:mkdir /html/www -p echo "xiaobai" > /html/www/index.html ...
docker容器打包成镜像
先查看镜像docker images格式# docker commit [OPTIONS] CONTAINER(容器名称或者ID) [REPOSITORY[:TAG]] -a : 提交的镜像作者 -c : 使用Dockerfile指令来创建镜像 -m : 描述 -p : 在commit时,...
shell if语句
if 语句格式单分支结构#第一种 if <条件表达式> then 指令 fi #第二种 if <条件表达式>; then 指令 fi实例1#/bin/bash read -p "请输入两个整数:" a b if (( $a == $b )...
centos7 apache一站式https设置
首先我们现在html目录中.htaccess文件(没有就新建一个)添加一下内容<IfModule rewrite_module> Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENA...