Vlssu Blog Technical Guides

website·Indexed 31 days ago

https://blog.vlssu.com/

A collection of technical tutorials and notes covering Linux system administration, server deployment, and software installation. Topics include installing Python 3.10, Java 8, and Node.js; configuring Nginx, Apache mod_remoteip, and MySQL; and deploying Minecraft servers using MCSM8 and Pterodactyl. It also features guides on using VuePress for blogging and setting up Flarum and Nextcloud.

Tokens
24.9K
Snippets
178
Records
214
Agent score
54%

What's inside Vlssu Blog

  1. Select the correct frp binary for your operating system

    When downloading frp from the official releases, choose the binary that matches your operating system and CPU architecture. Common mappings include:

    • darwin_amd64: macOS
    • linux_amd64: Linux 64-bit (x64)
    • linux_386: Linux 32-bit (x86)
    • windows_amd64: Windows 64-bit (x64)
    • windows_386: Windows 32-bit (x86)
    • linux_arm / linux_arm64: ARM architecture processors
    • linux_mips / linux_mipsle: MIPS architecture (big-endian/little-endian)
  2. Prerequisites for installing Pterodactyl Panel

    Pterodactyl Panel is a complex system that requires root access to the web server and a fundamental understanding of Linux system administration. It is not a 'drag-and-drop' service and requires the administrator to manage multiple dependencies. Users are advised to read the documentation thoroughly rather than blindly copying and pasting commands.
  3. Retrieve visitor IP addresses behind a CDN using mod_remoteip

    When a website uses a CDN, the server logs typically record the CDN's IP address instead of the visitor's. To resolve this in Apache, use the mod_remoteip (or mod_rpaf) module to extract the original visitor IP from the X-Forwarded-For HTTP header.
  4. Verify Go installation on Linux

    Verify that Go is correctly installed and the PATH is configured by checking the Go version. A successful installation will output the version string and the target architecture (e.g., go version go1.18 linux/amd64).
    go version
  5. Prerequisites for installing Pterodactyl Panel

    Pterodactyl Panel is a complex system that runs on your own web server. To install and operate the panel, you must have root access to the server and a fundamental understanding of Linux system administration. It is not a 'drag-and-drop' service and requires the installation of multiple dependencies.
  6. Install Aliyun CLI on Linux (AMD64)

    To install the Aliyun CLI on a Linux system with AMD64 architecture, download the latest compressed archive from the official Aliyun CDN, extract the binary, and move it to a directory in your system PATH (such as /usr/local/bin).
    wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
    tar xzvf aliyun-cli-linux-latest-amd64.tgz
    cp aliyun /usr/local/bin
  7. Install Java 8 for Minecraft servers

    Minecraft servers typically require Java 8. Use the following commands based on your operating system. On Ubuntu, if multiple Java versions are installed, use update-alternatives to set the default version.
    # CentOS
    yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel
    
    # Ubuntu
    apt install openjdk-8-jdk
    # Switch default Java version on Ubuntu
    sudo update-alternatives --config java
  8. Deploy Pterodactyl Panel files and dependencies

    1. Create a site in BT-Panel.
    2. Download the panel archive: https://github.com/pterodactyl-china/panel/releases/latest/download/panel.tar.gz (or use https://ghfast.top/ as a proxy).
    3. Upload and extract panel.tar.gz to the site directory.
    4. Rename .env.example to .env.
    5. Install dependencies via BT-Panel's Composer tool: Upgrade Composer to the latest version and run the following command in the 'Additional Commands' field:
    composer install --no-dev --optimize-autoloader
  9. Install Python 3.9 from source on Ubuntu 20.04

    For users who need to compile Python 3.9 from source, follow these steps: install the required build dependencies, download the source archive, configure the installation prefix (e.g., /usr/local/python3 to ensure SSL support for pip3), and compile the binary.
    # 1. Install build dependencies
    sudo apt update
    sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
    
    # 2. Download source package
    cd /opt
    sudo wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz
    
    # 3. Extract and Compile
    # (Assuming extraction to Python3.9.6/)
    cd Python3.9.6/
    ./configure --prefix=/usr/local/python3
    make
    sudo make install
  10. Set up Node.js environment for MCSManager

    MCSManager requires Node.js. It is recommended to use NVM (Node Version Manager) to manage versions. This guide uses Node.js v16.14.0.
    # Install Git
    yum install git -y # (CentOS)
    apt install git # (Ubuntu)
    
    # Install NVM
    git clone https://github.com/creationix/nvm.git ~/nvm
    echo "source ~/nvm/nvm.sh" >> ~/.bashrc
    source ~/.bashrc
    
    # Install and use Node.js v16
    nvm install v16.14.0
    nvm use v16.14.0
  11. Run MCSManager in the background using screen

    To prevent the panel from closing when the terminal session ends, use screen to create a persistent background session.
    # Install screen
    yum install screen # CentOS
    apt install screen # Ubuntu
    
    # Create a session named mcsm and start the panel
    screen -S mcsm
    sudo npm start
    
    # To re-attach to the session later
    screen -r mcsm
  12. Enable code block copying with vuepress-plugin-nuggets-style-copy

    Install vuepress-plugin-nuggets-style-copy to provide a 'Copy' button for code blocks. This is particularly useful if you are using a copyright plugin that otherwise interferes with text selection.
    npm install vuepress-plugin-nuggets-style-copy --save
    // /.vuepress/config.js
    ["vuepress-plugin-nuggets-style-copy", 
      {
        copyText: "复制代码",
        tip: {
          content: "复制成功!"
        }
      }
    ],