How to Set Up Mail Accounts on Plesk Control Panel

 How To  Comments Off on How to Set Up Mail Accounts on Plesk Control Panel
Sep 132018
 

Plesk is a user friendly, GUI control panel (like Cpanel or Webmin) for administering web sites and setting up e-mail accounts.

Several hosting providers offer Plesk as part of their hosting package or as an addon service.

This blog post is useful for people who aspire for a role as Support Technician at a web hosting services provider.

Creating E-mail Account on Plesk Control PanelCreate E-Mail Account in Plesk

In this post, we’ll focus on how to set up an e-mail account via Plesk.

1. Login to your Plesk admin panel

2. Click Mail, the second tab on left vertical bar

3. Next, click Create E-mail Address, and set up an e-mail account, contact@example.com

4. If there’s more than one domain, choose from drop-down list

5. Check the “Access to the Customer Panel” box if you want to allow customers to be able to change mailbox settings on Plesk

6. Enter password, confirm it by entering password a second time*
*(Remember to use a complicated password using upper & lower case letters, symbols & numbers by using the generate button below the password box. We recommend that you use a free, open source Password Manager like KeePassX or KeePass).

7. Next, leave the e-mail box size as “Default size” or set your preferred size for the mail-box in MB.

8. Now, click OK to create the mail box

Wasn’t that simple?

 Posted by at 2:11 pm

How do You Know if MySQL is Running on CentOS 7?

 General, How To  Comments Off on How do You Know if MySQL is Running on CentOS 7?
Sep 122018
 

Just this morning, someone asked me for the command to check if MySQL (or MariaDB) is running?

I quickly blurted out: Do a top or htop and you should see it.

# top | grep mysqld
26125 mysql  20   0 2618520 193692   9092 S  62.5  2.4 159:29.14 mysqld                                                   
26125 mysql  20   0 2618520 193692   9092 S   1.3  2.4 159:29.18 mysqld

While my answer was not wrong, I quickly realized there were better ways to find out if MySQL (or MariaDB) is running was running on a Linux box (in my case, CentOS 7).

Here are a few ways to determine if MySQL is running on a CentOS 7 or Red Hat 7 Linux box.

# service mariadb status
Redirecting to /bin/systemctl status mariadb.service
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-08-30 07:59:30 EDT; 1 weeks 4 days ago
 Main PID: 25949 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
           ├─25949 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─26125 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pi...

My favorite is the systemctl method since I use it often to check the status of other services like httpd.

$ systemctl status mariadb.service
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-08-30 07:59:30 EDT; 1 weeks 4 days ago
 Main PID: 25949 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
           ├─25949 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─26125 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pi...

Here’s another method to check the status of MySQL server:

$ mysqladmin -u root -p status
Enter password: 
Uptime: 1001300  Threads: 1  Questions: 11923946  Slow queries: 0  Opens: 701  Flush tables: 2  Open tables: 260  Queries per second avg: 11.908

You can always ping it.

# mysqladmin -umysql ping
mysqld is alive

Here’s one more way:

# mysqladmin -u root -p version
Enter password: 
mysqladmin  Ver 9.0 Distrib 5.5.60-MariaDB, for Linux on x86_64
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Server version		5.5.60-MariaDB
Protocol version	10
Connection		Localhost via UNIX socket
UNIX socket		/var/lib/mysql/mysql.sock
Uptime:			11 days 14 hours 32 min 44 sec

Threads: 1  Questions: 11943278  Slow queries: 0  Opens: 701  Flush tables: 2  Open tables: 260  Queries per second avg: 11.910

On a Linux Mint or Ubuntu box, the following command should work:

$ /etc/init.d/mysql status
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-09-10 02:13:20 EDT; 19h ago
 Main PID: 2250 (mysqld)
   CGroup: /system.slice/mysql.service
           └─2250 /usr/sbin/mysqld
 Posted by at 1:46 pm

6 Ways to Check if a Package is Installed on a Linux Mint or Ubuntu PC

 How To, Linux  Comments Off on 6 Ways to Check if a Package is Installed on a Linux Mint or Ubuntu PC
Sep 102018
 

This morning I was checking via the command line to see if MySQL Server was installed on my Linux Mint 18 (Sarah) system and fumbled around a bit about how to do it.

Presumably, there are many other Linux users who wish to install a package and unsure how to check it on the command line.

So I decided to do this blog post on the various ways to check if a particular package is installed on a Linux Mint or Ubuntu system.

For each unique method, I will illustrate with two examples (the first example for a package not installed and the second for a package that’s already installed).

1. apt-cache policy Method

Not Installed

$ apt-cache policy mysql-server
N: Unable to locate package mysql-server

apt-cache policy is a quick way to determine if a particular package is installed on a Ubuntu or Linux Mint system.

Already Installed

$ apt-cache policy grsync
grsync:
  Installed: 1.2.5-1
  Candidate: 1.2.5-1
  Version table:
 *** 1.2.5-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status
2. dpkg -l Method

Not Installed

$ dpkg -l | grep mysql-server

Since mysql-server is not on my system, I did not get any output when I ran the dpkg -l | grep mysql-server command.

Already Installed

$ dpkg -l | grep grsync
ii  grsync        1.2.5-1       amd64        GTK+ frontend for rsync
3. dpkg-query Method

Let’s now consider the dpkg-query way to see if a specific package is installed on Ubuntu or Linux Mint.

Not Installed

$ dpkg-query -s mysql-server
dpkg-query: package 'mysql-server' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

The above example clearly demonstrates that mysql-server is not installed on my Linux Mint 18 PC.

Already Installed

$ dpkg-query -s grsync
Package: grsync
Status: install ok installed
.....output truncated
4. dpkg -s Method

dpkg -s package_name is another quick way to determine if a package is installed on an Ubuntu system.

Not Installed

$ dpkg -s mysql-server | grep Status
dpkg-query: package 'mysql-server' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

Already Installed

$ dpkg -s cherrytree | grep Status
Status: install ok installed
5. apt list Method

Not Installed

$ apt list mysql-server
Listing... Done
mysql-server/xenial-updates,xenial-updates,xenial-security,xenial-security 5.7.23-0ubuntu0.16.04.1 all

Already Installed

$ apt list firefox
Listing... Done
firefox/sarah,now 61.0.1+linuxmint1+sylvia amd64 [installed]
N: There is 1 additional version. Please use the '-a' switch to see it
6. dpkg -l | grep package Method

Not Installed

$ dpkg -l | grep mysql-server

Since mysql-server is not installed on my Linux desktop, the above example did not produce any output.

Already Installed

$ dpkg -l | grep firefox
ii  firefox                     61.0.1+linuxmint1+sylvia            amd64        Safe and easy web browser from Mozilla
ii  firefox-locale-en           61.0.1+linuxmint1+sylvia            amd64        English language pack for Firefox
 Posted by at 1:25 pm

How To Add Guest Additions to Lubuntu 16.04

 How To, Linux  Comments Off on How To Add Guest Additions to Lubuntu 16.04
Apr 262016
 

I have Lubuntu running as a virtual machine via VirtualBox.

Like many Ubuntu fans, I upgraded to version 16.04 LTS (Xenial Xerus) yesterday.

The reason for my upgrade was that Ubuntu 15.10 (a.k.a. Wily Werewolf) was not a Long-term Supported distribution.

Support for Ubuntu 15.10 ends in July 2016 while Ubuntu 16.04 LTS will be supported until April 2021.

The upgrade from Ubuntu 15.10 to Ubuntu 16.04 LTS went smoothly.

Following the upgrade, I rebooted my virtual machine.

And then came the familiar problem all of us confront with VirtualBox – screen resolution issue.

The problem is that the monitor settings (screen resolution) will be off and the desktop will not occupy the full screen.

Irritating but not a showstopper.

However, the problem can be fixed quickly.

This is how I fixed the screen resolution issue after upgrading from Ubuntu 15.10 to Ubuntu 16.04 LTS.

I opened up the terminal and installed virtualbox-guest-dkms.

tommy@johnson:~$ sudo apt-get install virtualbox-guest-dkms
[sudo] password for tommy: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libnotify-bin virtualbox-guest-utils virtualbox-guest-x11
The following NEW packages will be installed:
  libnotify-bin virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,986 kB of archives.
After this operation, 13.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libnotify-bin amd64 0.7.6-2svn1 [6,584 B]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/multiverse amd64 virtualbox-guest-utils amd64 5.0.18-dfsg-2build1 [387 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial/multiverse amd64 virtualbox-guest-dkms all 5.0.18-dfsg-2build1 [551 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial/multiverse amd64 virtualbox-guest-x11 amd64 5.0.18-dfsg-2build1 [1,041 kB]
Fetched 1,986 kB in 0s (2,399 kB/s)         
....
....

Once the installation is complete, there’s one more step.

You need to reboot the newly upgraded virtual machine (Ubuntu 16.04 LTS).

$ sudo reboot

After rebooting,you should now have access to the full screen.

As simple as that.

Related Posts:
What are Guest Additions?
 Posted by at 10:04 am

How to Properly Reboot or Shut Down a Linux System

 Command Line, How To, Linux  Comments Off on How to Properly Reboot or Shut Down a Linux System
Jul 092015
 

How to do Clean ShutdownLearning how to do a clean shut down of a Linux system is important if you don’t want to mess up your computer.

Just pressing your finger on the power button will certainly shut down or reboot your Linux system. But it can also cause serious damage like data corruption.

Remember, Linux is constantly writing data to disk even if it’s not apparent to you. Also, Linux keeps data in memory although it might appear to have written the data to disk.

So it’s crucial to do an orderly shutdown of a Linux desktop or server.

When you do a clean or orderly shutdown, you’re essentially informing users and processes on the Linux system of the shutdown and blocking new logins.

In this post, we’ll cover various options to properly reboot and shut down a Linux system.

You must be root or use sudo to run the shutdown command.

When I tried to run shutdown without being root or using sudo, I got the following error:

[thomas@localhost ~]$ shutdown
Must be root.

Continue reading »

 Posted by at 2:35 pm

How to Flush IPTables Chains Selectively

 Command Line, How To, Linux  Comments Off on How to Flush IPTables Chains Selectively
May 132015
 

IPtables are a priceless resource for system administrators to secure their servers.

Given the ceaseless attempt by hackers working for money or thrills, every Linux server administrator must grasp the basics of IPtables.

In this post, I will assume that you already have IPtables installed and running on your system.

Once in a while, there might be arise a situation where you’ll have to flush the IPtables rules.

What is flushing?

Flushing basically refers to deleting the IPtables rules in a single chain or all chains.

Now you should know the difference between flushing and deleting on the command line with reference to IPtables.

In flushing, you’re just deleting the rules in a chain. Continue reading »

 Posted by at 5:03 pm