Advertisement
42n4

PROXMOXINIT

Jan 3rd, 2017
636
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.73 KB | None | 0 0
  1. #USE IT IN COMMAND LINE (without #):
  2. #apt-get update; apt-get -y install curl
  3. #curl http://pastebin.com/raw/C8FcBYGz | sed 's/\r//g' > proxmoxinit.sh
  4. #sh proxmoxinit.sh
  5. export HOME=/root
  6. echo "export HOME=/root" >> $HOME/.bashrc
  7. #echo "export SHELL=/bin/bash" >> $HOME/.bashrc
  8. sed -i 's/#\ You/export SHELL=\/bin\/bash #/g' $HOME/.bashrc
  9. sed -i 's/# alias/alias/g' $HOME/.bashrc
  10. sed -i 's/# export/export/g' $HOME/.bashrc
  11. sed -i 's/# eval/eval/g' $HOME/.bashrc
  12. sed -i 's/# PS1/PS1/g' $HOME/.bashrc
  13. sed -i 's/# unmask/unmask/g' $HOME/.bashrc
  14. . $HOME/.bashrc
  15. echo "deb http://download.proxmox.com/debian jessie pve-no-subscription" >> /etc/apt/sources.list
  16. echo "#deb http://download.proxmox.com/debian jessie pvetest" >> /etc/apt/sources.list
  17. sed -i 's/^deb/#deb/g' /etc/apt/sources.list.d/pve-enterprise.list
  18. apt-get update
  19. apt-get dist-upgrade -y
  20. apt-get install -y curl iotop vim git lm-sensors sg3-utils mc ethtool wpagui wireless-tools
  21.  
  22. sed -i 's/DEFAULT="quiet"/DEFAULT="quiet intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pci=realloc"/g' /etc/default/grub
  23. update-grub
  24. echo "#etc/modules: kernel modules to load at boot time" > /etc/modules
  25. echo vfio              >> /etc/modules
  26. echo vfio_iommu_type1  >> /etc/modules
  27. echo vfio_pci          >> /etc/modules
  28. echo vfio_virqfd       >> /etc/modules
  29.  
  30. echo "deb http://www.deb-multimedia.org jessie main non-free" >>/etc/apt/sources.list.d/mint.list
  31. apt-get update
  32. apt-get install -y --force-yes deb-multimedia-keyring
  33. apt-get update
  34. apt-get dist-upgrade -y
  35. apt-get update
  36. apt-get autoremove -y
  37. apt-get install -y mate-desktop-environment xorg lightdm
  38. apt-get install -y X11vnc
  39. apt-get install -y firefox-esr-l10n-pl
  40. apt-get install -y openvswitch-switch
  41.  
  42. #JEŚLI MASZ SAMBĘ
  43. [ ! -d /mnt/SambaShare ] && mkdir /mnt/SambaShare
  44. #echo "//192.168.10.22/Images /mnt/SambaShare cifs username=piotr,password=ad_1234,auto 0 0" >> /etc/fstab
  45. echo "mount /mnt/SambaShare/" >> /etc/rc.local
  46. sed -i 's/exit/\#exit/g' /etc/rc.local
  47. echo "exit 0" >> /etc/rc.local
  48. chmod 755 /etc/rc.local
  49. update-rc.d rc.local defaults
  50. update-rc.d rc.local enable
  51. cat << __EOF__ >  /etc/systemd/system/rc-local.service
  52. [Unit]
  53.  Description=/etc/rc.local Compatibility
  54.  ConditionPathExists=/etc/rc.local
  55.  After=network.target
  56. [Service]
  57.  Type=forking
  58.  ExecStart=/etc/rc.local start
  59.  TimeoutSec=0
  60.  StandardOutput=tty
  61.  RemainAfterExit=yes
  62.  SysVStartPriority=99
  63. [Install]
  64.  WantedBy=multi-user.target
  65. __EOF__
  66. systemctl enable rc-local
  67. /etc/init.d/kmod start  
  68. update-rc.d kmod enable
  69. curl ix.io/client > /usr/local/bin/ix
  70. chmod +x /usr/local/bin/ix
  71. #dodaj użytkownika do logowania, potem w gui stwórz go z opcją PAM Linux i możesz mu nadać prawa
  72. adduser guest
  73. adduser guest users
  74. #passwd guest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement