Search found 618 matches

by LHammonds
Fri Aug 09, 2019 3:33 pm
Forum: Tutorials
Topic: How to Load Balance Apache Web Server on Ubuntu Server 18.04 LTS
Replies: 5
Views: 207

Test via PHP

Test via PHP If you already have your database cluster ready to use, let's setup a test to show what web server the browser hits as well as which database was used in the backend. The web server will not know anything about the backend database servers because they look like a single database from ...
by LHammonds
Thu Aug 08, 2019 2:14 pm
Forum: Tutorials
Topic: How to Load Balance Apache Web Server on Ubuntu Server 18.04 LTS
Replies: 5
Views: 207

Logging Client IP

Logging Client IP When the web server is behind a proxy or load balancer, the frontend server's IP will always show up as the client IP accessing the website. To address this, we will make some changes to utilize the "X-Forwarded-For" header. NOTE: This only works for the non-encrypted sites (no SS...
by LHammonds
Tue Aug 06, 2019 7:08 pm
Forum: Tutorials
Topic: How to Load Balance Apache Web Server on Ubuntu Server 18.04 LTS
Replies: 5
Views: 207

Traffic Control

Configure Apache servers to only allow traffic from the internal subnet where the load balance servers exist. You can also restrict access further by specifying just the load balancer IP addresses directly Edit the website's configuration file: sudo vi /etc/apache2/sites-available/mysite.mydomain.co...
by LHammonds
Mon Aug 05, 2019 4:46 pm
Forum: Tutorials
Topic: How to Load Balance Galera/MariaDB Servers on Ubuntu Server 18.04 LTS
Replies: 3
Views: 77

Install HAProxy

Install HAProxy Run this command on both load balance servers: sudo apt install haproxy Name Resolution You can modify your host file for name resolution and just use the names of servers in your configuration files rather than the IP addresses. If a server IP changes in the future, you only need t...
by LHammonds
Mon Aug 05, 2019 11:48 am
Forum: Tutorials
Topic: How to Load Balance Galera/MariaDB Servers on Ubuntu Server 18.04 LTS
Replies: 3
Views: 77

Install xinetd

Install xinetd Run this command on all database nodes in the cluster: sudo apt install xinetd Firewall Rules On each database node in the cluster, edit the firewall script that was created during the initial setup of the server (if you followed my instructions ): vi /var/scripts/prod/en-firewall.sh...
by LHammonds
Mon Aug 05, 2019 11:47 am
Forum: Tutorials
Topic: How to Load Balance Galera/MariaDB Servers on Ubuntu Server 18.04 LTS
Replies: 3
Views: 77

Install Keepalived

Install Keepalived Run this command on both load balance servers: sudo apt install keepalived Master Load Balancer Firewall Rules Edit the firewall script that was created during the initial setup of the server (if you followed my instructions ): vi /var/scripts/prod/en-firewall.sh Add (or enable) ...
by LHammonds
Mon Aug 05, 2019 11:39 am
Forum: Tutorials
Topic: How to Load Balance Galera/MariaDB Servers on Ubuntu Server 18.04 LTS
Replies: 3
Views: 77

How to Load Balance Galera/MariaDB Servers on Ubuntu Server 18.04 LTS

------------- WORK-IN-PROGRESS ------------- Greetings and salutations, I hope this thread will be helpful to those who follow in my foot steps as well as getting any advice based on what I have done / documented. To discuss this thread, please participate here: << Insert Ubuntu Forums Link >> High...
by LHammonds
Mon Aug 05, 2019 9:23 am
Forum: Tutorials
Topic: Potential Future Tutorials
Replies: 0
Views: 14

Potential Future Tutorials

Here are some potential tutorials I might look into for creating at some point in the future: OpenDNS Server with Pi-Hole to block ads network-wide. Also integration with Active Directory DNS. Offsite storage using Wasabi when you have no offsite location of your own. Install DBeaver on Ubuntu Deskt...
by LHammonds
Tue Jul 30, 2019 3:19 pm
Forum: Tutorials
Topic: How to Install MariaDB Galera Cluster on Ubuntu 18.04 LTS
Replies: 7
Views: 134

Reboots

Reference: Introducing the "Safe-To-Bootstrap" feature in Galera Cluster Shutdown Cluster The procedure to shutdown an entire cluster is as follows: Work from the last node to the 1st node such as srv-db3, then srv-db2 and finally srv-db1. Make sure the node you are working on is in sync by running ...
by LHammonds
Tue Jul 30, 2019 2:51 pm
Forum: Tutorials
Topic: How to Install MariaDB Galera Cluster on Ubuntu 18.04 LTS
Replies: 7
Views: 134

Test Replication

Test Replication On srv-db1, create a new database: mariadb -u root -p -e "CREATE DATABASE testrep;CREATE TABLE testrep.test ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(50), PRIMARY KEY(id));INSERT INTO testrep.test (name) VALUES ('srv-db1');SHOW DATABASES;" +--------------------+ | Database | +...
by LHammonds
Tue Jul 30, 2019 2:40 pm
Forum: Tutorials
Topic: How to Install MariaDB Galera Cluster on Ubuntu 18.04 LTS
Replies: 7
Views: 134

Start the Galera Cluster

Start the Galera Cluster On each database server, stop the database using this command: sudo systemctl stop mariadb On srv-db1 (Node1), start the cluster with this command: sudo galera_new_cluster Check to see if the cluster started and has one node active: mariadb -u root -p -e "show status like '...
by LHammonds
Tue Jul 30, 2019 2:01 pm
Forum: Tutorials
Topic: How to Install MariaDB Galera Cluster on Ubuntu 18.04 LTS
Replies: 7
Views: 134

Galera Configuration

Galera Configuration On each database server, type these commands: sudo touch /etc/mysql/conf.d/galera.cnf sudo chown root:root /etc/mysql/conf.d/galera.cnf sudo chmod 644 /etc/mysql/conf.d/galera.cnf On srv-db1, edit the config file: sudo vi /etc/mysql/conf.d/galera.cnf Add the following for srv-d...
by LHammonds
Tue Jul 30, 2019 1:41 pm
Forum: Tutorials
Topic: How to Install MariaDB Galera Cluster on Ubuntu 18.04 LTS
Replies: 7
Views: 134

Firewall Rules

Firewall Rules For each database server, edit the firewall script that was created during the initial setup of the server (if you followed my instructions ): vi /var/scripts/prod/en-firewall.sh Add the following (adjusting for your specific environment): echo "Adding Database Server rules" ufw allo...
by LHammonds
Tue Jul 30, 2019 1:29 pm
Forum: Tutorials
Topic: How to Install MariaDB Galera Cluster on Ubuntu 18.04 LTS
Replies: 7
Views: 134

Tighten Security

Tighten Security MariaDB comes with a script to tighten-down security for a production server. Perform these steps on each database server. Connect to the server using PuTTY. Start the secure install script: sudo mysql_secure_installation Enter current password for root: Just press ENTER here since...
by LHammonds
Tue Jul 30, 2019 12:39 pm
Forum: Tutorials
Topic: How to Install MariaDB Galera Cluster on Ubuntu 18.04 LTS
Replies: 7
Views: 134

Install MariaDB

Add MariaDB repositories Source of information: MariaDB (NOTE: Your flavor of Linux and download location may vary and that page will help) Perform these steps on each database server. Connect to the server using PuTTY and login with your administrator credentials. Type the following to add the Mar...
by LHammonds
Tue Jul 30, 2019 9:56 am
Forum: Tutorials
Topic: How to Install MariaDB Galera Cluster on Ubuntu 18.04 LTS
Replies: 7
Views: 134

How to Install MariaDB Galera Cluster on Ubuntu 18.04 LTS

------------- WORK-IN-PROGRESS ------------- Greetings and salutations, I hope this thread will be helpful to those who follow in my foot steps as well as getting any advice based on what I have done / documented. To discuss this thread, please participate here: << Insert Ubuntu Forums Link >> High...
by LHammonds
Wed Jul 24, 2019 10:04 am
Forum: Tutorials
Topic: How to Install Apache Web Server on Ubuntu Server 18.04 LTS
Replies: 7
Views: 199

Enhance Web Server Security

This section covers settings that can be modified to make it a bit more secure. ServerSignature Turn off ServerSignature to prevent Apache from identifying itself and version number. /etc/apache2/conf-available/security.conf ServerSignature Off ServerTokens Set ServerTokens to the least amount of in...
by LHammonds
Tue Jul 23, 2019 11:35 am
Forum: Tutorials
Topic: How to Install Apache Web Server on Ubuntu Server 18.04 LTS
Replies: 7
Views: 199

Directory Security

Directory Security It is a good idea to have your site permission settings in a script that can be scheduled to run on a normal basis. Each site/application will need to have specific permissions set so use the following script as an example of things you can do to customize a script for your site....
by LHammonds
Tue Jul 23, 2019 11:22 am
Forum: Tutorials
Topic: How to Install Apache Web Server on Ubuntu Server 18.04 LTS
Replies: 7
Views: 199

Force SSL Usage

Force SSL Usage This section will describe how to modify the site configuration to ensure anyone that hits an http (port 80) URL will be automatically re-directed to the https (port 443) location...thus ensuring all traffic on the site is encrypted using SSL. Enable the rewrite mod: sudo a2enmod re...
by LHammonds
Tue Jul 23, 2019 11:08 am
Forum: Tutorials
Topic: How to Install Apache Web Server on Ubuntu Server 18.04 LTS
Replies: 7
Views: 199

Let's Encrypt SSL Certificate

Let's Encrypt SSL Certificate Let's Encrypt is a non-profit certificate authority run by Internet Security Research Group that provides X.509 certificates for Transport Layer Security encryption at no charge. The certificate is valid for 90 days, during which renewal can take place at any time. Thi...