Software / Platforms: Apache Webserver, nginx, MariaDB, PHP 8.3, Plesk, Apache Solr
Prerequisites
- Server Recommendation:
- Minimum of 16 CPU cores, 16GB RAM
- SSD / NVMe for optimal performance, especially for MariaDB and Solr.
- Access:
- Root or sudo access to your Debian 12 server.
- A domain name configured to point to your server (if hosting websites).
- Networking:
- Ensure the server has a static IP.
- Open necessary ports for services:
- 80 (HTTP), 443 (HTTPS) for web.
- 3306 for MariaDB (optional, for remote DB access).
- 8443 for Plesk admin panel.
- 8983 for Solr admin (limit access for security).
1. Update and Prepare Debian 12
sudo apt update && sudo apt upgrade -y
sudo apt install curl wget gnupg software-properties-common -y
Set the correct timezone:
sudo dpkg-reconfigure tzdata
Add necessary repositories (if needed, for Plesk and MariaDB).
2. Install Plesk
Plesk automates the installation of key components like Apache, nginx, and MariaDB.
- Download and Install Plesk Installer:
wget https://autoinstall.plesk.com/plesk-installer
chmod +x plesk-installer
sudo ./plesk-installer
- Follow On-Screen Instructions:
- Choose the “Recommended” installation type.
- Ensure Apache, nginx, and MariaDB are selected.
- You can enable optional features like Mail Server or Security Enhancements.
- Access Plesk:
- After installation, visit:
https://<your_server_ip>:8443
. - Log in with root credentials and set up the admin account.
- After installation, visit:
- Verify Services: Plesk should set up Apache, nginx, and MariaDB by default.
- Activate / install Plugins:
- Panel.ini Editor
- Repair Kit
- Let's Encrypt
- SSL IT
3. Configure Apache and nginx
- Apache Configuration:
- Apache is the primary backend for Plesk. Plesk configures Apache automatically, but custom configurations can be done via:
/etc/apache2/apache2.conf
- Per domain: via Plesk > Domain > Apache & nginx Settings.
- Apache is the primary backend for Plesk. Plesk configures Apache automatically, but custom configurations can be done via:
- nginx as a Reverse Proxy:
- nginx is enabled as a proxy in Plesk by default.
-
Verify configuration:
sudo systemctl status nginx sudo systemctl status apache2
- Customize Settings in Plesk:
- Go to Tools & Settings > Web Server Settings.
- Configure caching, gzip compression, and SSL settings.
4. Configure MariaDB
- MariaDB Installation (Plesk manages this by default):
-
Check MariaDB version:
mysql --version
- Default configuration files are located in
/etc/mysql/
.
-
-
Secure MariaDB: Run the security script to set a root password and secure MariaDB:
sudo mysql_secure_installation
-
Adjust Config for Performance: Edit
/etc/mysql/my.cnf
:[mysqld] innodb_buffer_pool_size=1G max_connections=200
Restart MariaDB:
sudo systemctl restart mariadb
5. Install Solr
-
Install Java (Required for Solr):
sudo apt install openjdk-11-jdk -y java -version
-
Download Solr: Visit the Solr download page and get the latest version. Replace
x.y.z
with the latest version:wget https://downloads.apache.org/lucene/solr/x.y.z/solr-x.y.z.tgz tar xzf solr-x.y.z.tgz
-
Install Solr:
sudo bash solr-x.y.z/bin/install_solr_service.sh solr-x.y.z.tgz
-
Start Solr:
sudo systemctl start solr sudo systemctl enable solr
- Access Solr:
- Solr admin panel:
http://<your_server_ip>:8983/solr
. - Secure this port with firewall rules or IP-based restrictions (and ZK : ZooKeeper).
- Solr admin panel:
-
Create a Core:
sudo su - solr -c "/opt/solr/bin/solr create -c mycore"
6. Optimize and Secure the Setup
- Enable HTTPS with Let’s Encrypt:
- Use Plesk to install and manage Let’s Encrypt SSL for domains.
- Firewall Configuration:
-
Use
ufw
or a similar firewall tool:sudo ufw allow OpenSSH sudo ufw allow 80 sudo ufw allow 443 sudo ufw allow 8443 sudo ufw allow 8983 sudo ufw enable
-
- Monitor Resources:
- Install monitoring tools like
htop
or configure Plesk alerts for resource usage.
- Install monitoring tools like
- Backup Configuration:
- Configure automated backups in Plesk for server and databases.
7. Post-Installation Checklist
-
Verify all services are running:
sudo systemctl status apache2 sudo systemctl status nginx sudo systemctl status mariadb sudo systemctl status solr
- Test server speed and response.
- Secure Solr admin interface with IP or authentication.
Neuen Kommentar schreiben