Server OS & Initial Setup
When activating a new cloud server, choose between preconfigured application images or a clean Linux distribution. Familiar users should pick an image with JDK 11+, MySQL 8+, and an optional FTP/SFTP integration for a fast environment setup; avoid paid mirror options unless explicitly required. Those new to deployment workflows should select a minimal CentOS 7/8 or Ubuntu 20.04/22.04 blank image to practice full-stack environment configuration—experience here directly translates to interview readiness for hands-on deployment questions.
For existing servers needing a reset, stop all active processes first, then select "Reinstall Operating System" from the cloud provider’s instance dashboard and pick a suitable option.
Secure Remote Access
Use SSH for remote server management instead of web-based consoles for efficiency. The default SSH port is 22, which most providers pre-open in the security group (firewall rules). Connect via a local terminal (macOS/Linux) or PuTTY/Windows Terminal (Windows):
ssh admin@45.79.182.31 -p 22
If a "Host key verification failed" error appears, remove outdated client-side cached authentication data:
ssh-keygen -R 45.79.182.31
Reconnect, type yes when prompted to confirm the new host key, and enter your server access password to log in.
Preconfigured images often store default credentials (MySQL, FTP/SFTP) in /root/default_accounts.txt; blank images require manual JDK, MySQL, and server software installation and configuration.
Security Group Configuration
By default, most cloud providers only open SSH (22), ICMP (-1), and RDP (3389) ports. Add inbound/outbound rules for your application’s HTTP/HTTPS ports (e.g., 9090, 443, 80), and any database ports if needed (restrict data base port access to trusted IPs only for security). Save the rules and reboot the server to apply changes.
Project Selection & Local Setup
A lightweight personal blog with clean architecture, well-commented code, modern Java syntax, and standard project structure works best for entry-level/intermediate interviews. Clone a maintained open-source blog repository:
git clone https://github.com/halo-dev/halo.git
The project uses Gradle by default, but Gradle Wrapper scripts are included, so no local Gradle installation is required for building. For Maven-preferred users, many forks exist that convert the build system—search GitHub for "halo blog maven build" to find one.
Building with Gradle Wrapper
Navigate to the project root directory and run:
# macOS/Linux
./gradlew clean bootJar
# Windows
gradlew.bat clean bootJar
The resulting executable JAR file will be saved to build/libs/halo-exec.jar.
File Transfer to Server
Use SFTP via terminal or FileZilla for file transfer. Terminal example using SFTP:
scp -P 22 ./build/libs/halo-exec.jar admin@45.79.182.31:/opt/blog-app/
Deploying & Running the Application
SSH back into the server, create a dedicated directory for persistent data (e.g., /opt/blog-data/), and run the JAR with custom configuration overrides:
mkdir -p /opt/blog-data
cd /opt/blog-app
java -jar halo-exec.jar --halo.work-dir=/opt/blog-data --server.port=9090
To keep the application running after closing the SSH session, use nohup or a process manager like systemd:
nohup java -jar halo-exec.jar --halo.work-dir=/opt/blog-data --server.port=9090 > /opt/blog-app/app.log 2>&1 &
Accessing the Application
Open a browser and visit http://45.79.182.31:9090 to complete the initial blog setup (admin account creation, database configuration, etc.). The project includes core blog features: post management, category/tag organization, comment moderation, theme customization, and basic API endpoints for future extension.
For further interview enhancement ideas include adding Redis caching for frequently accessed content, integrating a CDN for static assets, or refactoring small modules to practice refactoring practices or add unit/integration tests.