-
Notifications
You must be signed in to change notification settings - Fork 1
/
test2
75 lines (67 loc) · 2.14 KB
/
test2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Title: Optimized Proxmox Setup Guide
This guide provides a streamlined process for setting up Proxmox, including customization and useful utilities. Follow these steps to get started:
Download Proxmox from the official website and create a bootable USB drive using Rufus with the DD option. Avoid creating software RAID on physical RAID.
After installation, resize the disk to suit your needs and allow full disk utilization:
bash
Copy code
lvremove /dev/pve/data
lvresize -l +100%FREE /dev/pve/root
resize2fs /dev/mapper/pve-root
Update and upgrade the system, and perform cleanup:
bash
Copy code
mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
echo deb http://download.proxmox.com/debian/pve buster pve-no-subscription > /etc/apt/sources.list
apt-get update && apt-get upgrade -y
apt-get dist-upgrade -y
apt-get autoclean
apt-get autoremove -y
Install useful utilities:
bash
Copy code
apt-get install htop tmux fail2ban samba speedtest-cli net-tools ntfs-3g ifupdown2 hdparm
Change the SSH port to 2299 and enable root login:
bash
Copy code
sed -i 's/#Port 22/Port 2299/' /etc/ssh/sshd_config
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl restart ssh
Configure Fail2Ban for SSH:
bash
Copy code
cp /etc/fail2ban/fail2ban.conf /etc/fail2ban/fail2ban.local
cat << EOF > /etc/fail2ban/jail.local
[DEFAULT]
ignoreip = 127.0.0.1/8
bantime = 600
findtime = 600
maxretry = 3
[sshd]
enabled = true
port = 2299
EOF
systemctl restart fail2ban
Set up Samba:
bash
Copy code
# Add your configuration to /etc/samba/smb.conf
systemctl restart smbd
Update Proxmox templates:
bash
Copy code
pveam update
Backup GRUB:
bash
Copy code
rsync -avh --progress /boot/grub /path/to/backup
Configure GPU passthrough (follow the detailed steps in the original guide).
Set up NIC bonding (follow the detailed steps in the original guide).
Install MegaCLI for RAID management:
bash
Copy code
# Follow the detailed steps in the original guide
Test I/O speed with hdparm:
bash
Copy code
hdparm -tT --direct /dev/sda
The original guide also includes a list of useful VMs, MegaCLI cheats, and Observium cheats.