Proxmox VE Installation and VM Setup Guide

Answered using GPT-4o Mini by GPT4oMini.app

Question:

explain the steps on the following:

  1. Install Proxmox VE for my actual server, and set internal ip address to 192.168.1.0

  2. In the server, create two Virtual Machines.

  • One Application VM for running Ubuntu and PHP applications and set internal ip address to 192.168.1.1.
  • Another Database VM for managing the MariaDB database set internal ip address to 192.168.1.2.
  1. Establish two subdirectories under the Application VM.
  • One for the internet application system named edge.
  • One for the web application system named platform.
  1. Create two databases in the MariaDB under the Database VM.
  • One for the internet application system.
  • One for the web application system.
Answer:

Here’s a step-by-step guide to install Proxmox VE, create virtual machines, set up directories, and create databases as per your requirements.

Step 1: Install Proxmox VE

  1. Download Proxmox VE ISO:

  2. Create a Bootable USB:

    • Use a tool like Rufus (Windows) or Etcher (Linux/Mac) to create a bootable USB drive with the Proxmox VE ISO.
  3. Boot from USB:

    • Insert the USB drive into your server and boot from it. You may need to change the boot order in the BIOS/UEFI settings.
  4. Install Proxmox VE:

    • Follow the on-screen instructions to install Proxmox VE. Select the target hard drive, configure the country, time zone, and keyboard layout.
    • When prompted for the network configuration, set the internal IP address to 192.168.1.0 (note: typically, you should use a usable IP address like 192.168.1.10 instead of .0).
  5. Complete Installation:

    • Finish the installation and reboot the server. After rebooting, access the Proxmox web interface by navigating to https://192.168.1.0:8006 in your web browser.

Step 2: Create Two Virtual Machines

  1. Log in to Proxmox Web Interface:

    • Use your web browser to log in to the Proxmox web interface.
  2. Create Application VM:

    • Click on "Create VM" in the top right corner.
    • Set a name (e.g., "Application VM") and select the ISO image for Ubuntu.
    • Configure the VM settings (CPU, Memory, Disk).
    • In the "Network" tab, set the network model to "virtio" and assign the internal IP address 192.168.1.1.
    • Complete the VM creation.
  3. Create Database VM:

    • Repeat the process to create another VM for the database.
    • Name it (e.g., "Database VM") and select the ISO image for Ubuntu.
    • Configure the VM settings (CPU, Memory, Disk).
    • In the "Network" tab, set the network model to "virtio" and assign the internal IP address 192.168.1.2.
    • Complete the VM creation.

Step 3: Establish Subdirectories under the Application VM

  1. Access Application VM:

    • Start the Application VM and access it via the console or SSH.
  2. Install Apache and PHP:

    • Update the package list and install Apache and PHP:
      sudo apt update
      sudo apt install apache2 php libapache2-mod-php
      
  3. Create Subdirectories:

    • Navigate to the web root directory:
      cd /var/www/html
      
    • Create the subdirectories:
      sudo mkdir edge platform
      
  4. Set Permissions:

    • Set appropriate permissions for the directories:
      sudo chown -R www-data:www-data edge platform
      sudo chmod -R 755 edge platform
      

Step 4: Create Two Databases in MariaDB under the Database VM

  1. Access Database VM:

    • Start the Database VM and access it via the console or SSH.
  2. Install MariaDB:

    • Update the package list and install MariaDB:
      sudo apt update
      sudo apt install mariadb-server
      
  3. Secure MariaDB Installation:

    • Run the security script:
      sudo mysql_secure_installation
      
    • Follow the prompts to set a root password and secure your installation.
  4. Log in to MariaDB:

    • Log in to the MariaDB shell:
      sudo mysql -u root -p
      
  5. Create Databases:

    • Create the databases for the applications:
      CREATE DATABASE internet_app;
      CREATE DATABASE web_app;
      
  6. Exit MariaDB:

    • Exit the MariaDB shell:
      EXIT;
      

Summary

You have now successfully installed Proxmox VE, created two virtual machines (one for applications and one for the database), established subdirectories for your applications, and created two databases in MariaDB. You can now proceed to deploy your applications and connect them to the