Thursday, June 16, 2022

How to Install Desktop(GUI) on CentOS 7

 Step 1: Prerequisites


a) You should have a running RHEL/CentOS 7 System.

b) You should have sudo or root access to run privileged commands.

c) You should have yum utility available in your System.
Step 2: Update Your Server

Before installing a new package, it is always a good idea to update the System with the latest available versions using yum update command as shown below. If any of the packages needs upgradation then upgrade it by using yum upgrade command.

Step 3: Check Package Groups

You can check all the available package groups by using yum grouplist or yum group list command. As you can see from the below output, we need to basically install GNOME Desktop and Graphical Administration Tools package groups.
Step 4: Install GNOME Desktop(GUI)

To install GNOME Desktop and Graphical Administration Tools package groups, you need to use either yum groupinstall "GNOME Desktop" "Graphical Administration Tools" or yum group install "GNOME Desktop" "Graphical Administration Tools" command as shown below.
Step 5: Enable GUI

After successful installation of GNOME Desktop environment, you need to enable and make the graphical mode as default. This can be done by using systemctl set-default graphical command as shown below.
Step 6: Reboot Server

Finally reboot the Server using reboot command to start the Graphical mode.
Step 7: Setup GNOME Desktop(GUI)

After reboot, you should be able to see the GNOME Desktop environment like below.

Once you logged in, you should be able to see the below Window to select your language. By default, English will be selected so I will leave it as it is and Click on Next.

In the next step, you need to setup your Keyboard layout. By default, it will be selected as English(US) so I will leave as it is and Click on Next. You are free to choose any Keyboard layout here based on your preference.

In the next window, you will see an option to turn Location Services ON or OFF. Turning ON will allow applications to determine your geographical location. By default, it will selected as ON so for the moment I will leave as it is and Click on Next. If you don't want to any application to see your geographical location then you can switch OFF your Location Services.

In the next windows, you will be asked to connect your accounts to easily access your email, online calendar, contacts, documents and photos. You can either connect it or skip for the moment. I am choosing to skip this as of now so I will click on Skip.

This concludes your setup and now you are ready to use your System. To finish the setup Click on Start Using CentOS Linux.

This will bring you to the Server Desktop where you can start using your System as shown below.
Step 8: Uninstall GNOME Desktop(GUI)

In case, you decide not to use GNOME Desktop anymore then you can uninstall it by using yum groupremove "GNOME Desktop" "Graphical Administration Tools" or yum group remove "GNOME Desktop" "Graphical Administration Tools" command as shown below.

Extract rar Files in CentOS Linux



How to Extract rar Files in CentOS Linux

To extract rar file in CentOS 7, We need to install package called unar (Not unrar), Then we can extract rar files using the unar utility.

Install unar on CentOS.
Extract rar files with unar.
Extract Password Protected rar files.
Install unar on CentOS Linux

The unar for CentOS 7 provides by the epel repository, So first enable the epel repository.

yum install epel-release

Then install unar on CentOS using yum command.

yum install unar

Don’t misspell the package name, it is unar not unrar.
Extract rar files in CentOS with unar

To extract .rar archive file from the command line, execute unar command followed by the name of the archive file.


unar example.rar

By default archive file will extract to the current working directory. To extract rar file to a different directory, we need to use -o option.


unar -o /opt example.rar

As per the above command The .rar archive example.rar will unrar to the /opt directory.
Unrar Password Protected rar files in CentOS

By default unar command will prompt the password if the rar file is password protected.


Or we can specify the password with -p option.


unar -p 123456 centos.rar
Extract rar files in CentOS Desktop

When we have unar package installed, we can unrar archive files from the GUI.

To unrar a archive file using the GUI, Right click on the .rar file and select Extract Here.

Summary

In this tutorial we learned how to extract .rar archive format in CentOS 7.In Order to Unrar .rar files, we need to install unar package which is provided by the epel repository for CentOS 7.
Once we install unar, we can extract archive files using both command line and the GUI.

Tuesday, June 14, 2022

How to add additional static IP adress to CentOs 7 using webmin

How to add additional IP address to CentOS 7 using command


Navigate to the network interface configuration folder using the following command:
cd /etc/sysconfig/network-scripts

Create a new virtual interface with:
nano ifcfg-eth0:0

The file will be created and opened with the text-editor “nano”. Now the following paragraphs must be added:

DEVICE=eth0:0
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.51.100.42
NETMASK=255.255.255.255


systemctl restart network
or
sudo reboot 

See the video:https://youtu.be/-Y5LXdpnEYY
Followed by: Contabo VPS

warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory fixed

$ cat /etc/environment

LANG=en_US.utf-8 
LC_ALL=en_US.utf-8


For CentOS:

sudo vi /etc/environment
add the following  lines:
LANG=en_US.utf-8
LC_ALL=en_US.utf-8

Or, 
export LC_CTYPE=en_US.UTF-8 
export LC_ALL=en_US.UTF-8

or 
vi  .bash_profile

then add the following lines:

export LC_CTYPE=en_US.UTF-8 
export LC_ALL=en_US.UTF-8

Install only Webmin in CentOS

sudo vi /etc/yum.repos.d/webmin.repo

[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1


wget http://www.webmin.com/jcameron-key.asc
sudo rpm --import jcameron-key.asc

sudo yum install webmin

Follow the command to instll Virtualmin:

~# wget https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh

~# sudo sh virtualmin-install.sh

Saturday, June 11, 2022

PowerMTA System requirements

It depends on how big your email lead list is. For example, if you want to send 10000/hour emails , the optimum server would have 10 IPs and would be using 10 domains or subdomains. This way each IP/domain would send emails1000/hour. The more IPs and domains the better variety can be applied as follows.

Minimum system requirements for sending from 1 IP/domain:

  • VPS (KVM, OpenVZ, XEN, …)
  • CentOS 6 x64 minimal
  • 1 core
  • 1 GB RAM
  • 10 GB HDD
  • 1 IP

I theory a server like this could also be used with more IPs and domains but could get to its peak point.
Here are recommended system requirements based on number of used IPs/domains
Local PowerMTA


Everything will run on the same server so our server must have enough power. Here are our recommendations:

5-19 IPs/domains

  • VPS or Dedicated server
  • 2 cores
  • 8 GB RAM
  • 20 GB SSD
20-99 IPs/domains

  • VPS or Dedicated server
  • 4 cores
  • 16GB RAM
  • 40 GB SSD
100+ IPs/domains

  • VPS or Dedicated server
  • 8 cores
  • 32GB RAM
  • 100 GB SSD
Here a saying we all know from Jeremy Clarkson would come in handy, POWER!!!! And more power we have the better.

External PowerMTA
In this case, Mumara will run on one more powerful server and PowerMTA will be installed on many cheaper servers. Here are our recommendations:

Main server – Mumara

  • 4 cores
  • 16GB RAM
  • 40 GB SSD
  • 1 IP

MTAs – PowerMTA
  • 1 core
  • 1 GB RAM
  • 10 GB HDD
  • 1 IP
This guideline covers both scenarios.

Extract Domain from email in Excel or Google sheet

  =TEXTAFTER( A2 , "@") or, =MID(A1, FIND("@", A1) + 1, LEN(A1) - FIND("@", A1))