Monday, 11 July 2016

How to Install & Configure Apache for both GUI & CLI mode on CentOS/RHEL 6.X

Install & Configure Apache for both GUI & CLI mode on CentOS/RHEL 6.X


What is ApacheGUI?


This tools is a free and open source package designed for system administrators to manage the functionality of Apache Web Server from a browser, such as edit configuration and web document files directly from browser, download, search or visualize Apache Logs in real time, install, edit or remove Apache modules, view runtime statistics or detailed graphs transactions of Apache HTTP Server.



Step 1: Stop the Selinux, and Update the Date Time on the Server :



# vi /etc/sysconfig/selinux

SELINUX=disabled ###(Change enabled to disabled)

--- save & quit (:wq) ---

# service iptables stop
# chkconfig iptabes off
# yum -y install ntpd
# service ntpd restart
# ntpdate pool.ntp.org
# chkconfig ntpd on

Step 2: Install Java of your choise. here installed open jdk you can install oracle java also:



# yum -y install httpd httpd-develjava

Step 3: Download ApacheGUI:



# cd /opt
# wget http://jaist.dl.sourceforge.net/project/apachegui/1.11-Linux-Solaris-Mac/ApacheGUI-1.11.0.tar.gz
# tar -zxvf ApacheGUI-1.11.0.tar.gz
# cd ApacheGUI/bin

Step 4.Start the server:



# ./run.sh
# service iptables stop

If you want to Change the server port from 9999.

# vi /opt/ApacheGUI/tomcat/conf/server.xml

find 9999 and change to any port you like.

Step 5. Configure Apache GUI:



Browse : http://Server-IP/Domain:9999/ApacheGUI/



Use following credentials to login into ApacheGUI tool If Asked

Username: admin
Password: admin

Step 6. Configure Apache GUI from Web Panel :


Next, the tool will prompt you on How Apache Web Server was installed?
Choose Package option, if you installed Apache on RHEL/CentOS using yum package management tool and hit OK to move forward.

Server Root: /etc/httpd
Primary Configuration File: /etc/httpd/conf/httpd.conf
Configuration Directory: /etc/httpd
Log Directory: /logs
Modules Directory: /etc/httpd/modules
Binary File: /usr/sbin/apachectl
Username: root
Password: redhat
Password: redhat

** After you finish hit on Submit button to apply configuration and you’re done.
** Now you can control Apache Web Server with all its configuration files and edit web documents directly from your browser

Step 7. Create init script for Apache GUI :



# vi /etc/init.d/apache-gui

#!/bin/sh
#
#
# System startup script for apache-gui
#
### BEGIN INIT INFO
# Provides: apache-gui
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start the apache-gui
# Description:       Start the apache-gui
### END INIT INFO
#
# chkconfig: 2345 20 80
# description: Runs the apache-gui
# processname: apache-gui
#
# Source function library
. /etc/init.d/functions

case "$1" in
    start)
    cd /opt/ApacheGUI/bin/
./run.sh
       ;;
    stop)
   cd /opt/ApacheGUI/bin/
./stop.sh
        ;;
restart)
cd /opt/ApacheGUI/bin/
./stop.sh
./run.sh
    *)
        echo $"Usage: $0 {start|stop}"
        exit 2
esac
exit $?

--- save & quit (:wq) ---

# chmod 755 /etc/init.d/apache-gui

** Start apchegui as the service now.

# service apache-gui start
# service apache-gui stop
# chkconfig apache-gui on

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

Tuesday, 19 April 2016

How to Install SVN With WebSVN (Web Panel) in Centos/RHEL 6.X

Install SVN With WebSVN on CentOS/RHEL 6.X

What is SVN?

Apache Subversion (often abbreviated SVN, after the command name svn) is a software versioning and revision control system distributed as free software under the Apache License. Software developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation.

What is WebSVN?

WebSVN offers a view onto your subversion repositories that’s been designed to reflect the Subversion methodology. You can view the log of any file or directory and see a list of all the files changed, added or deleted in any given revision. You can also view the differences between two versions of a file so as to see exactly what was changed in a particular revision.

Requirements:

1. Apache
2. Subversion
3. php
4. WebSVN

Step 1: Stop the IPTables and Selinux, and Update the Date Time on the Server :

# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux

SELINUX=disabled ###(Change enabled to disabled)

--- save & quit (:wq) ---

# service ntpd restart
# ntpdate pool.ntp.org
# chkconfig ntpd on
# init 6

Step 2: Install & Configure SVN/Subversion with Apache :

A. Install Required Packages:

# yum install -y mod_dav_svn subversion svn httpd httpd-devel php

B. Create subversion.conf file:

# vi /etc/httpd/conf.d/subversion.conf

### add these lines ###

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

<location /repos>
DAV svn
SVNParentPath /var/www/svn/Repos
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /var/www/svn/secure/svn-users
AuthzSVNAccessFile /var/www/svn/secure/svn-access-control
Require valid-user

</location>

--- save & quit (:wq) ---

C. Create SVN Directory Tree:

# mkdir -p /var/www/svn/{Repos,secure}
# touch /var/www/svn/secure/svn-access-control
# touch /var/www/svn/secure/svn-users
# service httpd restart

Step 3: Configure some Test Repo & create User for SVN :

A. Create Repo and User:

# cd /var/www/svn/Repos
# svnadmin create testrepo
# chmod -Rf 777 testrepo
# htpasswd -cm /var/www/svn/secure/svn-users testuser (after that give password for "testuser" twice)

B. Modify svn-access-control for Repos Permisions:

# vi /var/www/svn/secure/svn-access-control

### add these lines
[groups]

admin = testuser
testrepo = testuser

[/]
@admin = rw

[testrepo:/]
@testrepo = rw

--- save & quit (:wq) ---

# service svnserve restart

### Check the Svn repo with the url: http://<ip-of-server>/repos/testrepo
username: testuser
password: (Password)

C. update the Repo to Revision 1

# mkdir -p /mnt/svn-structure-template/{trunk,branches,tags}
# svn import -m 'Initial import' /mnt/svn-structure-template/ http://localhost/repos/testrepo

Step 4: Install and Configure WebSVN :

# cd /var/www/html
# wget http://websvn.tigris.org/files/documents/1380/49057/websvn-2.3.3.zip
# unzip websvn-2.3.3.zip
# mv websvn-2.3.3 websvn
# cd /var/www/html/websvn/include
# cp distconfig.php config.php
# vi config.php

### add these lines

// Configure these lines if your commands aren't on your path.
//
$config->setSVNCommandPath('/usr/bin'); // e.g. c:\\program files\\subversion\\bin
$config->setDiffPath('/usr/bin');
// For syntax colouring, if option enabled...
$config->setEnscriptPath('/usr/bin');
$config->setSedPath('/bin');
// For delivered tarballs, if option enabled...
$config->setTarPath('/bin');
// For delivered GZIP'd files and tarballs, if option enabled...
$config->setGZipPath('/bin');
//
$config->parentPath('/svn/');
$extEnscript[".pl"] = "perl";
$extEnscript[".py"] = "python";
$extEnscript[".sql"] = "sql";
$extEnscript[".java"] = "java";
$extEnscript[".html"] = "html";
$extEnscript[".xml"] = "html";
$extEnscript[".thtml"] = "html";
$extEnscript[".tpl"] = "html";
$extEnscript[".sh"] = "bash";

## $config->addRepository('Repo_Path', 'Repo_Url', NULL, 'Repo_User', 'Repo_Pass'); If more Repo added just copy the below Line and Modify it for the New Repo to Access on WebSVN

$config->addRepository('/var/www/svn/testrepo', 'http://192.168.72.243/repos/testrepo', NULL, 'testuser', 'redhat');

--- save & quit (:wq) ---

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

### After line number 312 add these lines

<Directory "/var/www/html/websvn">
DirectoryIndex index.html index.php index.cgi index.pl
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

--- save & quit (:wq) ---

# service httpd restart

### Check the WebSVN Now on url: http://<ip-of-server>/websvn

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

Friday, 15 April 2016

How to install Netdata on Centos/RHEL 6.X


Install Netdata on Centos/RHEL 6.X

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: Stop the IPTables and Selinux, and Update the Date Time on the Server :

# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux

SELINUX=disabled ###(Change enabled to disabled)

--- save & quit (:wq) ---

# service ntpd restart
# ntpdate pool.ntp.org
# chkconfig ntpd on
# init 6

Step 2: Netdata Installation on Linux Systems :

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

Step 3: clone the netdata repository from git and run netdata installer script to build it :

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

Step 4: Now it’s time to start netdata by executing the following command from the terminal & You can also stop netdata by terminating it’s process with killall command as shown :

# /usr/sbin/netdata
# killall netdata

N.B: 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 5: 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.

Thursday, 10 March 2016

How to Install WAMP Server on Windows Server 2008/2012 R2


What is WAMP?

WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you to manage easily your Database


Requirement:

A. Apache Server (httpd-2.2.22-win32-x86-no_ssl.msi)
B. PHP (php-5.x.x-Win32-VC9-x86.zip)
C. DotNet Framework 4.0 (dotNetFx40_Full_x86_x64.exe)
D. Mysql Installer Community (mysql-installer-community-5.6.10.1.msi)
E. PhpMyAdmin (phpMyAdmin-4.5.5-english.zip)

Step 1. Install & Configure Apache Server (httpd-2.2.22-win32) :

Download Link:

http://a.mbbsindia.com//httpd/httpd-2.4.18.tar.gz

Next->I Acceept->Next->Give Network Domain (ex:- deb.com)-> Server Name (ex:- apache)-> Administrator email Address(ex:- ddas@kminfosystems.com)->Next-> Choose Custom-> Next->Click on Change & select the Directory (ex-c:\webserver\apche)->Next->Install->Finish.

N.B: ex-c:\webserver\apache make this structure if using this structure

Step 2. Go to Web Browser & type :

http://localhost or http://Your-IP-Address

Step 3. Install & Configure PHP :

Download Latest Version of Php:

http://windows.php.net/downloads/releases/

Extract php-5.x.x-Win32-VC9-x86.zip-> Rename 'php-5.x.x-Win32-VC9-x86' to 'php'-> Cut The php folder-> Open C:\webserver-> Paste.

Open 'php' Folder->find the file named 'php.ini-development'->Rename 'php.ini-development' to 'php.ini'-> Open httpd.conf (Location: C:\webserver\apache\conf\httpd.conf)-> Find

<IfModule !mpm_netware_moudle> & Paste the following Lines-

LoadModule php5_module "C:\webserver\php\php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:\webserver\php"

Open the Directory 'htdocs' (C:\webserver\apache\htdocs)-> and make a .php file named info.php-> type:

<?php
phpinfo();
?>

--Save the file.

--Restart the Apache Service.

Step 4. Open the Browser & type :

http://localhost/info.php or http://Your-IP-Adress/info.php

Step 5. Install DotNet Framework 4.0. :

Download .NET:

https://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/dotNetFx45_Full_setup.exe

Step 6. Install Mysql Installer Community :

Download The Latest Version:

http://cdn.mysql.com//Downloads/MySQLInstaller/mysql-installer-community-5.6.28.0.msi

Install Mysql Product-> I Accept-> Next-> Skip-> Next-> Choose 'Server Only'-> Next-> Next-> Execute->
Next-> Check on Advance Configuration-> Next-> Type Mysql Root Password (redhat)->Next->Next->
Check on General Log-> Next-> Next-> Finish.

Go to Start->All Programs->MySQL->MySQL Server 5.6->MySQL 5.6 Command Line Client
Password : redhat

-show databases;
-exit;

Step 7. Install & Configure phpMyAdmin :

Download The Latest Version:
https://www.phpmyadmin.net/downloads/

Extract phpMyAdmin-4.5.5-english.zip-> Rename 'phpMyAdmin-4.5.5-english.zip' to 'pma'-> Cut The pma folder-> Open C:\webserver\apache\htdocs-> Paste.

Open the 'pma' folder-> find the file named 'config.sample.inc.php'-> Rename the file
'config.sample.inc.php' to 'config.inc.php'

Step 8. Go to C:\webserver\php :

Open 'php.ini' file-> Find those three lines

;extension=php_mbstring.dll
;extension=php_mysql.dll
;extension=php_mysqli.dll

Uncomment those Lines & modify look like this :

extension="c:\webserver\php\ext\php_mbstring.dll"
extension="c:\webserver\php\ext\php_mysql.dll"
extension="c:\webserver\php\ext\php_mysqli.dll"

--Save the File.

Open httpd.conf (Location: C:\webserver\apache\conf\httpd.conf)-> Find

<IfModule dir_module> Just add index.php after index.html

index.html index.php

--Save the File

--Restart the Apache Service.

Step 9. Open the Browser & type :

http://localhost/pma or http://Your-IP-Address/pma
User Name : root
Enter The Mysql Password : redhat

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

Wednesday, 2 March 2016

How to Install Tomcat 9 With Java 9 On CentOS/RHEL 6.X



Install Tomcat 9 With Java 9 On Centos/RHEL 6

Step 1: Stop the IPTables and Selinux, and Update the Date Time on the Server :

# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux

SELINUX=disabled ###(Change enabled to disabled)

--- save & quit (:wq) ---

# service ntpd restart
# ntpdate pool.ntp.org
# chkconfig ntpd on
# init 6

Step 2: Download & Install Java 9 :

# cd /opt
# wget http://download.java.net/java/jdk9/archive/104/binaries/jdk-9-ea+104_linux-x64_bin.tar.gz
# tar -zxvf jdk-9-ea+104_linux-x64_bin.tar.gz
# cd jdk-9/
# alternatives --install /usr/bin/java java /opt/jdk-9/bin/java 2
# alternatives --config java

There may Be more that 1 programs which provide 'java'. Select the version Which is downloaded.

Selection    Command
-----------------------------------------------
*  1           /opt/jdk1.7.0_71/bin/java
 + 2           /opt/jdk1.8.0_45/bin/java
   3           /opt/jdk1.8.0_66/bin/java
   4           /opt/jdk-9/bin/java
 
Enter to keep the current selection[+], or type selection number: 4

# alternatives --install /usr/bin/jar jar /opt/jdk-9/bin/jar 2
# alternatives --install /usr/bin/javac javac /opt/jdk-9/bin/javac 2
# alternatives --set jar /opt/jdk-9/bin/jar
# alternatives --set javac /opt/jdk-9/bin/javac

# vi /etc/profile.d/java.sh

#!/bin/bash
JAVA_HOME=/opt/jdk-9/
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME
export CLASSPATH=.

--- Save & Quit (:wq) ---

# chmod +x /etc/profile.d/java.sh
# source /etc/profile.d/java.sh
# export JAVA_HOME=/opt/jdk-9/
# export PATH=PATH:/opt/jdk-9/bin

* Check the installed Java Version:

# java -version

java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+104-2016-02-03-214959.javare.4385.nc)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+104-2016-02-03-214959.javare.4385.nc, mixed mode)

Step 3: Download and Install Tomcat 9 :

# cd /opt
# wget http://www.us.apache.org/dist/tomcat/tomcat-9/v9.0.0.M3/bin/apache-tomcat-9.0.0.M3.tar.gz
# tar -zxvf apache-tomcat-9.0.0.M3.tar.gz
# mv apache-tomcat-9.0.0.M3 /usr/local/tomcat9

** Create a init script for run the Tomcat as a service:

# vi /etc/init.d/tomcat

#!/bin/bash
# description: Tomcat Start Stop Restart-SOM
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/opt/jdk-9
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/usr/local/tomcat9

case $1 in
start)
sh $CATALINA_HOME/bin/startup.sh
;;
stop)
sh $CATALINA_HOME/bin/shutdown.sh
;;
restart)
sh $CATALINA_HOME/bin/shutdown.sh
sh $CATALINA_HOME/bin/startup.sh
;;
esac
exit 0

--- save & quit (:wq) ---

# chmod 755 /etc/init.d/tomcat

# vi /usr/local/tomcat9/conf/tomcat-users.xml

### Add these lines in between "<tomcat-users>" Tag. Change the Password and Username.

<role rolename="manager-gui" />
<user username="manager" password="redhat" roles="manager-gui" />

<role rolename="admin-gui" />
<user username="admin" password="redhat" roles="manager-gui,admin-gui" />

--- save & quit (:wq) ---

# service tomcat restart
# chkconfig tomcat on

*** Check on Browser: http://<IP_Address>:8080
Click on Manager App and Login with Manager Creds
Click on Host manager and Login with Admin Creds

Step 4: Configure Virtual Host on Tomcat 9 :

N.B: There is some problem with Apache Solr and Railo with Java 9. Seems Java 9 doesn't Work properly for Apache Solr & Railo. So for now Here doing with a sample war file Virtual Hosting. Virtual Host Name test.com (For Example).

# vi /etc/hosts

### add the virtual to hosts file

192.x.x.x test.com

--- save & quit (:wq) ---

## Download sample.war file

# cd /opt
# wget https://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/sample.war
# cd /usr/local/tomcat9
# cp -r webapps/ test.com
# mv test.com/ROOT test.com/ROOT.bak
# cp /opt/sample.war /usr/local/tomcat/test.com/ROOT.war

### Configure the server.xml file for virtual Hosting

# vi /usr/local/tomcat9/conf/server.xml

### add this line

<Host name="test.com"  appBase="test.com" unpackWARs="true" autoDeploy="true"/>

--- save & quit (:wq) ---

# service tomcat restart

*** Check on Browser: http://test.com:8080

Step 5: Apache Reverse Proxy for Tomcat Virtual Hosts :

# yum -y install httpd httpd-devel

# vi /etc/httpd/conf.d/test.com.conf

### Add these Lines

<VirtualHost *:80>
    ServerAdmin email-address
    ServerName test.com
    ServerAlias www.test.com


    ProxyRequests Off
    ProxyPreserveHost On
    <Proxy *>
       Order allow,deny
       Allow from all
    </Proxy>


    ProxyPass / http://test.com:8080/
    ProxyPassReverse / http://test.com:8080/


    ErrorLog /logs/test.com-error_log
    CustomLog /logs/test.com-access_log common

</VirtualHost>

--- save & quit (:wq) ---

# mkdir /logs
# service tomcat restart
# service httpd restart

*** Check on Browser: http://test.com

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

Sunday, 7 February 2016

How to Install LAMP Server on Centos/RHEL 6.X

LAMP Server on Centos/RHEL 6.X

Step 1: Install Apache

# yum -y install httpd httpd-devel

Start httpd Service

#/etc/init.d/httpd start

Edit httpd.conf file

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

### Just Add this Line
#ServerName www.example.com:80
ServerName (ip address of server):80

--- Save &amp; Quit (:wq) ---

Step 2: Go to /var/www/html and Make A HTML page

# vi index.html

Restart httpd Service:

#/etc/init.d/httpd restart

Step 3: Install MySQL Database Server

# yum -y install mysql mysql-server mysql-devel

Start Mysqld Service

# /etc/init.d/mysqld start

Changing MySQL Root Password:

# mysql
mysql&gt; USE mysql;
mysql&gt; UPDATE user SET Password=PASSWORD('sql') WHERE user='root';
mysql&gt; FLUSH PRIVILEGES;
mysql&gt; exit

Check by logging:

#mysql -u root -p
Enter Password:

mysql&gt; show databases;
++
| Database |
++
| information_schema |
| mysql |
++
2 rows in set (0.00 sec)

mysql&gt; exit

Step 4: Install PHP5 Scripting Language

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml

Step 5: Create a file named /var/www/html/info.php

# vi /var/www/html/info.php

phpinfo();
?&gt;

--- Save &amp; Quit (:wq) ---

# /etc/init.d/httpd restart

Step 6: Then point your browser to http://ip address/info.php

http://(Your-IP/Hostname)/info.php

Step 7: Download this phpMyAdmin rpm

# cd /var/www/html
# wget https://files.phpmyadmin.net/phpMyAdmin/4.0.10.14/phpMyAdmin-4.0.10.14-all-languages.tar.gz

Extract the tar File &amp; Rename it :

# tar -zxvf phpMyAdmin-4.0.10.14-all-languages.tar.gz
# ls
# mv phpMyAdmin-4.0.10.14-all-languages phpmyadmin
# ls

Edit the /etc/httpd/conf/httpd.conf File :

# vi /etc/httpd/conf/httpd.conf
Add those Lines :


Options +Indexes +Multiviews
DirectoryIndex index.php index.html
AllowOverride All
Allow from all

--- Save &amp; Quit (:wq) ---

Rename the config.sample.inc.php File

# mv config.sample.inc.php config.inc.php

Step 8: Start the httpd &amp; mysql Service on Boot &amp; stop iptables &amp; Disable the selinux

# chkconfig httpd on
# chkconfig mysqld on
# service iptables stop
# chkconfig iptables off
# setenforce 0

Point your browser to

http://(Your-IP/Hostname)/phpmyadmin

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

Friday, 22 January 2016

How to Install MRTG On Centos/RHEL 6


Install MRTG On Centos/RHEL 6

Install MRTG (Multi Router Traffic Grapher) to see network traffic data on the web


Step 1:Install Apache HTTP Server

# yum -y install httpd httpd-devel

Step 2:Install MRTG, SNMP

#  yum -y install net-snmp net-snmp-utils mrtg

Step 3: Configure SNMP (Simple Network Management Protocol)

# vi /etc/snmp/snmpd.conf

# line 41: comment out

#com2sec notConfigUser   default       public

# line 74,75: uncomment and change
# change to your local network for "mynetwork" section
# change comunity name except public or private

com2sec local localhostServerworld
com2sec mynetwork 10.0.0.0/24Serverworld

# line 78,79: uncomment
group MyRWGroup  any        local
group MyROGroup  any        mynetwork

# line 85: uncomment
view all    included  .1                               80

# line 93,94: uncomment
access MyROGroup ""      any       noauth    0      all    none   none
access MyRWGroup ""      any       noauth    0      all    all    all

--- save and quit (:wq) ---

Then start the snmp service:

# service snmpd start
# chkconfig snmpd on

## show status (replace the "Serverworld" to your comunity name)

# snmpwalk -v2c -c Serverworld localhost system

SNMPv2-MIB::sysDescr.0 = STRING: Linux dlp.server.world 2.6.32-504.3.3.el6.x86_64 #1 SMP
Wed Dec 17 01:55:02 UTC 2014 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (168142) 0:28:01.42
...
...
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (4) 0:00:00.04
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (4) 0:00:00.04

Step 4: Configure MRTG

# cfgmaker --ifref=descr --ifdesc=descr Serverworld@10.0.0.30 > /etc/mrtg/mrtg.cfg
# vi /etc/mrtg/mrtg.cfg

# line 9: add
WorkDir: /var/www/mrtg

# line 16: uncomment
Options[_]: growright, bits

# near line 73: make sure lines like follows are uncommented (change ip as your and

'Serverworld' as your community name)

Target[10.0.0.30_eth0]: \eth0:Serverworld@192.168.100.156:
SetEnv[10.0.0.30_eth0]: MRTG_INT_IP="10.0.0.30" MRTG_INT_DESCR="eth0"
MaxBytes[10.0.0.30_eth0]: 125000000
Title[10.0.0.30_eth0]: eth0 -- dlp.server.world
PageTop[10.0.0.30_eth0]: <h1>eth0 -- dlp.server.world</h1>

## execute mrtg 3 times (display warnings until 3 times)

# for (( i=1 ; i <= 3 ; i++ )); do env LANG=C mrtg /etc/mrtg/mrtg.cfg; done

2015-01-25 21:33:23, Rateup WARNING: /usr/bin/rateup could not read the primary log file for

10.0.0.30_eth0
2015-01-25 21:33:23, Rateup WARNING: /usr/bin/rateup The backup log file for 10.0.0.30_eth0

was invalid as well
2015-01-25 21:33:23, Rateup WARNING: /usr/bin/rateup Can't remove 10.0.0.30_eth0.old updating

log file
2015-01-25 21:33:23, Rateup WARNING: /usr/bin/rateup Can't rename 10.0.0.30_eth0.log to

10.0.0.30_eth0.old updating log file
2015-01-25 21:33:23, Rateup WARNING: /usr/bin/rateup Can't remove 10.0.0.30_eth0.old updating

log file

## generate index file

# indexmaker --columns=1 /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html

# updating is done automatically by cron

# cat /etc/cron.d/mrtg

*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file

/var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok

Step 5: Configure httpd to access MRTG

# vi /etc/httpd/conf.d/mrtg.conf

# line 11: add IP address you allow to access
Allow from 127.0.0.1 10.0.0.0/24

##restart httpd:

#  /etc/rc.d/init.d/httpd restart
or
# service httpd restart

Step 6: Access to the MRTG Panel from a client with HTTP

http://(MRTG hostname or IP address)/mrtg/

then it's possible to see MRTG site.


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

How to Install zen-cart on centos 6


Install ZenCart on Centos/RHEL 6.X

Step 1: Configure LAMP

A. Install LAMP 


Step 2: Download the latest version of Zen Cart and Install

# wget http://nchc.dl.sourceforge.net/project/zencart/CURRENT%20-%20Zen%20Cart%201.5.x

%20Series/zen-cart-v1.5.4-12302014.zip
# unzip zen-cart-*.zip -d /var/www/html/
# mv /var/www/html/zen-cart-* /var/www/html/zen-cart/

Step 3: Create Database

# mysql -u root -predhat

mysql> CREATE DATABASE zencart;
mysql> CREATE USER 'zencartuser'@'localhost' IDENTIFIED BY 'your-password-here';
mysql> GRANT ALL PRIVILEGES ON zencart.* TO 'zencartuser'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> \q

Step 4: Also, create a new virtual host in Apache, for example

# vi /etc/httpd/conf.d/zen-cart.conf

<VirtualHost *:80>
ServerAdmin admin@your-domain.com
DocumentRoot /var/www/html/zen-cart/
ServerName your-domain.com
ServerAlias www.your-domain.com
ErrorLog logs/your-domain.com-error_log
CustomLog logs/your-domain.com-access_log common
</VirtualHost>

-- save and quit (:wq) --

Step 5: Set the permissions for these files and directories to 777 using the following commands

# cd /var/www/html/zen-cart/
# mv admin/includes/dist-configure.php admin/includes/configure.php
# mv includes/dist-configure.php includes/configure.php
# chmod 777 admin/includes/configure.php
# chmod 777 includes/configure.php
# chmod 777 cache
# chmod 777 includes/languages/english/html_includes
# chmod 777 logs
# chmod 777 media
# chmod 777 pub
# chmod 777 images/
# chmod 777 admin/backups
# chmod 777 admin/images/graphs

Step 6: Open the following and follow the instructions

http://Your-IP-Address/zen-cart/zc_install/index.php


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

How to Install PHP 7 on Centos



Install PHP 7 on Centos


Step 1: you must add the Webtatic EL yum repository information corresponding to your CentOS/RHEL version to yum


CentOS/RHEL 7.x:


# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

CentOS/RHEL 6.x:


# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

Step 2: Now you can install PHP 7.0 (along with an opcode cache) by doing

# yum install -y --enablerepo=webtatic-testing php70w php70w-opcache php70w-bcmath php70w-cli
php70w-common php70w-dba php70w-devel php70w-embedded php70w-enchant php70w-fpm php70w-gd php70w-imap php70w-interbase php70w-intl php70w-ldap php70w-mbstring php70w-mcrypt php70w-mysql php70w-mysqlnd php70w-odbc php70w-pdo php70w-pdo_dblib php70w-pgsql php70w-process php70w-pspell php70w-recode php70w-snmp php70w-soap php70w-tidy php70w-xml php70w-xmlrpc

Step 3: Changes on the Module File for Php

# vi /etc/httpd/conf.d/php.conf

-- Line number 6 and 10 replace with these Lines

LoadModule php7_module modules/libphp7.s (replace with line nuber 6)
LoadModule php7_module modules/libphp7-zts.so (replace with line number 10)
AddHandler php7-script .php (replace with line number 16)

-- save and quit (:wq) --

Step 4: Create a php info file and check

# vi /var/www/html/info.php

<?php
phpinfo();
?>

-- save and quit (:wq) --

# service httpd restart

Step 5: check in browser http://IP-Address/info.php or check through CLI

# php -v

PHP 7.0.0RC2 (cli) (built: Sep  4 2015 21:04:20)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

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

How to Install Mysql 5.7 on Centos 6.X/7.X


Mysql 5.7 on Centos 6.X/7.X

Step 1: Save the Repo File for The MySql 5.7 or Install the RPM for Mysql 5.7

# 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/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

--- save n quit (:wq) ---

or,

On RHEL/CentOS 7

# wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
# yum localinstall mysql57-community-release-el7-7.noarch.rpm

On RHEL/CentOS 6

# wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm
# yum localinstall mysql57-community-release-el6-7.noarch.rpm

Step 2: Install Mysql 5.7

# yum install mysql-community-server -y

Step 3: Reset the Mysql Temporary root Password and Chacge the password Policy

# vi /etc/my.cnf

add these lines below [mysqld]

validate_password_policy=LOW
validate_password_length=6
validate_password_dictionary_file=YES
validate_password_special_char_count =0
validate_password_mixed_case_count = 0

--- save and quit (:wq) ---

# service mysqld start


# cat /var/log/mysqld.log |grep "temporary password"
2015-09-06T16:46:46.109066Z 1 [Note] A temporary password is generated for root@localhost: <Password>

# mysql_secure_installation

Enter password for user root: <Enter the Temporary Password>

The existing password for the user account root has expired. Please set a new password.

New password: <New Password>

Re-enter new password: <Retype the Password>

Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n

 ... skipping.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.

All done!

Step 4: Check the Version and Mysql Once

# mysql -u root -p<password>

mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.7.10 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

mysql> \q
Bye

# mysql --version

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