tag:blogger.com,1999:blog-85009121339047353002024-03-28T14:53:34.437+05:30LIBTECHNOPHILELINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIASTMahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.comBlogger204125tag:blogger.com,1999:blog-8500912133904735300.post-89913999361880583422024-03-25T15:24:00.002+05:302024-03-25T15:29:30.824+05:30Installing Tabula on Debian/Ubuntu<div>Are you tired of manually extracting data from PDFs? Tabula might just be the solution you need. Tabula is an open-source tool designed to extract tables from PDF documents. In this guide, we'll walk you through the process of setting up a Tabula server for seamless PDF data extraction.</div><div><br /></div><div>Step 1: Download Tabula</div><div><br /></div><div>First things first, you'll need to download the Tabula JAR file. Navigate to your preferred directory (for example, /opt) and use wget to download the Tabula JAR file:</div><div><br /></div><div><span style="font-family: courier;"><b>cd /opt && wget https://github.com/tabulapdf/tabula/releases/download/v1.2.1/tabula-jar-1.2.1.zip</b></span></div><div><br /></div><div>Step 2: Install Unzip</div><div><br /></div><div>Once the download is complete, you'll need to install unzip to extract the contents of the ZIP file. You can do this using apt:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt install unzip</b></span></div><div><br /></div><div>Step 3: Unzip Tabula</div><div><br /></div><div>Now, unzip the downloaded Tabula ZIP file:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo unzip tabula-jar-1.2.1.zip</b></span></div><div><br /></div><div>Step 4: Configure Firewall</div><div><br /></div><div>To allow access to the Tabula server, you'll need to open the desired port (default is 8080) on your firewall. For instance, if you're using ufw, you can open port 8080 like so:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo ufw allow 8080/tcp</b></span></div><div><br /></div><div>Step 5: Run Tabula Server</div><div><br /></div><div>Now, you're all set to run the Tabula server. Use the following command:</div><div><br /></div><div><span style="font-family: courier;"><b>java -Dfile.encoding=utf-8 -Xms256M -Xmx1024M -jar tabula/tabula.jar</b></span></div><div><br /></div><div>If you want to run the server in the background, you can use nohup:</div><div><br /></div><div><span style="font-family: courier;"><b>nohup java -Dfile.encoding=utf-8 -Xms256M -Xmx1024M -jar tabula/tabula.jar &</b></span></div><div><br /></div><div>And that's it! Your Tabula server is now up and running, ready to extract tables from PDF documents effortlessly.</div><div><br /></div><div>Access Tabula: <a href="http://127.0.0.1:8080">http://127.0.0.1:8080</a> or your-server-ip:8080</div><div><br /></div><div>Reference: <a href="https://tabula.technology/">https://tabula.technology/</a></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-82682209602028459012024-03-22T15:34:00.003+05:302024-03-22T15:34:23.045+05:30Connecting Debian/Ubuntu VPS from Windows Using RDP<div>Are you seeking a convenient way to access your Ubuntu Virtual Private Server (VPS) from your Windows machine? Remote Desktop Protocol (RDP) offers a seamless solution and setting it up is simpler than you might expect. In this comprehensive guide, we'll take you through each step of the process, ensuring a smooth and hassle-free setup.</div><div><br /></div><div>Install a Desktop Environment on Your VPS</div><div><br /></div><div>Begin by installing a desktop environment on your Ubuntu VPS. We'll use XFCE4 for this purpose:</div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>sudo apt update</b></span></div><div><span style="font-family: courier;"><b>sudo apt install xfce4</b></span></div><div><br /></div><div>Installing xrdp on Ubuntu</div><div><br /></div><div>Next, we'll install xrdp, the RDP server for Linux, on your Ubuntu VPS. Execute the following commands in your terminal:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt update</b></span></div><div><span style="font-family: courier;"><b>sudo apt install xrdp -y</b></span></div><div><span style="font-family: courier;"><b>sudo systemctl status xrdp</b></span></div><div><br /></div><div>These commands will install xrdp and initiate the service. Verify its status to ensure it's running smoothly.</div><div><br /></div><div>Configuring xrdp Port (Optional)</div><div><br /></div><div>By default, xrdp listens for incoming connections on port 3389. If you prefer using a different port for security reasons, follow these steps:</div><div><br /></div><div>Edit the xrdp configuration file using a text editor (e.g., nano):</div><div><br /></div><div><span style="font-family: courier;"><b>sudo nano /etc/xrdp/xrdp.ini</b></span></div><div><br /></div><div>Locate the port directive in the [Globals] section and set your desired value (e.g., port=49952).</div><div><br /></div><div>Restart the xrdp server to apply the changes:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo systemctl restart xrdp</b></span></div><div><br /></div><div>Open a Port for Incoming Traffic in ufw</div><div><br /></div><div>To allow incoming RDP connections through the firewall, follow these instructions:</div><div><br /></div><div>Check the status of the ufw firewall:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo ufw status</b></span></div><div><br /></div><div>If it's inactive, enable it:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo ufw enable</b></span></div><div><br /></div><div>Allow traffic on the desired port (e.g., 49952 for RDP):</div><div><br /></div><div><span style="font-family: courier;"><b>sudo ufw allow 49952/tcp</b></span></div><div><br /></div><div>Feel free to modify the port number if necessary.</div><div><br /></div><div>Reload the ufw firewall to apply the changes:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo ufw reload</b></span></div><div><br /></div><div>Congratulations! You've successfully configured your Ubuntu VPS to accept incoming RDP connections. Now, you can utilize the Remote Desktop client on your Windows machine to connect to your VPS using its IP address and the configured port.</div><div><br /></div><div>Setting up RDP access enhances the manageability of your Ubuntu VPS, enabling you to perform tasks remotely with utmost convenience. Whether you're a developer, system administrator, or simply an enthusiast, this straightforward setup can significantly streamline your workflow and boost productivity.</div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-18163022661864690172024-03-05T15:11:00.000+05:302024-03-05T15:11:25.034+05:30Updating Borrower's WhatsApp Number and Date of Birth in Bulk<div>Manually updating large sets of borrower data can be time-consuming and prone to errors. In this guide, we'll walk through the process of updating WhatsApp numbers (referred to as "phone" in our system) and date of birth for borrowers in Koha using SQL and spreadsheet tools.</div><div><br /></div><div><b>Step 1: Identify Missing Information</b></div><div><br /></div><div>First, we need to identify borrowers with missing date of birth and WhatsApp numbers (phone) in our database. We can do this using a SQL query:</div><div><br /></div><div><span style="font-family: courier;"><b>SELECT </b></span></div><div><span style="font-family: courier;"><b> borrowernumber,</b></span></div><div><span style="font-family: courier;"><b> cardnumber,</b></span></div><div><span style="font-family: courier;"><b> surname,</b></span></div><div><span style="font-family: courier;"><b> phone,</b></span></div><div><span style="font-family: courier;"><b> dateofbirth</b></span></div><div><span style="font-family: courier;"><b>FROM </b></span></div><div><span style="font-family: courier;"><b> borrowers </b></span></div><div><span style="font-family: courier;"><b>WHERE </b></span></div><div><span style="font-family: courier;"><b> dateofbirth IS NULL</b></span></div><div><span style="font-family: courier;"><b>AND phone IS NULL;</b></span></div><div><b><br /></b></div><div><b>Step 2: Save the Report</b></div><div><br /></div><div>Save the results of the SQL query as a report for reference during the update process.</div><div><br /></div><div><b>Step 3: Prepare Spreadsheet or Google Form</b></div><div><br /></div><div>Create a spreadsheet with columns borrowernumber, dateofbirth, and phone or create a Google Form with fields for Cardnumber, Date of Birth, and WhatsApp Number.</div><div><br /></div><div><b>Step 4: VLOOKUP Borrowernumbers</b></div><div><br /></div><div>In the spreadsheet, use the VLOOKUP function to match the cardnumber from the first sheet to the second sheet and retrieve the respective borrowernumber.</div><div><br /></div><div><b>Step 5: Save as <span style="color: red;">update_dob_phone.csv</span></b></div><div><b><span style="color: red;"><br /></span></b></div><div><b><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcF4bKYBjLTq0apGG_vEQcBKuUB3W7s-yoG7ZFMXzX5y19YV0ogdLOaNXd67JdDBewA1IMv1MqaGcDGnDfIDD9Af0wlULXsUAU0EDshCIjzQujvveOIwV4ICFJDhTWlQsWeRtvRAVfiYX0Saghh8yUrdfcvpxPi5Np97VrSqdMK3XiYnkZDn7UOm9gPWg/s547/soffice.bin_hhZwDuSlOQ.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="165" data-original-width="547" height="194" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcF4bKYBjLTq0apGG_vEQcBKuUB3W7s-yoG7ZFMXzX5y19YV0ogdLOaNXd67JdDBewA1IMv1MqaGcDGnDfIDD9Af0wlULXsUAU0EDshCIjzQujvveOIwV4ICFJDhTWlQsWeRtvRAVfiYX0Saghh8yUrdfcvpxPi5Np97VrSqdMK3XiYnkZDn7UOm9gPWg/w640-h194/soffice.bin_hhZwDuSlOQ.png" width="640" /></a></div><br /></b></div><div>Save the updated spreadsheet as a CSV file named update_dob_phone.csv.</div><div><br /></div><div><b>Step 6: Upload CSV File</b></div><div><br /></div><div>Upload the update_dob_phone.csv file into the web server directory /var/www/html.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo cp update_dob_phone.csv /var/www/html</b></span></div><div><br /></div><div><b>Step 7: Update Database</b></div><div><br /></div><div>Now, we'll use SQL to update the borrower information in our database.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo mysql -uroot -pmysqlrootpassword</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>USE koha_library;</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>CREATE TEMPORARY TABLE temp_borrower_data (</b></span></div><div><span style="font-family: courier;"><b> borrowernumber INT,</b></span></div><div><span style="font-family: courier;"><b> dateofbirth DATE,</b></span></div><div><span style="font-family: courier;"><b> phone VARCHAR(20)</b></span></div><div><span style="font-family: courier;"><b>);</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>LOAD DATA INFILE '/var/www/html/update_dob_phone.csv'</b></span></div><div><span style="font-family: courier;"><b>INTO TABLE temp_borrower_data</b></span></div><div><span style="font-family: courier;"><b>FIELDS TERMINATED BY ','</b></span></div><div><span style="font-family: courier;"><b>ENCLOSED BY '"'</b></span></div><div><span style="font-family: courier;"><b>LINES TERMINATED BY '\n'</b></span></div><div><span style="font-family: courier;"><b>IGNORE 1 ROWS;</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>UPDATE borrowers b</b></span></div><div><span style="font-family: courier;"><b>JOIN temp_borrower_data t</b></span></div><div><span style="font-family: courier;"><b>ON b.borrowernumber = t.borrowernumber</b></span></div><div><span style="font-family: courier;"><b>SET b.dateofbirth = t.dateofbirth,</b></span></div><div><span style="font-family: courier;"><b> b.phone = t.phone;</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>DROP TEMPORARY TABLE IF EXISTS temp_borrower_data;</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-60529728882755085542024-02-21T11:41:00.002+05:302024-02-21T11:45:05.989+05:30Creating Custom Pages on Koha OPAC Made Easy with Version 22.11 onwards...<div>Are you tired of struggling with complex code and command-line experience just to create and publish pages on Koha OPAC? Well, fret no more! With the latest versions 22.11 onwards, Koha has made it incredibly easy to create custom pages without any technical expertise required.</div><div><br /></div><div>In the past, users had to navigate through cumbersome processes, editing code within Koha and dealing with command-line operations just to add a simple page. This not only posed a challenge for non-technical users but also consumed valuable time and resources.</div><div><br /></div><div>However, with the introduction of version 22.11, Koha has streamlined the process, making it accessible to everyone. Now, creating and publishing pages on Koha OPAC is as simple as a few clicks.</div><div><br /></div><div>Here's how you can do it:</div><div><br /></div><div>1. Go to Tools >> HTML Customizations >> Pages.</div><div>2. Click on the "New Entry" button.</div><div>3. Select "OPAC" as the Display location.</div><div>4. Enter the publication date and title of the page.</div><div>5. Click on the source code icon to paste your HTML code.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH-CuSssUPVM_VHTt5JJ5j3gMpuhcadM5Zt8pZWHjlDYbgM-R48cWUmemHmnR-8ALIsM9Xry0T2MSbTG3REWK62utI1oBcNjJ5RUiN7gWoFyhgxpB1olkvT3F9IQLK1f7f5mJVF9ih92HBaY6ByroaEHTgKfwXajDO8x3N1XB49xhF2TvpfQp-hooWTAI/s1332/SEUNJtl7rc.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="808" data-original-width="1332" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH-CuSssUPVM_VHTt5JJ5j3gMpuhcadM5Zt8pZWHjlDYbgM-R48cWUmemHmnR-8ALIsM9Xry0T2MSbTG3REWK62utI1oBcNjJ5RUiN7gWoFyhgxpB1olkvT3F9IQLK1f7f5mJVF9ih92HBaY6ByroaEHTgKfwXajDO8x3N1XB49xhF2TvpfQp-hooWTAI/w640-h388/SEUNJtl7rc.png" width="640" /></a></div><div><br /></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXlgmzw0N0y_KSK8dF02oZ6ipGXtRQq2DjAcQNuWoDJ0VTP_rvgqHYqBOSt9C6_UmV3Uh1OLSFNeayIz7Pmr2L5bG3x1faPGM0_m-XIEh3ac8C-2CBtAB8Oala6a9PnT_xdSOq9yh8i9oChxNNO4HbdQaXEwu0YIuBl4Og8V1lFiDglPI6yjVRzMdbWLE/s1564/dSSlbcrlXe.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="394" data-original-width="1564" height="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXlgmzw0N0y_KSK8dF02oZ6ipGXtRQq2DjAcQNuWoDJ0VTP_rvgqHYqBOSt9C6_UmV3Uh1OLSFNeayIz7Pmr2L5bG3x1faPGM0_m-XIEh3ac8C-2CBtAB8Oala6a9PnT_xdSOq9yh8i9oChxNNO4HbdQaXEwu0YIuBl4Og8V1lFiDglPI6yjVRzMdbWLE/w640-h162/dSSlbcrlXe.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">6. Save your changes.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Get the page URL and use wherever you want to use. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB_ec9OBN2L88Evn4xKQhKhW46r7EEvguZo7IjbXiGdwks16PFckhufr78ZZJ_VDZ3ED8D5OOXAE3tOThKrO3ZP3guQm0PJBEWeghtaD8Zb3Fj1fwxy4EI0y-obRFo813R4VpmA8CqdymzwEYod3rHPmxElErjModhvJXQiclN_EiaxlRxQf4W3RfcB2A/s1920/60eFfx9OuL.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB_ec9OBN2L88Evn4xKQhKhW46r7EEvguZo7IjbXiGdwks16PFckhufr78ZZJ_VDZ3ED8D5OOXAE3tOThKrO3ZP3guQm0PJBEWeghtaD8Zb3Fj1fwxy4EI0y-obRFo813R4VpmA8CqdymzwEYod3rHPmxElErjModhvJXQiclN_EiaxlRxQf4W3RfcB2A/w640-h360/60eFfx9OuL.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>That's it! Your custom page is now live on Koha OPAC, ready for users to access and explore. No more struggling with complex code or command-line operations – just simple, intuitive steps to create the pages you need.</div><div><br /></div><div>Whether you're adding announcements, creating guides, or showcasing library events, the new page creation process in Koha version 22.11 makes it easier than ever to customize your OPAC experience.</div><div><br /></div><div>So why wait? Upgrade to Koha version 22.11 today and start creating beautiful custom pages with ease. Say goodbye to technical headaches and hello to a more user-friendly OPAC experience for your library patrons.</div><div><br /></div><div>Reference: <a href="https://koha-community.org/manual/22.11/en/html/tools.html">Tools — Koha Manual 22.11 documentation (koha-community.org)</a></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-81331158337390157302024-02-18T19:35:00.002+05:302024-02-18T19:35:17.459+05:30Installing AnyDesk on Debian/Ubuntu (Versions 12 and 22.04 LTS and Beyond)<div>Installing software on Debian-based systems like Ubuntu has always been straightforward, thanks to the Advanced Packaging Tool (APT). However, recent changes have rendered the traditional method of adding repositories somewhat obsolete, particularly with the deprecation of `apt-key`. In this guide, we'll explore the updated process for installing AnyDesk on the latest Debian and Ubuntu distributions, ensuring smooth operation and future-proof installation.</div><div><br /></div><div>Adding AnyDesk Repository:</div><div><br /></div><div>To begin, we need to add the AnyDesk repository to our system's sources list. However, instead of modifying the main `sources.list` file, which is not recommended, we'll create a separate file in the `<b>/etc/apt/sources.list.d/</b>` directory. This ensures cleaner package management and easier removal if necessary.</div><div><br /></div><div><b><span style="font-family: courier;">sudo apt install -y gnupg2</span></b></div><div><b><span style="font-family: courier;">curl -fsSL https://keys.anydesk.com/repos/DEB-GPG-KEY | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/anydesk.gpg</span></b></div><div><b><span style="font-family: courier;">sudo echo "deb http://deb.anydesk.com/ all main" | sudo tee /etc/apt/sources.list.d/anydesk-stable.list</span></b></div><div><br /></div><div>Updating Package Metadata:</div><div><br /></div><div>Once the repository information is added, we need to update the local cache of package metadata using `apt update`. This step is crucial as it ensures that our system recognizes the packages available from the newly added repository.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt update</b></span></div><div><br /></div><div>Installing AnyDesk:</div><div><br /></div><div>With the repository added and package metadata updated, we can now proceed to install AnyDesk using `apt install`.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt install -y anydesk</b></span></div><div><br /></div><div>By following these steps, installing AnyDesk on Debian and Ubuntu systems becomes a streamlined process. We've adapted to the changes in package management, avoiding deprecated methods like `apt-key` and adhering to best practices by keeping repository configurations separate.</div><div><br /></div><div>Reference: </div><div><a href="https://itsfoss.com/adding-external-repositories-ubuntu/">Installing Packages From External Repositories in Ubuntu (itsfoss.com)</a></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-15828328474054320212023-12-20T16:13:00.017+05:302024-02-17T10:19:01.677+05:30Using JavaScript and jQuery for Minimal Member Entry Form ( Koha 23.05)<div><b>Administration >> System preferences >> IntranetUserJs</b></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Hide the fieldsets and elements//</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">document.addEventListener("DOMContentLoaded", function() {</span></div><div><span style="color: #2b00fe;"> // Find the fieldsets with the classes "rows" and "memberentry_address"</span></div><div><span style="color: #2b00fe;"> const addressFieldset = document.querySelector("#memberentry_address");</span></div><div><span style="color: #2b00fe;"> const altAddressFieldset = document.querySelector("#memberentry_altaddress");</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Find an array of label IDs and corresponding input IDs to hide</span></div><div><span style="color: #2b00fe;"> const elementsToHide = [</span></div><div><span style="color: #2b00fe;"> { labelId: "firstname", inputId: "firstname" },</span></div><div><span style="color: #2b00fe;"> { labelId: "othernames", inputId: "othernames" },</span></div><div><span style="color: #2b00fe;"> { labelId: "phonepro", inputId: "phonepro" },</span></div><div><span style="color: #2b00fe;"> { labelId: "emailpro", inputId: "emailpro" },</span></div><div><span style="color: #2b00fe;"> { labelId: "fax", inputId: "fax" },</span></div><div><span style="color: #2b00fe;"> { labelId: "opacnote", inputId: "opacnote" }, </span></div><div><span style="color: #2b00fe;"> { labelId: "borrowernotes", inputId: "borrowernotes" }, </span></div><div><span style="color: #2b00fe;"> { labelId: "middle_name", inputId: "middle_name" }, </span></div><div><span style="color: #2b00fe;"> { labelId: "initials", inputId: "initials" }, </span></div><div><span style="color: #2b00fe;"> { labelId: "pronouns", inputId: "pronouns" },</span></div><div><span style="color: #2b00fe;"> { labelId: "primary_contact_method", inputId: "primary_contact_method" }, </span></div><div><span style="color: #2b00fe;"> // Add more elements if needed</span></div><div><span style="color: #2b00fe;"> ]; </span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Hide the fieldsets and elements by setting their display property to "none"</span></div><div><span style="color: #2b00fe;"> if (addressFieldset) {</span></div><div><span style="color: #2b00fe;"> addressFieldset.style.display = "none";</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> if (altAddressFieldset) {</span></div><div><span style="color: #2b00fe;"> altAddressFieldset.style.display = "none";</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> elementsToHide.forEach(element => {</span></div><div><span style="color: #2b00fe;"> const label = document.querySelector(`label[for='${element.labelId}']`);</span></div><div><span style="color: #2b00fe;"> const input = document.querySelector(`#${element.inputId}`);</span></div><div><span style="color: #2b00fe;"> const hint = document.querySelector(`#${element.inputId} + .hint`); // Get associated hint element</span></div><div><span style="color: #2b00fe;"> </span></div><div><span style="color: #2b00fe;"> if (label) {</span></div><div><span style="color: #2b00fe;"> label.style.display = "none";</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> if (input) {</span></div><div><span style="color: #2b00fe;"> input.style.display = "none";</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> if (hint) {</span></div><div><span style="color: #2b00fe;"> hint.style.display = "none"; // Hide associated hint</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;">});</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Modify Member Entry Form for "Name" Field</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Changes the label and converts input to uppercase for the "surname" field</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">$(document).ready(function() {</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Change label for the field with name "surname" to "Name" on member entry form page</span></div><div><span style="color: #2b00fe;"> if ($('#pat_memberentrygen').length) {</span></div><div><span style="color: #2b00fe;"> $('label[for="surname"]').text('Name:');</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Convert the value of the "surname" field to Title Case as the user types</span></div><div><span style="color: #2b00fe;"> $('#surname').on('input', function() {</span></div><div><span style="color: #2b00fe;"> var surname = $(this).val();</span></div><div><span style="color: #2b00fe;"> $(this).val(toTitleCase(surname));</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Function to convert a string to Title Case</span></div><div><span style="color: #2b00fe;"> function toTitleCase(str) {</span></div><div><span style="color: #2b00fe;"> return str.replace(/\w\S*/g, function(txt) {</span></div><div><span style="color: #2b00fe;"> return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;">});</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">$(document).ready(function () {</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Change Primary phone label on member details page</span></div><div><span style="color: #2b00fe;"> if ($('#pat_moremember').length) {</span></div><div><span style="color: #2b00fe;"> $('#patron-phone .label').text('WhatsApp Number:');</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Change phone label on member entry form page</span></div><div><span style="color: #2b00fe;"> if ($('#pat_memberentrygen').length) {</span></div><div><span style="color: #2b00fe;"> $('label[for="phone"]').text('WhatsApp number:');</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Add validation for WhatsApp number field</span></div><div><span style="color: #2b00fe;"> $('#phone').prop('required', true);</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Add event listener to validate the entered number format on form submission</span></div><div><span style="color: #2b00fe;"> $('#entryform').submit(function (event) {</span></div><div><span style="color: #2b00fe;"> var enteredNumber = $('#phone').val();</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Validate if the entered number starts with '91'</span></div><div><span style="color: #2b00fe;"> if (!enteredNumber.startsWith('91')) {</span></div><div><span style="color: #2b00fe;"> // Prevent form submission</span></div><div><span style="color: #2b00fe;"> event.preventDefault();</span></div><div><span style="color: #2b00fe;"> // You can display an error message or take appropriate action</span></div><div><span style="color: #2b00fe;"> alert('Please enter a valid WhatsApp number with "91" as the prefix Eg: 919567664972.');</span></div><div><span style="color: #2b00fe;"> // Clear the input or handle the error as needed</span></div><div><span style="color: #2b00fe;"> $('#phone').val('');</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;">}); </span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">/* change sort1 label on member details page */</span></div><div><span style="color: #2b00fe;">if ( $('#pat_moremember').length ) {</span></div><div><span style="color: #2b00fe;"> $('#patron-sort1 .label').text('Designation/Course name:');</span></div><div><span style="color: #2b00fe;">}</span></div><div><span style="color: #2b00fe;">/* change sort1 label on member entry form page */</span></div><div><span style="color: #2b00fe;">if ( $('#pat_memberentrygen').length ) {</span></div><div><span style="color: #2b00fe;"> $('label[for="sort1"]').text('Designation/Course name:');</span></div><div><span style="color: #2b00fe;">}</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">/* change sort2 label on member details page */</span></div><div><span style="color: #2b00fe;">if ( $('#pat_moremember').length ) {</span></div><div><span style="color: #2b00fe;"> $('#patron-sort2 .label').text('Blood group:');</span></div><div><span style="color: #2b00fe;">}</span></div><div><span style="color: #2b00fe;">/* change sort2 label on member entry form page */</span></div><div><span style="color: #2b00fe;">if ( $('#pat_memberentrygen').length ) {</span></div><div><span style="color: #2b00fe;"> $('label[for="sort2"]').text('Blood group:');</span></div><div><span style="color: #2b00fe;">}</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Hide Other phone on member details page</span></div><div><span style="color: #2b00fe;">if ($('#pat_moremember').length) {</span></div><div><span style="color: #2b00fe;"> $('#patron-Other phone').hide();</span></div><div><span style="color: #2b00fe;">}</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Hide Other phone on member entry form page</span></div><div><span style="color: #2b00fe;">if ($('#pat_memberentrygen').length) {</span></div><div><span style="color: #2b00fe;"> $('#Other phone').closest('div').hide();</span></div><div><span style="color: #2b00fe;">}</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> $(document).ready(function () {</span></div><div><span style="color: #2b00fe;"> if ($('#pat_memberentrygen').length > 0) {</span></div><div><span style="color: #2b00fe;"> // Copy card number to userid</span></div><div><span style="color: #2b00fe;"> $("#cardnumber").on("input", function () {</span></div><div><span style="color: #2b00fe;"> var cardNum = this.value;</span></div><div><span style="color: #2b00fe;"> $("#userid").val(cardNum);</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Set password as "Abcd123#"</span></div><div><span style="color: #2b00fe;"> $("#password").val("Abcd123#");</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Set password2 as "Abcd123#"</span></div><div><span style="color: #2b00fe;"> $("#password2").val("Abcd123#");</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;">});</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">//Hide Other Phone //</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">document.addEventListener("DOMContentLoaded", function() {</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Find the <li> elements with the label "Other phone"</span></div><div><span style="color: #2b00fe;"> const otherPhoneLiElements = document.querySelectorAll('li label[for="mobile"]');</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Hide each <li> element with the label "Other phone"</span></div><div><span style="color: #2b00fe;"> otherPhoneLiElements.forEach(liElement => {</span></div><div><span style="color: #2b00fe;"> liElement.parentNode.style.display = "none";</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">});</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">///whatsapp number label cahnge in profile?//</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">$(document).ready(function() {</span></div><div><span style="color: #2b00fe;"> // Update WhatsApp Number label text</span></div><div><span style="color: #2b00fe;"> $('#patron-information .label:contains("Primary phone:")').text('WhatsApp Number');</span></div><div><span style="color: #2b00fe;">});</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">//Alert staff about missing WhatsApp upon checkout//</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Confirm that we're on the "Checking Out" page</span></div><div><span style="color: #2b00fe;">var isCheckingOutPage = /circulation\.pl/.test(window.location.pathname);</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Check if there is a WhatsApp number link on the page</span></div><div><span style="color: #2b00fe;">var hasPhoneNumberLink = $('a[href^="tel:"]').length;</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">if (isCheckingOutPage && hasPhoneNumberLink === 0) {</span></div><div><span style="color: #2b00fe;"> alert('WhatsApp number is missing! Please update it');</span></div><div><span style="color: #2b00fe;">}</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">$(document).ready(function() {</span></div><div><span style="color: #2b00fe;"> // Confirm that we're on the "Checking Out" page</span></div><div><span style="color: #2b00fe;"> var isCheckingOutPage = /circulation\.pl/.test(window.location.pathname);</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Get the value of the date of birth input field</span></div><div><span style="color: #2b00fe;"> var dateOfBirth = $('patrondateofbirth').val().trim(); // Replace '#dateofbirth' with the actual ID or class of your date of birth input field</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> if (isCheckingOutPage && dateOfBirth === '') {</span></div><div><span style="color: #2b00fe;"> alert('Date of birth is missing! Please update it.');</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;">});</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">//Library Closure Widget (v22.05)</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> if ( $('#main_intranet-main').length ) {</span></div><div><span style="color: #2b00fe;"> var branch = $('#logged-in-info-full .logged-in-branch-code').text();</span></div><div><span style="color: #2b00fe;"> $('#container-main .col-sm-3').prepend('<h3 style="padding: 0.3em; margin: 0;"><span class="closures_title">Upcoming closures</span></h3><div id="closures"></div>');</span></div><div><span style="color: #2b00fe;"> $.getJSON("/cgi-bin/koha/svc/report?id=139&sql_params=" + branch + "&sql_params=" + branch + "&sql_params=" + branch + "&sql_params=" + branch + "&sql_params=" + branch + "&sql_params=" + branch + "&sql_params=" + branch, function(data) {</span></div><div><span style="color: #2b00fe;"> let closureData = '<div class="closureData" style="margin: 0.3em; margin-bottom: 1em; background-color:#E6F0F2; opacity:0.75; border-radius:6px; padding:3px; border:2px solid #B9D8D9;">';</span></div><div><span style="color: #2b00fe;"> $.each(data, function(index, value) {</span></div><div><span style="color: #2b00fe;"> var newClosureDate = value[0];</span></div><div><span style="color: #2b00fe;"> console.log(index + '/' + value);</span></div><div><span style="color: #2b00fe;"> newClosureDate = newClosureDate.replace(/-/g,'&#8209;');</span></div><div><span style="color: #2b00fe;"> if(index % 2==0){</span></div><div><span style="color: #2b00fe;"> closureData += '<div class="closureRow" style="display: table-row;">';</span></div><div><span style="color: #2b00fe;"> } else {</span></div><div><span style="color: #2b00fe;"> closureData += '<div class="closureRow" style="display: table-row; background-color:#d5dfe0;">';</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> closureData += '<div style="display: table-cell;"><strong>' + newClosureDate + ':&nbsp;</strong></div><div style="display: table-cell; width: 100%;"><em>' + value[1] + '</em></div></div>';</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;"> closureData += '</div>';</span></div><div><span style="color: #2b00fe;"> $('#closures').html( closureData );</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> //END Library Closure Widget</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Check if two days have passed since the last popup</span></div><div><span style="color: #2b00fe;">function shouldShowPopup() {</span></div><div><span style="color: #2b00fe;"> var lastPopupTime = localStorage.getItem('lastPopupTime');</span></div><div><span style="color: #2b00fe;"> </span></div><div><span style="color: #2b00fe;"> if (!lastPopupTime) {</span></div><div><span style="color: #2b00fe;"> // First time, show the popup</span></div><div><span style="color: #2b00fe;"> return true;</span></div><div><span style="color: #2b00fe;"> } else {</span></div><div><span style="color: #2b00fe;"> // Check if two days have passed since the last popup</span></div><div><span style="color: #2b00fe;"> var twoDaysInMillis = 2 * 24 * 60 * 60 * 1000; // two days in milliseconds</span></div><div><span style="color: #2b00fe;"> var currentTime = new Date().getTime();</span></div><div><span style="color: #2b00fe;"> return (currentTime - lastPopupTime) >= twoDaysInMillis;</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;">}</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Show the popup and update the last popup time in localStorage</span></div><div><span style="color: #2b00fe;">function showPopup() {</span></div><div><span style="color: #2b00fe;"> alert('Ensure WhatsApp Phone Battery');</span></div><div><span style="color: #2b00fe;"> localStorage.setItem('lastPopupTime', new Date().getTime());</span></div><div><span style="color: #2b00fe;">}</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Check if the popup should be shown and display it</span></div><div><span style="color: #2b00fe;">if (shouldShowPopup()) {</span></div><div><span style="color: #2b00fe;"> showPopup();</span></div><div><span style="color: #2b00fe;">}</span></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-17385768480539899962023-12-12T11:40:00.003+05:302023-12-12T11:42:52.718+05:30Koha Upgrade Error: Fixing Invalid Monetary Values in Circulation Rules<div>Upgrading Koha is typically a smooth process, but occasionally, users may encounter errors that require manual intervention. One such issue involves an error related to the "overduefinecap" rule in the circulation rules during the upgrade process. This blog post helps you identify and resolve this specific problem.</div><div><br /></div><div>Error Description:</div><div><br /></div><div><span style="color: #2b00fe;">Bug 33028 - Fix wrongly formatted values for monetary values in circulation rules </span></div><div><span style="color: #2b00fe;">ERROR - {UNKNOWN}: Circulation rules contain invalid monetary values: </span></div><div><span style="color: #2b00fe;">Rule ID: 419 (ALL-TE-BK) Rule: overduefinecap Value: 1,000.00</span></div><div><br /></div><div>The error message indicates that the "overduefinecap" rule contains an invalid monetary value. Specifically, the system expects the value to be '0.00', and if it's different, it can lead to an unsuccessful upgrade.</div><div><br /></div><div>Identifying the Issue:</div><div><br /></div><div>To identify the issue, users are advised to connect to their Koha database and query the circulation rules table. The following SQL command can be used:</div><div><br /></div><div><span style="font-family: courier;"><b>USE koha_library;</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>SELECT * FROM circulation_rules WHERE rule_name = 'overduefinescap';</b></span></div><div><br /></div><div>This command retrieves the existing records for the "overduefinescap" rule, allowing users to verify if the rule's value is different from '0.00'.</div><div><br /></div><div>Fixing the Issue:</div><div><br /></div><div>If the value for the "overduefinescap" rule is not '0.00', the following SQL command can be used to update it:</div><div><br /></div><div><span style="font-family: courier;"><b>UPDATE circulation_rules SET rule_value = '0.00' WHERE rule_name = 'overduefinescap';</b></span></div><div><br /></div><div>This command sets the rule_value to '0.00', aligning it with the expected value.</div><div><br /></div><div>After executing these SQL commands, you can retry the upgrade process for Koha. <span style="color: red;">Ensure that you have a backup of your Koha database before making any changes, as modifying the database directly can have significant consequences if not done correctly</span>. If you're not comfortable with this process, it's advisable to seek assistance from someone with experience in managing Koha installations.</div><div><br /></div><div>Cheers-</div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-22037874255192824602023-11-21T13:59:00.003+05:302023-12-15T07:10:32.401+05:30Streamlining Koha Membership Forms with JavaScript Magic<div style="text-align: justify;">The provided JavaScript code serves a range of functionalities within a Koha membership form, enhancing user experience and optimizing data entry. It includes features such as hiding alternate address and contact form elements to streamline the form's appearance. Additionally, the code sets default values for state and country fields, simplifying the submission process. </div><div><br /></div><div><b>Home > Administration > System preferences > IntranetUserJS </b></div><div><br /></div><div><span style="color: #2b00fe;">// Hiding Alternate Address & Alternate Contact // </span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">document.addEventListener("DOMContentLoaded", function() {</span></div><div><span style="color: #2b00fe;"> // Find the fieldsets with the classes "rows" and "memberentry_address"</span></div><div><span style="color: #2b00fe;"> const addressFieldset = document.querySelector("#memberentry_address");</span></div><div><span style="color: #2b00fe;"> const altAddressFieldset = document.querySelector("#memberentry_altaddress");</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Find an array of label IDs and corresponding input IDs to hide</span></div><div><span style="color: #2b00fe;"> const elementsToHide = [</span></div><div><span style="color: #2b00fe;"> { labelId: "firstname", inputId: "firstname" },</span></div><div><span style="color: #2b00fe;"> { labelId: "othernames", inputId: "othernames" },</span></div><div><span style="color: #2b00fe;"> { labelId: "phonepro", inputId: "phonepro" },</span></div><div><span style="color: #2b00fe;"> { labelId: "emailpro", inputId: "emailpro" },</span></div><div><span style="color: #2b00fe;"> { labelId: "fax", inputId: "fax" },</span></div><div><span style="color: #2b00fe;"> { labelId: "opacnote", inputId: "opacnote" }, // New element to hide</span></div><div><span style="color: #2b00fe;"> { labelId: "borrowernotes", inputId: "borrowernotes" }, // New element to hide</span></div><div><span style="color: #2b00fe;"> // Add more elements if needed</span></div><div><span style="color: #2b00fe;"> ];</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Hide the fieldsets and elements by setting their display property to "none"</span></div><div><span style="color: #2b00fe;"> if (addressFieldset) {</span></div><div><span style="color: #2b00fe;"> addressFieldset.style.display = "none";</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> if (altAddressFieldset) {</span></div><div><span style="color: #2b00fe;"> altAddressFieldset.style.display = "none";</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> elementsToHide.forEach(element => {</span></div><div><span style="color: #2b00fe;"> const label = document.querySelector(`label[for='${element.labelId}']`);</span></div><div><span style="color: #2b00fe;"> const input = document.querySelector(`#${element.inputId}`);</span></div><div><span style="color: #2b00fe;"> const hint = document.querySelector(`#${element.inputId} + .hint`); // Get associated hint element</span></div><div><span style="color: #2b00fe;"> </span></div><div><span style="color: #2b00fe;"> if (label) {</span></div><div><span style="color: #2b00fe;"> label.style.display = "none";</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> if (input) {</span></div><div><span style="color: #2b00fe;"> input.style.display = "none";</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> if (hint) {</span></div><div><span style="color: #2b00fe;"> hint.style.display = "none"; // Hide associated hint</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;">});</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Setting Default Values for State and Country // </span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">document.addEventListener('DOMContentLoaded', function() {</span></div><div><span style="color: #2b00fe;"> // Get the state and country elements in the form</span></div><div><span style="color: #2b00fe;"> var stateElement = document.getElementById('state'); // Replace 'state_field_id' with the actual ID of the state field</span></div><div><span style="color: #2b00fe;"> var countryElement = document.getElementById('country'); // Replace 'country_field_id' with the actual ID of the country field</span></div><div><span style="color: #2b00fe;"> </span></div><div><span style="color: #2b00fe;"> // Set the default values for state and country</span></div><div><span style="color: #2b00fe;"> stateElement.value = 'Kerala';</span></div><div><span style="color: #2b00fe;"> countryElement.value = 'India';</span></div><div><span style="color: #2b00fe;">});</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">// Copy Cardnumber as Username & "Abcd123#" as Default Password //</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">$(document).ready(function () {</span></div><div><span style="color: #2b00fe;"> if ($('#pat_memberentrygen').length > 0) {</span></div><div><span style="color: #2b00fe;"> // Copy card number to userid</span></div><div><span style="color: #2b00fe;"> $("#cardnumber").on("input", function () {</span></div><div><span style="color: #2b00fe;"> var cardNum = this.value;</span></div><div><span style="color: #2b00fe;"> $("#userid").val(cardNum);</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Set password as "Abcd123#"</span></div><div><span style="color: #2b00fe;"> $("#password").val("Abcd123#");</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Set password2 as "Abcd123#"</span></div><div><span style="color: #2b00fe;"> $("#password2").val("Abcd123#");</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;">});</span></div><div><br /></div><div><div><span style="color: #2b00fe;">/////// Add 91 as prefix in WhatsApp Number ////</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">$(document).ready(function() {</span></div><div><span style="color: #2b00fe;"> // Select the input field by its ID</span></div><div><span style="color: #2b00fe;"> var phoneInput = $("#phone");</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> // Attach an event listener for input changes</span></div><div><span style="color: #2b00fe;"> phoneInput.on("input", function() {</span></div><div><span style="color: #2b00fe;"> // Check if the input value starts with "91"</span></div><div><span style="color: #2b00fe;"> if (!phoneInput.val().startsWith("91")) {</span></div><div><span style="color: #2b00fe;"> // If not, add "91" to the beginning of the value</span></div><div><span style="color: #2b00fe;"> phoneInput.val("91" + phoneInput.val());</span></div><div><span style="color: #2b00fe;"> }</span></div><div><span style="color: #2b00fe;"> });</span></div><div><span style="color: #2b00fe;"> });</span></div></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-41733146841587286452023-11-18T14:29:00.004+05:302023-11-18T14:42:53.878+05:30Automating MySQL/MariaDB Query Cache Clearance and BleachBit<div style="text-align: justify;">Maintaining a robust and efficient Linux system involves periodic tasks such as clearing the MySQL/MariaDB query cache and optimizing disk space. In this blog post, we'll guide you through the process of creating a bash script, setting up cron jobs, and integrating BleachBit to automate these essential maintenance routines. By the end of this guide, you'll have a seamlessly automated system that ensures optimal performance and disk space management.</div><div><br /></div><div>Creating the Bash Script:</div><div><br /></div><div>Let's start by crafting a bash script to handle the MySQL query cache clearance. Open your preferred text editor and create a new file named `clear_query_cache.sh`:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo vim /usr/local/bin/clear_query_cache.sh</b></span></div><div><br /></div><div>Insert the following content into the script:</div><div><br /></div><div><span style="color: #2b00fe;">#!/bin/bash</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"># MySQL connection parameters</span></div><div><span style="color: #2b00fe;">MYSQL_USER="</span><span style="color: red;">root</span><span style="color: #2b00fe;">"</span></div><div><span style="color: #2b00fe;">MYSQL_PASSWORD="</span><span style="color: red;">mysqlroot</span><span style="color: #2b00fe;">"</span></div><div><span style="color: #2b00fe;">MYSQL_HOST="</span><span style="color: red;">localhost</span><span style="color: #2b00fe;">"</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"># Clear the query cache</span></div><div><span style="color: #2b00fe;">mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -h$MYSQL_HOST -e "RESET QUERY CACHE;"</span></div><div><br /></div><div>Remember to replace "<span style="color: red;">root</span>" "<span style="color: red;">mysqlroot</span>" and "<span style="color: red;">localhost</span>" with your actual MySQL username, password, and host.</div><div><br /></div><div>Making the Script Executable:</div><div><br /></div><div>Save the script and make it executable by running the following command in your terminal:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo chmod +x /usr/local/bin/clear_query_cache.sh </b></span></div><div><br /></div><div>Configuring Cron Jobs:</div><div><br /></div><div>Now, let's set up a cron job to automate the execution of the script at regular intervals. Open your crontab file for editing:</div><div><br /></div><div><span style="font-family: courier;"><b>crontab -e</b></span></div><div><br /></div><div>Add the following cron job entry to schedule the script to run every day at midnight:</div><div><br /></div><div># Run the script every day at midnight</div><div><span style="font-family: courier;"><b>0 0 * * * /usr/local/bin/clear_query_cache.sh</b></span></div><div><br /></div><div>Automating System Cleanup with BleachBit:</div><div><br /></div><div>BleachBit is a powerful disk space cleaner and system optimizer. Install it using the following command:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt install bleachbit</b></span></div><div><br /></div><div>Now, configure a cron job to run BleachBit every day at 3 AM:</div><div><br /></div><div><span style="font-family: courier;"><b>crontab -e</b></span></div><div><br /></div><div># Run BleachBit every day at 3 AM</div><div><span style="font-family: courier;"><b>0 3 * * * /usr/bin/bleachbit --clean all</b></span></div><div><br /></div><div>You've created a robust Linux system maintenance routine by automating MySQL query cache clearance and using BleachBit for overall system cleanup. Scheduled via cron jobs, this streamlined process optimizes your MySQL database and enhances system performance, freeing you to focus on critical administration tasks.</div><div><br /></div><div>NB: Adjust your cron time</div><div><br /></div><div>References: </div><div><br /></div><div><a href="https://mariadb.com/kb/en/query-cache/">https://mariadb.com/kb/en/query-cache/</a></div><div><a href="https://www.bleachbit.org/">https://www.bleachbit.org/</a></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-5268943826348888172023-11-13T16:26:00.008+05:302023-11-14T14:28:57.644+05:30Setting Up Omeka for Digital Exhibits on Debian/Ubuntu<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV7eaPFOY-QMlm8xBPZHcCtGcDsZtaLHxIK32NsmElZcFbTqp44-JXtJG3ZkKQZeEkyPYf3-suW4Os7MC0t7f9O4kdopbA6gKOjsww0KEvlQnsAGKPBWcnUMdvu2nzHGKGy3j44tLHkAgEGFRQwJ1EDgHnIGc_kRWdMnB-YKVnYM8r5zHo-qtToMLRhwM/s1600/om.jpeg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="789" data-original-width="1600" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV7eaPFOY-QMlm8xBPZHcCtGcDsZtaLHxIK32NsmElZcFbTqp44-JXtJG3ZkKQZeEkyPYf3-suW4Os7MC0t7f9O4kdopbA6gKOjsww0KEvlQnsAGKPBWcnUMdvu2nzHGKGy3j44tLHkAgEGFRQwJ1EDgHnIGc_kRWdMnB-YKVnYM8r5zHo-qtToMLRhwM/w640-h316/om.jpeg" width="640" /></a></div><div><br /></div><div>Omeka is a versatile, open-source content management system designed specifically for creating digital collections and exhibits. In this blog post, we'll walk through the step-by-step process of setting up Omeka on an Debian/Ubuntu server. By the end of this guide, you'll have a fully functional Omeka installation ready to showcase your digital content.</div><div><br /></div><div><div>Step 1: Update and Upgrade System Packages</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt update && sudo apt -y upgrade</b></span></div><div><br /></div><div>Step 2: Install Apache, MariaDB, PHP, and other Dependencies</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt install -y apache2 mariadb-server php imagemagick libapache2-mod-php php-mysqli php-exif php-dom php-solr wget</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span><div>Step 3: <span style="font-family: inherit;">Securing MariaDB</span></div><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;">Run this command to improve the security of the MariaDB installation:</span></div><div style="font-family: courier;"><b><br /></b></div><div style="font-family: courier;"><b>sudo mysql_secure_installation</b></div><div style="font-family: courier;"><b><br /></b></div><div><span style="font-family: inherit;">(The script will prompt you to set up the root user password, remove the anonymous user, restrict root user access to the local machine and remove the test database. In the end, the script will reload the privilege tables ensuring that all changes take effect immediately. All steps are explained in detail and it is recommended to answer “Y” (yes) to all questions.)</span></div></span></div><div><br /></div><div>Step 4: Enable Apache Modules</div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>sudo a2enmod rewrite</b></span></div><div><br /></div><div>Step 5: Configure Apache for Omeka</div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/omeka.conf</b></span></div><div><span style="font-family: courier;"><b>sudo vim /etc/apache2/sites-available/omeka.conf</b></span></div><div><br /></div><div><div><span style="font-family: inherit;">Modify the `DocumentRoot` and `ServerName` to point to your Omeka installation:</span></div><div><span style="font-family: inherit;"><br /></span></div><div><span style="color: #2b00fe; font-family: inherit;">DocumentRoot /var/www/html/</span><span style="color: red; font-family: inherit;">omeka</span></div><div><span style="color: #2b00fe; font-family: inherit;">ServerName </span><span style="color: red; font-family: inherit;">your-domain.com</span></div></div><div><br /></div><div>Add the following block of code just before the `</VirtualHost>` closing tag:</div><div><br /></div><div><span style="color: #2b00fe;"><Directory /var/www/html></span></div><div><span style="color: #2b00fe;"> Options Indexes FollowSymLinks MultiViews</span></div><div><span style="color: #2b00fe;"> AllowOverride All</span></div><div><span style="color: #2b00fe;"> Require all granted</span></div><div><span style="color: #2b00fe;"></Directory></span></div><div><br /></div><div>Step 6: Download and Install Omeka</div><div><br /></div><div><span style="font-family: courier;"><b>cd /var/www/html</b></span></div><div><span style="font-family: courier;"><b>sudo wget https://github.com/omeka/Omeka/releases/download/v3.1.2/omeka-3.1.2.zip</b></span></div><div><span style="font-family: courier;"><b>sudo unzip omeka-3.1.2.zip</b></span></div><div><span style="font-family: courier;"><b>sudo rm omeka-3.1.2.zip</b></span></div><div><span style="font-family: courier;"><b>sudo mv ./omeka-3.1.2/ ./omeka</b></span></div><div><br /></div><div>Step 7: Set Up MariaDB Database</div><div><br /></div><div><span style="font-family: courier;"><b>sudo mysql -uroot -p</b></span></div><div><br /></div><div>Enter your MySQL root password, then execute the following commands:</div><div><br /></div><div><span style="font-family: courier;"><b>CREATE DATABASE <span style="color: #2b00fe;">omeka </span>DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci;</b></span></div><div><span style="font-family: courier;"><b>GRANT ALL PRIVILEGES ON omeka.* TO '<span style="color: #2b00fe;">omeka</span>'@'localhost' IDENTIFIED BY '<span style="color: #2b00fe;">omeka123</span>';</b></span></div><div><span style="font-family: courier;"><b>exit;</b></span></div><div><br /></div><div>Step 8: Configure Omeka Database Settings</div><div><br /></div><div><span style="font-family: courier;"><b>sudo vim /var/www/html/omeka/db.ini</b></span></div><div><br /></div><div>Add the following configuration:</div><div><br /></div><div><span style="color: #2b00fe;">[database]</span></div><div><span style="color: #2b00fe;">host = "localhost"</span></div><div><span style="color: #2b00fe;">username = "omeka"</span></div><div><span style="color: #2b00fe;">password = "omeka123"</span></div><div><span style="color: #2b00fe;">dbname = "omeka"</span></div><div><span style="color: #2b00fe;">prefix = "omeka_"</span></div><div><span style="color: #2b00fe;">charset = "utf8"</span></div><div><br /></div><div>Step 9: Set Permissions for Omeka</div><div><br /></div><div><span style="font-family: courier;"><b>sudo chown -R www-data /var/www/html/omeka/files</b></span></div><div><span style="font-family: courier;"><b>sudo chmod -R 751 /var/www/html/omeka/files</b></span></div><div><br /></div><div>Step 10: Enable Apache Site and Restart Apache</div><div><br /></div><div><span style="font-family: courier;"><b>sudo a2ensite omeka.conf</b></span></div><div><span style="font-family: courier;"><b>sudo systemctl restart apache2</b></span></div></div><div><br /></div><div>Complete the Installation:</div><div><br /></div><div>Visit the admin page for your Omeka installation in your web browser:</div><div><br /></div><div><span style="color: #2b00fe;">http://your-domain.com </span></div><div><br /></div><div>Follow the on-screen instructions to complete the installation.</div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-49139217465662494152023-08-10T21:45:00.005+05:302023-08-10T21:46:34.361+05:30Monitoring WhatsApp Number Updates in Koha<div>In this blog post, I will explore automating the tracking of WhatsApp number updates in your Koha database using triggers, ensuring that your borrower records are always up to date.</div><div><br /></div><div>Understanding the Challenge:</div><div><br /></div><div>Upon integrating my <a href="https://libtechnophile.blogspot.com/2023/07/automating-whatsapp-number-updates-in.html" target="_blank">PHP script</a> with Koha, adding WhatsApp numbers became straightforward for both users and circulation staff. However, a common challenge emerged—managing the timestamps of WhatsApp number updates for our borrowers (how to obtain today's list of WhatsApp-updated patrons?). I desired an automated solution that could seamlessly update the "last updated" timestamp whenever a borrower's WhatsApp number changed. The solution to my challenge lay in employing "triggers" within the database.</div><div><br /></div><div>Setting Up the Foundation:</div><div><br /></div><div>To commence, a few modifications were necessary within the Koha database structure. I introduced a new column named "<b>phone_last_updated</b>" to our existing "borrowers" table. This column would house the timestamp of the latest WhatsApp number update. Initially, I configured the default value as NULL to ensure that pre-existing records remained unaffected.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo mysql -uroot -p<span style="color: red;">mysqlrootpassword</span></b></span></div><div><span style="font-family: courier;"><b>USE koha_library;</b></span></div><div><span style="font-family: courier;"><b>ALTER TABLE borrowers</b></span></div><div><span style="font-family: courier;"><b>ADD COLUMN phone_last_updated TIMESTAMP DEFAULT NULL;</b></span></div><div><br /></div><div>The Magic of Triggers:</div><div><br /></div><div>Now, let's delve into the core of our solution—the trigger. I fashioned a trigger called "<b>tr_borrowers_before_update</b>," set to activate before any update operation on the "borrowers" table. For each updated row, the trigger would examine whether the new WhatsApp number differed from the old one. If a disparity existed, it would automatically update the "phone_last_updated" timestamp to reflect the current date and time.</div><div><br /></div><div><span style="font-family: courier;"><b>DELIMITER //</b></span></div><div><span style="font-family: courier;"><b>CREATE TRIGGER tr_borrowers_before_update</b></span></div><div><span style="font-family: courier;"><b>BEFORE UPDATE ON borrowers</b></span></div><div><span style="font-family: courier;"><b>FOR EACH ROW</b></span></div><div><span style="font-family: courier;"><b>BEGIN</b></span></div><div><span style="font-family: courier;"><b>IF NEW.phone <> OLD.phone THEN</b></span></div><div><span style="font-family: courier;"><b>SET NEW.phone_last_updated = NOW();</b></span></div><div><span style="font-family: courier;"><b>END IF;</b></span></div><div><span style="font-family: courier;"><b>END;</b></span></div><div><span style="font-family: courier;"><b>//</b></span></div><div><span style="font-family: courier;"><b>DELIMITER ;</b></span></div><div><br /></div><div>Real-Time Outcomes:</div><div><br /></div><div>With the trigger in place, the system adeptly tracks updates to WhatsApp numbers. Whenever a borrower's phone number undergoes a modification, the "phone_last_updated" timestamp is automatically refreshed. This real-time functionality guarantees the precision and timeliness of our database records.</div><div><br /></div><div>Querying for Updated WhatsApp Numbers:</div><div><br /></div><div>To harness this timestamp data, I can effortlessly query for updated WhatsApp numbers. The subsequent SQL statement retrieves rows where the "phone_last_updated" timestamp aligns with the current date, aiding us in monitoring recent changes.</div><div><br /></div><div><span style="font-family: courier;"><b>SELECT phone AS 'WhatsApp Number', cardnumber, surname, userid, password, phone_last_updated</b></span></div><div><span style="font-family: courier;"><b>FROM borrowers</b></span></div><div><span style="font-family: courier;"><b>WHERE DATE(phone_last_updated) = CURDATE();</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-13989657997113363412023-07-25T18:23:00.010+05:302023-08-02T17:15:24.765+05:30Automating WhatsApp Number Updates in Koha ILS<div>In this blog post, we will explore a PHP script that automates the process of adding and updating WhatsApp numbers for borrowers in a Koha library management system. Integrating WhatsApp numbers into the borrowers' information by the library users themself can provide an additional means of communication and enhance user engagement.</div><div><br /></div><div><b>WhatsApp Number Validation</b></div><div><br /></div><div>The first step in the process is to validate the provided WhatsApp number. The PHP script uses a regular expression to check if the number consists of ten digits, as WhatsApp numbers typically do. This validation helps ensure that only valid numbers are accepted and entered into the database.</div><div><br /></div><div>If the provided number is invalid, the script displays an error message to the user and redirects them back to the index page, prompting them to re-enter the correct WhatsApp number.</div><div><b><br /></b></div><div><b>Querying the Database</b></div><div><br /></div><div>Once the provided WhatsApp number is validated, the script executes an SQL SELECT query to verify whether the borrower's card number exists in the "borrowers" table of the Koha database. This step is crucial to prevent adding duplicate entries for borrowers with multiple WhatsApp numbers.</div><div><br /></div><div><b>Updating the WhatsApp Number</b></div><div><br /></div><div>If the card number exists in the database and the user-provided WhatsApp number differs from the existing entry (if any), the script proceeds to update the "phone" column using an SQL UPDATE query. This ensures that borrowers have their latest WhatsApp numbers recorded in the database.</div><div><br /></div><div><b>User Feedback and Security</b></div><div><br /></div><div>The script provides informative feedback to the user after attempting to update the WhatsApp number. If the number was successfully updated, the user is informed accordingly. Similarly, if the number remained unchanged due to an existing entry with the same WhatsApp number, the user is notified.</div><div><br /></div><div>Security is emphasized throughout the script. Data sanitization and validation are implemented to prevent potential SQL injection attacks and ensure that only valid data is entered into the database. The use of prepared statements and parameterized queries helps safeguard against common security vulnerabilities.</div><div><br /></div><div><b>Installation and Setup</b></div><div><br /></div><div>Step 1: Install required packages</div><div><br /></div><div>Open a terminal and run the following command to install Apache2, PHP, and other necessary packages:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt update</b></span></div><div><span style="font-family: courier;"><b>sudo apt install apache2 apache2-utils software-properties-common libapache2-mod-php php-{bcmath,bz2,intl,gd,mbstring,mysql,zip,cli,fpm,opcache,xml,curl,intl,xsl,soap,json,apcu,imap,xmlrpc} git</b></span></div><div><br /></div><div>Step 2: Clone the application</div><div><br /></div><div>Navigate to the default web directory and clone the application repository from GitHub:</div><div><br /></div><div><span style="font-family: courier;"><b>cd /usr/share/koha/opac/htdocs</b></span></div><div><span style="font-family: courier;"><b>sudo git clone https://github.com/maheshpalamuttath/wa.git</b></span></div><div><br /></div><div>Step 3: Set appropriate permissions</div><div><br /></div><div>Change the permissions of the cloned directory to make sure the web server can access it:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo chmod 755 -R wa</b></span></div><div><span style="font-family: courier;"><b>sudo chown www-data:www-data -R wa</b></span></div><div><br /></div><div>Step 4: Configure the application</div><div><br /></div><div><div>Please make sure to replace the placeholders in the update_phone.php file with your actual Koha database credentials: </div></div><div><br /></div><div><span style="font-family: courier;"><b>sudo vim /usr/share/koha/opac/htdocs/wa/update_phone.php</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_jSWyZ2yoCpiPP-YoKO3xNjhZf7aIH_DfzcZhOmzLFd-ZYVzIWGSl1CsHMkiuYRDCQEGKipyc9CSoE9TPUFdlyIX5hXpihMu40MsQE21XyFJKCT1WsZU76sHIsjdbeVfnnTZnFjsJcUkiCW4rrrOCl-2tGPdrWt12q770K-p7er3K3OEoZ05xKG_5TYI/s653/WindowsTerminal_s3ryNa2d3n.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="136" data-original-width="653" height="134" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_jSWyZ2yoCpiPP-YoKO3xNjhZf7aIH_DfzcZhOmzLFd-ZYVzIWGSl1CsHMkiuYRDCQEGKipyc9CSoE9TPUFdlyIX5hXpihMu40MsQE21XyFJKCT1WsZU76sHIsjdbeVfnnTZnFjsJcUkiCW4rrrOCl-2tGPdrWt12q770K-p7er3K3OEoZ05xKG_5TYI/w640-h134/WindowsTerminal_s3ryNa2d3n.png" width="640" /></a></div></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div>How to get user credentials ?</div><div><br /></div>To retrieve the user credentials for your Koha library, assuming your instance name is "library," follow these steps:<br /><br /><ul style="text-align: left;"><li>Koha Database Name:<span style="color: red;"> koha_library</span></li><li>Koha Database Username: <span style="color: #ff00fe;">koha_library</span></li><li>The Koha Database Password will be automatically generated during the Koha installation process. To find the password, execute the command below:</li></ul><div><br /></div><div><b><span style="font-family: courier;">sudo koha-passwd library</span></b></div><div><br /></div><div>Step 5: Enable Apache Modules</div><div><br /></div><div>Enable the necessary Apache modules:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo a2enmod php</b></span></div><div><span style="font-family: courier;"><b>sudo a2enmod rewrite</b></span></div><div><br /></div><div>Step 6: Restart Apache</div><div><br /></div><div>Restart the Apache web server to apply the changes:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo systemctl reload apache2 && sudo systemctl restart apache2</b></span></div><div><br /></div><div>Step 7: Access the application</div><div><br /></div><div>Now, you should be able to access the application through your web browser. Open the following URL:</div><div><br /></div><div><a href="http://localhost/wa">http://localhost/wa</a></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7a_gXeAdVU5VDwIUiH1iS-kDj6qqeU2QbyXS12y8noIw5Sasv8eulXREF64_CTdCSG6UjzUoA0jsQr0Fduz6cHADMfKtOE9yEAY4rjjHZvkZVWW_0i2gey22ghjeiWBCxb1xCRykj1oJF5QVG8x4Ne9nTmZ-87i1Kfmh5kts0tXdJTR0TPtnSU_XTryU/s1005/Screenshot%202023-07-26%20at%2019-33-55%20HEARTIAN%20LIB-CONNECT.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="629" data-original-width="1005" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7a_gXeAdVU5VDwIUiH1iS-kDj6qqeU2QbyXS12y8noIw5Sasv8eulXREF64_CTdCSG6UjzUoA0jsQr0Fduz6cHADMfKtOE9yEAY4rjjHZvkZVWW_0i2gey22ghjeiWBCxb1xCRykj1oJF5QVG8x4Ne9nTmZ-87i1Kfmh5kts0tXdJTR0TPtnSU_XTryU/w640-h400/Screenshot%202023-07-26%20at%2019-33-55%20HEARTIAN%20LIB-CONNECT.png" width="640" /></a></div><br /><div>Please note that if you are accessing the server remotely, replace localhost with the server's IP address or domain name.</div><div><br /></div><div>Video Reference:</div><div><br /></div><div><style>
.video-container {
position: relative;
width: 100%;
padding-bottom: 56.25%;
overflow: hidden;
}
.video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
</div>
<body>
<div class="video-container">
<iframe allowfullscreen="" frameborder="0" src="https://www.youtube.com/embed/RbQS8xzXvhQ"></iframe>
</div></body>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-7142834674935966902023-07-24T17:22:00.016+05:302023-11-24T17:20:03.143+05:30Sending Bulk Overdue Notifications from Koha via WhatsApp<div>In today's fast-paced world, libraries are continuously seeking innovative ways to enhance their services and keep their users engaged. Real-time updates and notifications play a vital role in ensuring library users stay informed about events, due dates, and other important updates. In this blog post, we will explore a creative solution for small libraries to leverage WhatsApp as a means of sending bulk overdue notifications to their patrons using the Koha Integrated Library System.<br /><br /><b>Step 1:</b><b>Setting up WhatsApp Business for the Library:</b> </div><div> </div><div>To streamline communication and improve user engagement, the library can obtain a new mobile number dedicated solely to library services. Consequently, the librarian can set up <a href="https://business.whatsapp.com/" target="_blank">WhatsApp Business</a> on his phone and can also link it to other library staff members (currently supporting up to 4 devices simultaneously). This approach can help to facilitate swift responses to user queries and ensure efficient user support without affecting personal WhatsApp.<br /></div><div> </div><div><b>Step 2: Modifying Member Entry Form</b></div><div><br /></div><div>To begin with, the first step is to modify the label "phone" to "WhatsApp Number" in the member entry form in Koha. By doing this, libraries can collect and store WhatsApp Numbers for their patrons effectively.</div><div><br /></div><div>Go to Home > Administration > System preferences > IntranetUserJS, paste the provided code, and save the changes.</div><div><br /></div><div><span style="color: red; font-size: x-small;"><b>///// hide Alternate address /////</b></span></div><div><span style="color: red; font-size: x-small;"><b><br /></b></span></div><div><span style="color: red; font-size: x-small;"><b>document.addEventListener("DOMContentLoaded", function() {</b></span></div><div><span style="color: red; font-size: x-small;"><b> // Find the fieldsets with the classes "rows" and "memberentry_address"</b></span></div><div><span style="color: red; font-size: x-small;"><b> const addressFieldset = document.querySelector("#memberentry_address");</b></span></div><div><span style="color: red; font-size: x-small;"><b> const altAddressFieldset = document.querySelector("#memberentry_altaddress");</b></span></div><div><span style="color: red; font-size: x-small;"><b><br /></b></span></div><div><span style="color: red; font-size: x-small;"><b> // Hide the fieldsets by setting their display property to "none"</b></span></div><div><span style="color: red; font-size: x-small;"><b> if (addressFieldset) {</b></span></div><div><span style="color: red; font-size: x-small;"><b> addressFieldset.style.display = "none";</b></span></div><div><span style="color: red; font-size: x-small;"><b> }</b></span></div><div><span style="color: red; font-size: x-small;"><b> if (altAddressFieldset) {</b></span></div><div><span style="color: red; font-size: x-small;"><b> altAddressFieldset.style.display = "none";</b></span></div><div><span style="color: red; font-size: x-small;"><b> }</b></span></div><div><span style="color: red; font-size: x-small;"><b> });</b></span></div><div><span style="color: red; font-size: x-small;"><b><br /></b></span></div><div><span style="color: red; font-size: x-small;"><b>///// Change Primary phone label on member details page /////</b></span></div><div><span style="color: red; font-size: x-small;"><b><br /></b></span></div><div><span style="color: red; font-size: x-small;"><b>if ( $('#pat_moremember').length ) {</b></span></div><div><span style="color: red; font-size: x-small;"><b> $('#patron-phone .label').text('WhatsApp Number:');</b></span></div><div><span style="color: red; font-size: x-small;"><b>}</b></span></div><div><span style="color: red; font-size: x-small;"><b>/* change sort1 label on member entry form page */</b></span></div><div><span style="color: red; font-size: x-small;"><b>if ( $('#pat_memberentrygen').length ) {</b></span></div><div><span style="color: red; font-size: x-small;"><b> $('label[for="phone"]').text('WhatsApp Number:');</b></span></div><div><span style="color: red; font-size: x-small;"><b>}</b></span></div><div><br /></div><div>By making this simple modification, libraries can now collect and store patrons' WhatsApp numbers, enabling better communication with them.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHvSN4pksTvRVjr7w4XwV_d7anfJLr-oN9A09H3NQZ1NuNsxnPwfbd1L2tN7SUva_DD35177PuU_OeUd7FfrEAB120fPImhM5o9VveyqE-4BvqUeXDnSA5ABAbnyxfonb5df02FWXB7UHb9lBIUPCNXDy6A3uUUDK8R7NmvZD1ZXhtS7ecWJo3n66L3RY/s1259/chrome_gEv6nBJGGV.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="314" data-original-width="1259" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHvSN4pksTvRVjr7w4XwV_d7anfJLr-oN9A09H3NQZ1NuNsxnPwfbd1L2tN7SUva_DD35177PuU_OeUd7FfrEAB120fPImhM5o9VveyqE-4BvqUeXDnSA5ABAbnyxfonb5df02FWXB7UHb9lBIUPCNXDy6A3uUUDK8R7NmvZD1ZXhtS7ecWJo3n66L3RY/w640-h160/chrome_gEv6nBJGGV.png" width="640" /></a></div><div><br /></div><div><b>Step 3: Install WhatsApp Sender Free Bulk Messaging Chrome Extension</b></div><div><br /></div><div>As a cost-effective approach, the next step involves using the "WhatsApp Sender Free Bulk Messaging" Chrome extension. This extension enables the library staff to send messages to multiple patrons simultaneously, ensuring they receive timely notifications about overdue items and other important information.</div><div><br /></div><div>Download the Extension from the Chrome Web Store </div><div><br /></div><div><div><ul style="text-align: left;"><li><a href="https://chrome.google.com/webstore/detail/wa-bulk-message-sender/fhkimgpddcmnleeaicdjggpedegolbkb" target="_blank">WA Bulk Message Sender</a></li><li><a href="https://chrome.google.com/webstore/detail/wasender-free-plugin/heogilejknffekkbjdjmoamaehdblmnc" target="_blank">WASender Free Plugin </a></li></ul></div></div><div><br /></div><div><b>Step 4: Creating Customized SQL Reports from Koha</b></div><div><br /></div><div>In order to generate the necessary data for overdue notifications, library staff can create customized SQL reports from Koha. Two specific reports are discussed here: one for the overdue list and another for books due tomorrow. These reports provide valuable information such as the WhatsApp numbers of patrons, card numbers, surnames, due dates, and book details.</div><div><br /></div><div><i><b>Overdue List Report</b></i></div><div><br /></div><div>The following SQL query generates a report for items that are overdue by more than 30 days:</div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>SELECT</b></span></div><div><span style="font-family: courier;"><b> borrowers.phone AS 'WhatsApp Number',</b></span></div><div><span style="font-family: courier;"><b> borrowers.cardnumber,</b></span></div><div><span style="font-family: courier;"><b> borrowers.surname,</b></span></div><div><span style="font-family: courier;"><b> DATE_FORMAT(issues.date_due, '%d/%m/%Y') AS date_due,</b></span></div><div><span style="font-family: courier;"><b> (TO_DAYS(curdate()) - TO_DAYS(issues.date_due)) AS 'days_overdue',</b></span></div><div><span style="font-family: courier;"><b> items.homebranch,</b></span></div><div><span style="font-family: courier;"><b> GROUP_CONCAT(CONCAT_WS(' - ', items.barcode, items.itype, biblio.title, biblio.author) SEPARATOR ' | ') AS combined_data</b></span></div><div><span style="font-family: courier;"><b>FROM</b></span></div><div><span style="font-family: courier;"><b> borrowers</b></span></div><div><span style="font-family: courier;"><b>LEFT JOIN issues ON (borrowers.borrowernumber = issues.borrowernumber)</b></span></div><div><span style="font-family: courier;"><b>LEFT JOIN items ON (issues.itemnumber = items.itemnumber)</b></span></div><div><span style="font-family: courier;"><b>LEFT JOIN biblio ON (items.biblionumber = biblio.biblionumber)</b></span></div><div><span style="font-family: courier;"><b>WHERE</b></span></div><div><span style="font-family: courier;"><b> (TO_DAYS(curdate()) - TO_DAYS(issues.date_due)) > 30</b></span></div><div><span style="font-family: courier;"><b> AND items.homebranch = <<Branch|branches>></b></span></div><div><span style="font-family: courier;"><b>GROUP BY</b></span></div><div><span style="font-family: courier;"><b> borrowers.cardnumber</b></span></div><div><span style="font-family: courier;"><b>ORDER BY</b></span></div><div><span style="font-family: courier;"><b> borrowers.cardnumber ASC, issues.date_due ASC</b></span></div><div><br /></div><div>Result:</div><div><br /></div><div><i><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2FJvgVlglBHZ8ZasnihSN5oRkGIEHRPAKxWnDti764WesxwIpQhQxHvvVkueHiXRFJHOvS6y4tKqCuAtj_r7VozzoC7wLe5C9rqu9wqFE2vHLzY2yU4lbh2TmddAYDZMOjWjdNRC7Bf5_yC_bjg1o6yzdsYqgUD3ckZi6RenODE9lFKaqkoZ5-HKR_dM/s1561/chrome_VggYs5Fc3g.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="728" data-original-width="1561" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2FJvgVlglBHZ8ZasnihSN5oRkGIEHRPAKxWnDti764WesxwIpQhQxHvvVkueHiXRFJHOvS6y4tKqCuAtj_r7VozzoC7wLe5C9rqu9wqFE2vHLzY2yU4lbh2TmddAYDZMOjWjdNRC7Bf5_yC_bjg1o6yzdsYqgUD3ckZi6RenODE9lFKaqkoZ5-HKR_dM/w640-h298/chrome_VggYs5Fc3g.png" width="640" /></a></div></i></div><div><i><b><br /></b></i></div><div><i><b>Books Due Tomorrow Report</b></i></div><div><br /></div><div>This SQL query generates a report for items due to be returned tomorrow:</div><div><br /></div><div><span style="font-family: courier;"><b>SELECT p.phone AS `WhatsApp Number`,</b></span></div><div><span style="font-family: courier;"><b> p.cardnumber,</b></span></div><div><span style="font-family: courier;"><b> p.surname,</b></span></div><div><span style="font-family: courier;"><b> p.branchcode,</b></span></div><div><span style="font-family: courier;"><b> DATE_FORMAT(DATE(co.date_due), '%d/%m/%Y') AS duedate,</b></span></div><div><span style="font-family: courier;"><b> GROUP_CONCAT(CONCAT_WS(' - ', i.barcode, i.itype, b.title, b.author) SEPARATOR ' | ') AS combined_data</b></span></div><div><span style="font-family: courier;"><b>FROM borrowers p</b></span></div><div><span style="font-family: courier;"><b>LEFT JOIN issues co ON (co.borrowernumber = p.borrowernumber)</b></span></div><div><span style="font-family: courier;"><b>LEFT JOIN items i ON (co.itemnumber = i.itemnumber)</b></span></div><div><span style="font-family: courier;"><b>LEFT JOIN biblio b ON (b.biblionumber = i.biblionumber)</b></span></div><div><span style="font-family: courier;"><b>WHERE DATE(co.date_due) = DATE_ADD(curdate(), INTERVAL 1 DAY)</b></span></div><div><span style="font-family: courier;"><b> AND i.homebranch = <<Branch|branches>></b></span></div><div><span style="font-family: courier;"><b>GROUP BY p.cardnumber, p.surname, p.branchcode, p.sort1, DATE(co.date_due)</b></span></div><div><span style="font-family: courier;"><b>ORDER BY p.surname ASC</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><span style="font-family: "Times New Roman";">Result:</span></span></div><div><span style="font-family: courier;"><span style="font-family: "Times New Roman";"><br /></span></span></div><div><span style="font-family: courier;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-CJ1CXXU0TleBDCRtHvyOSIC98ei9Lbb-CdG_P0VlaGJEkR1OccicnDdZXTZs_Le2QavjkQAkPDB76aqHoSgKViwifKKRVQ542w9UOZUcW1uBvIPOR1HLtS87OeQlzYjVjPbySWGAEmTGv7wGyAyDk3E0OMUAEpHyXGziu-h-AJzvYkik6S6W_Wumpk/s1115/chrome_tN2iZCoqnR.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="330" data-original-width="1115" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-CJ1CXXU0TleBDCRtHvyOSIC98ei9Lbb-CdG_P0VlaGJEkR1OccicnDdZXTZs_Le2QavjkQAkPDB76aqHoSgKViwifKKRVQ542w9UOZUcW1uBvIPOR1HLtS87OeQlzYjVjPbySWGAEmTGv7wGyAyDk3E0OMUAEpHyXGziu-h-AJzvYkik6S6W_Wumpk/w640-h190/chrome_tN2iZCoqnR.png" width="640" /></a></div></span></div><div><b>Step 5: Sending Messages</b></div><div><br /></div><div>At the end of each day, the circulation desk staff can run the appropriate report from Koha and download it. With the WhatsApp Sender Chrome extension, they can attach the downloaded report file (.csv), select a preset message template, and click on the send button. This automated process ensures that each user receives a personalized notification with details of their overdue items or upcoming due dates.</div><div><br /></div><div><i><b>Message Text Template</b></i></div><div><br /></div><div>The following is a sample message template to be added in the WhatsApp Sender Chrome extension:</div><div><br /></div><div><div><span style="color: #2b00fe;">*BOOK OVERDUE* *TOMMORROW*</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">Dear *{{surname}},</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">Your library book(s) is/are overdue. Please return them by tomorrow to avoid late fees.</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">Card Number: {{cardnumber}}</span></div><div><span style="color: #2b00fe;">Library: {{branchcode}}</span></div><div><span style="color: #2b00fe;">Date Due: {{duedate}}</span></div><div><span style="color: #2b00fe;">Book Details: {{combined_data}}</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">For inquiries, contact our library staff.</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">Thank you,</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">-- East Campus Learning Resource center</span></div></div><div><br /></div><div><span style="color: red; font-size: x-small;"><b><br /></b></span></div><div><span style="color: red; font-size: x-small;"><b><br /></b></span></div><div><span style="color: red; font-size: x-small;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgETq1EbDitCTURVUMcMyKEID2Iy0y5sHLUu5h7xPIXV6K45EO8ZDG6ljAQx-TY04B2e2WbdmKGBxfQ_CQqkS9_wVZB0RWIXB4OsVV3BXFOFcdwryBj1a_oC0y1T7ibjNxmjSZjDA1D3tUfava9mGveiF4c2tmNORHoEeA-1XKIBIZ2dP5u4YbeAlue4Zo/s1920/chrome_Kzx1axWivj.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1032" data-original-width="1920" height="344" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgETq1EbDitCTURVUMcMyKEID2Iy0y5sHLUu5h7xPIXV6K45EO8ZDG6ljAQx-TY04B2e2WbdmKGBxfQ_CQqkS9_wVZB0RWIXB4OsVV3BXFOFcdwryBj1a_oC0y1T7ibjNxmjSZjDA1D3tUfava9mGveiF4c2tmNORHoEeA-1XKIBIZ2dP5u4YbeAlue4Zo/w640-h344/chrome_Kzx1axWivj.png" width="640" /></a></div><b><br /></b></span></div><div><b><br /></b></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx3gggc4oNxLWsSJmzv39hGhN769XWLHuyw31byWmuKVEBSpldJ1gl4TxrUj6bbEnpy-TWGCemO4HHNVc0oSZUlmcexF55XbW6Co--j9znG-EOQ5ljUNka7A-EeJJV00q4RxWw8l04QAIMxonepORagmXCXHirWxrU7kU0DCkj7LLyhwBW9UAIA6PTZFU/s600/D1rlIw0sqf.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="600" data-original-width="585" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx3gggc4oNxLWsSJmzv39hGhN769XWLHuyw31byWmuKVEBSpldJ1gl4TxrUj6bbEnpy-TWGCemO4HHNVc0oSZUlmcexF55XbW6Co--j9znG-EOQ5ljUNka7A-EeJJV00q4RxWw8l04QAIMxonepORagmXCXHirWxrU7kU0DCkj7LLyhwBW9UAIA6PTZFU/w624-h640/D1rlIw0sqf.png" width="624" /></a></div><b><br /></b></div><div><b><br /></b></div><div><b>Advantages of the WhatsApp Notification System:</b></div><div><br /></div><div>Implementing this WhatsApp-based notification system offers several advantages:</div><div><br /></div><div><ul style="text-align: left;"><li>Real-Time Updates: Patrons receive timely notifications directly on their WhatsApp, ensuring they stay informed about library events, overdue items, and important updates with attachments.</li><li>No Number Saving Required: Unlike broadcast/group messages, patrons do not need to save the library's WhatsApp number, simplifying the process and ensuring notifications reach everyone.</li><li>Cost-Effective: As a small library, investing in costly APIs for WhatsApp integration might not be feasible. This approach provides an affordable alternative to reach patrons effectively.</li></ul></div><div><br /></div><div>Embracing modern technologies like WhatsApp and integrating them creatively into library services can significantly improve user engagement and satisfaction. By following the step-by-step guide outlined above, small libraries can streamline their overdue notification process and provide a more convenient experience for their patrons. This innovative solution showcases the adaptability and resourcefulness of librarians in today's digital age. So, why wait? Get ready to revolutionize your library's communication with WhatsApp bulk messaging and keep your users connected in real-time!</div><div><br /></div><div><i><span style="font-size: x-small;">Disclaimer: Please ensure that you comply with all applicable privacy laws and regulations while using WhatsApp for communication with library patrons.</span></i></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-77357921003745081312023-05-22T23:25:00.005+05:302023-10-17T14:25:04.813+05:30Simplified Guide: Installing Koha with an Effortless Script<div>Koha, an open-source library management system, offers a comprehensive set of tools to manage library collections, circulation, cataloging, and more. However, for non-tech professionals in the library field, setting up Koha might seem like a daunting task. But fear not! In this step-by-step guide, I will walk you through a script that automates the setup process, making it accessible even for those without technical expertise.</div><div><br /></div><div>Step 1: Prepare the System</div><div><br /></div><div>To get started, you'll need an Debian/Ubuntu-based server. If you don't already have one, consider consulting with your IT department or a system administrator to set it up. Once the server is ready, proceed with the following steps.</div><div><br /></div><div>Step 2: Run the Script</div><div><br /></div><div>Download the "<span style="color: red;">koha_setup.sh</span>" script from <a href="https://drive.google.com/file/d/1SSSYgdwm_VSf81cq50GGpshthCDsnxxL/view?usp=drive_link" target="_blank">here</a> and save it in your preferred location on the server. For example, let's assume you saved it in the "Downloads" directory.</div><div><br /></div><div>Open the terminal on the server.</div><div>Change the directory to the location where you saved the script. In this case, use the following command to navigate to the "Downloads" directory:</div><div><br /></div><div><span style="font-family: courier;"><b>cd Downloads</b></span></div><div><br /></div><div>Next, ensure that the script has executable permissions. Grant executable permissions to the script using the "chmod" command with the "+x" option:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo chmod +x koha_setup.sh</b></span></div><div><br /></div><div>The "sudo" command is used to run the command with administrative privileges, as modifying system files may require them.</div><div><br /></div><div>Once the script has executable permissions, run it by executing the following command:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo ./koha_setup.sh</b></span></div><div><br /></div><div>The <span style="font-family: courier;"><b>"./" </b></span>prefix is used to indicate that the script should be executed from the current directory.</div><div><br /></div><div>Step 3: Set Up Koha Dependencies</div><div><br /></div><div>The script will begin by updating the package lists and upgrading any installed packages on the server. This ensures that the system is up to date with the latest software versions. It will then remove any unnecessary packages to free up disk space.</div><div><br /></div><div>Step 4: Configure the Firewall and Web Server</div><div><br /></div><div>To protect the server, the script installs the UFW firewall and configures it to allow access to the necessary ports. It then proceeds to install the Apache web server, which will serve as the platform for hosting Koha.</div><div><br /></div><div>Step 5: Install Koha and MariaDB Server</div><div><br /></div><div>The script adds the Koha repository to the package sources and updates the package lists accordingly. It then proceeds to install Koha using the apt install command. Concurrently, it installs the MariaDB database server, which will handle the storage and management of library data.</div><div><br /></div><div>Step 6: Configure Koha</div><div><br /></div><div>The script updates the Koha configuration file to use port 8080 instead of the default port 80, ensuring smooth operation alongside the web server. It also creates a Koha instance called "library" to store your library's data.</div><div><br /></div><div>Step 7: Finish the Configuration</div><div><br /></div><div>To enable proper communication between the web server and Koha, the script updates the Apache ports configuration file and enables the necessary Apache modules. It then disables the default Apache site and enables the Koha site. After restarting the services, your Koha installation will be ready to use. Finally, firefox browser will open 127.0.1.1:8080 (Staff interface with web installer) automatically.</div><div><br /></div><div>The script uses the following.</div><div><br /></div><div><b>8080 </b>as the INTRANET PORT</div><div><b>mysqlroot </b>as the MariaDB Root Password</div><div><br /></div><div>Please note that this guide assumes you are using Debian/Ubuntu-based server and have administrative privileges.</div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-34363370633859066552023-04-14T11:42:00.010+05:302023-04-20T15:17:51.336+05:30Installing MRBS on Debian/Ubuntu <p style="text-align: left;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggftQ-4v-Q8lxD--XCd6CHe_l9VYjr3uaiqL8oM2wIyzloDH9fJs2ikVpVj2ZFRVHn_4LIhj6E6ZYXZKMSau9yQMj0NRfWYwG3YuMPyvUdZp7ZZI_U-fMpeO0YW7p-lfs561Rd5rPMESMftgIW8Nraa99_oAOUKeHBUP46aSfzP-NRND56wcxypaYR/s1940/Screenshot%202023-04-19%20at%2017-28-40%20Room%20Booking%20Management%20System.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="947" data-original-width="1940" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggftQ-4v-Q8lxD--XCd6CHe_l9VYjr3uaiqL8oM2wIyzloDH9fJs2ikVpVj2ZFRVHn_4LIhj6E6ZYXZKMSau9yQMj0NRfWYwG3YuMPyvUdZp7ZZI_U-fMpeO0YW7p-lfs561Rd5rPMESMftgIW8Nraa99_oAOUKeHBUP46aSfzP-NRND56wcxypaYR/w640-h312/Screenshot%202023-04-19%20at%2017-28-40%20Room%20Booking%20Management%20System.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>Managing library hall bookings manually for every program conducted by various departments has become a challenging task for me. In my search for a solution, I realized the need for a system that enables teachers and students to book the hall without my intervention. I conducted extensive research to find an effective solution to manage the high demand for our library hall, and my efforts led me to discover MRBS (Meeting Room Booking System), a web-based reservation system that is both free and open-source, capable of handling everything from room booking to resource scheduling.<p style="text-align: left;"><br />Features:<br /><br /></p><ul style="text-align: left;"><li> Web/Intranet based - Available from any workstation through a Browser</li><li> Simple to follow, Web based options and intuitive presentation</li><li> Flexible Repeating Bookings</li><li> Authentication with your existing user database (eg Netware, NT Domain, NIS etc.)</li><li> Ensures that conflicting entries cannot be entered</li><li> Reporting option</li><li> Selectable DAY / WEEK / MONTH views</li><li> Multiple auth levels (read-only, user, admin)</li><li> Support for bookings by time or period - ideal for use in schools/colleges</li><li> Room administrators can be notified of bookings by email</li></ul><p><br />Here are the server specifications I used:<br /><br /></p><ul style="text-align: left;"><li> Operating System: Debian 11</li><li> RAM: 2 GB</li><li> Storage: 10 GB</li><li> SSH connection</li><li> Created a "mrbs" subdomain pointing to the server's IP under the master domain.<br /></li></ul><p> </p><p>If you're ready to get started, let's dive in!<br /><br />Step 1: Update the System<br /><br />Before proceeding with the installation, update your Debian 11 system to the latest version:<br /><br /><span style="font-family: courier;"><b>sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y</b></span><br /><br />Step 2: Install Required Packages<br /><br />To install the required packages, run the following command:<br /><br /><span style="font-family: courier;"><b>sudo apt install -y apache2 apache2-utils software-properties-common mariadb-server mariadb-client php libapache2-mod-php php-mysql php-iconv</b></span></p><p><span style="font-family: inherit;"> </span></p><p><span style="font-family: inherit;">Securing MariaDB<br /><br />Run this command to improve the security of the MariaDB installation:<br /><br /></span><span style="font-family: courier;"><b>sudo mysql_secure_installation</b></span><span style="font-family: inherit;"><br /><br />(The script will prompt you to set up the root user password, remove the anonymous user, restrict root user access to the local machine and remove the test database. In the end, the script will reload the privilege tables ensuring that all changes take effect immediately. All steps are explained in detail and it is recommended to answer “Y” (yes) to all questions.)</span><br /><br />Step 3: Create a Directory for MRBS<br /><br />Create a directory for MRBS in the /var/www/html directory:<br /><br /><span style="font-family: courier;"><b>sudo mkdir /var/www/html/mrbs</b></span><br /><br />Step 4: Download and Extract MRBS<br /><br />Download the latest version of MRBS from the official website:<br /><br /><span style="font-family: courier;"><b>wget https://excellmedia.dl.sourceforge.net/project/mrbs/mrbs/MRBS%201.11.0/mrbs-1.11.0.zip</b></span><br /><br />Extract the MRBS archive to the previously created directory:<br /><br /><span style="font-family: courier;"><b>sudo unzip mrbs-1.11.0.zip -d /var/www/html/mrbs</b></span><br /><br />Step 5: Copy Configuration File<br /><br />Copy the sample configuration file to the MRBS web directory:<br /><br /><span style="font-family: courier;"><b>sudo cp /var/www/html/mrbs/web/config.inc.php-sample /var/www/html/mrbs/web/config.inc.php</b></span><br /><br />Step 6: Set Permissions<br /><br />Set the permissions for the MRBS web directory:<br /><br /><span style="font-family: courier;"><b>sudo chown -R www-data:www-data /var/www/html/mrbs/web<br />sudo chmod -R 755 /var/www/html/mrbs/web</b></span><br /><br />Step 7: Create a Virtual Host<br /><br />Create a virtual host for MRBS:<br /><br /><span style="font-family: courier;"><b>sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/mrbs.conf<br />sudo nano /etc/apache2/sites-available/mrbs.conf</b></span><br /><br />In the editor, update the configuration file as follows:<br /><br /><span style="color: #2b00fe;"><VirtualHost *:80><br /> ServerAdmin admin@yourdomain.com<br /> ServerName </span><span style="color: red;">mrbs.yourdomain.com</span><span style="color: #2b00fe;"><br /> DocumentRoot /var/www/html/mrbs/web<br /><br /> <Directory </span><span style="color: red;">/var/www/html/mrbs/web</span><span style="color: #2b00fe;">><br /> Options Indexes FollowSymLinks MultiViews<br /> AllowOverride All<br /> Order allow,deny<br /> allow from all<br /> </Directory><br /><br /> ErrorLog ${APACHE_LOG_DIR}/mrbs_error.log<br /> CustomLog ${APACHE_LOG_DIR}/mrbs_access.log combined<br /></VirtualHost></span><br /><br />Disable the default Apache virtual host and enable the MRBS virtual host:<br /><br /><span style="font-family: courier;"><b>sudo a2dissite 000-default.conf<br />sudo a2ensite mrbs.conf</b></span><br /><br />Restart the Apache webserver to apply the changes:<br /><br /><span style="font-family: courier;"><b>sudo systemctl reload apache2 && sudo systemctl restart apache2</b></span><br /><br />Step 8: Create a Database and User<br /><br />To store the MRBS data, we need to create a new database and user in MariaDB. Here are the steps to create a database and user:<br /><br />Log in to the MariaDB shell as root:<br /><br /><span style="font-family: courier;"><b>sudo mysql -uroot -p</b></span><br /><br />Create a new database and user for MRBS:<br /><br /><span style="font-family: courier;"><b>CREATE DATABASE <span style="color: red;">mrbs</span>;<br />CREATE USER '<span style="color: red;">mrbs</span>'@'localhost' IDENTIFIED BY '<span style="color: red;">mrbs123</span>';<br />GRANT ALL PRIVILEGES ON *.* TO '<span style="color: red;">mrbs</span>'@'localhost' WITH GRANT OPTION;<br />FLUSH PRIVILEGES;<br />quit;</b></span><br /><br />Note: Replace <span style="color: #2b00fe;">mrbs123</span> with a strong password of your choice.<br /><br />Step 9: Import the MRBS Tables<br /><br />Now that the database and user are created, we need to import the MRBS tables into the database. Here are the steps to import the tables:<br /><br />Import the tables using the following command:<br /><br /><span style="font-family: courier;"><b>sudo mysql -u root -p<span style="color: red;">yourmysqlrootpassword</span> mrbs < /var/www/html/mrbs/tables.my.sql</b></span><br /><br />Once the tables are imported, we need to configure MRBS to use the newly created database.<br /><br />Step 10: Configure MRBS<br /><br />To configure MRBS to use the newly created database, we need to update the configuration file. Here are the steps to update the configuration file:<br /><br />Open the configuration file in a text editor:<br /><br /><span style="font-family: courier;"><b>sudo vim /var/www/html/mrbs/web/config.inc.php</b></span><br /><br />Change the following settings under the "Database Settings" section:<br /><br /><span style="color: #2b00fe;">$dbsys = "</span><span style="color: red;">mysql</span><span style="color: #2b00fe;">";<br />$db_host = "</span><span style="color: red;">localhost</span><span style="color: #2b00fe;">";<br />$db_database = "</span><span style="color: red;">mrbs</span><span style="color: #2b00fe;">";<br />$db_login = "</span><span style="color: red;">mrbs</span><span style="color: #2b00fe;">";<br />$db_password = "</span><span style="color: red;">mrbs123</span><span style="color: #2b00fe;">";</span><br /><br />Note: Replace mrbs123 with the password you set in the previous step.<br /><br />Save and close the file.<br /><br />Step 11: Access the MRBS Application<br /><br />Now that MRBS is installed and configured, we can access the application from a web browser using the URL <a href="http://mrbs.yourdomain.com">http://mrbs.yourdomain.com</a></p><p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY8zfSmBWw_0aY-LqFRl0EdPxyX-ll032m9W9BLCA9E8F6FrrDTrxaccA4TSbT9d5FLSOKpjhXLBkayAtku-516imvtySKUq0CSh-HZUSnpSfv40Ux8QIyFOkPmOiSVLY9GsLNAueynOB1gwxBPwbu5xw2PsXVOd9jq2RZcwUmnYmq98etxsS_U5AO/s1366/Screenshot%202023-04-18%20at%2010-09-01%20Meeting%20Room%20Booking%20System.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="632" data-original-width="1366" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY8zfSmBWw_0aY-LqFRl0EdPxyX-ll032m9W9BLCA9E8F6FrrDTrxaccA4TSbT9d5FLSOKpjhXLBkayAtku-516imvtySKUq0CSh-HZUSnpSfv40Ux8QIyFOkPmOiSVLY9GsLNAueynOB1gwxBPwbu5xw2PsXVOd9jq2RZcwUmnYmq98etxsS_U5AO/w640-h296/Screenshot%202023-04-18%20at%2010-09-01%20Meeting%20Room%20Booking%20System.png" width="640" /></a></div><br /><p></p><p>Reference: <a href="https://mrbs.sourceforge.io/view_text.php?section=Documentation&file=INSTALL">https://mrbs.sourceforge.io/view_text.php?section=Documentation&file=INSTALL</a><br /></p>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-35910860362335314632023-03-31T23:32:00.000+05:302023-05-22T23:33:38.517+05:30Retrieving Library and Patron Category Codes from Koha Database using MySQL Query<div>If you have forgotten your super librarian account credentials, there is a way to retrieve the necessary information without having to install any GUI database administration tools like phpMyAdmin. In this blog post, I will guide you through a simple MySQL query that can help you retrieve the required library and patron category codes from the Koha database.</div><div><br /></div><div>First, you will need to access your Koha database via the MySQL shell. To do so, open your terminal and enter the following command:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo su</b></span></div><div><br /></div><div>This command will switch your user to the root user, which will give you the necessary privileges to access the Koha database. Next, enter the following command to enter the MySQL shell:</div><div><br /></div><div><span style="font-family: courier;"><b>mysql -uroot -p</b></span></div><div><br /></div><div>You will be prompted to enter the root password for the MySQL server. Once you have entered the correct password, you will be taken to the MySQL prompt. Next, enter the following command to select the Koha database:</div><div><br /></div><div><span style="font-family: courier;"><b>use koha_library;</b></span></div><div><br /></div><div>Note that the database name may vary depending on the name you gave to your Koha database during installation. Once you have selected the correct database, enter the following MySQL query to retrieve the library code and patron category code:</div><div><br /></div><div><span style="font-family: courier;"><b>SELECT branchcode,categorycode </b></span></div><div><span style="font-family: courier;"><b>FROM borrowers;</b></span></div><div><br /></div><div>This query will retrieve the branch code and category code for all borrowers in the Koha database. The branch code corresponds to the library code, while the category code corresponds to the patron category code.</div><div><br /></div><div>Now, using the retrieved codes, we can create a super librarian. To learn how to create this new super librarian, please read the below blog post.</div><div><br /></div><div><a href="http://kohageek.blogspot.com/2018/07/create-super-librarian-by-command-line.html">http://kohageek.blogspot.com/2018/07/create-super-librarian-by-command-line.html</a></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-72892168631718588902023-02-02T16:02:00.018+05:302023-02-03T08:33:43.922+05:30Creating a SWAP partition in Debian/Ubuntu Linux<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlQn7cPWKFIBkCDjtdD-yq6yeW0OqpWQh08yOZX9CbdMA-WN_91H0-Fs6fH1-_AjFgijb1dxZaIcohOe82ynqYiUPWZds4uLwy7mCXSofdXD_6w3McBnrBZaaAU58lDjCuwEq1paMrvxwwBu14xwP213wRAcD52MjZnY_jR4PWIJIaCG5a33mtPdmS/s1200/Linux-Swap.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlQn7cPWKFIBkCDjtdD-yq6yeW0OqpWQh08yOZX9CbdMA-WN_91H0-Fs6fH1-_AjFgijb1dxZaIcohOe82ynqYiUPWZds4uLwy7mCXSofdXD_6w3McBnrBZaaAU58lDjCuwEq1paMrvxwwBu14xwP213wRAcD52MjZnY_jR4PWIJIaCG5a33mtPdmS/w640-h320/Linux-Swap.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p>Add some swap space to your server as a defence against out-of-memory issues in apps. We shall discuss adding a swap file to a Debian/Ubuntu server in this blogpost.</p><p><br /></p><p><b></b></p><blockquote><p><b>What is Swap?</b></p><p><br /></p><p>Swap is a portion of hard drive storage that has been set aside for the operating system to temporarily store data that it can no longer hold in RAM. This lets you increase the amount of information that your server can keep in its working memory, with some caveats. The swap space on the hard drive will be used mainly when there is no longer sufficient space in RAM to hold in-use application data.</p><p></p></blockquote><p><br /></p><p><b>Creating a swap partition</b></p><p><br /></p><p>STEP 1: First step is to check if by chance is there any SWAP partition already created in your PC:</p><p><br /></p><p><b><span style="font-family: courier;">sudo swapon --show</span></b></p><p><br /></p><p>Enter your root password. If you see no output, it means that the SWAP doesn’t exist.</p><p><br /></p><p>STEP 2: Next, let’s see the current partition structure of your computer’s hard disk:</p><p><br /></p><p><span style="font-family: courier;"><b>df -h</b></span></p><p><br /></p><p>STEP 3: Before you start the changes disable the use of swap:</p><p><br /></p><p><span style="font-family: courier;"><b>sudo swapoff -a</b></span></p><p><br /></p><p>STEP 4: Now it's time to create the SWAP file. Make sure you have enough space on the hard disk. It is a matter of preference in how much SWAP size you need.</p><p><br /></p><p>My suggestion is: If you have a maximum of 4GB of RAM I would suggest putting twice the RAM for the SWAP (8GB for SWAP). For PCs with more than 4GB I recommend the same number of RAM for SWAP plus 2GB. Example: In my case it's 4GB, I put 8GB for SWAP. But you may feel free to make your choice.</p><p><br /></p><p><span style="font-family: courier;"><b>sudo fallocate -l <span style="color: red;">8</span><span style="color: red;">G</span> /swapfile</b></span></p><p><br /></p><p>We can verify that the correct amount of space was reserved by typing:</p><p><br /></p><p><span style="font-family: courier;"><b>ls -lh /swapfile</b></span></p><p><br /></p><p>STEP 5: SWAP file is now created. Let’s give root-only permissions to it.</p><p><br /></p><p><span style="font-family: courier;"><b>sudo chmod 600 /swapfile</b></span></p><p><br /></p><p>STEP 6: Mark the file as SWAP space:</p><p><br /></p><p><span style="font-family: courier;"><b>sudo mkswap /swapfile</b></span></p><p><br /></p><p>STEP 7: Finally enable the SWAP.</p><p><br /></p><p><span style="font-family: courier;"><b>sudo swapon /swapfile</b></span></p><p><br /></p><p>STEP 8: You can now check using the same swapon command to check if SWAP is created.</p><p><br /></p><p><span style="font-family: courier;"><b>sudo swapon --show</b></span></p><p><br /></p><p>STEP 9: Also check the final partition structure again.</p><p><br /></p><p><span style="font-family: courier;"><b>free -h</b></span></p><p><br /></p><p>STEP 10: Once everything is set, you must set the SWAP file as permanent, else you will lose the SWAP after reboot. Run this command:</p><p><br /></p><p>Back up the /etc/fstab file in case anything goes wrong:</p><p><br /></p><p><span style="font-family: courier;"><b>sudo cp /etc/fstab /etc/fstab.bak</b></span></p><p><span style="font-family: courier;"><b><br /></b></span></p><p><span style="font-family: courier;"><b>echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab</b></span></p><p><br /></p><p><b>Adjusting the swappiness and Cache Pressure</b></p><p><br /></p><p>Change current swappiness value and Cache Pressure 10, 50 respectively by typing:</p><p><br /></p><p><span style="font-family: courier;"><b>sudo sysctl vm.swappiness=10</b></span></p><p><span style="font-family: courier;"><b>sudo sysctl vm.vfs_cache_pressure=50</b></span></p><p><br /></p><p>This setting will persist until the next reboot. We can set this value automatically at restart by adding the line to our /etc/sysctl.conf file:</p><p><br /></p><p><span style="font-family: courier;"><b>sudo nano /etc/sysctl.conf</b></span></p><p><span style="font-family: courier;"><b><br /></b></span></p><p><span style="font-family: courier;"><b>vm.swappiness=10</b></span></p><p><span style="font-family: courier;"><b>vm.vfs_cache_pressure=50</b></span></p><p><br /></p><p>Finished, now exit the terminal!</p><p><br /></p><p>Reference:</p><p><a href="https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04">https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04</a></p>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-45349716102126679022023-02-02T10:24:00.001+05:302023-02-02T10:24:11.715+05:30Install latest PHP on Debian <p>The Debian default repository does not contain latest PHP. But it can be installed via PHP repository </p><p><br /></p><p><i></i></p><blockquote><p><i>Why Debian system doesn't contain latest software?</i></p><p><i><br /></i></p><p><i>Debian is a stable and reliable distribution that prioritizes stability and security over new software releases. The latest software may contain bugs or security vulnerabilities that have not been fully tested, and including them in the distribution could compromise the stability and security of the system. Instead, Debian focuses on thoroughly testing and integrating stable releases of software into their repositories, ensuring that users have access to high-quality and secure software.</i></p></blockquote><p><i></i></p><p><br /></p><p>Install file dependencies</p><p><br /></p><p><span style="font-family: courier;"><b>sudo apt install -y gnupg2 ca-certificates apt-transport-https software-properties-common </b></span></p><p><br /></p><p>Add PHP repository</p><p><br /></p><p><span style="font-family: courier;"><b>echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list</b></span></p><p><br /></p><p><span style="font-family: courier;"><b>wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add -</b></span></p><p><br /></p><p>Install latest PHP and some modules ( at this time 8.0 is the latest version)</p><p><br /></p><p><span style="font-family: courier;"><b>sudo apt update</b></span></p><p><span style="font-family: courier;"><b>sudo apt install -y php libapache2-mod-php php-pear php-cgi php-common php-mbstring php-zip php-net-socket php-gd php-mysql php-bcmath unzip wget git </b></span></p><p><br /></p><p>Now check the PHP version with this command</p><p><br /></p><p>php -v</p><p><br /></p><p><br /></p>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-13357045906329535182023-01-25T15:08:00.021+05:302024-01-09T13:33:50.053+05:30Python script to convert, resize, and compress images in bulk<div>Here is the modified version of the Python script created by Mr. A.J. Tomson, Librarian, Devagiri College, Kozhikode. It was helpful for creating an idlink.txt and compressing images. But this modified script will help you <b>convert </b>images into <span style="color: red;">jpg </span>irrespective of their format (jpeg, png, or gif) and <b>resize </b>all images to 50% width and height without losing their actual aspect ratio and <b>create a zip</b> file. </div><div><br /></div><div>NB: The script has been tested with Debian 11 and Ubuntu 20.04 LTS.</div><div><br /></div><div>Using the script</div><div><br /></div><div>1. Arrange your photos in a folder. Check that the photo name matches the patron's card number.</div><div><br /></div><div>2. Go to the following link and click on the "<b>Download</b>" button.</div><div><br /></div><div><a href="https://drive.google.com/file/d/1JPXoQbUviOpTT7iD9DNPmTmzm6lTDYF6/view?usp=sharing" target="_blank">https://drive.google.com/file/d/1JPXoQbUviOpTT7iD9DNPmTmzm6lTDYF6/view?usp=sharing</a><br /></div><div><br /></div><div>3. Place the idlink.py script in the photos directory.</div><div><br /></div><div>4. Open a terminal, enter inside the photo folder, and apply the following commands: This script uses python3, so install it.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt update</b></span></div><div><span style="font-family: courier;"><b>sudo apt -y install python3</b></span></div><div><br /></div><div>5. Make the script executable.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo chmod +x idlink.py</b></span></div><div><br /></div><div>6. Run the script.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo ./idlink.py</b></span></div><div><br /></div><div>7. After the process, you can see a zip file where all your photos have been compressed.</div><div><br /></div><div>Go to Koha > Tools > Upload Patron Images.</div><div><br /></div><div>Upload the zip file.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/hD2LLE8_NNU" width="480" youtube-src-id="hD2LLE8_NNU"></iframe></div><div><br /></div><div>Reference: </div><div><a href="goog_2068731414"><br /></a></div><div><a href="http://kohageek.blogspot.com/2013/08/a-useful-script-to-compress-patron.html">http://kohageek.blogspot.com/2013/08/a-useful-script-to-compress-patron.html</a></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-50731639383914732362023-01-23T10:36:00.000+05:302023-01-23T10:36:53.639+05:30Muon SSH Terminal/SFTP client<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNriVI3E49DXaYTiXd_ebeIkc3h8gXPyaWnIdjIQBUQhz-eNmbD5dFWn24YiM4Jb8wPxZjbmcnt0hX263_7huXvZ9EGVBwKnzgPSEcH_oHYtGS_ZJOSaTs7pJ7vNxbpzZxemhUK9MlpISaZH7FdIE8cIE1Ny1grA-A-UMz4krJTlV_mISY2poOcd8T/s1920/new.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1009" data-original-width="1920" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNriVI3E49DXaYTiXd_ebeIkc3h8gXPyaWnIdjIQBUQhz-eNmbD5dFWn24YiM4Jb8wPxZjbmcnt0hX263_7huXvZ9EGVBwKnzgPSEcH_oHYtGS_ZJOSaTs7pJ7vNxbpzZxemhUK9MlpISaZH7FdIE8cIE1Ny1grA-A-UMz4krJTlV_mISY2poOcd8T/w640-h336/new.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p>Muon (previously known as Snowflake) is a graphical SFTP client and terminal emulator with helpful utilities.</p><p><br /></p><p>It provide an enhanced SFTP file browser, SSH terminal emulator, remote resource/process manager, server disk space analyzer, remote text editor, remote log viewer, and other helpful tools.</p><p><br /></p><p>The application is targeted mainly towards web/backend developers who often deploy/debug their code on remote servers and not overly fond of complex terminal based commands. It may also help sysadmins who manage multiple remote servers manually.</p><p><br /></p><p>Features include:</p><p><br /></p><p></p><ul style="text-align: left;"><li>Simple graphical interface for common file operations – common activities like moving files on server, renaming, cut, copy, paste, archiving, executing scripts, checking free space, calculating directory size, changing permissions, in a simple and efficient way.</li><li>Built in text editor with syntax highlighting and support for sudo – can invoke sudo and prompt for passwords as needed.</li><li>View and search huge log/text files in a very efficient manner. The log viewer presents a paginated view of the file, which loads in much less time.</li><li>Fast powerful file and content search, powered by find command – find files by name, type, modification date and can also look inside compressed archives.</li><li>Built in terminal and command snippet – all command line operations can be performed.</li><li>Fully equipped task manager – monitor resource usage (CPU, RAM, swap) and view/manage processes from a familiar GUI. It’s equipped with search and kill process functionality, and also with a option to kill processes with sudo.</li><li>Built in graphical disk space analyzer – find out what is consuming disk space.</li><li>Linux specific tools – such as getting information about the system and distro, starting and stopping systemd services and finding which process is listening on which port.</li><li>Manage SSH keys easily – simple and handy UI for creating and managing local and remote SSH keys. It also supports managing authorized keys from GUI.</li><li>Network tools – graphical interface for ping, port checking, traceroute, and DNS lookup.</li></ul><p></p><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="352" src="https://www.youtube.com/embed/fGRhYtiAsic" width="658" youtube-src-id="fGRhYtiAsic"></iframe></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p>Website:<a href="https://github.com/subhra74/snowflake" target="_blank"> https://github.com/subhra74/snowflake</a></p><p>Support: Wiki</p><p>Developer: Subhra Das Gupta</p><p>License: GNU General Public License Version 3</p>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-668322221812988222023-01-10T17:46:00.005+05:302023-01-10T17:47:20.142+05:30How to set static IP address on Debian/Ubuntu Linux<div>The first thing you must do is locate the name of your network device, DHCP IP address and default Gateway. For that, issue the commands and note down.</div><div><br /></div><div>To find network interface</div><div><br /></div><div><span style="font-family: courier;"><b>ip -c link show</b></span></div><div><br /></div><div>You should at least see two devices, lo (for loopback) and another named device (such as enp0s3).</div><div><br /></div><div>To find IP address</div><div><br /></div><div><span style="font-family: courier;"><b>hostname -I</b></span></div><div><br /></div><div>To find Gateway</div><div><br /></div><div><span style="font-family: courier;"><b>ip route | grep default</b></span></div><div><br /></div><div>Next, let’s back up the current network configuration file with the command:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo cp /etc/network/interfaces ~/</b></span></div><div><br /></div><div>Open the configuration file for editing with the command:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo nano /etc/network/interfaces</b></span></div><div><br /></div><div>With the interfaces file open for editing, you should see a DHCP configuration that looks like this:</div><div><br /></div><div><span style="color: red;"># The primary network interface</span></div><div><span style="color: red;">allow-hotplug enp3s0</span></div><div><span style="color: red;">iface enp3s0 inet dhcp</span></div><div><br /></div><div>Comment that block out so it looks like this:</div><div><br /></div><div><span style="color: #2b00fe;"># The primary network interface</span></div><div><span style="color: #2b00fe;"># allow-hotplug enp3s0</span></div><div><span style="color: #2b00fe;"># iface enp3s0 inet dhcp</span></div><div><br /></div><div>Now, we can add the necessary configuration for a static IP address. Let’s configure enp0s3 to use the address 192.168.0.2, with a gateway of 192.168.0.1, and a DNS nameserver of 8.8.4.4 8.8.8.8 That configuration will look like this:</div><div><br /></div><div><span style="font-family: courier;"><b># The primary network interface</b></span></div><div><span style="font-family: courier;"><b>auto enp3s0</b></span></div><div><span style="font-family: courier;"><b>iface enp3s0 inet static</b></span></div><div><span style="font-family: courier;"><b>address 192.168.0.2</b></span></div><div><span style="font-family: courier;"><b>netmask 255.255.255.0</b></span></div><div><span style="font-family: courier;"><b>gateway 192.168.0.1</b></span></div><div><span style="font-family: courier;"><b>dns-nameservers 8.8.4.4 8.8.8.8</b></span></div><div><br /></div><div>Make sure to edit the above configuration to match your network scheme. Save and close the file.</div><div><br /></div><div>Finally, restart the networking service with the command:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo systemctl restart networking</b></span></div><div><br /></div><div>Make sure the networking configuration is correct, by issuing the command:</div><div><br /></div><div><span style="font-family: courier;"><b>hostname -I</b></span></div><div><br /></div><div>You should see the static IP address you configured. You’re good to go.</div><div><br /></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-77612558838423346582023-01-04T18:32:00.002+05:302023-01-04T18:32:21.942+05:30Install Docker, Docker-Compose and NGinx Proxy Manager on Debian<div><b>Docker and Docker Compose</b></div><div><br /></div><div>Docker was confusing to me initially. I really just didn't get it. I didn't understand what it was. But, at some point, it just clicked with me.</div><div><br /></div><div>The best explanation I can give, is exactly what their logo tried to exhibit. Docker is teh Giant Transport Ship, and your servers / services are the containers on the ship.</div><div><br /></div><div>In reality, Docker is a virtual environment (think Virtual Box, etc) where you run servers in virtual machines that are very slimmed down to only have the most necessary pieces of software.</div><div><br /></div><div>Docker is the Server Rack, and the Containers are the servers in the rack.</div><div><br /></div><div>Docker-Compose is a tool to make it a bit easier to get Docker containers (especially multiple containers that need to communicate) up and running using a static configuration file.</div><div><br /></div><div>Official documentation on installing <a href="https://www.google.com/search?source=hp&ei=dAu8XrCmI4GwsAWSibuIAg&q=How+to+Install+Docker+CE&oq=How+to+Install+Docker+CE&gs_lcp=CgZwc3ktYWIQAzICCAAyAggAMgIIADICCAAyAggAMgIIADICCAAyAggAMgIIADICCAA6BQgAEIMBUM0JWJonYN0uaABwAHgAgAGIAogBixeSAQcxMS4xMS4ymAEAoAEBqgEHZ3dzLXdpeg&sclient=psy-ab&ved=0ahUKEwiwsK6ujbHpAhUBGKwKHZLEDiEQ4dUDCAg&uact=5" target="_blank">Docker </a></div><div><br /></div><div>I have created a script that includes every commands and steps, you just need to run the script as root</div><div><br /></div><div><a href="f" target="_blank">Download</a></div><div><br /></div><div>Or Manually create a bash file</div><div><br /></div><div><span style="font-family: courier;"><b>nano docker_install.sh</b></span></div><div><br /></div><div><span style="color: #2b00fe;">#!/bin/bash</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">## update & upgrade Debian</span></div><div><span style="color: #2b00fe; font-family: courier;"><b>sudo apt update && sudo apt upgrade -y</b></span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">## install few required packages not available with Debian by default. </span></div><div><span style="color: #2b00fe; font-family: courier;"><b>sudo apt install -y software-properties-common dirmngr file-roller ca-certificates curl gnupg lsb-release</b></span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">## add Docker’s official GPG key:</span></div><div><span style="color: #2b00fe; font-family: courier;"><b>sudo mkdir -p /etc/apt/keyrings</b></span></div><div><span style="color: #2b00fe; font-family: courier;"><b>curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg</b></span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">## set up the repository:</span></div><div><span style="color: #2b00fe; font-family: courier;"><b>echo \</b></span></div><div><span style="color: #2b00fe; font-family: courier;"><b> "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \</b></span></div><div><span style="color: #2b00fe; font-family: courier;"><b> $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null</b></span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">## update</span></div><div><span style="color: #2b00fe; font-family: courier;"><b>sudo apt update</b></span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">## install Docker Engine</span></div><div><span style="color: #2b00fe; font-family: courier;"><b>apt-cache policy docker-ce</b></span></div><div><span style="color: #2b00fe; font-family: courier;"><b>sudo apt install -y docker-ce</b></span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">## set user as part of docker group</span></div><div><span style="color: #2b00fe; font-family: courier;"><b>sudo usermod -aG docker ${USER}</b></span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">## install docker-compose</span></div><div><span style="color: #2b00fe; font-family: courier;"><b>sudo apt install -y docker-compose</b></span></div><div><br /></div><div>save the file</div><div><br /></div><div>Run the bash file</div><div><br /></div><div><span style="font-family: courier;"><b>sudo ./docker_install.sh</b></span></div><div><br /></div><div>This process will add docker in the server</div><div><br /></div><div><div>Verify the Docker installation and version.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo docker version</b></span></div><div><br /></div><div>Enable the Docker service to start up on system boot.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo systemctl enable docker</b></span></div><div><br /></div><div>Check the Docker service status.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo systemctl status docker</b></span></div></div><div><br /></div><div><b>NGinX Proxy Manager</b></div><div><br /></div><div>While this is a useful tool when you host from home, it's a useful tool for any server, hosting from anywhere.</div><div><br /></div><div>NGinX Proxy Manager is run as a browser based GUI for setting up NGinX reverse proxied websites.</div><div><br /></div><div>Essentially, you forwward only ports 80 and 443 on your home router, to the server where you run NGinX Proxy Manager (NPM), and allow NPM to route requests for websites / applications accross your network, or within the same docker instance.</div><div><br /></div><div>Additionally, NPM can help you get LetsEncrypt SSL certificates for the sites you are running.</div><div><br /></div><div>To install NPM you need to install docker and docker-compose, and create a new folder on the server you want to run it in. Next, you'll create two files inside that folder:</div><div><ul style="text-align: left;"><li>config.json</li><li>docker-compose.yml</li></ul></div><div><span style="font-family: courier;"><b>mkdir npm</b></span></div><div><span style="font-family: courier;"><b>cd npm</b></span></div><div><br /></div><div>Inside the <b>config.json</b> file, you'll put the following:</div><div><br /></div><div><span style="color: red;">{</span></div><div><span style="color: red;"> "database": {</span></div><div><span style="color: red;"> "engine": "mysql",</span></div><div><span style="color: red;"> "host": "db",</span></div><div><span style="color: red;"> "name": "npm",</span></div><div><span style="color: red;"> "user": "npm",</span></div><div><span style="color: red;"> "password": "npm",</span></div><div><span style="color: red;"> "port": 3306</span></div><div><span style="color: red;"> }</span></div><div><span style="color: red;">}</span></div><div><br /></div><div>And inside the <b>docker-compose.yml</b> file you'll put:</div><div><br /></div><div><span style="color: red;">version: "3"</span></div><div><span style="color: red;">services:</span></div><div><span style="color: red;"> app:</span></div><div><span style="color: red;"> image: 'jc21/nginx-proxy-manager:latest'</span></div><div><span style="color: red;"> restart: unless-stopped</span></div><div><span style="color: red;"> ports:</span></div><div><span style="color: red;"> # These ports are in format <host-port>:<container-port></span></div><div><span style="color: red;"> - '80:80' # Public HTTP Port</span></div><div><span style="color: red;"> - '443:443' # Public HTTPS Port</span></div><div><span style="color: red;"> - '81:81' # Admin Web Port</span></div><div><span style="color: red;"> # Add any other Stream port you want to expose</span></div><div><span style="color: red;"> # - '21:21' # FTP</span></div><div><span style="color: red;"> environment:</span></div><div><span style="color: red;"> DB_MYSQL_HOST: "db"</span></div><div><span style="color: red;"> DB_MYSQL_PORT: 3306</span></div><div><span style="color: red;"> DB_MYSQL_USER: "npm"</span></div><div><span style="color: red;"> DB_MYSQL_PASSWORD: "npm"</span></div><div><span style="color: red;"> DB_MYSQL_NAME: "npm"</span></div><div><span style="color: red;"> # Uncomment this if IPv6 is not enabled on your host</span></div><div><span style="color: red;"> DISABLE_IPV6: 'true'</span></div><div><span style="color: red;"> volumes:</span></div><div><span style="color: red;"> - ./data:/data</span></div><div><span style="color: red;"> - ./letsencrypt:/etc/letsencrypt</span></div><div><span style="color: red;"> depends_on:</span></div><div><span style="color: red;"> - db</span></div><div><span style="color: red;"><br /></span></div><div><span style="color: red;"> db:</span></div><div><span style="color: red;"> image: 'jc21/mariadb-aria:latest'</span></div><div><span style="color: red;"> restart: unless-stopped</span></div><div><span style="color: red;"> environment:</span></div><div><span style="color: red;"> MYSQL_ROOT_PASSWORD: 'npm'</span></div><div><span style="color: red;"> MYSQL_DATABASE: 'npm'</span></div><div><span style="color: red;"> MYSQL_USER: 'npm'</span></div><div><span style="color: red;"> MYSQL_PASSWORD: 'npm'</span></div><div><span style="color: red;"> volumes:</span></div><div><span style="color: red;"> - ./data/mysql:/var/lib/mysql</span></div><div><br /></div><div>Make sure to replace the items with < and > around it in each file, and that the username and passwords in each file match.</div><div><br /></div><div>Now run the command:</div><div><br /></div><div><span style="font-family: courier;"><b>docker-compose up -d</b></span></div><div><br /></div><div>Give it a minute to pull down everything, and get started, and then in your browser go to the IP address of your server. You should get a Congratulations screen.</div><div><br /></div><div>if you go tot he IP address at port 81 (http://192.168.1.x:81), you'll be prompted to login to NPM.</div><div><br /></div><div>Default credentials are:</div><div><br /></div><div>username: admin@example.com</div><div>passwrod: changeme</div><div><br /></div><div>Make sure to update the email and password, from the default values, then log out, and back in usign the new values you entered.</div><div><br /></div><div>Now, you're ready to start proxying traffic.</div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-72761226307363815252023-01-04T18:31:00.002+05:302023-01-04T18:31:37.842+05:30External Access to a Local Server via a Cloudflare Tunnel<div>In this blog post, I explain how to access your local server (that can be your Koha server) from outside your network using a free service called Cloudflare Tunnel.</div><div><br /></div><div>This service is</div><div><ul style="text-align: left;"><li>It is 100% free.</li><li>Highly secure</li></ul></div><div><br /></div><div>You don’t need to punch any holes in your router.</div><div><br /></div><div>So there is no need for Port-Forwarding . This works even if you don’t have any <span style="color: red;">static public IP!</span></div><div><br /></div><div>Steps to be followed</div><div><br /></div><div><ul style="text-align: left;"><li>Buying a free domain name</li><li>Creating a Cloudflare account</li><li>Configuring nameservers to point your domain to Cloudflare</li><li>Installing the Cloudflare service and setting up tunnels</li><li>Add an application to the tunnel (Ingress Rules).</li></ul></div><div><br /></div><div>For this tutorial, I used a Debian 11 (Bullseye) server on my machine (I use Next Unit of Computing (NUC)), a bare bones mini PC from Intel (you can even use a Raspberry Pi), and Godaddy for acquiring a domain name (you can use Freenom to get a free domain name), and the Cloudflare Zero Trust Service for remote access.</div><div><br /></div><div>Let’s get started.</div><div><b><br /></b></div><div><div><b>Registering a Domain Name</b></div><div><br /></div><div>First we will grab a domain name go the link below and create a account for you</div><div><br /></div><div>From Godaddy</div><div><br /></div><div><a href="https://www.godaddy.com/en-in">https://www.godaddy.com/en-in</a></div><div><br /></div><div>From Freenom</div><div><br /></div><div><a href="https://www.freenom.com/en/index.html?lang=en">https://www.freenom.com/en/index.html?lang=en</a></div><div><br /></div><div>Search for domain which suits you and register it .</div><div><br /></div><div><b>Create a Cloudflare account</b></div><div><br /></div><div>Now open Cloudflare Dashboard in your browser</div><div><br /></div><div><a href="https://dash.cloudflare.com/">https://dash.cloudflare.com/</a></div><div><br /></div><div>Register a new account if this is your first time and move to the dashboard.</div><div><br /></div><div>Now we will register a new site in Cloudflare with the domain name we just registered .</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3ciqM53M5gIAl3UrP0J_gFvPDTBR_X2WEQA_fJzA9ibuwlPOuk9P2RQQ3MMOBQmp2ECJlxPrXZ8g1A65SQDsKnpMIc-lSNXNwehfR8XzI0wiitbD3nCMjmUeR_tyz3ki9biY5hocnxju3zgh4PClx-KjsMsdAaEXqjVsxYR9yLbi-5CQ1-4QYG1oy/s1366/Screenshot%202023-01-04%20at%2015-07-47%20Home%20Maheshpalamuttath@gmail.com's%20Account%20Cloudflare.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="834" data-original-width="1366" height="390" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3ciqM53M5gIAl3UrP0J_gFvPDTBR_X2WEQA_fJzA9ibuwlPOuk9P2RQQ3MMOBQmp2ECJlxPrXZ8g1A65SQDsKnpMIc-lSNXNwehfR8XzI0wiitbD3nCMjmUeR_tyz3ki9biY5hocnxju3zgh4PClx-KjsMsdAaEXqjVsxYR9yLbi-5CQ1-4QYG1oy/w640-h390/Screenshot%202023-01-04%20at%2015-07-47%20Home%20Maheshpalamuttath@gmail.com's%20Account%20Cloudflare.png" width="640" /></a></div><div><br /></div><div>Enter the domain name in the next screen and click on “<b>Add site</b>“</div><div><br /></div><div>Scroll down and select the free tier !</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh95SWi_h3Gz40uGzoXClrxTtw5HESaMS8_r3hXa9JZE3qrct1bSNGHBmEN5qP9j9oHOrBjPj5R7g86VlpK3bgr84rrYNIQEtFrD44nAwHmJvxUsLuk1t49quw9vKnni45Qb_4YqBh3004p2s0ygdCkSnxA8Gfjp_LN256-7yL6-YTlti2z57-lgPTr/s1366/free.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="628" data-original-width="1366" height="294" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh95SWi_h3Gz40uGzoXClrxTtw5HESaMS8_r3hXa9JZE3qrct1bSNGHBmEN5qP9j9oHOrBjPj5R7g86VlpK3bgr84rrYNIQEtFrD44nAwHmJvxUsLuk1t49quw9vKnni45Qb_4YqBh3004p2s0ygdCkSnxA8Gfjp_LN256-7yL6-YTlti2z57-lgPTr/w640-h294/free.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div>Cloudflare will search if there an DNS records already added for this site – But since this is the first time that we are registering it won’t find anything .</div><div><br /></div><div><b>Changing the Nameservers in Godaddy to Cloudflare</b></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBPggwNBYzF9pr-YAE2hK2VxRNqH5PnzKXEYRnzzF3w4-1kkE_vc_2j0uRH1pD3BIi4_ZhW5dAEJprciG4kQ0KHV7ccgD8Dnn5wMZiPbHgAgrnFKGd6LDtYDjBStX2eA3Aet7ioEoa-BMfWjteEsKbf92eOH6eqc7T9vanHUSc6-CMJ6egSdhUFhjS/s1099/Screenshot%202023-01-04%20at%2015-11-04%20Records%20DNS%20opensio.co.in%20Maheshpalamuttath@gmail.com's%20Account%20Cloudflare.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="611" data-original-width="1099" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBPggwNBYzF9pr-YAE2hK2VxRNqH5PnzKXEYRnzzF3w4-1kkE_vc_2j0uRH1pD3BIi4_ZhW5dAEJprciG4kQ0KHV7ccgD8Dnn5wMZiPbHgAgrnFKGd6LDtYDjBStX2eA3Aet7ioEoa-BMfWjteEsKbf92eOH6eqc7T9vanHUSc6-CMJ6egSdhUFhjS/w640-h356/Screenshot%202023-01-04%20at%2015-11-04%20Records%20DNS%20opensio.co.in%20Maheshpalamuttath@gmail.com's%20Account%20Cloudflare.png" width="640" /></a></div><div><br /></div><div>In the left menu select DNS -> Records and scroll down to the bottom and here you will see the nameservers provided , Copy it and open Godaddy dashboard</div><div><br /></div><div>Go to Godaddy dashboard</div><div><br /></div><div><i><b>My Products -->> Account Settings -->> Select your Domain</b></i></div></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuBwQIMqAmlx93NcV-ZA6jFpwUf6sVhfF4w8ebGe9Af8a-azTwLRoFezo23tNMCIee_VRc_hi-LI7fGeo2iH9DYd6is1EDwFzio-0ZheVKW4bqvXKp52UMNpWaaxzKo14gyBxngk1x-Kwm2_MvEMupJ7DGHfEiKKAC5Eh5pVIYO3mjg9L5js9Scbmh/s1366/Screenshot%202023-01-04%20at%2015-17-57%20Products.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1268" data-original-width="1366" height="594" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuBwQIMqAmlx93NcV-ZA6jFpwUf6sVhfF4w8ebGe9Af8a-azTwLRoFezo23tNMCIee_VRc_hi-LI7fGeo2iH9DYd6is1EDwFzio-0ZheVKW4bqvXKp52UMNpWaaxzKo14gyBxngk1x-Kwm2_MvEMupJ7DGHfEiKKAC5Eh5pVIYO3mjg9L5js9Scbmh/w640-h594/Screenshot%202023-01-04%20at%2015-17-57%20Products.png" width="640" /></a></div>Click on DNS and scroll down to the bottom, where you will see the nameservers provided by Godaddy. Next to that, you will see a <b>change</b> button. Click on that button then on <b>Enter myown nameservers</b> and put in the nameservers provided by Cloudflare and save it.<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYhegjbOIOmBzaRik0AZnhJYGer1JAOnqsxnFi1F-9jH2kQETcsdiyOC-2kgnwzJ4opUqu6dcnQ6uTpH98vW00HgSKRItuUL3IrmC6_OY1-NJ5VFuFmHMP9hasforKwCBFPreflvG--NDvRiRuduPC6N4AJvH-wds1LZ_yVV5HzFMDFKqsIAopXmom/s953/Screenshot%202023-01-04%20at%2015-31-17%20DNS%20Management.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="547" data-original-width="953" height="368" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYhegjbOIOmBzaRik0AZnhJYGer1JAOnqsxnFi1F-9jH2kQETcsdiyOC-2kgnwzJ4opUqu6dcnQ6uTpH98vW00HgSKRItuUL3IrmC6_OY1-NJ5VFuFmHMP9hasforKwCBFPreflvG--NDvRiRuduPC6N4AJvH-wds1LZ_yVV5HzFMDFKqsIAopXmom/w640-h368/Screenshot%202023-01-04%20at%2015-31-17%20DNS%20Management.png" width="640" /></a></div><br /><div><div>Usually Name server updates take around 1-12 Hrs – Wait for sometime and check back in Cloudflare portal. Once it is updated you will see a Tick mark in the Site Name you just added which means the NameServer update was successful , if it is still pending you will see the mark as “Pending Nameserver Update”</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga7TUu42wTmbOoKvhgvQOItybN7uk_5z7rO7Fx6oI3s2ss2Z9jEmcKvoMYowNCZqhNL_dZyj5wUVV9kr_8uxMpdmMTs70gBQoosTkxubOiBTPbY9OB0GUuXNiVJEzSHM5hDHXvK79SwY31R8Qtko54vI1Rq2nPnhyIMwIisC7pAPmY2tsBdozEXySQ/s1366/Screenshot%202023-01-04%20at%2015-35-02%20Home%20Maheshpalamuttath@gmail.com's%20Account%20Cloudflare.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="628" data-original-width="1366" height="294" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga7TUu42wTmbOoKvhgvQOItybN7uk_5z7rO7Fx6oI3s2ss2Z9jEmcKvoMYowNCZqhNL_dZyj5wUVV9kr_8uxMpdmMTs70gBQoosTkxubOiBTPbY9OB0GUuXNiVJEzSHM5hDHXvK79SwY31R8Qtko54vI1Rq2nPnhyIMwIisC7pAPmY2tsBdozEXySQ/w640-h294/Screenshot%202023-01-04%20at%2015-35-02%20Home%20Maheshpalamuttath@gmail.com's%20Account%20Cloudflare.png" width="640" /></a></div><br /><div><div><b>Installing Cloudlfared on our local server (PC)</b></div><div><br /></div><div>Now our domain name is pointing to Cloudflare ! We will go ahead and Launch the Zero trust dashboard . <b>Site Name -> Access -> Launch Zero Trust</b></div></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn0YU0uW3hNThMJ0WfnR1wRJNTVr9NaJ6izoxR0AL0O1K96f8kqbCoDENVG__yJ2PEMhlLVWIOzY7BipKq5a96ZpNVzbqh-7sUd2hRP_hINGaQmsIANOOANqweqt_8qZSp4gRqIbEhP_3DI5zuJ_3FGAGikunQpz4Xq-Li8BVbz28n7B4QHMu5YimC/s1366/Screenshot%202023-01-04%20at%2015-37-24%20Cloudflare%20Access%20Access%20mahesh-homeserver.co.in%20Maheshpalamuttath@gmail.com's%20Account%20Cloudflare.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="628" data-original-width="1366" height="294" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn0YU0uW3hNThMJ0WfnR1wRJNTVr9NaJ6izoxR0AL0O1K96f8kqbCoDENVG__yJ2PEMhlLVWIOzY7BipKq5a96ZpNVzbqh-7sUd2hRP_hINGaQmsIANOOANqweqt_8qZSp4gRqIbEhP_3DI5zuJ_3FGAGikunQpz4Xq-Li8BVbz28n7B4QHMu5YimC/w640-h294/Screenshot%202023-01-04%20at%2015-37-24%20Cloudflare%20Access%20Access%20mahesh-homeserver.co.in%20Maheshpalamuttath@gmail.com's%20Account%20Cloudflare.png" width="640" /></a></div><br /><div><b>Login into to our local server via SSH Or through Desktop.</b></div><div><div><br /></div><div>Installing any Required Software</div><div><br /></div><div>1. Update and Upgrade Packages on Our Server</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt update && sudo apt upgrade -y</b></span></div><div><br /></div><div>2. Install two other require packages </div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt install -y curl lsb-release</b></span></div><div><br /></div><div>Adding the Cloudflare Repository to our local server</div><div><br /></div><div>3. With all the required packages in place, we can finally grab the GPG key for the Cloudflared repository and store it on our local server.</div><div><br /></div><div>To save this key to your device, use the following command.</div><div><br /></div><div><span style="font-family: courier;"><b>curl -L https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-archive-keyring.gpg >/dev/null</b></span></div><div><br /></div><div>A GPG key is crucial to verify the packages we are installing are valid and belong to the repository.</div><div><br /></div><div>4. With the GPG key saved into our keyrings folder, our next step is to add the Cloudflared repository to our local server. You can add</div><div><br /></div><div><span style="font-family: courier;"><b>echo "deb [signed-by=/usr/share/keyrings/cloudflare-archive-keyring.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list</b></span></div><div><br /></div><div>5. As we have made changes to the available repositories, we will need to perform another update of the package list cache,</div><div><br /></div><div>You can update this cache by using the following command within the terminal.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt update</b></span></div><div><br /></div><div>Installing Cloudfared on our local server</div><div><br /></div><div>6. With the repository added, we can now proceed to install the Cloudflared package on our local server.</div><div><br /></div><div>To install this package, you will want to run the following command:</div><div><br /></div><div><span style="font-family: courier;"><b>sudo apt install -y cloudflared</b></span></div><div><br /></div><div><b>Setting up a Cloudflare tunnel on our local server</b></div><div><br /></div><div>Now that we have prepared our local server, we can set up the Cloudflare tunnel. This tunnel is where your traffic will be run over.</div><div><br /></div><div>Authenticating with the Cloudflare Service</div><div><br /></div><div>1. Our first step is to create an association between our local server and the Cloudflare service. We can begin authenticating with the Cloudflare service by using the command below.</div><div><br /></div><div><span style="font-family: courier;"><b>cloudflared tunnel login</b></span></div><div><br /></div><div>Ensure you keep Cloudflared open on your device while this process is completed.</div><div><br /></div><div>2. After running the above command, you will see the following message appear within the terminal.</div><div><br /></div><div>You will want to go to the URL displayed in the message and use it to log in to your Cloudflare account.</div><div><br /></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFCfDcUq6HvyHP7CXlIgTCGhDS9ST76-79ev6QP8rigCyZszX38_1AvYZj_RBfM6JgKUpwStS1aJrwAeD7UyIAcRR6EG8liJZQ2ZvcPcXv340VtbiCMZHVEZSWfm76D9DPJzqnoAJTS1OuCUrLA61_djGEt_u5vylfJ2Y02hdBEO89j7y9xv5K9Gfq/s1277/1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="160" data-original-width="1277" height="80" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFCfDcUq6HvyHP7CXlIgTCGhDS9ST76-79ev6QP8rigCyZszX38_1AvYZj_RBfM6JgKUpwStS1aJrwAeD7UyIAcRR6EG8liJZQ2ZvcPcXv340VtbiCMZHVEZSWfm76D9DPJzqnoAJTS1OuCUrLA61_djGEt_u5vylfJ2Y02hdBEO89j7y9xv5K9Gfq/w640-h80/1.png" width="640" /></a></div><br /><div>3. Once our local server is successfully authenticated with the Cloudflare service, you will see the following message:</div></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdJtPXalR2tMJBWirtc3D8I_2jkMssMH0kfLDCGO1vWXOBqKjJmPg2Fg42c8Al6KsH80SlZvoFdRXgfUsf3HJ7HmU9KmF1TtrRF1IAA5LBD0t1NnnMzkfpjFOrOX-HffTxVLHh-HpzcxOURGISN3Ic9nq3bErUMquBWHpM6s_3JVnD7q6it9EkTBSg/s1243/2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="116" data-original-width="1243" height="60" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdJtPXalR2tMJBWirtc3D8I_2jkMssMH0kfLDCGO1vWXOBqKjJmPg2Fg42c8Al6KsH80SlZvoFdRXgfUsf3HJ7HmU9KmF1TtrRF1IAA5LBD0t1NnnMzkfpjFOrOX-HffTxVLHh-HpzcxOURGISN3Ic9nq3bErUMquBWHpM6s_3JVnD7q6it9EkTBSg/w640-h60/2.png" width="640" /></a></div><br /><div><div>Creating the Cloudflare Tunnel on our local server</div><div><br /></div><div>4. Now that we are authorized, we can create a Cloudflare tunnel by using the following command.</div><div><br /></div><div>Ensure you replace “TUNNELNAME” with the name you want to assign this tunnel.</div><div><br /></div><div><span style="font-family: courier;"><b>cloudflared tunnel create TUNNELNAME</b></span></div><div><br /></div><div>5. After running the above command, you will see a message similar to the one below.</div><div><br /></div><div>You will want to write down the ID as we will need this for later.</div><div><br /></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMFVtE1C2_blBOuynJBd5rPTqyxNfNmIl4O7Mut7T6KVJZbcp-nM1P-x-Jxhih4lBoFKbiiteSio_Xh8K6IqA9UGsaw99DrOFbjXn5p4wtWdIqTxKzwveKwXovmKxNknYuxyI7VfnPeah3sRwFYZ42FMotWtuRZsbjreZP15A9gZCz_ap9BpfTHDXs/s1356/3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="142" data-original-width="1356" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMFVtE1C2_blBOuynJBd5rPTqyxNfNmIl4O7Mut7T6KVJZbcp-nM1P-x-Jxhih4lBoFKbiiteSio_Xh8K6IqA9UGsaw99DrOFbjXn5p4wtWdIqTxKzwveKwXovmKxNknYuxyI7VfnPeah3sRwFYZ42FMotWtuRZsbjreZP15A9gZCz_ap9BpfTHDXs/w640-h68/3.png" width="640" /></a></div><br /><div><div><div>Confirm that the tunnel has been successfully created by running:</div><div><br /></div><div><span style="font-family: courier;"><b>cloudflared tunnel list</b></span></div></div><div><br /></div><div>Routing the Tunnel to a Domain Name</div><div><br /></div><div>6. With the tunnel created, we can now route the tunnel to a domain name that we have with Cloudflare. This will allow us to access our local server through that domain name.</div><div><br /></div><div>Ensure you replace “TUNNELNAME” with the name of your tunnel and replace “DOMAINNAME” with the domain name you want to use.</div><div><br /></div><div><span style="font-family: courier;"><b>cloudflared tunnel route dns TUNNELNAME DOMAINNAME</b></span></div></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: inherit;">7. If the above command worked correctly, you would see a similar message to the one below. This message confirms that Cloudflare created a CNAME that routes to your tunnel.</span></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyqAb-XCaKHKZCGIPQ5gDTeWybi-3sMfhmX40BhBWxGpnbehM9Xym4PjU2BO68QI_XnGq1B8GWDwSMEmNDiFGVYc0suaHIfkNrQ4HXsaze2K8QMYLciHMbPk0nzZVMbRdSw7oXPUVEcAmZ68fnuNFmJRqst4fvPb3MxNpdM7sniHvmE7YNkhJqK4Id/s1317/4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="107" data-original-width="1317" height="52" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyqAb-XCaKHKZCGIPQ5gDTeWybi-3sMfhmX40BhBWxGpnbehM9Xym4PjU2BO68QI_XnGq1B8GWDwSMEmNDiFGVYc0suaHIfkNrQ4HXsaze2K8QMYLciHMbPk0nzZVMbRdSw7oXPUVEcAmZ68fnuNFmJRqst4fvPb3MxNpdM7sniHvmE7YNkhJqK4Id/w640-h52/4.png" width="640" /></a></div><div><br /></div><div>See your cloudflare website's DNS</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSYe0Bs3HuXGV0gcu4Ddvo59JYfz-C3XGPzr-3v7AGhu8IEDd-7KuS1VaqKW9I01Iu588MoJ0bQr2PsFcS5iPvK4Es3huMH-_hDYsrgsHxhUGuzv02EVAQ8IFOnn2ZrG45fqLSpJatBSyDef6Bc4Qah8Rvjlo8hFdNXU67TRWqDqB6TGmWMf3DpzJ3/s1366/chrome_jy3XC6m9wg.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="617" data-original-width="1366" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSYe0Bs3HuXGV0gcu4Ddvo59JYfz-C3XGPzr-3v7AGhu8IEDd-7KuS1VaqKW9I01Iu588MoJ0bQr2PsFcS5iPvK4Es3huMH-_hDYsrgsHxhUGuzv02EVAQ8IFOnn2ZrG45fqLSpJatBSyDef6Bc4Qah8Rvjlo8hFdNXU67TRWqDqB6TGmWMf3DpzJ3/w640-h290/chrome_jy3XC6m9wg.png" width="640" /></a></div><div><br /></div><div><div><br /></div><div><div>No, we need to create two more CNAME records in the DNS, one for the Koha Staff interface and another for the OPAC interface by clicking on the "Add Record" button on the right side of the DNS records. Before that, copy the <b>target </b>from the DNS record that was initially created. </div></div><div><br /></div><div>These are the subdomains I intend to use.</div><div><br /></div><div><i>koha-admin</i></div><div><i>koha-opac</i></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgznWjY_-UY6BgwjHGaFDk5GJtRje462l_3cZiuwp0MKp766yFgA-k63Qe3ZFtTdnluaDTqChVf8w8NZpIrK9NlNzvJJvQGs7RPpe4jXfHcL95VdEbQ3T6gfA83EeWWSkmeTkGD5J4wcg3M73mtkQfSc0-tVh9t2iPUG_os2daI2qCTMp6CFM7qHzqq/s1366/5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="617" data-original-width="1366" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgznWjY_-UY6BgwjHGaFDk5GJtRje462l_3cZiuwp0MKp766yFgA-k63Qe3ZFtTdnluaDTqChVf8w8NZpIrK9NlNzvJJvQGs7RPpe4jXfHcL95VdEbQ3T6gfA83EeWWSkmeTkGD5J4wcg3M73mtkQfSc0-tVh9t2iPUG_os2daI2qCTMp6CFM7qHzqq/w640-h290/5.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Step:1</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd7U-LJa9TNlRbwn_FMW0taSE60hDV3m7tDi8Cd5tqCuI2vB2yX2lW_CqQlBh46Bzvt_y9nAGSdLJPWV6MJIHL08lFUNf4t8zYJPlUCqd_hHkEK0FMKzP0gN1F6z9ZzUl9CdKx7eiGVg2fn42rJ38YK6tALdp7gKhyk5p45B74cb-6WYo-wWSwuXHr/s982/6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="346" data-original-width="982" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd7U-LJa9TNlRbwn_FMW0taSE60hDV3m7tDi8Cd5tqCuI2vB2yX2lW_CqQlBh46Bzvt_y9nAGSdLJPWV6MJIHL08lFUNf4t8zYJPlUCqd_hHkEK0FMKzP0gN1F6z9ZzUl9CdKx7eiGVg2fn42rJ38YK6tALdp7gKhyk5p45B74cb-6WYo-wWSwuXHr/w640-h226/6.png" width="640" /></a></div><div><br /></div>Step:2 Copying the target</div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoqQPv3z1HO6guU9faHP5Tv9dYcW5a7qb0sjOf7dh1CVTsRd7BTggq2FhMsL3Mg-8zvEmAoUiUV1uZYWTdV0qfxeLvxUJbniBTPWZteyo_eP6wtwdyuWHsFgf3q6L2q1VRoopGeywtFpEUxnbcfG_1DAocAPuC49VcJfvHF583gprbk8lt5xDu2YWa/s1366/7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="617" data-original-width="1366" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoqQPv3z1HO6guU9faHP5Tv9dYcW5a7qb0sjOf7dh1CVTsRd7BTggq2FhMsL3Mg-8zvEmAoUiUV1uZYWTdV0qfxeLvxUJbniBTPWZteyo_eP6wtwdyuWHsFgf3q6L2q1VRoopGeywtFpEUxnbcfG_1DAocAPuC49VcJfvHF583gprbk8lt5xDu2YWa/w640-h290/7.png" width="640" /></a></div><div><br /></div><div>Adding First CNAME (subdomain) for Koha Staff Client </div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg8Ol0vFMcRDeGTu8anWx978mivAA6Lm7XFka9V1hCX27iC7jW43gYEzfWtXRzfewvnVrPrKzPI1Tzpm3cB-Mo2ShzXyILHcLyKgs4_SopXZCL5v12eA397MDtWoW8fWFw4BwkPzDgoHmAQeeGH34bkeO8kywN6DK5HMvsATBojmFo4p28vp3aDZJm/s1366/8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="617" data-original-width="1366" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg8Ol0vFMcRDeGTu8anWx978mivAA6Lm7XFka9V1hCX27iC7jW43gYEzfWtXRzfewvnVrPrKzPI1Tzpm3cB-Mo2ShzXyILHcLyKgs4_SopXZCL5v12eA397MDtWoW8fWFw4BwkPzDgoHmAQeeGH34bkeO8kywN6DK5HMvsATBojmFo4p28vp3aDZJm/w640-h290/8.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Adding Second CNAME (subdomain) for Koha OPAC Client</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAI5MvMUXFCGdtXtohP52V5l19WWXke51G3_rwtfLDNyFehs_0etwye98TxnDRbKpjL4XwgUAac097T2Ckl-D4WHI15ZXJevpMoaWN0A1X6hr2cADKkwpDlXKaEIBJwltAKC59hvonaxQHqxKqIU0WYcjCxMORCY2h1FFAxqccrESc5W6-whiCgHA8/s1366/9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="617" data-original-width="1366" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAI5MvMUXFCGdtXtohP52V5l19WWXke51G3_rwtfLDNyFehs_0etwye98TxnDRbKpjL4XwgUAac097T2Ckl-D4WHI15ZXJevpMoaWN0A1X6hr2cADKkwpDlXKaEIBJwltAKC59hvonaxQHqxKqIU0WYcjCxMORCY2h1FFAxqccrESc5W6-whiCgHA8/w640-h290/9.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">Fianl result of CNAME records</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl_L0w_O5meSxXbhDnTtWh28as9bRwTWph2p6228RccmzN408drT0II-6l4C0QU0JFOmhLbfn10fpa10UiFZBIOWDbe2tirN_LapSov6YCl_RHcARLXjKT0sTGXecU9J5W383w6sgnqpq-aWvAgIOs8NKNtDMNC2svYNYBhmnuVyAFZs-kTAy1P7B4/s1366/10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="617" data-original-width="1366" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl_L0w_O5meSxXbhDnTtWh28as9bRwTWph2p6228RccmzN408drT0II-6l4C0QU0JFOmhLbfn10fpa10UiFZBIOWDbe2tirN_LapSov6YCl_RHcARLXjKT0sTGXecU9J5W383w6sgnqpq-aWvAgIOs8NKNtDMNC2svYNYBhmnuVyAFZs-kTAy1P7B4/w640-h290/10.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div>Now now both the CNAME’s are pointing to the same tunnel , we will route the traffic to both the interfaces accordingly using the ingress rules . Open up the <b>config.yaml file</b> and add the below-mentioned code snippet. Change the ports according to your interface. Note: Here I am going to add <span><b style="color: red;">Koha staff port 8080 and OPAC port 8081</b>, since I have used these port in koha. </span>Save the configuration and start the tunnel again.</div><div><br /></div><div><b>Forwarding our local server Ports through the Cloudflare Tunnel</b></div><div><br /></div><div><div>Note down the tunnel ID and run the command below.</div><div><br /></div><div><span style="font-family: courier;"><b>cloudflared tunnel list</b></span></div></div><div><br /></div><div>Create a yml file replacing XXXX with your tunnel ID</div><div><br /></div><div><div><span style="font-family: courier;"><b>sudo nano ~/.cloudflared/config.yml</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b>tunnel: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</b></span></div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b>credentials-file: /home/mahesh/.cloudflared/XXXXXXXXX.json</b></span></div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b><br /></b></span></div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b>ingress:</b></span></div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b> # Rules map traffic for Koha Staff Interface:</b></span></div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b> - hostname: koha-admin.mahesh-homeserver.co.in</b></span></div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b> service: http://localhost:8080</b></span></div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b> # Rules map traffic for Koha OPAC Interface:</b></span></div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b> - hostname: koha-opac.mahesh-homeserver.co.in</b></span></div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b> service: http://localhost:8081</b></span></div><div><span style="color: #2b00fe; font-family: courier; font-size: x-small;"><b> - service: http_status:404</b></span></div></div><div><br /></div><div>save the file</div><div><br /></div><div><div>With the config file created, we can install it as a service using the following command.</div><div><br /></div><div>This command will copy our config file to the correct location and prepare a service file for systemd.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo cloudflared --config ~/.cloudflared/config.yml service install</b></span></div><div><br /></div><div>We can enable the Cloudflare tunnel service so that it will start when our local server does by using the following command.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo systemctl enable cloudflared</b></span></div><div><br /></div><div>Finally, you can ensure the tunnel is online now by using the command below within the terminal.</div><div><br /></div><div><span style="font-family: courier;"><b>sudo systemctl start cloudflared</b></span></div></div><div><br /></div><div>Restart the Tunnel</div><div><br /></div><div><span style="font-family: courier;"><b>cloudflared tunnel run mytunnel</b></span></div></div></div><div><br /></div><div><div>We will test this in our browsers by visiting the new subdomain.</div><div><br /></div><div>koha-admin.mahesh-homeserver.co.in</div><div>koha-opac.mahesh-homeserver.co.in</div></div><div><br /></div><div>References:</div><div><a href="goog_2107564302"><br /></a></div><div><a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/#set-up-a-tunnel-locally-cli-setup">https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/#set-up-a-tunnel-locally-cli-setup</a></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-32137720155364692882022-12-29T15:24:00.017+05:302023-01-13T15:31:40.545+05:30RustDesk: A self-hosted AnyDesk/TeamViewer Alternative<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_OxY6oefUqwLe65bW8WocAEC4E8T-zPWawRqRVzwMn6CUW7ol0TbpsYwQREx_8kh-XwnvCPcXXsywpSgYi0XMO3i32RfvNpDqjjingge_Fi7WnORvQ5avvDxrt4rJiPPCT_gIVE7NgZY7bgsnmM6om8S3Ko43KCXvQlECt5d--tF1KlCmuNVZATiW/s1000/2a40bacc-d066-49b3-bc59-e966cbb804e6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="287" data-original-width="1000" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_OxY6oefUqwLe65bW8WocAEC4E8T-zPWawRqRVzwMn6CUW7ol0TbpsYwQREx_8kh-XwnvCPcXXsywpSgYi0XMO3i32RfvNpDqjjingge_Fi7WnORvQ5avvDxrt4rJiPPCT_gIVE7NgZY7bgsnmM6om8S3Ko43KCXvQlECt5d--tF1KlCmuNVZATiW/w640-h184/2a40bacc-d066-49b3-bc59-e966cbb804e6.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>RustDesk is an open source, remote desktop system that gives you control of your own server, and client software. If you've ever used TeamViewer, AnyDesk, Remotely, and a whole host of other options, then you'll understand exactly what RustDesk is. It's remote access / remote support software. The beauty of RustDesk is that it's just been re-written, and the server and client are now fully open source, and free to use.</div><div><br /></div><div>Server requirements</div><div><ul style="text-align: left;"><li>A linux server (CentOS/Ubuntu/Debian)</li><li>1 CPU </li><li>1 GB RAM</li><li>10 GB disk</li></ul></div><div><br /></div><div>How to Install the server</div><div><br /></div><div>Deploy a server from any VPS providers & connect to your server and point your IP to your domain, here I created one sub-domain from domain ie, rustdusk and maped the IP from my DNS settings</div><div><br /></div><div><span style="font-family: courier;"><b>ssh root@youripaddress</b></span></div><div><br /></div><div>Update Debian using apt</div><div><br /></div><div><span style="font-family: courier;"><b>apt update && apt upgrade -y</b></span></div><div><br /></div><div>Install few required packages not available with Debian by default. </div><div> </div><div><span style="font-family: courier;"><b>apt install -y software-properties-common dirmngr file-roller unzip wget gnupg git curl vim tmux ufw sudo</b></span></div><div><br /></div><div>Create a user and make it a sudo user</div><div><br /></div><div><span style="font-family: courier;"><b>adduser rustdesk</b></span></div><div><span style="font-family: courier;"><b>adduser rustdesk sudo</b></span></div><div><br /></div><div>Please setup your firewall on your server prior to running the script.</div><div><br /></div><div>Configure the firewall</div><div><br /></div><div><span style="font-family: courier;"><b>ufw allow 22/tcp</b></span></div><div><span style="font-family: courier;"><b>ufw allow 21115:21119/tcp</b></span></div><div><span style="font-family: courier;"><b>ufw allow 8000/tcp</b></span></div><div><span style="font-family: courier;"><b>ufw allow 21116/udp</b></span></div><div><span style="font-family: courier;"><b>ufw enable</b></span></div><div><span style="font-family: courier;"><b>systemctl start ufw</b></span></div><div><br /></div><div>Copy ssh key from root to the new user directory</div><div><br /></div><div><span style="font-family: courier;"><b>mkdir -p /home/rustdesk/.ssh</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>cp ./.ssh/* /home/rustdesk/.ssh/</b></span></div><div><br /></div><div>Change the ownership</div><div><br /></div><div><span style="font-family: courier;"><b>chown -R rustdesk:rustdesk /home/rustdesk/.ssh/</b></span></div><div><br /></div><div>Reboot the server and reconnect as the new user</div><div><br /></div><div><span style="font-family: courier;"><b>ssh rustdesk@youripaddress</b></span></div><div><br /></div><div>Run the following commands:</div><div><br /></div><div><span style="font-family: courier;"><b>wget -O install-docker.sh https://gitlab.com/bmcgonag/docker_installs/-/raw/main/install_docker_nproxyman.sh</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>chmod +x install-docker.sh</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>./</b></span><b style="font-family: courier;">install-docker.sh</b></div><div><br /></div><div>Create rustdesk directory under docker directory</div><div><br /></div><div><span style="font-family: courier;"><b>cd docker && mkdir rustdesk && cd rustdesk</b></span></div><div><br /></div><div>Create a file called "docker-compose.yml" and copy paste the following lines</div><div><br /></div><div><span style="font-family: courier;"><b>nano docker-compose.yml</b></span></div><div><br /></div><div><span style="color: #2b00fe;">version: '3'</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">networks:</span></div><div><span style="color: #2b00fe;"> rustdesk-net:</span></div><div><span style="color: #2b00fe;"> external: false</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;">services:</span></div><div><span style="color: #2b00fe;"> hbbs:</span></div><div><span style="color: #2b00fe;"> container_name: hbbs</span></div><div><span style="color: #2b00fe;"> ports:</span></div><div><span style="color: #2b00fe;"> - 21115:21115</span></div><div><span style="color: #2b00fe;"> - 21116:21116</span></div><div><span style="color: #2b00fe;"> - 21116:21116/udp</span></div><div><span style="color: #2b00fe;"> - 21118:21118</span></div><div><span style="color: #2b00fe;"> image: rustdesk/rustdesk-server:latest</span></div><div><span style="color: #2b00fe;"> command: hbbs -r </span><span style="color: red;">rustdesk.opensio.co.in</span><span style="color: #2b00fe;">:21117</span></div><div><span style="color: #2b00fe;"> volumes:</span></div><div><span style="color: #2b00fe;"> - ./hbbs:/root</span></div><div><span style="color: #2b00fe;"> networks:</span></div><div><span style="color: #2b00fe;"> - rustdesk-net</span></div><div><span style="color: #2b00fe;"> depends_on:</span></div><div><span style="color: #2b00fe;"> - hbbr</span></div><div><span style="color: #2b00fe;"> restart: unless-stopped</span></div><div><span style="color: #2b00fe;"><br /></span></div><div><span style="color: #2b00fe;"> hbbr:</span></div><div><span style="color: #2b00fe;"> container_name: hbbr</span></div><div><span style="color: #2b00fe;"> ports:</span></div><div><span style="color: #2b00fe;"> - 21117:21117</span></div><div><span style="color: #2b00fe;"> - 21119:21119</span></div><div><span style="color: #2b00fe;"> image: rustdesk/rustdesk-server:latest</span></div><div><span style="color: #2b00fe;"> command: hbbr</span></div><div><span style="color: #2b00fe;"> volumes:</span></div><div><span style="color: #2b00fe;"> - ./hbbr:/root</span></div><div><span style="color: #2b00fe;"> networks:</span></div><div><span style="color: #2b00fe;"> - rustdesk-net</span></div><div><span style="color: #2b00fe;"> restart: unless-stopped</span></div><div><br /></div><div><div>Starting the Server</div><div><br /></div><div>Presuming that you've done all of the necessary setup steps above, you can now run the server with the command:</div><div><br /></div><div><span style="font-family: courier;"><b>docker-compose up -d</b></span></div><div><br /></div><div>NOTE: you have to be in the rustdesk folder / directory when you run the above command.</div><div>Once you get a "done" message in the terminal, you can check the run logs with</div><div><br /></div><div><span style="font-family: courier;"><b>docker-compose logs -f</b></span></div></div><div><br /></div><div><div>Now you need to get the RustDesk client downloaded and installed on your desire client machines.</div><div><br /></div><div>Go to <a href="http://RustDesk.com">RustDesk.com</a> and click the Download button.</div><div><br /></div><div>Once downloaded, if you need to run the installer, run it per your Distros requirements. Windows is a zipped file, with an executable inside, so extract the file, then run the .exe to install.</div><div><br /></div><div>Once you run the client it will connect to the RustDesk default servers. You'll see an ID number and passcode (hidden by default). Next to the ID you'll see a 3-dot icon. Click it, and select "ID/Relay Server".</div><div><br /></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB7MQsjtsB_wxlp0uWZeDv203gQbJSRJbFkS2lVgoCNsi4wmyzGYGmw0N7qaXWtcBFDidujTdeYeTALfoKNsK85mbpm5LgzyukI7hWhXuju_u1ReySzqykIO8ZYvWWyxupgBZUIp8gUQcc8rvJ_NtMA19n8C6cS3IR21CzyQVep6LB3EFzg-5mDG-5/s409/3-dot-rustdesk%20(1).png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="305" data-original-width="409" height="299" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB7MQsjtsB_wxlp0uWZeDv203gQbJSRJbFkS2lVgoCNsi4wmyzGYGmw0N7qaXWtcBFDidujTdeYeTALfoKNsK85mbpm5LgzyukI7hWhXuju_u1ReySzqykIO8ZYvWWyxupgBZUIp8gUQcc8rvJ_NtMA19n8C6cS3IR21CzyQVep6LB3EFzg-5mDG-5/w400-h299/3-dot-rustdesk%20(1).png" width="400" /></a></div><br /><div>In the pop-up window, will in the domain / sub-domain of your server, with the port in the first blank marked ID Server:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbxra7rgIjGxjnVmFzJfUpX0zrC6XM0XkPhC143FRIPF_SUf8txU2yIcs0bjwtRygxED2vu7tuS1cD6ZLfBHcgSKdkpw1Owb3M89H6CSzns5ixqBUep6KvdnBvcBWV-rdL0Oa0xrLyrLi3MIpadC7eXqsNI9upIFGd39Nwou1bJ-oof5sG9VYpQlCW/s669/RustDesk_J5KdQa5bfU.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="377" data-original-width="669" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbxra7rgIjGxjnVmFzJfUpX0zrC6XM0XkPhC143FRIPF_SUf8txU2yIcs0bjwtRygxED2vu7tuS1cD6ZLfBHcgSKdkpw1Owb3M89H6CSzns5ixqBUep6KvdnBvcBWV-rdL0Oa0xrLyrLi3MIpadC7eXqsNI9upIFGd39Nwou1bJ-oof5sG9VYpQlCW/w400-h225/RustDesk_J5KdQa5bfU.png" width="400" /></a></div><br /><div>Finally, when you click 'Ok', you should see the message at the bottom of the main RustDesk client window go to "Ready" as shown below.</div><div><br /></div><div><div>Security</div><div><br /></div><div>The RustDesk documentation covers a few key security topics. You will be running unencrypted if you continue to use RustDesk in the manner shown so far. This is probably good for a private network (local-only network), but if you want to use RustDesk online, you should follow the additional instructions in their documentation to make sure your connection is secured.</div></div><div><br /></div><div><div>First, on your server, go to the folder inside the rustdesk folder called "hbbs"</div><div><br /></div><div><span style="font-family: courier;"><b>cd ~/docker/rustdesk/hbbs</b></span></div><div><br /></div><div>Next, look at the contents of the file called "id_ed25519.pub" with</div><div><br /></div><div><span style="font-family: courier;"><b>nano id_ed25519.pub</b></span></div><div><br /></div><div>Copy the key that is inside this file, and then make sure to enter this key in the 'Key' field on all of your RustDesk clients. Now, when you connect two clients together that both have the same server URL, and the same key value, they will communicate via an encrypted connection.</div></div><div><br /></div><div>How can I prevent other people from accessing my RustDesk server?</div><div><br /></div><div><b style="font-family: courier;">cd..</b></div><div><span style="font-family: courier;"><b>nano docker-compose.yml</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: inherit;">Append your secret key to the yml file</span></div><div><span style="font-family: inherit;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi83vW2hVh99NoNfj6PO7f-Um5IxDBm53_H1E06JSK089maX4NiY4OgeZay8a9wEcMb_Z8l69Qnq-GGM0XEnEus61su-jHh-3ZIx6XKvTe3Ooi2wvwq3RGStOr7SMLMoOoMEG5tdgl6_p5k9SzUIioThjeUYMiu_jiBOCZit69hrFIqNL1Bp9MTwzP1/s1366/WindowsTerminal_CdVkZTgjWR.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1366" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi83vW2hVh99NoNfj6PO7f-Um5IxDBm53_H1E06JSK089maX4NiY4OgeZay8a9wEcMb_Z8l69Qnq-GGM0XEnEus61su-jHh-3ZIx6XKvTe3Ooi2wvwq3RGStOr7SMLMoOoMEG5tdgl6_p5k9SzUIioThjeUYMiu_jiBOCZit69hrFIqNL1Bp9MTwzP1/w640-h338/WindowsTerminal_CdVkZTgjWR.png" width="640" /></a></div><br /><div>Restart your docker containers with your new changes by simply running:</div><div><br /></div><div><span style="font-family: courier;"><b>docker-compose up -d</b></span></div><div><br /></div><div>again, and then test your system. If you try to connect to your server from a client without the key setup on the client as well, it should no longer connect.</div><div><br /></div><div>This does 2 things.</div><div><ul style="text-align: left;"><li>It makes certain that your clients are connecting using the key and encryption.</li><li>No one without your key can connect through your server.</li></ul><div><br /></div><div>Reference:</div><div><br /></div><div><a href="https://rustdesk.com/docs/en/self-host/install/">https://rustdesk.com/docs/en/self-host/install/</a></div><div><a href="https://www.youtube.com/watch?v=EeFqj23jxMk">https://www.youtube.com/watch?v=EeFqj23jxMk</a></div></div></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0tag:blogger.com,1999:blog-8500912133904735300.post-44213853870694338392022-12-25T16:47:00.001+05:302022-12-25T16:47:26.728+05:30Fix Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead in Ubuntu<div><div>When adding the Koha repository and its key, you might see a warning; this is a security measure, not a problem.</div><div><br /></div><div>Starting with Ubuntu 20.10, the use of <b>apt-key</b> yields a warning that the tool will be deprecated in the near future; likewise, <b>add-apt-repository</b> will also soon be deprecated. While these deprecation warnings do not strictly prevent the usage of<b> apt-key</b> and <b>add-apt-repository</b> with Ubuntu 22.04, it is not advisable to ignore them.</div><div><br /></div><div>The current best practice is to use <b>gpg </b>in place of <b>apt-key</b> and <b>add-apt-repository</b>, and in future versions of Ubuntu, that will be the only option.<b> apt-key</b> and <b>add-apt-repository</b> themselves have always acted as wrappers, calling <b>gpg </b>in the background. Using <b>gpg </b>directly cuts out the intermediary. </div></div><div><br /></div><div>It won't display the warning because the syntax itself adds a file with the name koha.gpg to the trusted.gpg.d directory, so use the following key when installing Koha</div><div><br /></div><div><br /></div><div><span style="font-family: courier;"><b>sudo wget -O- http://debian.koha-community.org/koha/gpg.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/koha.gpg</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><b>OR</b></div><div><b><br /></b></div><div>You must move the trusted.gpg file with the name koha-trusted.gpg to /etc/apt/trusted.d/ after adding the key.</div><div><br /></div><div><span style="font-family: courier;"><b>cd /etc/apt/</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>sudo mv trusted.gpg koha-trusted.gpg</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>sudo mv koha-trusted.gpg /etc/apt/trusted.gpg.d/</b></span></div><div><br /></div><div>and continue installing Koha; the same process can be used to install anydesk using a DEB repository.</div><div><br /></div><div><div><span style="font-family: courier;"><b>cd /etc/apt/</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>sudo mv trusted.gpg anydesk-trusted.gpg</b></span></div><div><span style="font-family: courier;"><b><br /></b></span></div><div><span style="font-family: courier;"><b>sudo mv anydesk-trusted.gpg /etc/apt/trusted.gpg.d/</b></span></div></div><div><br /></div>Mahesh Palamuttathhttp://www.blogger.com/profile/13004111007338203147noreply@blogger.com0