This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream redis { | |
server 127.0.0.1:6379; | |
keepalive 512; | |
} | |
server { | |
listen 80; | |
server_name www.mf8.biz mf8.biz; | |
access_log off; | |
index index.html index.htm index.php; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# init_centos shell | |
#安装说明参见 https://sadsu.com/?p=266 | |
#----------------------------------------------------------# | |
# Variables&Functions # | |
#----------------------------------------------------------# | |
red='\033[0;31m' | |
green='\033[0;32m' | |
yellow='\033[0;33m' | |
plain='\033[0m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nameserver 8.8.8.8 | |
nameserver 8.8.4.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[litespeed] | |
name=LiteSpeed Tech Repository for CentOS $releasever - $basearch | |
baseurl=http://openlitespeed.oss-cn-hangzhou.aliyuncs.com/centos/7/$basearch/ | |
failovermethod=priority | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=http://openlitespeed.oss-cn-hangzhou.aliyuncs.com/centos/RPM-GPG-KEY-litespeed | |
[litespeed-update] | |
name=LiteSpeed Tech Repository for CentOS $releasever - $basearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CentOS-Base.repo | |
# | |
# The mirror system uses the connecting IP address of the client and the | |
# update status of each mirror to pick mirrors that are updated to and | |
# geographically close to the client. You should use this for CentOS updates | |
# unless you are manually picking other mirrors. | |
# | |
# If the mirrorlist= does not work for you, as a fall back you can try the | |
# remarked out baseurl= line instead. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#提供商,目前支持TencentCloud或Aliyun | |
XYBILL_<name>=TencentCloud | |
#Secret ID | |
XYBILL_<name>_providerCreds_ak= | |
#Secret Key | |
XYBILL_<name>_providerCreds_sk= | |
#最小余额 | |
XYBILL_<name>_minAmount=5 | |
#日志详细度 | |
LOG_LEVEL=INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MariaDB 10.4 RedHat repository list - created 2019-05-27 11:58 UTC | |
# http://downloads.mariadb.org/mariadb/repositories/ | |
[mariadb] | |
name = MariaDB | |
baseurl = http://yum.mariadb.org/10.4/rhel8-amd64 | |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB | |
enabled=1 | |
gpgcheck=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Checking if user is root otherwise throw error | |
if [ "$(id -u)" -ne 0 ]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
# Availbale Options | |
if [ ! "$#" -ge 1 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[nginx-stable] | |
name=nginx stable repo | |
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ | |
gpgcheck=1 | |
enabled=1 | |
gpgkey=https://nginx.org/keys/nginx_signing.key | |
[nginx-mainline] | |
name=nginx mainline repo | |
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install -y libguestfs-tools | |
virt-filesystems --long -h --all -a rhev-m.init.qcow2 | |
truncate -r rhev-m.init.qcow2 rhev-m.qcow2 | |
truncate -s +100G rhev-m.qcow2 | |
virt-resize --expand /dev/sda1 rhev-m.init.qcow2 rhev-m.qcow2 | |
virt-customize -a rhev-m.qcow2 --root-password password:<pass> | |
virt-customize -a rhev-m.qcow2 --run-command 'yum remove -y cloud-init' | |
virt-customize -a rhev-m.qcow2 --run-command 'sed -i s/^PasswordAuthentication.*/PasswordAuthentication\ yes/ /etc/ssh/sshd_config' | |
virt-customize -a rhev-m.qcow2 --run-command 'sed -i s/^PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config' |
NewerOlder