Complete Guide: Koha Library Management System Setup
Step-by-step installation and configuration tutorial
Prerequisites
- Ubuntu/Debian-based Linux system
- Root or sudo access
- Existing Koha installation
- MySQL/MariaDB database server
- Basic command-line knowledge
Installation Steps
First, switch to the root user to ensure you have the necessary permissions for installation.
sudo suInstall Apache web server and required PHP modules for the application to function properly.
sudo apt-get install -y git php libapache2-mod-php php-{bcmath,bz2,intl,gd,mbstring,mysql,zip}Change to the Koha OPAC directory where we'll clone the InOut repository.
cd /usr/share/koha/opac/htdocsClone the InOut module from GitHub repository.
git clone https://github.com/omkar2403/inout.gitConfigure file permissions to allow Apache to read and write to the InOut directory.
sudo chmod 777 -R inout
sudo chown www-data:www-data -R inoutDatabase Configuration
Access the MySQL command-line interface.
mysql -u root -pCreate a new database for the InOut module.
CREATE DATABASE libinout;Create a dedicated user for the InOut database.
CREATE USER 'libinout'@'localhost' IDENTIFIED BY 'Libinout@123';Assign necessary permissions to the database user.
GRANT ALL PRIVILEGES ON *.* TO 'libinout'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;Exit MySQL after granting privileges:
exit;Import the database schema and sample data from the SQL file.
mysql -u root -p libinout < /usr/share/koha/opac/htdocs/inout/DB/inout.sqlUpdate the database connection file with your credentials.
nano /usr/share/koha/opac/htdocs/inout/functions/dbconn.phpUpdate the following parameters:
- Database username
- Database password
- Database name
Save and exit: Press Ctrl+X, then Y, then Enter
Reload and restart Apache to apply all changes.
sudo systemctl reload apache2 && systemctl restart apache2Navigate to the login page in your web browser.
http://your-server-address/inout/login.phpTroubleshooting
Login Issues?
If you're unable to login with the default credentials, follow these steps to reset the password:
mysql -u root -pUSE libinout;First, set a temporary password:
UPDATE users SET pass='your_password' WHERE username='your_username';Then, encrypt it with SHA1:
UPDATE users SET pass=SHA1('your_password') WHERE username='your_username';Conclusion
Congratulations! You've successfully installed and configured the Koha InOut module. Make sure to change default passwords and secure your installation before deploying to production.
Comments
Post a Comment