- partitions
- use the tool of your choice (fdiks/gdisks/parted)
- gdisk p1 +1M EF02 (bios boot)
- filesystems
mkfs -t <fs-type> /dev/<partition>
- mount partitions on /mnt
- setup network
ip address add <IP>/<CIDR> dev eth0ip route add default via <GW>- add dns in /etc/resolve.conf
This file contains hidden or 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 | |
| rm /etc/ssh/ssh_host_* | |
| dpkg-reconfigure openssh-server | |
| systemctl restart sshd |
This file contains hidden or 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 | |
| sudo apt update && apt update -yqq && apt dist-upgrade -yqq | |
| sudo apt install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc -yqq | |
| sudo apt install kernel-package -yqq | |
| wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.8.tar.xz | |
| unxz linux-4.9.8.tar.xz | |
| wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.8.tar.sign | |
| gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 38DBBDC86092693E | |
| gpg2 --verify linux-4.9.8.tar.sign | |
| tar xvf linux-4.9.8.tar |
This file contains hidden or 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 | |
| # openvpn-install.sh original from https://github.com/Nyr/openvpn-install | |
| # OpenVPN road warrior installer for Debian, Ubuntu and CentOS | |
| # This script will work on Debian, Ubuntu, CentOS and probably other distros | |
| # of the same families, although no support is offered for them. It isn't | |
| # bulletproof but it will probably work if you simply want to setup a VPN on | |
| # your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and | |
| # universal as possible. |
This file contains hidden or 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 | |
| #create_vhost_httpd.sh in Centos7 | |
| #Variables | |
| host=$1 | |
| port="80" | |
| location="/var/www/html" | |
| error_log="/var/log/httpd/${host}-error_log" | |
| access_log="/var/log/httpd/${host}-access_log common" | |
| #Résolution de nom locale | |
| echo "127.0.0.1 ${host}" >> /etc/hosts |
This file contains hidden or 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 | |
| #create_vhost_httpds.sh in Centos7 | |
| #Variables | |
| host=$1 | |
| port="443" | |
| location="/var/www/html" | |
| error_log="/var/log/httpd/${host}-error_log" | |
| access_log="/var/log/httpd/${host}-access_log common" | |
| #Résolution de nom locale | |
| echo "127.0.0.1 ${host}" >> /etc/hosts |
This file contains hidden or 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 | |
| ip4="192.168.168" | |
| ip6="fd00:168:168" | |
| lan="eth0" | |
| wan="eth1" | |
| 1_interfaces () { | |
| cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| NM_CONTROLLED="no" |
This file contains hidden or 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 | |
| # | |
| # This version uses September 2016 rpi jessie image, please use this image | |
| # | |
| network="10.0.0" | |
| if [ "$EUID" -ne 0 ] | |
| then echo "Must be root" | |
| exit | |
| fi |
This file contains hidden or 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 | |
| ## 1. Set variables | |
| SITE="blog1" | |
| ZONE="example.com" | |
| MAIL="root@example.com" | |
| CF_TOKEN="your_api" | |
| ## Do not touch any others | |
| CF_EMAIL=$MAIL | |
| CF_ZONE=$ZONE |
This file contains hidden or 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 | |
| download_install_virt-scripts () { | |
| cd | |
| apt-get -y install git | |
| git clone https://github.com/goffinet/virt-scripts | |
| cd virt-scripts | |
| ./autoprep.sh | |
| } |