Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- instal debian buster + proxmox 6 (for easy storage and partition in proxmox)
- =======================
- ##### 1. instal debian buster iso minimal, partition : #####
- /root
- swap
- /var/lib/vz
- ## select install :
- + ssh server
- + standart system utilities
- ##### 2. Enable root login over SSH: #####
- ## As root, edit the sshd_config file in /etc/ssh/sshd_config :
- nano /etc/ssh/sshd_config.
- ## Add a line :
- PermitRootLogin yes
- ## Save the updated /etc/ssh/sshd_config file. Then restart the SSH server:
- service sshd restart.
- ##### 3. remote via ssh, login as root #####
- ## if temporary want use proxy apt :
- export http_proxy=http://10.20.30.253:3128
- ## for remove proxy, edit file in /etc/apt/apt.conf , remove line proxy on there
- ## change repo indo :
- nano /etc/apt/sources.list
- ## disable all line, then add :
- ###
- deb http://mirror.poliwangi.ac.id/debian/ buster main contrib non-free
- deb http://mirror.poliwangi.ac.id/debian/ buster-updates main contrib non-free
- deb http://mirror.poliwangi.ac.id/debian-security/ buster/updates main contrib non-free
- ###
- ## add repo proxmox :
- echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
- wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
- chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
- ## If use AMD Carizo proci,
- apt remove pve-firmware proxmox-ve
- apt remove firmware-amd-graphics
- ## install some package tools
- apt update && apt install net-tools mlocate ntfs-3g lshw samba cifs-utils build-essential intel-microcode -y
- ## install proxmox
- apt dist-upgrade
- apt install proxmox-ve postfix open-iscsi
- ## Instal firmware rtl nic if needed
- apt install firmware-linux-nonfree
- apt remove os-prober
- reboot
- ### add sensor cpu temperature on webfig
- see : https://www.gaoxiaobo.com/web/server/69.html
- ## remove kernel debian if needed
- apt remove linux-image-amd64 linux-image-4.*.*-*-amd64
- update-grub
- ##### 4a. If need add disk ntfs to host : #####
- blkid
- mkdir /mnt/windows
- mount -t ntfs-3g /dev/sdc1 /mnt/windows
- ## auto mount via /etc/fstab
- blkid
- # /dev/sdb5: LABEL="BACKUP" UUID="01D0AD16CA0C16A0" TYPE="ntfs" PARTUUID="60db9826-05"
- # add line to /etc/fstab
- UUID=01D0AD16CA0C16A0 /mnt/windows ntfs-3g defaults 0 0
- ##### 4b. Mount host folder to container lxc
- # edit /etc/pve/nodes/data/lxc/xxx.conf , ten add line
- lxc.mount.entry: /storage/share/share storage/share none bind,create=dir,optional 0 0
- ##### 5. If need add disk passtrough vm #####
- ls -l /dev/disk/by-id | grep ata-
- # lrwxrwxrwx 1 root root 9 Dec 22 05:04 ata-ST1000DM010-2DM162_Z4YFAQ56 -> ../../sdc
- ## add to kvm (100 is ID VM, ata-xxx is name from ls):
- qm set 100 -virtio3 /dev/disk/by-id/ata-ST1000DM010-2DM162_Z4YFAQ56
- update VM 100: -virtio3 /dev/disk/by-id/ata-ST1000DM010-2DM162_Z4YFAQ56
- # OR, edit manual from /etc/pve/nodes/proxmox/qemu-server/***.conf
- ##### 6. if need mount samba from other pc as storage directory, or from vm share to host #####
- ## assumed samba server is //data/share , can be //IP_Address/share
- mkdir /storage/samba
- mount -t cifs //10.20.30.200/MOVIE-OP /home/user/server/movie/ -o guest,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm
- # OR
- mount -t cifs -o vers=3,username=none,password=none '\\10.20.30.200\MOVIE-OP\movie1' /mnt
- ## auto mount via /etc/fstab
- //10.20.30.200/MOVIE-OP /home/user/server/movie/ cifs guest,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0
- ###### 7. Add audio to vm
- # ADD this line to /etc/pve/nodes/proxmox/qemu-server/***.conf
- args: -device AC97,addr=0x18
- # or
- args: -device intel-hda,id=sound5,bus=pci.0,addr=0x18 -device hda-micro,id=sound5-codec0,bus=sound5.0,cad=0 -device hda-duplex,id=sound5-codec1,bus=sound5.0,cad=1
- ###### 8. Networking config /etc/network/interfaces #####
- auto lo
- iface lo inet loopback
- allow-hotplug enp2s0
- auto enp2s0
- iface enp2s0 inet manual
- dns-nameservers 10.20.30.99
- dns-search amanah.biz
- # dns-* options are implemented by the resolvconf package, if installed
- auto vmbr0
- # bridge nic enp2s0
- iface vmbr0 inet static
- address 10.20.30.234
- netmask 255.255.255.0
- gateway 10.20.30.99
- bridge_ports enp2s0
- bridge_stp off
- bridge_fd 0
- auto vmbr1
- #private sub network
- iface vmbr1 inet static
- address 10.10.10.1
- netmask 255.255.255.0
- bridge_ports none
- bridge_stp off
- bridge_fd 0
- post-up echo 1 > /proc/sys/net/ipv4/ip_forward
- post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
- post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o enp2s0 -j MASQUERADE
- post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
- post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o enp2s0 -j MASQUERADE
- ### 8. Set debian as gateway
- nano /etc/sysctl.conf
- # uncomment line bellow
- net.ipv4.ip_forward=1
- # create nat iptables to rc.local
- iptables -t nat -A POSTROUTING -o enps0 -j MASQUERADE
- ### 9. sample samba config, see : https://pastebin.com/NMvjhmxD
- nano /etc/security/limits.conf
- And add at the end:
- * - nofile 16384
- root - nofile 16384
- ############################################
- ## 10. if need debian desktop :
- apt-get install lxde xorg chromium synaptic --no-install-recommends
- ## auto login :
- nano /etc/lightdm/lightdm.conf
- [Seat:*]
- autologin-user=user
- ## for root login
- nano /etc/pam.d/lightdm-autologin
- change:
- auth required pam_succeed_if.so user != root quiet_success
- to:
- auth required pam_succeed_if.so user != anything quiet_success
- ## 10. FINISH
- Extra :
- https://nubcakes.net/index.php/2019/03/05/how-to-add-storage-to-proxmox/
- https://www.cyberciti.biz/faq/linux-list-network-cards-command/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement