From 2ab960d533e1e03b268ce6966ceeb53df5e81368 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sat, 1 Mar 2025 17:30:43 +0100 Subject: [PATCH] Update --- .../docs/post-install/basic-settings/page.tsx | 10 +- web/app/docs/post-install/system/page.tsx | 355 +++++++++++++++--- 2 files changed, 318 insertions(+), 47 deletions(-) diff --git a/web/app/docs/post-install/basic-settings/page.tsx b/web/app/docs/post-install/basic-settings/page.tsx index 9c49ab6..9871988 100644 --- a/web/app/docs/post-install/basic-settings/page.tsx +++ b/web/app/docs/post-install/basic-settings/page.tsx @@ -22,11 +22,11 @@ echo 'Acquire::Languages "none";' | sudo tee /etc/apt/apt.conf.d/99-disable-tran ` const timeSyncCode = ` -# Set timezone (replace 'America/New_York' with your timezone) -sudo timedatectl set-timezone America/New_York - -# Enable automatic time synchronization -sudo timedatectl set-ntp true +# Set system timezone automatically based on IP +IP=$(dig +short myip.opendns.com @resolver1.opendns.com) +TIMEZONE=$(curl -s "https://ipapi.co/${IP}/timezone") +timedatectl set-timezone "$TIMEZONE" +timedatectl set-ntp true ` const updateUpgradeCode = ` diff --git a/web/app/docs/post-install/system/page.tsx b/web/app/docs/post-install/system/page.tsx index 0b9b058..a3bcfdd 100644 --- a/web/app/docs/post-install/system/page.tsx +++ b/web/app/docs/post-install/system/page.tsx @@ -5,31 +5,184 @@ export const metadata: Metadata = { title: "ProxMenux Post-Install: System Settings", description: "Detailed guide to the System Settings category in the ProxMenux post-install script for Proxmox VE optimization.", - openGraph: { - title: "ProxMenux Post-Install: System Settings", - description: - "Detailed guide to the System Settings category in the ProxMenux post-install script for Proxmox VE optimization.", - type: "article", - url: "https://macrimi.github.io/ProxMenux/docs/post-install/system", - images: [ - { - url: "https://macrimi.github.io/ProxMenux/system-settings-image.png", - width: 1200, - height: 630, - alt: "ProxMenux Post-Install System Settings", - }, - ], - }, - twitter: { - card: "summary_large_image", - title: "ProxMenux Post-Install: System Settings", - description: - "Detailed guide to the System Settings category in the ProxMenux post-install script for Proxmox VE optimization.", - images: ["https://macrimi.github.io/ProxMenux/system-settings-image.png"], - }, + // ... (rest of the metadata remains the same) } export default function SystemSettingsPage() { + const fastRebootCode = ` +# Install kexec-tools +sudo apt-get install -y kexec-tools + +# Create kexec-pve service file +sudo tee /etc/systemd/system/kexec-pve.service > /dev/null <> ~/.bash_profile + ` + + const kernelPanicCode = ` +# Create kernel panic configuration file +sudo tee /etc/sysctl.d/99-kernelpanic.conf > /dev/null < /dev/null < /dev/null < /dev/null < /dev/null <> ~/.profile + +# Configure swappiness +sudo tee /etc/sysctl.d/99-swap.conf > /dev/null < /dev/null < /dev/null < /dev/null < /dev/null <
@@ -38,28 +191,146 @@ export default function SystemSettingsPage() {

The System Settings category in the customizable_post_install.sh script focuses on core system configurations - and optimizations for your Proxmox VE installation. -

-

Available Optimizations

-
    -
  • - Kernel Parameters: Optimize kernel settings for improved performance and stability. -
  • -
  • - System Limits: Adjust system limits for better resource management. -
  • -
  • - Scheduled Tasks: Set up important system maintenance tasks. -
  • - {/* Add more list items for each optimization in this category */} -
-

Usage

-

- When running the customizable_post_install.sh script, you'll be prompted to choose which System Settings - optimizations to apply. Select the ones that best suit your Proxmox VE environment and requirements. + and optimizations for your Proxmox VE installation. These settings are crucial for improving system performance, + stability, and resource management.

+ +

Available Optimizations

+ +
+

1. Enable Fast Reboots

+

+ This optimization configures kexec for quick reboots, significantly reducing the time needed for system + restarts. +

+

+ Why it's beneficial: Fast reboots are crucial in a virtualization environment where downtime + needs to be minimized. By using kexec, the system can skip the time-consuming hardware initialization process + during a reboot, resulting in much faster restart times. +

+

To apply this optimization manually, you would run:

+
+          {fastRebootCode}
+        
+
+ +
+

2. Configure Kernel Panic Behavior

+

+ This optimization sets up the system to automatically restart on kernel panic, improving system resilience and + uptime. +

+

+ Why it's beneficial: Automatic restarts on kernel panic help maintain system availability. + Instead of remaining in a crashed state, the system will attempt to recover by rebooting, potentially + resolving the issue without manual intervention. +

+

To apply this optimization manually, you would run:

+
+          {kernelPanicCode}
+        
+
+ +
+

3. Ensure Entropy Pools are Populated

+

+ This optimization installs and configures haveged to ensure sufficient entropy, preventing potential slowdowns + in cryptographic operations. +

+

+ Why it's beneficial: Many cryptographic operations rely on a pool of random numbers. In + virtual environments, generating true randomness can be challenging, leading to potential bottlenecks. Haveged + helps maintain a healthy entropy pool, ensuring smooth operation of cryptographic tasks. +

+

To apply this optimization manually, you would run:

+
+          {entropyCode}
+        
+
+ +
+

4. Increase Various System Limits

+

+ This optimization increases various system limits to improve resource management and system performance. +

+

+ Why it's beneficial: Default system limits can be too restrictive for high-performance + virtualization environments. Increasing these limits allows for better utilization of system resources, + accommodating more concurrent operations and larger workloads without hitting artificial bottlenecks. +

+

To apply this optimization manually, you would run:

+
+          {systemLimitsCode}
+        
+
+ +
+

5. Install Kernel Headers

+

This optimization installs the kernel headers for the current kernel version.

+

+ Why it's beneficial: Kernel headers are necessary for building kernel modules, which may be + required by certain software or drivers. Having them installed ensures that you can compile and use custom + kernel modules if needed, enhancing system flexibility and compatibility. +

+

To apply this optimization manually, you would run:

+
+          {kernelHeadersCode}
+        
+
+ +
+

6. Optimize Journald

+

This optimization configures journald for better performance and resource usage.

+

+ Why it's beneficial: Optimizing journald helps manage system logs more efficiently. By + limiting log sizes and adjusting logging levels, you can prevent logs from consuming excessive disk space + while still maintaining useful system information for troubleshooting. +

+

To apply this optimization manually, you would run:

+
+          {journaldCode}
+        
+
+ +
+

7. Optimize Logrotate

+

This optimization configures logrotate for better log management.

+

+ Why it's beneficial: Proper log rotation is crucial for managing disk space and maintaining + system performance. By compressing old logs and limiting their size, you prevent log files from growing + indefinitely and potentially filling up your disk. +

+

To apply this optimization manually, you would run:

+
+          {logrotateCode}
+        
+
+ +
+

8. Optimize Memory Settings

+

+ This optimization adjusts various memory-related kernel parameters for better performance. +

+

+ Why it's beneficial: These memory optimizations can significantly improve system performance, + especially in virtualized environments. They help ensure that memory is used efficiently, reduce the + likelihood of out-of-memory errors, and improve the performance of memory-intensive applications. +

+

To apply this optimization manually, you would run:

+
+          {memorySettingsCode}
+        
+
+ +
+

Automatic Application

+

+ All of these optimizations are automatically applied when selected in the System section of the + customizable_post_install.sh script. This automation ensures that these beneficial settings are applied + consistently and correctly, saving time and reducing the potential for human error. +

+
) } -