Posts

Showing posts with the label centos

How to install wireshark in Ubuntu 18.04

Dowanlod the latest reposotory from : https://launchpad.net/~wireshark-dev/+archive/ubuntu/stable Open terminal and type the commands: sudo apt-get install wireshark sudo dpkg-reconfigure wireshark-common sudo adduser $USER wireshark wireshark if you getting wireshark running error, so close it and then just do the following Go to usr/share/wireshark Open init.lua with a text editor Change disable_lua = false to disable_lua = true https://osqa-ask.wireshark.org/questions/16343/install-wireshark-on-ubuntu

CentOS 7 PHP version7.2 official repository

CentOS 7 PHP version7.2 official repository Command to install the EPEL repository configuration package: yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm Command to install the Remi repository configuration package: yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm Command to install the yum-utils package (for the yum-config-manager command): yum install yum-utils If you want a single version which means replacing base packages from the distribution Packages have the same name than the base repository, ie php-* Some common dependencies are available in remi-safe repository, which is enabled by default PHP version 7.2 packages are available for CentOS 7 in remi-php72 repository If the priorities plugin is enabled, ensure remi-php72 have higher priority (a lower value) than base and updates Command to enable the repository: yum-config-manager --enable remi-php72 Command to upgrade (the reposito...

Install and configure rsyslog Centralized logging server in CentOS

 Install and configure rsyslog Centralized logging server in CentOS 6.5 In this tutorial we will learn, how to install and configure rsyslog 7.6 version on RHEL 6.5/CentOS 6.5 .The scenario is, install and setup rsyslog Centralized Logging Server in RHEL/CentOS 6.5. All the logs from client servers will be sent to Centralized logging server i.e rsyslog server. Check Pre-installed rsyslog package Step 1: First of all check the rsyslog package is installed in your system.Generally by-default we get rsyslog version 5.x , after minimal installation of CentOS 6.x / RHEL 6.x We will install the latest rsyslog package. At the time of writing this post, rsyslog stable version 7.6 was available. You can find the latest package information from rsyslog official website Note: By default, RHEL 6.x and CentOS 6.x has rsyslog version 5.x. So here we will update the rsyslog with new version. You can get the rsyslog version information, by using below given two commands rpm -qa|grep rsy...

how to spot a spammer on a server ?

The most important file to check is : Quote from: exim main log /var/log/exim_mainlog There you will find all information about exim operation status. These are also useful command to get stats about exim queue: To list email summaries and counts by domain: #exim -bp | exiqsumm To clear emails older than one day: #exiqgrep -o 86400 -i | xargs exim -Mrm To delete emails from queue FOR a particular user: #exiqgrep -ir email@domain.com | xargs exim -Mrm To delete emails from queue FOR a particular domain: #exiqgrep -ir @domain.com | xargs exim -Mrm To delete emails from queue FROM a particular user: #exiqgrep -if email@domain.com | xargs exim -Mrm To delete emails from queue FROM a particular domain: #exiqgrep -if @domain.com | xargs exim -Mrm

Linux Agent - Error - Replication Driver Missing

Linux Agent - Error - Replication Driver Missing If any policy fails in R1soft, then you need to click on the failed policy and check the field "Alerts". If you see error related to "hcpdriver module", like ============================ An exception occurred during the request. The replication driver was not detected (detail: An error occurred while loading the hcpdriver module, please check your system logs; Please run "r1soft-setup --get-module " on your Agent to install one. ). ============================ Then you need to make sure you have installed Kernel-devel & Kernel-headers on your "Agent Server". Run (On clients server); # lsmod | grep hcp If it returns no value, then the hcpdriver not running on your client machine. After that you need perform below steps, 1. Check the current running Kernel # uname -r 2. Check you installed correct Kernel-devel & Kernel-headers # rpm -qa | gre...

Create a MySQL Database, Username, Password, and Privileges from the command line

Step 1: Login to MySQL ( you will need an account ) user@server:~$ mysql -u mysql_user -p Enter password: Step 2: Create the Database mysql > create database db_name; Step 3: Verify that it’s there mysql > show databases; Step 4: Create the User mysql > create user db_user; Step 5: Grant privileges while assigning the password mysql > grant all on db_name.* to 'db_user'@'localhost' identified by 'db_password'; *Note: The localhost field usually doesn’t have to be edited, but you can set it to the specific address. The above example grants all privileges, obviously. But you will likely want to limit privileges under many circumstances. These parameters include select, insert, and delete. Choose all that apply and separate by comma, thusly: mysql > grant select, insert, delete on db_name.* to 'db_user'@'localhost' identified by 'db_password';

How to install Softaculous in WHM

Image
1) In order to install Softaculous ensure ionCube Loaders are enabled. If it is not enabled you can go to WHM >> Tweak Settings >>PHP >> Select ioncube from Loader to use for internal cPanel PHP 2) Now Login to the server as root. 3)Go to the directory /usr/local/cpanel/whostmgr/docroot/cgi cd /usr/local/cpanel/whostmgr/docroot/cgi 4) Download Softaculous wget -N http://www.softaculous.com/ins/addon_softaculous.php 5) Change the permissions to 755 chmod 755 addon_softaculous.php That’s for the command line. Now login to WHM 6) Go to WHM > Plugins> Softaculous – Instant Installs

File and folder Permissions

Permissions are set using a command called CHMOD. CHMOD stands for CHange MODe. You are giving the host computer new instructions about this file or directory. CHMOD comes as a set of 3 numbers. Each of these 3 numbers is a sum total of 3 other numbers. So you have to add 3 numbers to get the first CHMOD number, add 3 numbers to get the second CHMOD number and add 3 numbers to get the third CHMOD number. Understanding the numbers... Each digit is a number value from 0 to 7. The value specifies what capabilities are available (or not). These numbers correspond to 3 command types. Read, write and execute. Read (r) has a value of 4. It allows listing files in the directory. Write (w) has a value of 2. It allows the addition of new files to the directory. Execute (x) has a value of 1. It allows access to the files in the directory. Here are the possible combinations available using these command types : Digit rwx Result 0 --- no access ...

How to set iptables rules in centos

The rules we used for firewall 2 were: Stop all incoming traffic using the following command: iptables -P INPUT DROP Allow SSH session to firewall 2 by using the following command: iptables -A INPUT -p tcp --dport 22 -s 0/0 -j ACCEPT Allow ICMP traffic to firewall 2 by using the following command: iptables -A INPUT -p icmp -j ACCEPT Allow all related and established traffic for firewall 2 by using the following command: iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT Stop all forwarding by using the following command: iptables -P FORWARD DROP Allow forwarding of TCP traffic on IP interface 172.110.60.0 (client) port 80 (HTTP) and port 443 (HTTPS) to go to 192.168.40.95 (webApp.secure) by using the following commands: iptables -A FORWARD -p tcp --dport 80 -s 172.110.60.0 /24 -d 192.168.40.95 -j ACCEPT iptables -A FORWARD -p tcp --dport 443 -s 172.110.60.0 /24 -d 192.168.40.95 -j ACCEPT Allow forwarding of ICMP traffic by using t...