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
curl -sSI $1 | grep -i 'server:' | sed -r "s/server:\ (\w|)/\1/i" |
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 | |
# makecache | |
yum makecache | |
# Install Dependencies | |
yum install yum-cron tuned centos-release -y | |
# config yum-cron | |
sed -i 's|^download_updates = no|download_updates = yes|' /etc/yum/yum-cron.conf | |
sed -i 's|^apply_updates = no|apply_updates = yes|' /etc/yum/yum-cron.conf |
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
# Install yum-cron | |
yum update -y | |
yum install yum-cron -y | |
sed -i 's|^download_updates = no|download_updates = yes|' /etc/yum/yum-cron.conf | |
sed -i 's|^apply_updates = no|apply_updates = yes|' /etc/yum/yum-cron.conf | |
sudo systemctl start yum-cron | |
sudo systemctl enable yum-cron |
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
# ------- Debian ------- | |
sudo apt-get install ufw -y | |
# ------- CentOS ------- | |
sudo yum install epel-release -y | |
sudo yum install --enablerepo="epel" ufw -y | |
# ------- Config ------- | |
sudo ufw allow ssh | |
sudo ufw allow http |
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
net.ipv4.ip_forward = 0 | |
net.ipv4.conf.all.rp_filter = 1 | |
net.ipv4.conf.default.rp_filter = 1 | |
net.ipv4.conf.default.accept_source_route = 0 | |
kernel.sysrq = 0 | |
kernel.core_uses_pid = 1 | |
net.bridge.bridge-nf-call-ip6tables = 0 | |
net.bridge.bridge-nf-call-iptables = 0 | |
net.bridge.bridge-nf-call-arptables = 0 | |
kernel.msgmnb = 65536 |
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
version: '2' | |
services: | |
kodexplorer: | |
image: 'baiyuetribe/kodexplorer' | |
restart: always | |
environment: | |
- [email protected] | |
- VIRTUAL_HOST=cloud.domain.com | |
- VIRTUAL_PORT=80 |
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 | |
# | |
# ossfs Automount Aliyun OSS Bucket in the specified direcotry. | |
# | |
# chkconfig: 2345 90 10 | |
# description: Activates/Deactivates ossfs configured to start at boot time. | |
# put into /etc/init.d/ossfs | |
# chmod a+x /etc/init.d/ossfs | |
# chkconfig ossfs on |
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
vm.swappiness = 0 | |
kernel.sysrq = 1 | |
net.ipv4.neigh.default.gc_stale_time = 120 | |
# see details in https://help.aliyun.com/knowledge_detail/39428.html | |
net.ipv4.conf.all.rp_filter = 0 | |
net.ipv4.conf.default.rp_filter = 0 | |
net.ipv4.conf.default.arp_announce = 2 | |
net.ipv4.conf.lo.arp_announce = 2 |
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
openssl genrsa -out domain.key 2048 | |
openssl req -new -key domain.key -out domain.csr | |
openssl x509 -req -in domain.csr -signkey domain.key -out domain.crt |
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
### Basic ### | |
# The directory to store the downloaded file. | |
dir=${HOME}/Downloads | |
# Downloads the URIs listed in FILE. | |
input-file=${HOME}/.aria2/aria2.session | |
# Save error/unfinished downloads to FILE on exit. | |
save-session=${HOME}/.aria2/aria2.session | |
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0 | |
save-session-interval=60 | |
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5 |
NewerOlder