Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #USE IT IN COMMAND LINE (without #):
- #apt-get update; apt-get -y install curl
- #curl http://pastebin.com/raw/VJw8vmTa | sed 's/\r//g' > proxmoxinit.sh
- #sh proxmoxinit.sh
- export HOME=/root
- echo "export HOME=/root" >> $HOME/.bashrc
- #echo "export SHELL=/bin/bash" >> $HOME/.bashrc
- sed -i 's/#\ You/export SHELL=\/bin\/bash #/g' $HOME/.bashrc
- sed -i 's/# alias/alias/g' $HOME/.bashrc
- sed -i 's/# export/export/g' $HOME/.bashrc
- sed -i 's/# eval/eval/g' $HOME/.bashrc
- sed -i 's/# PS1/PS1/g' $HOME/.bashrc
- sed -i 's/# unmask/unmask/g' $HOME/.bashrc
- . $HOME/.bashrc
- sed -i 's/hammer/jewel/' /etc/apt/sources.list.d/ceph.list
- echo "deb http://download.proxmox.com/debian jessie pve-no-subscription" >> /etc/apt/sources.list
- echo "#deb http://download.proxmox.com/debian jessie pvetest" >> /etc/apt/sources.list
- sed -i 's/^deb/#deb/g' /etc/apt/sources.list.d/pve-enterprise.list
- apt-get update
- apt-get dist-upgrade -y
- apt-get install -y curl iotop vim git lm-sensors sg3-utils mc ethtool wpagui wireless-tools bonnie++ iperf sysv-rc-conf
- sed -i 's/DEFAULT="quiet"/DEFAULT="quiet intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pci=realloc"/g' /etc/default/grub
- update-grub
- echo "#etc/modules: kernel modules to load at boot time" > /etc/modules
- echo vfio >> /etc/modules
- echo vfio_iommu_type1 >> /etc/modules
- echo vfio_pci >> /etc/modules
- echo vfio_virqfd >> /etc/modules
- echo "deb http://www.deb-multimedia.org jessie main non-free" >>/etc/apt/sources.list.d/mint.list
- apt-get update
- apt-get install -y --force-yes deb-multimedia-keyring
- apt-get update
- apt-get dist-upgrade -y
- apt-get update
- apt-get autoremove -y
- apt-get install -y mate-desktop-environment xorg lightdm
- apt-get install -y X11vnc
- apt-get install -y firefox-esr-l10n-pl
- apt-get install -y openvswitch-switch
- #KONFIGURACJA HOSTS AKTUALNYMI IP SERWERÓW KLUSTERA
- server="proxmox"
- host01="1"
- host02="2"
- host03="3"
- host04="4"
- echo "127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4" > /etc/hosts
- echo "192.168.0.5${host01} ${server}${host01}" >> /etc/hosts
- echo "192.168.0.5${host02} ${server}${host02}" >> /etc/hosts
- echo "192.168.0.5${host03} ${server}${host03}" >> /etc/hosts
- echo "192.168.0.5${host04} ${server}${host04}" >> /etc/hosts
- echo "10.10.10.1${host01} osd${host01}" >> /etc/hosts
- echo "10.10.10.1${host02} osd${host02}" >> /etc/hosts
- echo "10.10.10.1${host03} osd${host03}" >> /etc/hosts
- echo "10.10.10.1${host04} osd${host04}" >> /etc/hosts
- pveceph install -version jewel
- apt-get dist-upgrade -y
- #JEŚLI MASZ SAMBĘ
- [ ! -d /mnt/SambaShare ] && mkdir /mnt/SambaShare
- #echo "//192.168.10.22/Images /mnt/SambaShare cifs username=piotr,password=ad_1234,auto 0 0" >> /etc/fstab
- echo "mount /mnt/SambaShare/" >> /etc/rc.local
- sed -i 's/exit/\#exit/g' /etc/rc.local
- echo "exit 0" >> /etc/rc.local
- chmod 755 /etc/rc.local
- update-rc.d rc.local defaults
- update-rc.d rc.local enable
- cat << __EOF__ > /etc/systemd/system/rc-local.service
- [Unit]
- Description=/etc/rc.local Compatibility
- ConditionPathExists=/etc/rc.local
- After=network.target
- [Service]
- Type=forking
- ExecStart=/etc/rc.local start
- TimeoutSec=0
- StandardOutput=tty
- RemainAfterExit=yes
- SysVStartPriority=99
- [Install]
- WantedBy=multi-user.target
- __EOF__
- systemctl enable rc-local
- [ ! -d /etc/ceph ] && mkdir /etc/ceph
- ln -sfn /etc/pve/ceph.conf /etc/ceph/ceph.conf
- /etc/init.d/kmod start
- update-rc.d kmod enable
- curl ix.io/client > /usr/local/bin/ix
- chmod +x /usr/local/bin/ix
- #dodaj użytkownika do logowania, potem w gui stwórz go z opcją PAM Linux i możesz mu nadać prawa
- adduser guest
- adduser guest users
- #passwd guest
- ##########################################################################################
- #przez GUI skonfiguruj linux bridge z eth2 (tylko autostart ustawiony)
- #ustaw NIC1 10.10.10.0 network
- #cat /etc/network/interfaces*
- #restart serwer i sprawdź ssh osd? w /etc/hosts w razie potrzeby /etc/init.d/networking restart
- #na proxmox1 uruchom
- #pvecm create kluster
- #pvecm help
- #pvecm status
- #pvecm nodes
- #pvecm add proxmox1 # po zalogowaniu ssh na innych od proxmox1 serwerach dołącz je do klustera
- #ewentualnie loguj się przez ssh do proxmox2-? i wykonuj powyższe komendy
- #od teraz bez hasła logowanie ssh proxmox?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement