cat > run.sh << 'EndOfScript' cat > /etc/apt/sources.list << 'EoT' deb http://repos.uclv.edu.cu/debian stretch main contrib # security updates deb http://repos.uclv.edu.cu/debian-security stretch/updates main contrib EoT cat > /etc/apt/sources.list.d/pve-enterprise.list << 'EoT' deb http://repos.uclv.edu.cu/proxmox stretch pve-no-subscription EoT cat > /etc/apt/sources.list.d/ceph-uclv.list << 'EoT' deb http://repos.uclv.edu.cu/proxmox/ceph-luminous stretch main EoT apt-get update apt-get -y dist-upgrade apt-get -y install screen mc sudo tmux rdate iptraf tcpdump atop htop iotop aptitude net-tools munin-node #Creación de alias cat << 'EoT' >> /etc/bash.bashrc alias ll='ls -al --color=yes' EoT rdate -n 10.12.1.50 cat >> /etc/network/interfaces << 'EoT' auto vmbr101 iface vmbr101 inet manual bridge_ports eno2.101 bridge_stp off bridge_fd 0 bridge_vlan_aware yes # red 10.12.1.x auto vmbr1 iface vmbr1 inet manual bridge_ports eno2 bridge_stp off bridge_fd 0 bridge_vlan_aware yes # generico para usar con vlan tag auto vmbr222 iface vmbr222 inet manual bridge_ports eno2.222 bridge_stp off bridge_fd 0 bridge_vlan_aware yes # internet auto vmbr5 iface vmbr5 inet manual bridge_ports eno2.5 bridge_stp off bridge_fd 0 bridge_vlan_aware yes # backbone auto vmbr254 iface vmbr254 inet manual bridge_ports eno2.254 bridge_stp off bridge_fd 0 bridge_vlan_aware yes # gestion EoT timedatectl set-ntp false apt-get install ntpdate cat > /etc/default/ntpdate << 'EoT' # The settings in this file are used by the program ntpdate-debian, but not # by the upstream program ntpdate. # Set to "yes" to take the server list from /etc/ntp.conf, from package ntp, # so you only have to keep it in one place. NTPDATE_USE_NTP_CONF=yes # List of NTP servers to use (Separate multiple servers with spaces.) # Not used if NTPDATE_USE_NTP_CONF is yes. NTPSERVERS="10.12.1.250" #0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org" # Additional options to pass to ntpdate NTPOPTIONS="" EoT ntpdate -v 10.12.1.250 cat <<EoT >/etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. /usr/sbin/ntpdate 10.12.1.250 exit 0 EoT chmod +x /etc/rc.local systemctl daemon-reload systemctl start rc-local systemctl status rc-local EndOfScript chmod +x ./run.sh ./run.sh