McAfee Support – Prevent mass mailing worms from sending mail, ePol.

Could you tell us how could you disable the Acess protection policy (either by ePO or VSE )?

If you have done this options in VSE on ePO managed client then the settings will revert back to its original after the policy enforcement .

Kindly do this action on ePO server and check the status

Steps:

1)kindly select your computer name on ePO conslole

2)click action under the ePO console

3)select agent and modify policies on single machine

4)select VSE8.x as product and edit the access protection policies

5)select the antivirus standar protection and untick the « Prevent mass mailing worms sending mail »

OAS.JPG

Source : McAfee Support Community – Prevent mass mailing worms from sending mail – McAfee Support Community

How to Install and Configure WordPress on CentOS 7 | ProfitBricks DevOps Central

Table of Contents

Introduction

WordPress is a free and open source blogging platform or content management system based on PHP and MySQL. Currently WordPress is the most popular CMS all over the world, and has 20000 plus plugins to extend its functionality.You can easily create a simple website, blog or complex portals and enterprise websites using WordPress.

WordPress provides lots of features. Some of them are listed below:

  • WordPress is available in more than 70 languages. So you can build a website in a language as your choice.
  • You can easily manage your content, schedule, look and publication using WordPress, and also secure your posts and content with a password.
  • WordPress comes with thousands of themes for you to create a beautiful website. You can also upload your own theme with the click of a button.
  • With the importers feature you can easily import your blog from another website to WordPress.
  • WordPress provides search engine optimization out of the box, and also provides many SEO plugins.

In this tutorial, we will discuss how to install and configure WordPress on a CentOS 7 server.

Requirements

  • A server running CentOS 7.
  • A non-root user with sudo privilege setup on your server.

Getting Started

Update your system with the latest package versions by running the following command:

sudo yum update -y

Once your system is up-to-date, you can proceed to the next step.

Installing LAMP

Before installing WordPress itself, you will need to install the LAMP stack and other required packages on your server.

You can install all the necessary packages with the following command:

sudo yum install httpd mariadb mariadb-server php php-common php-mysql php-gd php-xml php-mbstring php-mcrypt php-xmlrpc unzip wget -y

Once installation is complete, start the Apache and MariaDB services and enable them to start at boot with the following commands:

sudo systemctl start httpd
sudo systemctl start mariadb
sudo systemctl enable httpd
sudo systemctl enable mariadb

Configuring MariaDB for WordPress

By default MariaDB is not secured, so you will need to secure it first. You can do this by running mysql_secure_installation script:

sudo mysql_secure_installation

Answer all the questions as shown below:

Set root password? [Y/n] n
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Once you have finished, login to MariaDB console with the following command:

mysql -u root -p

Enter your MariaDB root password and hit Enter. After login, create a database for WordPress:

MariaDB [(none)]>CREATE DATABASE wordpress;
MariaDB [(none)]>GRANT ALL PRIVILEGES on wordpress.* to 'user'@'localhost' identified by 'password';
MariaDB [(none)]>FLUSH PRIVILEGES;
MariaDB [(none)]>exit

Installing and Configuring WordPress

You can download the latest version of the WordPress source from the official website. You can get the latest version of WordPress by running the following command:

wget http://wordpress.org/latest.tar.gz

Once download is finished, extract the downloaded file with the following command:

tar -xzvf latest.tar.gz

Next, move the extracted files to the Apache web root directory:

sudo cp -avr wordpress/* /var/www/html/

Next, create a directory for WordPress to store uploaded files:

sudo mkdir /var/www/html/wp-content/uploads

Next, assign proper ownership and permissions to your WordPress files and folders:

sudo chown -R apache:apache /var/www/html/
sudo chmod -R 755 /var/www/html/

Next, you will need to make some changes in the WordPress main configuration file, so it can be connected with the database and user.

First, rename and edit the WordPress main configuration file:

cd /var/www/html/
sudo mv wp-config-sample.php wp-config.php
sudo nano wp-config.php

Change the DB_NAME, DB_USER, and DB_PASSWORD variables as shown below:

define('DB_NAME', 'wordpress');
define('DB_USER', 'user');
define('DB_PASSWORD', 'password');

Save and close the file when you are finished.

Accessing WordPress Web Installation Wizard

Before starting, you will need to allow access to the Apache ports using firewalld.

You can do this by running the following command:

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

Next, open your web browser and type the URL http://your-server-ip. You should see the following page:

WordPress language selection

Select language as per your need and click on Continue button, you should see the following page:

WordPress site info page

Fill out all the required site information and click on Install WordPress button. You should see the WordPress default dashboard as below:

WordPress dashboard page

Once installation is completed, you can login WordPress by typing the URL http://your-server-ip/wp-login.php? on your web browser. You should see the WordPress login page as below:

WordPress login page

Next, provide username and the password which you have created earlier and click on Log In button, you should see the following page:

WordPress dashboard

Summary

Congratulations! You have successfully installed WordPress on CentOS 7. I hope you have now enough knowledge to host your own WordPress blog easily. Feel free to comment below if you have any questions.

Source : How to Install and Configure WordPress on CentOS 7 | ProfitBricks DevOps Central

How To Install WordPress On CentOS 7 Linux | Unixmen

Today, we will learn how we can install WordPress on our CentOS 7 Linux distribution.

Why CentOS?

CentOS Linux is a community-supported distribution derived from sources freely provided to the public by Red Hat for Red Hat Enterprise Linux (RHEL). As such, CentOS Linux aims to be functionally compatible with RHEL. The CentOS Project mainly changes packages to remove upstream vendor branding and artwork. CentOS Linux is no-cost and free to redistribute. Each CentOS version is maintained for up to 10 years (by means of security updates — the duration of the support interval by Red Hat has varied over time with respect to Sources released). A new CentOS version is released approximately every 2 years and each CentOS version is periodically updated (roughly every 6 months) to support newer hardware. This results in a secure, low-maintenance, reliable, predictable and reproducible Linux environment.

You can download CentOS from here. You can directly download the ISO file format disk image from here.

What is WordPress?

WordPress is an open source website creation tool or content management system (CMS) based on PHP and MySQL. Matt Mullenweg and Mike Little programmed WordPress back on 2003. This is the most easiest static (can be developed for dynamic also) website content management system (or CMS) that exists.

WordPress is a free and license under GPLv2 (or later) from the Free Software Foundation. According to a survey report, WordPress was used by more than 23.3% of the top 10 million websites. WordPress is one of the most popular blogging system used on the Web.

It supports

  • Different free & paid themes for different different UI & UX
  • Plugins for different services & functionalities
  • Mobiles (Responsive views)
  • Multi-user & multi-blogging

To know more about WordPress, visit this link. To download latest WordPress from here.

Prerequisites

To install WordPress, we will need these following thing that needs to be installed or available on our CentOS 7 Linux server.

  • Apache or Nginx as web server
  • PHP version 5.6 or greater
  • MySQL / MariaDB version 5.6 or greater as database

Legacy or older version of PHP & MySQL can drive WordPress but not recommended from their official page.

Also, make sure your firewall / iptables or SELinux is not blocking any port(s) which is required over here or you don’t have any problem with proper user permission.

To disable SELinux, type the following

setenforce 0

Let’s update the CentOS 7 Linux server first. This is a good practise to keep your server up to date. To do so, issue the below command one after another and wait till it gets updated. It will depends on your internet speed and it will take a long. So, please have patience.

sudo yum clean all
sudo yum -y update

You will see something like below image once you are done with it. Depending on how old your system softwares are or which packages are needs to be updated. The below image indicates an successful update and may require to reboot system as well.

yumupdatedcentos7

Installing Apache as web server

To install Apache on your CentOS 7, issue the below command on your terminal.

sudo yum -y install httpd

This will download and install Apache as a web server on the system.

Let’s start Apache by issuing the below command.

sudo systemctl start httpd

Set Apache at start or booting time so after every reboot, it get started automatically without manual start.

sudo systemctl enable httpd

Test Apache

To test apache issue the below command.

sudo systemctl status httpd

This will show the status of Apache for you.

Or you can open a web browser and type “localhost” without the double quote in to the address bar. You will see something like this.

testing_apache_centos7

It indicates that our web server up and running ?

You may need to enable mod_rewrite module as well. Just open the file located on /etc/httpd/conf/httpd.conf by your faviourute file editor and change the following line

AllowOverride None

to

AllowOverride All

We are done with Apache.

Installing MySQL / MariaDB

To install MySQL / MariaDB on to your system, issue the below command.

sudo yum install mariadb-server mariadb

This will download and install MySQL / MariaDB on to the system.

To start the MariaDB server, issue the below command.

sudo systemctl start mariadb

Now, we need to set the password for the “root” user of MySQL / MariaDB. Let’s do it by typing the following and this is must for security reason.

sudo mysql_secure_installation

You will see something like this. Hit Y to continue and type a complex password and remember it.

CentOS7_security

After setting the root password, you will see something like below image.

afterrootpasswordCentOS7

Now, you will get few prompts on your terminal with Y/N options.

Hit Y for the prompt “Remove anonymous users?”

Hit Y for the prompt “Disallow root login remotely?”

Hit Y for the prompt “Remove test database and access to it?”

Hit Y for the prompt “Reload privilege tables now?”

After finishing all the prompts, you will see something like below.

finishmariadbCentOS7

We are done with MySQL / MariaDB.

Installing PHP 

To install PHP, open a terminal and issue the below command.

sudo yum -y install php php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl

This will download and install PHP on your CentOS 7 system along with some others PHP modules which are required for WordPress.

Installing phpMyAdmin

To install phpMyAdmin, issue the below command in the terminal.

sudo yum -y install epel-release

And then issue the below command again.

sudo yum -y install phpmyadmin

After installing PHP, we need to restart the Apache or other web server in order to work with PHP. Type the following to do so.

sudo systemctl restart httpd.service

To test whether you can access phpMyAdmin or not, open any web browser and type the following in the address bar.

localhost/phpmyadmin

You will see something like this.

phpmyadminCentOS7

We are done installing PHP.

Installing WordPress

Download the latest WordPress from here. Or use the below command to download it.

sudo wget https://wordpress.org/latest.zip

After downloading the zip archive file, let’s unzip it by typing the below command on the terminal.

sudo unzip latest.zip

After successful unzipping, you will see a folder named “wordpress”. Now, copy this “wordpress” folder to the /var/www/html folder path by doing the following.

sudo cp -avr wordpress /var/www/html

Now, move to the /var/www/html folder and issue the below two commands.

sudo chmod -R 775 wordpress
sudo chown apache:apache wordpress

Now, type the following in your web browser address bar.

localhost/wordpress

You will see the below image. Click “Let’s go!” for continue.

1stwordpresscentos7

After clicking “Let’s go!” button, you will see something like this.

wordpresssetp2centos7

Now, we need to create a database with a name whatever you wish for installing WordPress.

Let’s create the database then. To do so, open the web browser and type the following.

localhost/phpmyadmin

Then it will ask for a user name & password. Type “root” as user name and the password that you had set earlier while installing MySQL/ MariaDB. I hope that you can remember that. Once you are logged in, you will see something like this.

phpmyadmincenos7

Now click New from the left top corner marked as red in the following image.

phpmyadmincenos7step2

After clicking New, you will see this. Type a database name and click “Create” button. Here, I am typing iftekher for my database name. You can type whatever you wish.

creatingdbcentos7

We are done creating our database for installing WordPress.

Now move back to the WordPress installation.

Type the database name as iftekher (As I set iftekher as my database name), user name as root, root password and leave database host and table prefix as it is. It should look like below image. Click submit button to continue.

settingupcentos7

After this, you will see a similar image like below and you need to click “Run the install” button.

runthecentos7

Then, you will see a welcome screen just like below asking for your WordPress site title, user name, password which are related to your WordPress site. Type your the site title, type admin as user name and choose a hard password and enter your email address and click “Install WordPress”.

welcomewpcentos7

Then you will get a message that WordPress has been successfully installed on your CentOS7.

Now, type the following in your web browser address bar and you will see something like this.

localhost/wordpress

livewpcentos7

So we are done with installing WordPress on our CentOS 7 Linux server.

Have a great day.

Source : How To Install WordPress On CentOS 7 Linux | Unixmen

How To Configure SFTP server on CentOS?

How to configure a SFTP server on CentOS 7

Introduction

I have put together a how-to showing how to setup a SFTP server on CentOS with full CHROOT.

Source Video: https://www.youtube.com/watch?v=d4D6xqQigH8

Steps (6 total)

1 Start the SSHD service and ensure it starts with the server

# systemctl enable sshd.service
# systemctl start sshd.service

2 Setup the SSH Deamon – some VI knowledge required

# vi /etc/ssh/sshd_config

Comment the following line (add a hash before it)

Subsystem sftp /usr/local/libexec/sftp-server

and add the following just below it, I recommend using tab instead of spaces

Subsystem sftp internal-sftp

Now scroll to the end of the config file and add the following to create the match rule:

Match Group sftponly
ChrootDirectory %h
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no

Save the config file and close it. (Press ESC and type ‘wq!’)

3 Reload the SSH Deamon

# systemctl restart sshd.service

4 Let’s add the user(s) and group (I used John as an example):

# groupadd sftponly
# useradd john -g sftponly -s /bin/false
# passwd john

5 Add folders (for the user to read and write data from):

# mkdir /home/john/datadir
# chown root /home/john
# chmod 755 /home/john
# chown john /home/john/datadir
# chmod 755 /home/john/datadir

6 Stop SELinux from interfering with our jail

# setsebool -P ssh_chroot_rw_homedirs on

References

Best Free Monitoring system for Linux

Source : Best Free Monitoring system for Linux

Best command line tools for linux performance monitoring

Sometimes a system can be slow and many reasons can be the root cause. To identify the process that is consuming memory, disk I/O or processor capacity you need to use tools to see what is happening in an operation system.

There are many tools to monitor a GNU/Linux server. In this article, I am providing 7 monitoring tools and i hope it will help you.

Htop

Htop is an alternative of top command but it provides interactive system-monitor process-viewer and more user friendly output than top.
htop also provides a better way to navigate to any process using keyboard Up/Down keys as well as we can also operate it using mouse. For Check our previous post:How to install and use htop on RHEL/Centos and Fedora linux

Htop (Linux Process Monitoring)

Htop (Linux Process Monitoring)

dstat

Dstat is a versatile replacement for vmstatiostatnetstat and ifstatDstat overcomes some of their limitations and adds some extra features, more counters and flexibility. Dstat is handy for monitoring systems during performance tuning tests, benchmarks or troubleshooting.
Dstat allows you to view all of your system resources in real-time, you can eg. compare disk utilization in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval).
Dstat gives you detailed selective information in columns and clearly indicates in what magnitude and unit the output is displayed. Less confusion, less mistakes. And most importantly, it makes it very easy to write plugins to collect your own counters and extend in ways you never expected.
Dstat’s output by default is designed for being interpreted by humans in real-time, however you can export details to CSV output to a file to be imported later into Gnumeric or Excel to generate graphs.

Check our previous post: How to install and use dstat on RHEL/CentOS,Fedora and Debian/Ubuntu based distribution

Example dstat output

Example dstat output

Collectl

Collectl is a light-weight performance monitoring tool capable of reporting interactively as well as logging to disk. It reports statistics on cpu, disk, infiniband, lustre, memory, network, nfs, process, quadrics, slabs and more in easy to read format.
In this article i will show you how to install and sample usage Collectl on Debian/Ubuntu and RHEL/Centos and Fedora linux.

Check our previous post: Collectl – Monitoring system resources

Collectl screen

Collectl screen

Nmon

nmon is a beutiful tool to monitor linux system performance. It works on LinuxIBMAIXUnixPower,x86amd64 and ARM based system such as Raspberry Pi. The nmoncommand displays and recordslocal system information. The command can run either in interactive or recording mode.

Check our previous post: Nmon – linux monitoring tools

nmon startup screen

nmon startup screen

Saidar

Saidar is a curses-based application to display system statistics. It use the libstatgrab library, which provides cross platform access to statistics about the system on which it’s run. Reported statistics includeCPUloadprocessesmemoryswapnetwork input and output and disks activities along with their free space.

Check our previous post: Saidar – system monitoring tool

saidar -c

saidar -c

Sar

The sar utility, which is part of the systatpackage, can be used to review history performance data on your serverSystem resource utilization can be seen for given time frames to help troubleshoot performance issues, or to optimize performance.

Check our previous post: Using Sar To Monitor System Performance

Sar command

Sar command

Glances

Glances is a cross-platform curses-based command line monitoring tool writen in Python which use the psutil library to grab informations from the system. Glance monitoring CPULoad AverageMemoryNetwork InterfacesDisk I/OProcessesand File System spaces utilization.

Glances can adapt dynamically the displayed information depending on the terminal siwrize. It can also work in a client/server mode for remote monitoring.

Check our previous post: Glances – Real Time System Monitoring Tool for Linux

Glances

Glances

Atop

Atop is an interactive monitor to view the load on a Linux system. It shows the occupation of the most critical hardware resources on system level, i.e. cpu, memory, disk and network. It also shows which processes are responsible for the indicated load with respect to cpu- and memory load on process level. Disk load is shown if per process “storage accounting” is active in the kernel or if the kernel patch ‘cnt’ has been installed. Network load is only shown per process if the kernel patch ‘cnt’ has been installed.

Example Atop output

Atop linux resources monitoring tool

For more about Atop check next post: Atop – monitor system resources in linux

So, if you come across any other similar tool then let us know in the comment box below.

Source : Best command line tools for linux performance monitoring

How to setup network after RHEL/CentOS 7 minimal installation

After installing RHEL/CentOS 7 minimal, You may not able to connect network in that machine. This will happen because Ethernet interfaces are not enabled by default.
This guide explain you to setup network on RHEL/CentOS 7.

Setup network on CentOS 7 minimal

First, type “nmcli d” command in your terminal for quick list ethernet card installed on your machine:

"nmcli d" command output

“nmcli d” command output

Type “nmtui” command in your terminal to open Network manager. After opening Network manager chose “Edit connection” and press Enter (Use TAB button for choosing options).

CentOS_7 Network manager screen

CentOS_7 Network manager screen

Now choose you network interfaces and click “Edit

Edit your network interfaces

Edit your network interfaces

DHCP configuration

Choose “Automatic” in IPv4 CONFIGURATION and check Automatically connect check box and press OK and quit from Network manager.

Set ip adress using DHCP

Set ip adress using DHCP

Reset network services:

service network restart

Now your server will get IP Address from DHCP .

CentOS 7 check ip address

CentOS 7 check ip address

Source : How to setup network after RHEL/CentOS 7 minimal installation

Converting a Hyper-V vhdx for use with KVM or Proxmox VE

Export Hyper V Vhdx
Export Hyper V Vhdx

Recently we removed a 1/2 rack of servers from one of our data centers. That included our last two Microsoft Hyper-V 2012 R2 servers that hosted two VMs with historical STH Bench data for development. To make things slightly more interesting, the domain controller had been removed so we had Hyper-V hosts that were not responding to GUI tools and we had one day to move data off them. Not a great situation, but we wanted to show how you can quickly convert a Hyper-V VM to KVM. In this case, we are putting the VMs on a Promxox VE cluster so we can get the VMs on an all-flash Ceph storage array. Proxmox VE is a Debian Linux based platform that combines features such as KVM virtualization, containers, ZFS, GlusterFS and Ceph storage as well as cluster management all with a nice Web GUI. If you are simply using a Ubuntu, RHEL or CentOS KVM virtualization setup, these same steps will work minus the Proxmox GUI views.

Converting Hyper-V vhdx Virtual Machine for KVM Usage

The total process took a long time as we only had 100mbps of bandwidth between the three data centers free for this project. The actual hands-on-keyboard time took a matter of minutes for both VMs. The trick is that our KVM system did not work with vhdx Hyper-V virtual machine drives so we needed to convert them into a qcow2 image (more on why later.)

Step 1: Export the VM to get a clean VHDx snapshot

Hyper-V has a great snapshot and replication feature. The Hyper-V hypervisors we had setup had a very fast 40GbE interconnect and SSD storage so we could take many snapshots. The first step is to export the VM so you can have one vhdxx virtual drive to transfer and convert. If you can use the GUI, this is a few clicks away.

Export Hyper V Vhdx
Export Hyper V Vhdx (demonstrated on a desktop copy and Hyper-V Manager)

If you cannot get to a Hyper-V Manager GUI, then you will likely want to use the Export-VM command via PowerShell. If you get really stuck and cannot open a remote PowerShell session to the Hyper-V host, you can use RDP (if enabled) or iKVM on the server to get to a PowerShell prompt.

Using the Export-VM command via PowerShell or via the Hyper-V Manager GUI ensures that you get a single vhdx file ready to transfer and convert.

Step 2: Send the vhdx to the target KVM virtualization host

This step is really easy, especially if you exported the VM to a network share location. If so, you can simply copy the resultant vhdx to the new server. If you cannot, we have seen various other combinations of USB drives, SFTP clients and other methods to get the vhdx drive to the target server.

Step 3: Check the image before proceeding

Since the transfer was likely many GB in size and we are going Windows to Linux, it is always good to check that the vhdx image does not have errors before proceeding. Here is the command where “Bench-Dev.vhdx” is the file we transferred.

# qemu-img check -r all Bench-Dev.vhdx

Hyper V Vhdx To Proxmox Qcow2 Qemu Img Check
Hyper-V Vhdx To Proxmox Qcow2 Qemu-Img Check

As you can see, the vhdx file passed with no errors reported.

Step 4: Create the VM you want to use

At this point, we wanted to create a VM that we are going to use with the image we transferred. Here the key is to ensure that you make a VM that mirrors the Hyper-V VM in terms of CPU, RAM, network and disk options. Most modern OSes are supported via KVM so you should have little issue getting things to work, especially with Linux guests.

Hyper V Vhdx To Proxmox Qcow2 Create VM With Qcow2 Local Storage
Hyper V Vhdx To Proxmox Qcow2 Create VM With Qcow2 Local Storage

Step 5: Find the VMs qcow2 image

There are a few different ways you can do this, including creating the VM and attaching the disk after converting the vhdx. Since we want to keep Proxmox VE’s naming convention (and make the process easy), we are going to simply overwrite the qcow2 image that the virtual machine wizard created. First, we need to find the VM.

Since you can see that the disk in the shot above is named vm-112-disk-1.qcow2, we can search for that on our Linux/ Proxmox VE host.

Hyper V Vhdx To Proxmox Qcow2 Find Qcow2 Disk To Overwrite
Hyper V Vhdx To Proxmox Qcow2 Find Qcow2 Disk To Overwrite

Now that we know the location, we can set the output of the conversion operation to overwrite the empty disk.

Step 6: Convert the vhdx to qcow2 and verify

The command to convert our image and overwrite the empty qcow2 is very simple. We are going to use qemu-img convert, specify the output type and then the vhdx followed by the full path to the qcow2 image.

Hyper V Vhdx To Proxmox Qcow2 Qemu Img Convert
Hyper V Vhdx To Proxmox Qcow2 Qemu Img Convert

Here is the command you can adapt to your setup:

qemu-img convert -O qcow2 Bench-Dev.vhdx /var/lib/vz/images/112/vm-112-disk-1.qcow2

We also validated that the disk is indeed written int eh correct place.

Step 7: Boot the VM

At this point, you should be able to boot the VM. There are still some tasks that will need to be completed. For example, updating network settings. Generally, this type of conversion will yield a different network interface so there are likely steps like setting that up in the guest OS that will need to happen. Platforms like Proxmox VE have built-in console viewer applications so we were able to do this post-transfer. Another option is to complete these steps before transferring/ converting the VM so that you can power-up and verify that the operation works.

Hyper V Vhdx To Proxmox Qcow2 Boot To Verify
Hyper V Vhdx To Proxmox Qcow2 Boot To Verify

These 7 quick steps take only a few minutes (save for the inter-data center transfer) and helped us move our Hyper-V VMs to KVM quickly and painlessly.

Source : Converting a Hyper-V vhdx for use with KVM or Proxmox VE