随笔分类 - Linux运维
摘要:for serv in ` systemctl list-unit-files | grep enabled|awk '{print $1}'`;do systemctl disable $serv ;done for serv in autovt@.service crond.service ge
阅读全文
摘要:1:备份VG信息 vgcfgbackup vgdata 2:卸载文件系统 umount /data 3:去除卷组激活 lvchange -an /dev/vg0/lv_data vgchange -an vgdata 4:导出vg vgexport vgdata 5:查看scsi设备号 multipatch -ll 【echo 'scsi remove-single-devi...
阅读全文
摘要:authconfig --passminlen=8 --update authconfig --enablereqdigit --update authconfig --enablereqlower --update authconfig --enablerequpper --update authconfig --enablereqother --update sed -i 's/pass...
阅读全文
摘要:unix2dos 文件的编码格式进行转型 删除windows上复制文件产生的回车键
阅读全文
摘要:[root@master ~]# curl https://cht.sh/awk# sum integers from a file or stdin, one integer per line:printf '1\n2\n3\n' | awk '{ sum += $1} END {print su
阅读全文
摘要:#!/bin/bash cat > /etc/login.defs PASS_MAX_DAYS 90 EOF
阅读全文
摘要:[root@openstack ~]# packstack --allinone --provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ovs-bridge-interfaces=br-ex:eth
阅读全文
摘要:2010年7月,Rackspace和美国宇航局联合其他25家公司启动了OpenStack项目 OpenStack的发行版本时间表和核心项目 日期 Nova、Glance、Swift、Horizon、Keystone、Quantum Cinder、Ceilometer、Heat Nova、Glance
阅读全文
摘要:简写 for i in /sys/class/scsi_host/*; do echo "- - -" > $i/scan; done
阅读全文
摘要:[root@ftp:/root] > fdisk -l Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimu...
阅读全文
摘要:> man lvm LVM(8) System Manager's Manual LVM(8) NAME lvm — LVM2 tools SYNOPSIS lvm [command|file] DESCR...
阅读全文
摘要:> ansible --help Usage: ansible [options] Define and run a single task 'playbook' against a set of hosts Options: -a MODULE_ARGS, --args=MODULE_ARGS module arguments -...
阅读全文
摘要:修改IP地址
阅读全文
摘要:[root@ansible02:/root] > ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forev...
阅读全文
摘要:[root@web01 ~]# nmcli device status DEVICE TYPE STATE CONNECTION eth0 ethernet connected eth0 lo loopback unmanaged -- [root@web01 ~]# nmcli connectio
阅读全文
摘要:[root@web01 ~]# systemctl status sshd.service ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; ve
阅读全文
摘要:ad hoc 临时的,在ansible里需要快速执行,并不用保存命令的执行方式 简单命令 playbook 复杂命令
阅读全文
摘要:定义主机组用户和密码 [webservers] ansible[01:04] ansible_ssh_user='root' ansible_ssh_pass='AAbb0101' [root@ftp:/root] > ansible webserve...
阅读全文