Just another WordPress site

Tag: Plesk

Resetting the Parallels Plesk Panel Administration Password Linux

Resetting the Parallels Plesk Panel Administration Password Linux

This article covers Resetting the Parallels Plesk Panel Administration Password Linux.

This guide is for the following versions of Plesk.

Parallels Small Business Panel 10.x for Linux/Unix

Parallels Plesk Panel 11.x for Linux

Parallels Plesk Panel 10.x for Linux

Parallels Plesk Panel 9.x for Linux/Unix

Parallels Plesk Panel 8.x for Linux/Unix

For PP versions 10.x and above:

Use ${PRODUCT_ROOT_D}/bin/admin utility to prompt the password for user “admin”:

Example) /usr/local/psa/bin/admin --show-password

Use ${PRODUCT_ROOT_D}/bin/init_conf to reset the password for user “admin”:

Example) /usr/local/psa/bin//init_conf -u -passwd NewPasswordHere

For Plesk Versions up to 9.x:

cat /etc/psa/.psa.shadow
authenticates user “admin” by trying to authorize access to the PP database using the password provided.

Uninstall Plesk for Linux

How to uninstall Plesk for Linux

 

Applicable to:

  • Plesk for Linux

Question

How to uninstall Plesk for Linux?

Answer

Warning: After Plesk uninstallation, some system services may stop working due to their close integration with Plesk. Before removing Plesk for Linux, it is recommended to create a server snapshot to have a system restore point.

Note: Due to a Plesk Installer bug with ID PI-498, it is not possible to remove Plesk installed on Debian/Ubuntu-based distributions:

– Debian 10
– Debian 9
– Debian 8
– Ubuntu 20.04
– Ubuntu 18.04
– Ubuntu 16.04

As a workaround, it is recommend to redeploy a server from scratch.

To remove Plesk from CentOS/RHEL-based distributions, follow these steps:

  1. Connect to a Plesk server via SSH.
  2. Run the following command to remove Plesk and all its components:
  3. #plesk installer –remove-everything

Download MariaDB Server

Download MariaDB Server

MariaDB Server is one of the world’s most popular open source relational databases and is available in the standard repositories of all major Linux distributions. Look for the package mariadb-server using the package manager of your operating system. Alternatively you can use the following resources:

MariaDB Server 11.0 brings many significant improvements to the query optimizer! Try it out and please let us know of your experience. We aim to incorporate all the feedback we receive.
You can read more about the optimizer improvements straight from the main author at Monty Says blog post!

 

MariaDB Server
MariaDB Server Repositories
Connectors
MariaDB Foundation provides packages for MariaDB versions newer than the version provided by the distribution only.

Version 10.6

Here are the commands to run to import the MariaDB repository key on your Ubuntu system:

sudo apt-get install apt-transport-https curl
sudo mkdir -p /etc/apt/keyrings
sudo curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp'

Once the key is imported, copy and paste the following into a file under /etc/apt/sources.list.d (for instance /etc/apt/sources.list.d/mariadb.sources):

# MariaDB 10.6 repository list - created 2023-07-13 06:43 UTC
# https://mariadb.org/download/
X-Repolib-Name: MariaDB
Types: deb
# deb.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# URIs: https://deb.mariadb.org/10.6/ubuntu
URIs: https://ftp.heanet.ie/mirrors/mariadb/repo/10.6/ubuntu
Suites: jammy
Components: main main/debug
Signed-By: /etc/apt/keyrings/mariadb-keyring.pgp

You can now install MariaDB 10.6 from the MariaDB repository with:

sudo apt-get update
sudo apt-get install mariadb-server

Debug symbol packages, those that end in a ‘-dbgsym‘ suffix, are harmless to install. They are typically used to resolve stack traces and provide detail of perf recordings. They do not change the running behaviour of MariaDB. If in doubt, omit from installation.

If you need source packages, replace Types: deb with Types: deb deb-src in the /etc/apt/sources.list.d/mariadb.sources file. Then, you can obtain the mariadb source after installing dpkg-dev package, with apt-get source mariadb-server.

If you prefer to use the old “one-line-style” APT format, create the file /etc/apt/sources.list.d/mariadb.list with the following:

# MariaDB 10.6 repository list - created 2023-07-13 06:43 UTC
# https://mariadb.org/download/
# deb.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://deb.mariadb.org/10.6/ubuntu jammy main
deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://ftp.heanet.ie/mirrors/mariadb/repo/10.6/ubuntu jammy main
# deb-src [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://ftp.heanet.ie/mirrors/mariadb/repo/10.6/ubuntu jammy main

See Installing MariaDB packages for more information

Distribution

CentOS 7

Version 10.6

Here is your custom MariaDB DNF/YUM repository entry for CentOS. Copy and paste it into a file under /etc/yum.repos.d (we suggest naming the file MariaDB.repo or something similar).

# MariaDB 10.6 CentOS repository list - created 2023-07-13 06:44 UTC
# https://mariadb.org/download/
[mariadb]
name = MariaDB
# rpm.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# baseurl = https://rpm.mariadb.org/10.6/centos/$releasever/$basearch
baseurl = https://ftp.heanet.ie/mirrors/mariadb/yum/10.6/centos/$releasever/$basearch
module_hotfixes = 1
# gpgkey = https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
gpgkey = https://ftp.heanet.ie/mirrors/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck = 1

EPEL repository may be required to satisfy the pv dependency of galera.

After the file is in place, install and start MariaDB with:

sudo yum install MariaDB-server MariaDB-client

If you haven’t already accepted the MariaDB GPG key, you will be prompted to do so during the install. See Installing MariaDB with yum for detailed information. Note the GPG was changed in January 2023 with more secure key. For more details see our blog article New GPG Release Key for RPMs.

Debian 11 (Bullseye)

Version 10.6

Here are the commands to run to import the MariaDB repository key on your Debian system:

sudo apt-get install apt-transport-https curl
sudo mkdir -p /etc/apt/keyrings
sudo curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp'

Once the key is imported, copy and paste the following into a file under /etc/apt/sources.list.d (for instance /etc/apt/sources.list.d/mariadb.sources):

# MariaDB 10.6 repository list - created 2023-07-13 06:49 UTC
# https://mariadb.org/download/
X-Repolib-Name: MariaDB
Types: deb
# deb.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# URIs: https://deb.mariadb.org/10.6/debian
URIs: https://ftp.heanet.ie/mirrors/mariadb/repo/10.6/debian
Suites: bullseye
Components: main
Signed-By: /etc/apt/keyrings/mariadb-keyring.pgp

You can now install MariaDB 10.6 from the MariaDB repository with:

sudo apt-get update
sudo apt-get install mariadb-server

Debug symbol packages, those that end in a ‘-dbgsym‘ suffix, are harmless to install. They are typically used to resolve stack traces and provide detail of perf recordings. They do not change the running behaviour of MariaDB. If in doubt, omit from installation.

If you need source packages, replace Types: deb with Types: deb deb-src in the /etc/apt/sources.list.d/mariadb.sources file. Then, you can obtain the mariadb source after installing dpkg-dev package, with apt-get source mariadb-server.

If you prefer to use the old “one-line-style” APT format, create the file /etc/apt/sources.list.d/mariadb.list with the following:

# MariaDB 10.6 repository list - created 2023-07-13 06:49 UTC
# https://mariadb.org/download/
# deb.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://deb.mariadb.org/10.6/debian bullseye main
deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://ftp.heanet.ie/mirrors/mariadb/repo/10.6/debian bullseye main
# deb-src [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://ftp.he

 

 

Install Imunify360

Install Imunify360

Overview

This guide will show you how to install Imunify360 in Webuzo Control Panel. Imunify360 is the security solution for Linux web servers based on machine learning technology which utilizes a multi-layer approach to provide total protection against any types of malicious attacks or abnormal behavior including distributed brute force attack

Install Imunify360 Plugin

Please run the following command :

wget -N https://files.webuzo.com/plugins/imunify360/imunify360.sh

chmod +x imunify360.sh

./imunify360.sh

If ImunifyAV or ImunifyAV+ is already installed on your server you will be prompted to uninstall ImunifyAV. Type y to continue installing Imunify360.

Activate License

First, unregister your existing (trial) license key:
imunify360-agent unregister

After that, for key-based licenses, run:
imunify360-agent register YOURKEY

For IP-based licenses:
imunify360-agent register IPL

Use the word IPL, not an actual IP address for this command.

Admin Panel Screenshot

imunify360admin

Enduser Panel Screenshot

imunify360icon
imunify360enduser

Basic SSH Commands That You Should Know About

Basic SSH Commands That You Should Know About

Basic SSH Commands That You Should Know About

In this tutorial, we are going to cover 17 basic SSH commands that you should know about. By learning them, you will understand how to navigate and manage your VPS or server using the command line.

How to Access Remote Server

Before we begin, make sure that you have access to a remote server. If you own a VPS or Dedicated server, the login details are emailed to you by your hosting provider.

Pro Tip

SSH stands for Secure Shell, a protocol used to securely connect to a remote server or system. If you want to learn more about it, Hostinger has a detailed tutorial on how SSH works.

Now let’s start accessing your remote server:

  1. There are two recommended methods to establish an SSH connection:
    • Using an SSH client (PuTTY). It will require you to enter the server’s IP and the port number into the corresponding fields.
      The fields in PuTTY where you need to enter your server's IP address and port
    • Using the built-in command prompt (Windows) or terminal shell (Linux, macOS). You will need to write:
      ssh user@serverip

      Remember to replace “user” with your real username and “serverip” with your server’s dedicated or shared IP address.

  2. Once you click the Open button on PuTTY or enter the command on the terminal, you will be prompted for a password. If you are connecting to the server for the first time, you might get a warning message, telling you that the server is not recognized. Just hit Yes to continue.

That’s it. Now you’re connected to the server and can start executing SSH commands.

List of Basic SSH Commands

In this part, we will go through popular SSH commands, complete with their syntaxes and useful options.

Here’s a quick look of the basic SSH commands that we’ll cover in this article:

SSH Command Explanation
ls Show directory contents (list the names of files).
cd Change Directory.
mkdir Create a new folder (directory).
touch Create a new file.
rm Remove a file.
cat Show contents of a file.
pwd Show current directory (full path to where you are right now).
cp Copy file/folder.
mv Move file/folder.
grep Search for a specific phrase in file/lines.
find Search files and directories.
vi/nano Text editors.
history Show last 50 used commands.
clear Clear the terminal screen.
tar Create & Unpack compressed archives.
wget Download files from the internet.
du Get file size.

1. ls Command

This SSH command is used to list all files and directories. After entering ls, you will see an output that looks like this:

The output of ls command

There are also a few useful options that you can combine with it:

  • -l —  displays the details of the files, such as size, modified date and time, the owner, and the permissions.
  • -a —  shows hidden files and directories.

2. cd Command

cd (Change Directory) is the command that we use to jump between directories. It’s a pretty simple command — just type cd followed by the name of the directory:

cd [directory]

As such, if you want to enter the home directory of your server, you can type:

cd home

You may also write the full path of a certain directory if it is a few levels deep. For instance:

cd home/TestDirectory/AnotherDirectory

You are now in the AnotherDirectory.

To go back one level, you can simply enter “..” (two dots) after cd command. What’s cool, you can go back further by adding another two-dots and separating them with a forward slash (/):

cd ../..

By entering this line, you are in the home directory again.

3. mkdir Command

You can use mkdir (Make Directory) command to create a directory. This is the syntax:

mkdir [folder name]

Let’s assume you want to create a new folder named “myfolder”. You will need to type:

mkdir myfolder

4. touch Command

This SSH command is used to create a new file. Here is the syntax:

touch [file name]

If you want to create a .txt file named “myfile”, this is what you need to write:

touch myfile.txt.

The file extension could be anything you want. You can even create a file with no extension at all.

5. rm Command

rm command removes a chosen file or directory. To delete a file, enter:

rm [file name]

For instance, if you want to remove myfile.txt, simply execute:

rm myfile.txt

To delete a folder, you need to use the -r option to remove all the files and subfolders inside it:

rm -r home/hostinger/myfolder

6. cat Command

We use cat command to display the content of a file. Below is the syntax:

cat [file name]

It also allows you to create a new file by merging multiple files. For example:

cat info.txt info2.txt > mergedinfo.text

By executing this line, the content of info.txt and info2.txt will be saved into mergedinfo.txt.

7. pwd Command

pwd is a simple command that outputs the full path of your working directory. Once entered, you should see a result like this:

home/user/public_html

pwd command can come in really handy when you are accessing your site hosting account through SSH. Oftentimes, shared servers don’t tell you the directory you are in.

8. cp Command

This SSH command will copy files and folders. The syntax is:

cp [options] [source] [destination]

[source] is the file or folder you want to copy and [destination] is the duplicate.

Let’s say you have myfile.txt in your working directory, and you want to make a copy of it. The syntax would be:

cp myfile.txt myfile2.txt

If you want to make a copy in a different folder, run the following command:

cp /home/hostinger/myfile.txt /home/etc/

Be careful when writing the name of the destination. If you provide two file names, the cp command will copy the content of the source file into the destination file. Thus, the destination file will be overwritten without any warning. However, if the destination file doesn’t exist, then the command will create a new file.

[options] is not mandatory. However, there are several options that you can use:

  • -f — if you don’t have writing permission to the destination file, it’ll be deleted and the command will create a new file
  • -u — copy the source file if it is newer than the destination file.
  • -n — will not overwrite an existing file.
  • -a — archive the files.

Unlike duplicating files, copying folders requires you to use the -R (recursive) option. The option allows all folders and files inside it to be copied.

cp -R /home/hostinger/myfolder /home/etc/

9. mv Command

This command works similarly to cp. However, mv command will move the file or folder instead of copying it. This is the syntax:

mv [source] [destination]

Let’s say we want to move myfile.txt from /home/hostinger/ftp to /home/hostinger/myfolder/. The command should be:

mv /home/hostinger/ftp/myfile.txt /home/hostinger/myfolder

Unlike cp command, you don’t need the -R option to move a folder. For instance:

mv /home/hostinger/ftp/ /home/hostinger/myfolder/

This will automatically move all files and subfolders inside ftp to myfolder.

10. grep Command

grep command looks for a given string in files. For example:

grep 'line' info.txt

The above command would search for ‘line’ in a file named “info.txt”. What’s great, the command will print the entire line that contains the matched text.

The results of grep SSH command

Keep in mind that this command is case sensitive. If you want to ignore letter cases, use -i option.

11. find Command

We enter find SSH command to search for a file or files that meet the given criteria (name, size, file type, etc). The following is the basic syntax:

find [starting directory] [options] [search term]

[starting directory] is where you would like to start your search process. There are three main choices:

  • / (slash) — search the whole system
  • . (dot) — search the working directory
  • ~ (tilde) — search the home directory

[options] is an additional argument that you can use to refine your search. Some of the most popular options are:

  • -name — look for files based on their names
  • -user — search for files that belong to a given user
  • -size — look for files based on their sizes

[search term] is the keyword or number that you use to search for files.

Take a look at this example:

find . -name “index”

This command will return any files that have the word “index” on their names. And since we use “.” (dot), the command will only search the working directory.

We also have a great tutorial that provides an in-depth explanation about this SSH command.

12. vi/nano Command

Vi and Nano are two popular text editors that you can use in the command line. To open a file using Vi or Nano, you just need to enter:

vi [file name]

or

nano [file name]

If the specified file doesn’t exist, both text editors will automatically create it for you.

Unfortunately, some Linux distributions don’t offer Nano by default. Don’t worry, you can read our guide on how to install and use Nano.

13. history Command

This one is used to display the last used commands. You need to enter a number to limit the displayed results. For example:

history 20

As you probably guess, the example will show the 20 most recently entered commands.

14. clear Command

The function of clear command is simple — it clears all text from the terminal screen.

15. tar Command

tar is an SSH command that creates or extracts .tar.gz files. It is very popular because most third-party software binaries are in the .tar.gz format.

To archive a folder in .tar.gz format, use the following command:

tar cvzf ArchiveName.tar.gz /path/to/directory

To unpack a .tar.gz file, enter this command:

tar xvzf FileName.tar.gz

Notice that both commands use different four-character options — cvzf and xvzf.  Each letter represents a specific instruction:

  • x tells tar to extract files
  • c tells tar to create an archive
  • v stands for verbose. The option tells tar to display all file names that are processed by the command.
  • z instructs tar to uncompress the archive
  • f tells tar that you are supplying the name of the archive

16. wget Command

wget is used to download files from the internet. For example, to fetch a file from a website and store it in our current directory, we’ll use:

wget http://fileurl/filename.ext

If you want to download multiple files, put all URLs into a file and use the -i option.

Let’s say the file containing the links is called downloads.txt. The command will look like this:

wget -i downloads.txt

17. du Command

You can use du (Disk Usage) command to view the size of files and folders in a specified directory:

du [directory path]

Unfortunately, the summary will show disk block numbers instead of bytes, kilobytes, and megabytes. Therefore, to show it in a human-readable format, you need to insert the -h option after du command:

du -h /home

The results will be more understandable:

The results of du command

Check out this article to read more about du command.