Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Monday, 27 June 2016

How To Install & Configure Drupal on CentOS/RHEL 6x

How To Install & Configure Drupal on CentOS/RHEL 6x


Q. What is Drupal?

-- Drupal is content management software. The application includes a content management platform and a development framework. It's used to make many of the websites and applications you use every day. Drupal has great standard features, like easy content authoring, reliable performance, and excellent security.

Step: 1. Bind Hosts File :

# vi /etc/hosts

10.100.99.247           ser1.domain.com    ser1

-- Save & Quit (:wq)

Step: 2. Disable Selinux & Stop Firewall :

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

# service iptables stop
# chkconfig iptables off

Step: 3. Install NTP Server (for Time Syncronization) :

# yum -y install ntp
# service ntpd restart
# chkconfig ntpd on
# ntpdate pool.ntp.org

Step: 4. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 5. Install MySQL Server 5.6 :

# rpm -Uvh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
# yum -y install mysql mysql-server

Step: 6. Install PHP 5.6 :

# yum -y install epel-release
# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
# yum -y install php56w php56w-devel php56w-common php56w-mbstring php56w-gd \
   php56w-xml php56w-mcrypt php56w-mysqlnd php56w-imap php56w-pdo \
   php56w-snmp php56w-soap php56w-xmlrpc php56w-opcache php56w-iconv mod_ssl wget

Step: 7. Start Apache Service :

# service httpd restart
# chkconfig httpd on

Step: 8. Start MySQL Service & Set Root Password :

# service mysqld restart
# chkconfig mysqld on

# mysql_secure_installation

Step: 9. Create Database for Drupal :

# mysql -u root -p
Enter the Password:

mysql> create database drupaldb;
mysql> grant all privileges on drupaldb.* to drupal@localhost identified by 'password';
mysql> grant all privileges on drupaldb.* to drupal@'%' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 10. Download & Extract Drupal Source Code :

# cd /var/www/html/
# wget https://ftp.drupal.org/files/projects/drupal-8.1.0.tar.gz
# tar -zxvf drupal-8.1.0.tar.gz
# mv drupal-8.1.0 drupal
# chown -Rf apache:apache /var/www/html/drupal

Step: 11. We need to Create Settings file from the default.settings.php File :

# cd /var/www/html/drupal/sites/default/
# cp -p default.settings.php settings.php
# chmod a+w /var/www/html/drupal/sites/default/settings.php
# chmod a+w /var/www/html/drupal/sites/default

Step: 12. Enable Apache mod_rewrite Module :

# vi /etc/httpd/conf/httpd.conf

Line No: 338

AllowOverride None To AllowOverride All

At the End, Add this Line :

RewriteEngine on

-- Save & Quit (:wq)

# service httpd restart

Step: 12. Install Drupal Through Web Browser :

http://10.100.99.247/drupal/core/install.php

-- Choose Language: English & Click on "Save & Continue"
-- Choose Profile: Standard & Clcik on "Save & Continue"
-- Database Configuration:
     Database Name: drupaldb
     Database Username: drupal
     Database Password: password
  
-- Clcik on "Save & Continue".
-- SITE INFORMATION:
     Site Name: domain.com
     Site Email Address: koushik@domain.com
-- SITE MAINTENANCE ACCOUNT:
     Username: admin
     Password: Passw0rd
     Confirm Password: Passw0rd
-- REGIONAL SETTINGS:
     Default Country: India
-- Click on "Save & Continue"
  
Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

Tuesday, 21 June 2016

How To Enabling YUM Automatic Updates & Send Mail in CentOS/RHEL 6x

Enabling YUM Automatic Updates & Send Mail in CentOS/RHEL 6x

Step: 1. Install Yum-Cron Package :

# yum -y install yum-cron

Step: 2. Configure Yum-Cron :

Note: By default, this software is configured to download all the updates & apply them immediately after downloading, but we can change these behaviors in its configuration file. In my opinion the default is good for what i want to achieve, download & install all the updates, if you just want a mail that tell you which packages are available set the parameter CHECK_ONLY to yes, this will NOT download the updates but will just check if there are updates & will send an email to the root account if there is something that can be updated.

# vi /etc/sysconfig/yum-cron

# Don't install, just check (valid: yes|no)
CHECK_ONLY=yes

# Don't install, just check & download (valid: yes|no)
DOWNLOAD_ONLY=no

# by default MAILTO is unset, so crond mails the output by itself.
MAILTO=koushik@domain.com

-- Save & Quit (:wq)

Step: 3. Block Packages from being Automatically Updated :

Note: If you want to exclude some packages from being updated.

# vi /etc/yum.conf

YUM_PARAMETER="-x kernel* -x php* -x httpd*"

-- Save & Quit (:wq)

Step: 4. Start Yum-Cron Service :

# service yum-cron start
# chkconfig yum-cron on

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

Monday, 20 June 2016

How To Install & Configure Netdata on CentOS/RHEL 6x

How To Install & Configure Netdata on CentOS/RHEL 6x

Q. What is Netdata?

-- Netdata is a extremely optimized Linux utility that provides real-time (per second) performance monitoring for Linux systems, applications, SNMP devices, etc. and shows full interactive charts that absolutely render all collected values over the web browser to analyze them.

Step: 1. Bind Hosts File :

# vi /etc/hosts

10.100.99.247    ser1.domain.com    ser1

-- Save & Quit (:wq)

Step: 2. Stop the IPTables & Disable Selinux :

# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

Step: 3. Update the Date & Time on the Server :

# yum -y install ntp
# service ntpd restart
# ntpdate pool.ntp.org
# chkconfig ntpd on
# init 6

Step: 4. Install Netdata Dependencies :

# yum -y install zlib-devel gcc gcc-c++ make git autoconf autogen automake pkgconfig

Step: 5. Clone the Netdata Repository from Git Repository & Run Netdata Installer Script :

# cd /mnt
# git clone https://github.com/firehol/netdata.git --depth=1
# cd netdata
# ./netdata-installer.sh

Press ENTER to build and install netdata to your system >

Step: 6. Start Netdata by executing the following Command & You can also Stop Netdata by Terminating it’s Process with killall Command :

# /usr/sbin/netdata
# killall netdata

Note: Netdata saves on exit its round robbin Database information under /var/cache/netdata file, so that when you start again Netdata, it will Continue from where it was stopped last time.

Step: 7. Updating Netdata & Restart the Netdata and Check on Browser :

# cd /mnt/netdata
# git pull
# ./netdata-installer.sh

http://IP-Address:19999

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

Tuesday, 14 June 2016

How To Reset A Forgotten MariaDB Root Password on CentOS 7

How To Reset A Forgotten MariaDB Root Password on CentOS 7

MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. It is notable for being led by the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle.

Step: 1. Stop the Database Server :

# systemctl stop mariadb.service

On Ubuntu Users :

# service mariadb stop

Step: 2. Start MariaDB with Unrestricted Access :

# mysqld_safe --skip-grant-tables --skip-networking &

Press Enter.

Step: 3. Now the Database is Started, Logon to it without Passwords :

# mysql -u root

Step: 4. Change the MariaDB root Password :

mariadb> use mysql;
mariadb> update user set password=PASSWORD("new-password") where User='root';
mariadb> flush privileges;
mariadb> \q

Step: 5. Stop the Database :

# systemctl stop mariadb.service

Step: 6. Now Start the MariaDB Service :

# systemctl start mariadb.service

Step: 7. Logon as the root User with the New Password :

# mysql -u root -p

Enter Password:

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

Sunday, 5 June 2016

Scan for Rootkits, Backdoors & Exploits Using Rootkit Hunter in Linux

Scan for Rootkits, Backdoors & Exploits Using Rootkit Hunter in Linux


Q. What is Rkhunter?
-- rkhunter (Rootkit Hunter) is a Unix-based tool that scans for rootkits, backdoors and possible local exploits.

Step: 1. Downloading Rkhunter Package :

# yum -y install wget mailx
# cd /tmp
# wget http://downloads.sourceforge.net/project/rkhunter/rkhunter/1.4.2/rkhunter-1.4.2.tar.gz

Step: 2. Installing Rkhunter :

# tar -xvf rkhunter-1.4.2.tar.gz
# cd rkhunter-1.4.2
# ./installer.sh --layout default --install

Step: 3. Checking & Updating Rkhunter Database Properties :

# /usr/local/bin/rkhunter --update
# /usr/local/bin/rkhunter --propupd

Step: 4. Setting Cronjob & Email Alerts :

# vi /etc/cron.daily/rkhunter.sh

#!/bin/sh
(
/usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob --report-warnings-only
) | /bin/mail -s 'rkhunter Daily Run (PutYourServerNameHere)' mail@your_domain.com

-- Save & Quit (:wq)

# chmod 755 /etc/cron.daily/rkhunter.sh

Step: 5. To scan the Entire File System :

# rkhunter --check

Step: 6. All Results have been Written to the Log File :

# cat /var/log/rkhunter.log


Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

 
Copyright © 2016 Kousik Chatterjee's Blog