{"id":1995,"date":"2024-12-17T09:38:11","date_gmt":"2024-09-19T18:51:58","guid":{"rendered":""},"modified":"2025-02-02T00:46:17","modified_gmt":"2025-02-01T23:46:17","slug":"how-to-install-apache-solr-on-debian-12","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-apache-solr-on-debian-12\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 Apache Solr on Debian 12"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header>\n<h1>\u00a0<\/h1>\n<\/header>\n<section>\n<p><strong>Apache Solr<\/strong> is an open-source, highly scalable search platform built on Apache Lucene. It is used for enterprise-level search functionality and can handle large volumes of data with speed and efficiency. This guide will show you how to install Apache Solr on Debian 12, whether you&#8217;re running a local server or a <strong>VPS server<\/strong> environment.<\/p>\n<h2>Step 1: Update Your System<\/h2>\n<p>Before starting, make sure your Debian 12 server is up to date. Run the following commands to update your package list and install any available upgrades:<\/p>\n<pre><code>sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n<h2>Step 2: Install Java<\/h2>\n<p>Apache Solr requires Java to run. You can install OpenJDK, a free and open-source implementation of the Java Platform, using the following command:<\/p>\n<pre><code>sudo apt install default-jdk -y<\/code><\/pre>\n<p>Verify the Java installation by checking the version:<\/p>\n<pre><code>java -version<\/code><\/pre>\n<p>You should see output displaying the installed Java version.<\/p>\n<h2>Step 3: Download Apache Solr<\/h2>\n<p>Next, download the latest stable version of Apache Solr. Navigate to the <a href=\"https:\/\/solr.apache.org\/downloads.html\" target=\"_blank\" rel=\"follow\">official Apache Solr downloads page<\/a> to get the latest version. You can use <code>wget<\/code> to download Solr directly. For example, to download Solr 9.0.0:<\/p>\n<pre><code>wget https:\/\/dlcdn.apache.org\/lucene\/solr\/9.0.0\/solr-9.0.0.tgz<\/code><\/pre>\n<p>Once the download is complete, extract the downloaded file:<\/p>\n<pre><code>sudo tar xzf solr-9.0.0.tgz<\/code><\/pre>\n<h2>Step 4: Install Apache Solr<\/h2>\n<p>After extracting the Solr archive, navigate to the extracted directory and run the installation script:<\/p>\n<pre><code>sudo bash solr-9.0.0\/bin\/install_solr_service.sh solr-9.0.0.tgz<\/code><\/pre>\n<p>This will install Solr as a service on your system, configure it to run automatically at boot, and set the necessary permissions.<\/p>\n<h2>Step 5: Start and Enable Apache Solr<\/h2>\n<p>Once the installation is complete, start the Solr service and enable it to start automatically at boot:<\/p>\n<pre><code>\r\nsudo systemctl start solr\r\nsudo systemctl enable solr\r\n        <\/code><\/pre>\n<p>To verify that Solr is running, use the following command:<\/p>\n<pre><code>sudo systemctl status solr<\/code><\/pre>\n<h2>Step 6: Access the Solr Admin Interface<\/h2>\n<p>By default, Apache Solr runs on port 8983. To access the Solr Admin interface, open a web browser and navigate to:<\/p>\n<pre><code>http:\/\/your_server_ip:8983\/solr<\/code><\/pre>\n<p>You should see the Solr Admin Dashboard, where you can manage and monitor your Solr instances.<\/p>\n<h2>Step 7: Create a New Solr Core<\/h2>\n<p>In Solr, &#8220;cores&#8221; represent separate collections of indexed data. To create a new core, use the following command (replace <code>my_core<\/code> with your desired core name):<\/p>\n<pre><code>sudo su - solr -c \"\/opt\/solr\/bin\/solr create -c my_core\"<\/code><\/pre>\n<p>Once the core is created, you can manage it from the Solr Admin interface or via the command line.<\/p>\n<h2>Step 8: Secure Solr (Optional)<\/h2>\n<p>If you&#8217;re running Solr on a public-facing <strong>VPS server<\/strong>, it&#8217;s important to secure access to the Solr Admin interface. Consider setting up basic authentication or using a reverse proxy like Nginx with SSL encryption to protect access.<\/p>\n<h3>Set Up Basic Authentication<\/h3>\n<p>To enable basic authentication, you can install the <code>solr-basic-authentication-plugin<\/code> and configure authentication in the <code>solr.in.sh<\/code> file.<\/p>\n<h3>Configure Nginx as a Reverse Proxy with SSL<\/h3>\n<p>For an added layer of security, configure Nginx as a reverse proxy for Solr with Let&#8217;s Encrypt SSL. First, install Nginx and Certbot:<\/p>\n<pre><code>sudo apt install nginx certbot python3-certbot-nginx -y<\/code><\/pre>\n<p>Set up a reverse proxy in the Nginx configuration file:<\/p>\n<pre><code>\r\nserver {\r\n    listen 80;\r\n    server_name your_domain;\r\n\r\n    location \/ {\r\n        proxy_pass http:\/\/localhost:8983;\r\n        proxy_set_header Host $host;\r\n        proxy_set_header X-Real-IP $remote_addr;\r\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n        proxy_set_header X-Forwarded-Proto $scheme;\r\n    }\r\n}\r\n        <\/code><\/pre>\n<p>Save the file and restart Nginx:<\/p>\n<pre><code>sudo systemctl restart nginx<\/code><\/pre>\n<p>Then, obtain a free SSL certificate from Let&#8217;s Encrypt:<\/p>\n<pre><code>sudo certbot --nginx -d your_domain<\/code><\/pre>\n<p>Follow the prompts to complete the SSL configuration. Nginx will now proxy requests to Solr securely using HTTPS.<\/p>\n<h2>Running Apache Solr on a VPS Server<\/h2>\n<p>Apache Solr is ideal for search-heavy applications, and running it on a <strong>VPS server<\/strong> provides the scalability and performance needed for enterprise-level search functionality. Whether you&#8217;re indexing large datasets or building search functionality into your application, a <strong>VPS<\/strong> offers the control and flexibility required for smooth operation.<\/p>\n<h2>Looking for a Reliable VPS Solution?<\/h2>\n<p>If you&#8217;re looking for a powerful and scalable <strong>VPS server<\/strong> to run Apache Solr, consider using . With <strong>Windows VPS<\/strong>, you get high-performance VPS hosting with full control over your environment, perfect for running Solr and other demanding applications.<\/p>\n<footer>\n<p>For more VPS server solutions and guides, visit <a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\" rel=\"follow\">netcloud24.com<\/a>.<\/p>\n<\/footer>\n<\/section>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 Apache Solr is an open-source, highly scalable search platform built on Apache Lucene. It is used for enterprise-level search functionality and can handle large volumes of\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-1995","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1995"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1995\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}