Skip to main content

Posts

INSTALLING OSSEC AGENT IN CENTOS

OSSEC is an open source centralized log monitoring and notification system. OSSEC is often used to meet PCI Compliance central logging and intrusion monitoring requirements with a free and self-managed solution. First download the package #wget https://github.com/ossec/ossec-hids/releases/download/v2.7/ossec-hids-2.7.tar.gz Now extract it #tar -zxvf ossec* mv to ossec-hids directory #cd ossec-hids/ Install the file # ./install.sh Now start the service #service ossec start (Centos 6) #systemctl start ossec (Centos7) UNINSTALLING OSSEC As OSSEC is installed from source, we don't have all the nice package management options. we have to remove all the things manually, that is, all the ossec files, the init files, the ossec users and ossec groups. The following shell commands do that: #rm -f /etc/init.d/ossec /etc/rc0.d/K20ossec /etc/rc1.d/K20ossec /etc/rc2.d/S20ossec #rm -f /etc/rc3.d/S20ossec /etc/rc4.d/S20ossec /etc/rc5.d/S20ossec /etc/rc6.d/K20ossec #rm ...

ASTERISK CENTOS 6.X INSTALLATION THROUGH COMPILATION (ASTERISK 1.8)

Asterisk is an enterprise level telephone system that uses real desk phones capable of seamlessly calling normal phones. Install wget to pull down Asterisk && Download Asterisk 1.8 & DAHDI Tools: #yum install wget #wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.5.0.tar.gz #wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.5.0+2.5.0.tar.gz Asterisk & DAHDI Tools need extracting, to extract the tar.gz #tar -xvzf asterisk-1.8*   #tar -xvzf dahdi-linux-complete-* Install dependencies so we can compile Asterisk 1.8 #yum install kernel-devel gcc make gcc-c++ libxml2-devel Next, install Perl & Ncurses Development #yum install perl ncurses-devel #cd dahdi-linux-complete* #make all #make install #make config For this tutorial I am only going to be using SIP trunks. If you have are using cards / hardware you might want to check out /etc/dahdi/sy...

INSTALLING CLAMAV 0.99.2 ON CENTOS

ClamAv  is an open source antivirus engine for detecting trojans, viruses, malware and other malicious threats.Here i will explain about its configuration in centos. First create#vi /etc/yum.repos.d/epel.repo [epel] name=Extra Packages for Enterprise Linux 6 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch failovermethod=priority enabled=1 priority=10 gpgcheck=0 Create the epel repository based on the centos version you are using.Here Iam configuring for centos6.8. Save and Close the file #yum clean all #yum update  #yum repolist Install clamav-db rpm package: #yum install clamav clamd Start the clamd service and set it to auto-start # /etc/init.d/clamd start # chkconfig clamd on (to make service run after reboot) Update the virus definitions database using command: # /usr/bin/freshclam Note:  C...

ENABLING USER AUTHENTICATION IN MONGODB

                                            In my previous article i have explained installation of mongodb in Centos.Follow the guidelines in  http://www.goserverspace.com/2017/09/mongodb-is-nosql-database-which.html In this article Iam explaining about enabling user authentication in mongodb. we will enable authentication for users to prevent that another user without sufficient privileges is able  to see the data on the database. On our CentOS 7 server, MongoDB is running under systemd with an init script in the '/etc/init.d/' dirctory. We will edit that script to force the mongodb service to run with the '--auth' option. Go to the '/etc/init.d/' directory and edit the "mongod" file: #cd /etc/init.d/ #vim mongod On line 15 you will find the "OPTION" variable, there we will add the "mongod" option. OPTIONS=" --auth -f $CONFIGFI...

MONGODB ON CENTOS 7

                MongoDB is a NoSQL database which provides high performance, high availability, and automatic scaling. NoSQL database means that, unlike MySQL or PostgreSQL, it does not support SQL in order to retrieve or manipulate the stored data. 1.INSTALLING MONGODB                                                                                                                                                                     First Create a mongodb repository file                     ...

PHPMYADMIN ON CENTOS 6.9

PhpMyAdmin is a free software tool written in  PHP  for handling the  administration of  MySQL  through Web. phpMyAdmin supports a large number of operations on MySQL and MariaDB.It makes users to use mysql and mariadb easily. First we need to setup a lamp server. ( For that follow our documents in   http://www.goserverspace.com/2017/09/lamp-on-centos-68.html ) Next step is installing phpmyadmin.By default it will not be available.So we want to create a  epel repo. #vi /etc/yum.repos.d/epel.repo [epel] name=Extra Packages for Enterprise Linux 7 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch failovermethod=priority enabled=1 priority=10 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7   Save and Close the file Now update the repo #yum update -y #yum repolist Now we can install p...

LAMP ON CENTOS 6.9

LAMP is a platform that uses linux as operating system, apache as the Web server, mysql as the relational database management system and php as the scripting language.Thus it is of great importance. In some cases we also use pearl or python instead of php. Installing Apache The first step is installing httpd package #yum install httpd -y Now start the service #systemctl start httpd Now enable httpd service #systemctl enable httpd.service To check it just open your browser and access http://localhost Create a MySQL/MariaDB Database Now next step is installing mysql.Here iam using mysql-community package.So we want to create a repository for it.  First create a mysql-repository #vi /etc/yum.repos.d/mysql-community.repo [mysql57-community] name=MySQL 5.7 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/ ena...

DOWNGRADING CENTOS 6.9 TO 6.8

We all are familier with updating our os.But what about downgrading...Its little risky..right?...Let me explain you about it.. 1.First we need to downgrade the kernel.Here we want to downgrade from Centos 6.9 to 6.8 Find out kernel version running on centos 6.8. I found it as  kernel-2.6.32-642.15.1.el6 # curl -O http://vault.centos.org/6.8/updates/x86_64/Packages/kernel-2.6.32-642.15.1.el6.x86_64.rpm (  ie, downloading the required kernel version) #yum install kernel-2.6.32-642.15.1.el6.x86_64.rpm    (install the kernel version) 2. Now find the kernels present in grub grep '^[[:space:]]*kernel' /boot/grub/grub.conf From the list, identify the kernel that you want to set as default. Each kernel in the list is assigned by GRUB a numeric entry value starting from 0 in an increasing order. That is, the first entry assigned 0, the second entry assigned 1, etc. Open /boot/grub/grub.conf with a text editor, and set GRUB_DEFAULT to...

WEBMIN ON CENTOS

Webmin is a web-based graphical tool for unix . It is used to manage services like User management, Disk managemet, Network, Iptables (Firewall), Cron, Apache, DNS, File sharing and much more .   Install all dependencies # yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty #wget http://prdownloads.sourceforge.net/webadmin/webmin-1.860-1.noarch.rpm Install webmin pakage #yum install webmin* -y   Disabled firewalld and selinux Now for our convenience we can disable firewalld and selinux Open the selinux config file and make the following entry #vi /etc/selinux/config SELINUX=disabled Now the next step is to disable firewalld #service firewalld stop If we want to disable firewalld from on reboot #chkconfig firewalld off Start the webmin service Start the service and make it start automatically(optional) #chkconfig webmin on Start the webmin service #service webmin start Now, open  http://ip.add.re.ss:10000  in your browser and enter yor root username and pa...