Search found 699 matches

by LHammonds
Fri Sep 13, 2019 11:47 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

Backup Individual Database

Database Backup On Demand This script is designed to run every minute looking for key files. If a specific file shows up on the samba share, it will trigger an immediate backup of the specified database. This is helpful when scheduling the backup of an app server and coordinating the backup of the ...
by LHammonds
Fri Sep 13, 2019 11:35 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

Backup All Databases

MySQL Backup Script This script is designed to perform a full backup of all databases while the server is online. It actually does three kinds of backups. First, it pulls all the databases into a single file which is good for restoring everything on new servers. It then pulls by database to create ...
by LHammonds
Fri Sep 13, 2019 11:34 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

Scripting

Scripting Much of the solutions beyond this point involve scripts (programming snippets / automated commands). In particular, they are Bash Scripts. I chose this due to its popularity and the fact it comes with Ubuntu. I try to make use of what comes with the system without requiring additional sof...
by LHammonds
Fri Sep 13, 2019 11:27 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

Usage Examples

Usage Examples Connect to the server using PuTTY. At the login prompt, login with your administrator account. Start a database session and create a database called wordpress and a user called wordpressuser with a password of "mydbpass" and grant the user access to the database: mysql -u root CREATE...
by LHammonds
Fri Sep 13, 2019 11:22 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

Reset lost root password

Reset lost root password If you ever find yourself in the position of not being able to login (locally) to your database with your root account, you will need to reset the password. For example, phpmyadmin fails to change the password correctly and neither the old nor the new password works. This p...
by LHammonds
Fri Sep 13, 2019 10:51 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

Relocate the Databases

Relocate the Databases If you do not want to leave your databases in the default location (/var/lib/mysql), then you can follow these steps to move them somewhere else. In this example, we will move them to /opt/mysql At the login prompt, login with your administrator account At the console, type t...
by LHammonds
Fri Sep 13, 2019 10:02 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

Firewall Rules

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 the following rule which allows connectivity from from anything on your local subnet: echo "Adding Database Server rules" ufw a...
by LHammonds
Fri Sep 13, 2019 10:00 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

Tighten Security

Secure Installation MariaDB comes with a script to tighten-down security for a production server. Perform these steps on the 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 sin...
by LHammonds
Fri Sep 13, 2019 9:55 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

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
Fri Sep 13, 2019 9:54 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

Install Ubuntu Server

Install Ubuntu Server The Ubuntu Server Long-Term Support (LTS) is free but we have the option of buy support and that is the main reason this server was selected. The steps for setting up the base server are covered in this article: How to install and configure Ubuntu Server It is assumed that the...
by LHammonds
Fri Sep 13, 2019 9:53 am
Forum: Tutorials
Topic: How to Install MariaDB 10.4.x on Ubuntu Server 18.04 LTS
Replies: 16
Views: 9768

How to Install MariaDB 10.4.x 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 LINK HERE <<< High-level ...
by LHammonds
Wed Sep 11, 2019 4:43 pm
Forum: Tutorials
Topic: How to Install an FTP over SSL (FTPS) on Ubuntu Server 18.04
Replies: 7
Views: 4993

Fail2Ban

ON HOLD - NEED TO RESEARCH THIS SECTION Fail2Ban Standard Filters If you followed my instructions for setting up the Ubuntu Server, you should already have sshd being protected by Fail2Ban. Now we are going to add the pre-defined vsftpd filter. Edit the jail configuration file: sudo vi /etc/fail2ba...
by LHammonds
Wed Sep 11, 2019 9:27 am
Forum: Tutorials
Topic: How to Install an FTP over SSL (FTPS) on Ubuntu Server 18.04
Replies: 7
Views: 4993

Command-Line FTP Clients for Automation

Command-Line FTP Clients for Automation sftp command comes with OpenSSH and should already be installed on your server. Example: echo "lcd /local/path" > /tmp/ftp.cmd echo "cd /remote/path" >> /tmp/ftp.cmd echo "mget *" >> /tmp/ftp.cmd sftp -b /tmp/ftp.cmd ftpuser@192.168.1.21 NOTE: To use this, yo...
by LHammonds
Tue Sep 10, 2019 3:32 pm
Forum: Tutorials
Topic: How to Install an FTP over SSL (FTPS) on Ubuntu Server 18.04
Replies: 7
Views: 4993

Public / Private Key Management

Public / Private Key Management If you need to generate an SSH key with a passphrase in order to connect to another FTP server, it can be a tricky thing to automate scripts that push and pull files to that server since each time you connect, it will ask for the passphrase. I've seen some recommend ...
by LHammonds
Tue Sep 10, 2019 3:31 pm
Forum: Tutorials
Topic: How to Install an FTP over SSL (FTPS) on Ubuntu Server 18.04
Replies: 7
Views: 4993

Configure User Accounts

Configure User Accounts At the login prompt, login with your administrator account ( administrator / myadminpass ) At the $ prompt, temporarily grant yourself super user privileges by typing sudo su {ENTER} and then provide the administrator password ( myadminpass ). Add an ftpusers group. addgroup...
by LHammonds
Tue Sep 10, 2019 3:31 pm
Forum: Tutorials
Topic: How to Install an FTP over SSL (FTPS) on Ubuntu Server 18.04
Replies: 7
Views: 4993

Firewall Rules

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) the following: echo "Adding FTPS Server rules" ufw allow proto tcp to any port 990 comment 'FTPS' 1>/dev/null 2>&1 ...
by LHammonds
Tue Sep 10, 2019 3:29 pm
Forum: Tutorials
Topic: How to Install an FTP over SSL (FTPS) on Ubuntu Server 18.04
Replies: 7
Views: 4993

Install FTP Service

Install FTP Service At the login prompt, login with your administrator account ( administrator / myadminpass ) At the $ prompt, temporarily grant yourself super user privileges by typing sudo su {ENTER} and then provide the administrator password ( myadminpass ). Install vsftpd and make a backup of...
by LHammonds
Tue Sep 10, 2019 3:27 pm
Forum: Tutorials
Topic: How to Install an FTP over SSL (FTPS) on Ubuntu Server 18.04
Replies: 7
Views: 4993

Install Ubuntu Server

Install Ubuntu Server The 1st thing to do is the installation of Ubuntu Server. The following guide will describe how to setup a server for use in a production environment and this document assumes the guide was followed to setup Ubuntu. The server install guide also contains an "Assumption" sectio...
by LHammonds
Tue Sep 10, 2019 3:23 pm
Forum: Tutorials
Topic: How to Install an FTP over SSL (FTPS) on Ubuntu Server 18.04
Replies: 7
Views: 4993

How to Install an FTP over SSL (FTPS) on Ubuntu Server 18.04

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: Ubuntu Forums High-level overview This document will describe how to setup an FTP ...
by LHammonds
Fri Sep 06, 2019 11:20 am
Forum: Tutorials
Topic: How to Install MariaDB Galera Cluster on Ubuntu 18.04 LTS
Replies: 9
Views: 8123

Status Scripts

Status Scripts If you want some custom scripts to check various settings, you can obtain the status in variables such as the following bash code snippets (run as the root user which has access to the database): Here is a database command to obtain the friendly name of the current state: mysql -u ro...