Repository navigation
Installation Guide
Kavindu Sahan Silva edited this page Oct 24, 2025
·
2 revisions
Complete guide to installing and setting up HealthFirst Hospital Management System.
| Software | Version | Download Link |
|---|---|---|
| β Java JDK | 11+ | Oracle JDK |
| ποΈ MySQL | 8.0+ | MySQL Downloads |
| π¦ Maven | 3.6+ | Maven Downloads |
| π» IDE | Latest | IntelliJ IDEA |
| π§ Git | Latest | Git Downloads |
- RAM: Minimum 4GB (8GB recommended)
- Storage: At least 2GB free space
- OS: Windows 10+, macOS 10.14+, or Linux
# Check Java version
java -version
# Should show: java version "11.x.x" or higher
# Check Maven version
mvn -version
# Should show: Apache Maven 3.6.x or higher
# Check MySQL
mysql --version
# Should show: mysql Ver 8.0.x# Clone the repository
git clone https://github.com/IT24102083/hospital-management-system.git
# Navigate to project directory
cd hospital-management-system
# Verify files
ls -la# Login to MySQL
mysql -u root -p
# Create database
CREATE DATABASE IF NOT EXISTS hospital_management;
# Verify database creation
SHOW DATABASES;
# Exit MySQL
exit;- Open MySQL Workbench
- Connect to your local MySQL server
- Create new schema:
hospital_management - Execute the
data.sqlfile fromsrc/main/resources/
# Import sample data
mysql -u root -p hospital_management < src/main/resources/data.sql
# Verify data import
mysql -u root -p -e "USE hospital_management; SHOW TABLES;"-
Open configuration file:
nano src/main/resources/application.properties
-
Update database credentials:
spring.datasource.url=jdbc:mysql://localhost:3306/hospital_management?createDatabaseIfNotExist=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true spring.datasource.username=root spring.datasource.password=YOUR_MYSQL_PASSWORD
-
Configure email settings:
spring.mail.username=your-email@gmail.com spring.mail.password=your-app-password
π‘ Tip: Generate Gmail App Password at Google Account Security
-
Set upload directory:
app.upload.dir=uploads/medicines
# Clean and build
mvn clean install
# Skip tests for faster build (optional)
mvn clean install -DskipTestsExpected Output:
[INFO] BUILD SUCCESS
[INFO] Total time: 45.234 s
mvn spring-boot:runjava -jar target/hospital-management-system-0.0.1-SNAPSHOT.jar- Open project in IntelliJ IDEA
- Wait for Maven dependencies to download
- Locate
HospitalManagementSystemApplication.java - Right-click β Run 'HospitalManagementSystemApplication'
-
Check console output:
Started HospitalManagementSystemApplication in X.XXX seconds -
Access application:
- Open browser: http://localhost:8080
- You should see the landing page
-
Test login:
- Username:
admin - Password:
password
- Username:
-- Login to MySQL
mysql -u root -p hospital_management
-- Check tables
SHOW TABLES;
-- Verify user data
SELECT * FROM users LIMIT 5;# Check logs for email service initialization
tail -f logs/application.log | grep "mail"# Check if directory exists
ls -la uploads/medicines/
# Create if not exists
mkdir -p uploads/medicines
chmod 755 uploads/medicines# Find process using port 8080
lsof -i :8080
# Kill the process (replace PID)
kill -9 <PID>
# Or change port in application.properties
server.port=8081# Try adding these parameters
spring.datasource.url=jdbc:mysql://localhost:3306/hospital_management?allowPublicKeyRetrieval=true&useSSL=false# Clear Maven cache
rm -rf ~/.m2/repository
# Rebuild
mvn clean install -U# Fix permissions
sudo chmod -R 755 uploads/
sudo chown -R $USER:$USER uploads/# Pull latest changes
git pull origin main
# Rebuild
mvn clean install
# Restart application# Stop the application (Ctrl+C)
# Drop database
mysql -u root -p -e "DROP DATABASE hospital_management;"
# Remove project directory
cd ..
rm -rf hospital-management-system- βοΈ Configuration Guide - Detailed configuration options
- π§ Initial Setup - First-time setup wizard
- π¨ββοΈ Admin Guide - Learn to manage the system
- Always use environment variables for sensitive data
- Keep your MySQL password secure
- Regularly backup your database
- Monitor application logs for errors
Need Help? Troubleshooting Guide | FAQ