Linux Resources

Install MySQL on Debian 9 Stretch - Step by Step Process ?

This article covers how to install mysql 8.0 and Secure MySQL on Debian 9 server. MySQL, the world's most popular open-source relational database management system is not available in the default Debian's repositories. MariaDB is the default database system in Debian 10. 

The MySQL APT repository provides a simple and convenient way to install and update MySQL products with the latest software packages using Apt. The MySQL APT repository provides MySQL packages for the following Linux distros: Debian.

How to Uninstall MySQL from Debian?

To remove MySQL, Run the following commands:

$ sudo apt-get remove --purge mysql-server mysql-client mysql-common -y
$ sudo apt-get autoremove -y
$ sudo apt-get autoclean
rm -rf /etc/mysql
sudo find / -iname 'mysql*' -exec rm -rf {} \;

How to secure MySQL ?

MySQL comes with a command we can use to perform a few security-related updates on our new install. Let's run it now:

$ mysql_secure_installation

This will ask you for the MySQL root password that you set during installation. Type it in and press ENTER. Then answer a series of yes or no prompts. 

Install MariaDB on CentOS 7 Server - Step by Step Process ?

This article covers how to install and Secure MariaDB on a CentOS 7 server. MariaDB is a fork of MySQL managed by the original MySQL developers. It's designed as a replacement for MySQL, uses some commands that reference mysql, and is the default package on CentOS 7.

To Install MariaDB 5.5 on CentOS 7:

1. Install the MariaDB package using the yum package manager: 

$ sudo yum install mariadb-server

2. Once the installation is complete, start the MariaDB service and enable it to start on boot using the following commands: 

$ sudo systemctl start mariadb 
$ sudo systemctl enable mariadb

To install MariaDB on CentOS 8:

1. Open the terminal application. Another option is to log in using the ssh command:

 ssh user@centos-8-server-ip

2. Install the MariaDB on CentOS 8 by running the command:

$ sudo yum install mariadb-server

3. Secure the MariaDB server in CentOS 8 by running the command:

$ sudo mysql_secure_installation

4. Finally test MariaDB installation by running the command:

$ mysql -u root -p

MariaDB vs MySQL:

Even though MariaDB is a fork of MySQL, these two database management systems are still quite different: 

MariaDB is fully GPL licensed while MySQL takes a dual-license approach.

MariaDB supports a lot of different storage engines. 

In many scenarios, MariaDB offers improved performance.

Install Scribus on Linux Mint 20 - Step by Step Process ?

This article covers the installation method of Scribus on a Linux system. Scribus is used to create PDF files, e-books, newsletter, magazines and posters etc. It can also be used to edit the existing PDF file.

Scribus is available in the default package repositories of Ubuntu, Linux Mint, Debian and Arch Linux. So, to install it run the following command:

$ sudo apt upade && sudo apt install -y scribus    // Ubuntu, Linux Mint & Debian
$ sudo pacman -S scribus   // Arch Linux & Manjaro Linux

Python Get Current Directory

This article covers how to use the 'os. getcwd()' method to easily get the python current working directory. When you run a Python script, the current working directory is set to the directory from which the script is executed.

The os python module provides a portable way to interact with the operating system. The module is part of the standard Python library and includes methods for finding and changing the current working directory.

Basically, In Python, you can get and change (set) the current working directory with os.getcwd() and os.chdir().

os module is included in the standard library, so no additional installation is required.

To Get the current working directory: os.getcwd()

To Change the current working directory: os.chdir()

How to Get the current working directory: os.getcwd() ?

1. os.getcwd() returns the absolute path of the working directory where Python is currently running as a string str.

2. getcwd stands for "get current working directory", and the Unix command pwd stands for "print working directory".

Install Java on Ubuntu 20.04 LTS - Step by Step Process ?

This article covers how to install Java Run-time Environment (JRE) and the Java Developer Kit (JDK) on Ubuntu 20.04. Java is one of the most popular programming languages. It is used for developing anything from lightweight mobile to desktop applications.

Oracle's licensing agreement for Java doesn’t allow automatic installation through package managers. To install the Oracle JDK, which is the official version distributed by Oracle, you must create an Oracle account and manually download the JDK to add a new package repository for the version you'd like to use. 

To install the Default JRE/JDK 

1. To install this version, first update the package index:

$ sudo apt update

2. Next, check if Java is already installed:

$ java -version

If Java is not currently installed, you’ll see the following output:

Command 'java' not found, but can be installed with:
apt install default-jre
apt install openjdk-11-jre-headless
apt install openjdk-8-jre-headless

3. Execute the following command to install the default Java Runtime Environment (JRE), which will install the JRE from OpenJDK 11:

$ sudo apt install default-jre

The JRE will allow you to run almost all Java software.

4. Verify the installation with:

java -version

Install the Let's Encrypt Certificate Using Certbot in Ubuntu 20.04 - How to do it on Nginx web server ?

This article covers how to install Certbot, to get let's encrypt certificates. SSL/TLS encryption is an integral part of the network infrastructure. Any web and mail server allows you to enable data encryption.

To begin, you must have a domain name. Its DNS A-record must contain the public address of your server. If the firewall is enabled, open access for HTTP and HTTPS traffic:

$ sudo ufw allow 80
$ sudo ufw allow 443

To Install the "Let's Encrypt" package on Ubuntu:

1. Run the command below to install Let's Encrypt.

$ sudo apt install letsencrypt

2. Check the "certbot.timer" utility for automatic certificate renewal.

$ sudo systemctl status certbot.timer

Search by typing a one letter Word Term Here