无显示器环境下通过SSH在HP Pavilion m9047c上安装Ubuntu Server作为Minecraft服务器的可行性咨询
无显示器环境下通过SSH在HP Pavilion m9047c上安装Ubuntu Server作为Minecraft服务器的可行性咨询
Hey there! Awesome call repurposing that old HP Pavilion m9047c as a Minecraft server—this is totally doable even without a working display port. Let’s walk through the steps using the gear you already have: your Windows PC, USB drive, and that box of miscellaneous cords.
准备工作
- Grab your USB drive (make sure it’s at least 4GB, and back up any data on it first—we’ll be formatting it)
- On your Windows computer, download the latest Ubuntu Server LTS image (22.04 LTS is a rock-solid pick for server stability)
- Dig up an Ethernet cable from your cord stash—wired connection is way easier to set up without a display, so we’ll use this to hook the HP PC to your router
制作Ubuntu Server安装U盘
- Use a free Windows tool like Rufus to write the Ubuntu Server image to your USB drive:
- Open Rufus, select your USB drive from the device dropdown
- Click "Select" and choose the Ubuntu Server ISO you downloaded
- Under "Image option", pick "DD Image" (this ensures the drive boots correctly for headless server installation)
- Click "Start" and wait for the process to finish—don’t interrupt it!
提前配置SSH(无显示器必备关键步骤)
Since we can’t see the setup screen, we’ll add a config file to the USB drive so Ubuntu auto-sets up SSH and a user for us:
- After Rufus finishes, open the USB drive in Windows File Explorer
- Create a plain text file named
user-data(make sure there’s no.txtextension at the end) - Paste this content into the file, replacing the placeholders with your details:
#cloud-config users: - name: your-custom-username passwd: $6$rounds=4096$your-hashed-password sudo: ALL=(ALL) NOPASSWD:ALL shell: /bin/bash ssh: allow-pw: true install-server: true - To get the hashed password: Open Windows PowerShell, run
openssl passwd -6, enter your desired password when prompted, then copy the long string it outputs into thepasswdfield above.
启动HP PC并开始安装
- Plug the USB drive into the HP Pavilion m9047c, then connect it to your router with the Ethernet cable
- Power on the HP PC—if it doesn’t boot from the USB drive automatically, restart it and repeatedly press F10 (HP’s usual BIOS key; if that fails, try Esc or F9) to open the boot menu, then select the USB drive
- The server will install automatically in the background. Give it 5-10 minutes to finish up.
连接到Ubuntu Server via SSH
- On your Windows PC, open your router’s admin page (usually at
192.168.1.1or192.168.0.1—check your router’s label if you’re unsure) - Look for the list of connected devices—you’ll see a device named
ubuntuor matching the HP’s MAC address. Note down its IP address. - Open Windows PowerShell and run this command (replace the placeholders):
Enter the password you set earlier, and you’ll be logged into your Ubuntu Server!ssh your-custom-username@[the-ip-you-noted]
系统初始化与Minecraft Server搭建
- First, update the system to get all the latest security patches:
sudo apt update && sudo apt upgrade -y - Install Java—Minecraft 1.17+ requires Java 17, so run:
sudo apt install openjdk-17-jre-headless -y - Download the Minecraft Server JAR file:
- Go to the official Minecraft website, copy the direct download link for the server JAR
- Back in your SSH session, run
wget [paste-the-download-link-here]to grab the file
- First run & EULA agreement:
- Start the server with this command (adjust the memory values based on your HP’s RAM—if it has 8GB, try
Xmx6G Xms3G):java -Xmx4G -Xms2G -jar server.jar nogui - The server will stop after a few seconds, generating an
eula.txtfile. Edit it with:
Changenano eula.txteula=falsetoeula=true, then pressCtrl+Oto save,Ctrl+Xto exit.
- Start the server with this command (adjust the memory values based on your HP’s RAM—if it has 8GB, try
- Restart the server, and you’re ready to play!
额外 Tips
- To make the Minecraft server start automatically when the HP PC boots, you can set up a systemd service—just let me know if you need help with that!
- If you want to access the server from outside your home network, you’ll need to set up port forwarding on your router (forward port 25565 to the HP’s IP address)
备注:内容来源于stack exchange,提问作者Evan Reineck
相关产品推荐
相关产品推荐

