Sunday, 27 August 2017

How to Install Oracle 12c Release 2 on CentOS/RHEL 6.X

Install Oracle 12c Release 2 on CentOS/RHEL 6.X

What is Oracle Database?
An Oracle database is a collection of data treated as a unit. The purpose of a database is to store and retrieve related information. A database server is the key to solving the problems of information management.

Requirements :-
*) For large-scale installation we need to use multicore processors with High availability.
*) Recommended minimum RAM needed for Oracle is 2GB or more.
*) Swap must be enabled double the size of RAM.
*) Disk space must be more than 20GB, its depends on edition which are we going to choose for installing.
*) /tmp directory must have free space more than 1GB for error free installation.
*) Supported Linux operating systems are RHEL, Centos, Oracle.
*) Both x86_64 and i686 packages are required for installation.

Step 1: Set up Hostname and bind it.
# vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=int-oracle.indusnet.co.in

--- Save and Quit (:wq) ---

# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.14.151   int-oracle.indusnet.co.in      int-oracle

--- Save and Quit (:wq) ---

Step 2: Disable firewall and put selinux on permissisve or disabled mode.
# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

--- Save and Quit (:wq) ---

# setenforce 0

**Remeber you need to restart the server for the changed selinux settings to put on effect.

Step 3: Install the Dependency required packages using YUM.
# yum -y install wget binutils compat-libcap1 smartmontools compat-libstdc++-33 compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686 libXext libXext.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau libXau.i686 libxcb libxcb.i686 libXi libXi.i686 make sysstat unixODBC unixODBC-devel xorg* xterm

Step 4: Change the kernel parameters.
# vi /etc/sysctl.conf

## Add the lines at last of the file

# ORACLE 12c Configuration
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

--- Save and Quit (:wq) ---

# sysctl -p
# vi /etc/security/limits.conf

## Add the lines at the last of the file

# ORACLE 12c Configuration
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768

--- Save and Quit (:wq) ---

# vi /etc/security/limits.d/90-nproc.conf

# Change number of process from 1024 to 16384
* soft    nproc    1024
# To this
    *  nproc 16384

--- Save and Quit (:wq) ---

Step 5: Create required groups and users for Oracle.
# groupadd -g 520 oinstall
# groupadd -g 521 dba
# groupadd -g 522 oper
# useradd -u 520 -g oinstall -G dba,oper oracle
# passwd oracle
Changing password for user oracle.
New password: *****
Retype new password: *****

Step 6: Create required directories and assign them proper permission / ownerships.
# mkdir -p /u01/app/oracle/product/12/dbhome_1
# chown -Rf oracle:oinstall /u01
# chmod -Rf 775 /u01

Step 7: Configure bash profile for oracle user.
# vi /home/oracle/.bash_profile

## Add these lines at the end of the file

# ORACLE 12c Configuration
PATH=$PATH:$HOME/bin
export TMP=/u01/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=int-oracle.indusnet.co.in
export ORACLE_UNQNAME=ora12c
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12/dbhome_1
export ORACLE_SID=ora12c
export PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

--- Save and Quit (:wq) ---

Step 8: Now switch to the directory where the installation file (download first) exists extract it.
# mkdir /u01/binaries/

** Download the Oracle 12c Installation Package from http://download.oracle.com/otn/linux/oracle12c/122010/linuxx64_12201_database.zip and Login with the Oracle Login Details and put the installation zip file to the /u01/binaries/ directory.

# unzip linuxx64_12201_database.zip

** Connect the Server with X-Manager and with oracle user that has been created in Step 5.

$ cd /u01/binaries/database/
$ ./runInstaller

In installation window
Step 1 : Configure security updates => Untick the option "I wish to receive security updates via My oracle support" & Provide an Email Address.
Step 2 : Installation option => Select Create & configure Database.(Incase if you want to configure database choose install database software only )
Step 3 : System Class => Select Server Class.
Step 4 : Grid installation option => Select Single instance database installation.
Step 5 : Install Type => Select Typical install
Step 6 : Typical installation =>
Make sure at this step we have following paths selected
Oracle_Base =/u01/app/oracle
Software location=/u01/app/oracle/product/12/dbhome_1
Storage type= File system
Database file location=/u01/app/oracle/oradata
OSDBA Group=dba
Global database name=ora12c
Password=<provide password>
Select option Pluggable Database name=pdbora12c
Step 7 : It should not make any issue regarding packages or other checks.
Step 8 : Install.

While the installation is going on it will ask to run following two scripts from root user.
/u01/app/oracle/product/12/dbhome_1/root.sh
/u01/app/oraInventory/oraInstroot.sh

** The whole process would take some time..

$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
ora12c

SQL> quit

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

Monday, 19 December 2016

How to install & configure MRTG with RRDTools and Router2 on Ubuntu 14.04


Install & configure MRTG with RRDTools and Router2 on Ubuntu 14.04



What is MRTG?
The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network links. MRTG generates HTML pages containing PNG images which provide a LIVE visual representation of this traffic.

What is RRDTool?
RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data. RRDtool can be easily integrated in shell scripts, perl, python, ruby, lua or tcl applications.

What is Router2?
routers2.cgi is a frontend to data stored in rrdtool databases. This is written in Perl, and requires the MRTG system to collect the data. Although the name would indicate otherwise, this frontend will work in the same way as 14all.cgi, and can provide a generic frontend for ALL MRTG collected data.

Step 1: Update & Upgrade the Ubuntu Server:

# apt-get -y update
# apt-get -y upgrade

Step 2: Preparation for Installing MRTG With RRDTools and Router2:

# apt-get -y install mrtg mrtg-ping-probe rrdtool librrds-perl snmp snmpd snmp-mibs-downloader libapache2-mod-perl2 libnet-snmp-perl libgd-gd2-perl

*Note: The installation requires round about 60 packages. Attention: The installation process from MRTG asks a single question, whether or not the root user should be the only one who can read the default configuration file from MRTG (/etc/mrtg.cfg). In our scenario, this can be answered with “Yes”, which is also the default option in this question.

Step 3: Install WebServer (Apache2) & Php-fpm and Preconfigured it according to the MRTG and Router2:

# apt-get -y install apache2
# vi /etc/apache2/sites-available/000-default.conf

#### Comment out/Delete all the lines and add the following lines;

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
         <Directory "/usr/lib/cgi-bin/">
                 AllowOverride None
                 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                 Require all granted
         </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

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

# apt-get -y install php5-fpm php5
# service apache2 restart
# service php5-fpm restart

# vi /var/www/index.html

### Add these lines

<head>
<meta http-equiv="refresh" content="0; URL=http://<IP-Address-Of-Server>/cgi-bin/routers2.cgi">
</head>

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

Step 4: Configure the Environment for the MRTG with RRDTool:

*Note: We must create some folders in order to store our configuration and rrd files. I decided to store the configs under the /etc folder while the rrd files under the /var folder.

# mkdir /var/mrtg #for rrd directory
# mkdir /etc/mrtg #for config files

*Note: Note that RRDtool itself needs no further configuration since it is always used from Routers2 directly and thus needs no specific configuration.

# cd /tmp
# wget http://www.steveshipway.org/software/rrd/routers2-v2.23.tar.gz
# tar xfv routers2-v2.23.tar.gz
# cd routers2-v2.23/
# perl install.pl

Continue [yes]? yes
Document root? /var/www
CGI directory? /usr/lib/cgi-bin
MRTG config directory? /etc/mrtg
MRTG files [*.cfg]? Enter
RRD directory [/tmp]? /var/mrtg
Perl executable [/usr/bin/perl]? Enter
Configuration file [/var/mrtg/routers2.conf]? Enter
Activate routingtable extensions [no]? Enter
'usebigk' option [mixed]? no
auth option [none]? Enter
Caching option [no]? Enter
Can I mail [no]? Enter

INSTALLING SOFTWARE

Perl is     : /usr/bin/perl
MRTG files  : /etc/mrtg/*.cfg
RRD files   : /var/mrtg
Doc root    : /var/www
CGI bin     : /usr/lib/cgi-bin
Config file : /var/mrtg/routers2.conf
Routingtable: INACTIVE
Compact page: ENABLED
Caching     : DISABLED
'usebigk'   : no
Auth option : NONE
Mail Steve  : no
Other options can be set later by modifying the Config file
Continue to install [no]? yes

# vi /var/mrtg/routers2.conf

### Add these lines at the end of the file,

charset = utf-8         #Since otherwise the degree symbol ° isn't displayed correctly
actuals = yes           #Show actual values in a popup
defaulttarget = summary #Show the summary page first
graphstyle = x3         #Show the biggest image by default
graphtype = w           #Show the weekly graph by default
percentile = yes        #Percentile calculation
sorder = l2 l2D x3 x3D  #Offer only the huge images
showtotal = yes         #A total line on the incoming and outgoing graphs
compact = no            #I am not using the compact graphs. Maybe you want to...
daystart = 8            #For displaying a highlighted area for the working day
dayend   = 18           #Ditto
windowtitle = Title     #Here you can customize the title of the webpage
bgcolour = #fffffff     #Otherwise some targets have a purple background
twinmenu = yes          #Since we all have widescreen displays nowadays
showfindbox = no        #I am not monitoring that many devices

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

# vi /etc/mrtg.cfg

## Comment out/Delete all the Lines and add the following lines at the end

#Directory in which the RRD files will be stored
WorkDir: /var/mrtg
#Tells MRTG to use RRD instead of its own log format
LogFormat: rrdtool
#To have multiple instances of MRTG running to immediately pass through all targets
Forks: 4
#Use the configs in the mrtg subfolder (/etc/mrtg)
Include: mrtg/*.cfg

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

# a2enmod cgi
# service apache2 restart

Step 5: Test the Setup on Browser:

http://<ip-address>/cgi-bin/routers2.cgi or http://<ip-address>

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


Tuesday, 27 September 2016

How to Install and Configure VTiger CRM on CentOS 6.X


Install and Configure VTiger CRM on CentOS 6.X

What is CRM?

Customer relationship management (CRM) is a term that refers to practices, strategies and technologies that companies use to manage and analyze customer interactions and data throughout the customer lifecycle, with the goal of improving business relationships with customers, assisting in customer retention and driving sales growth. CRM systems are designed to compile information on customers across different channels -- or points of contact between the customer and the company -- which could include the company's website, telephone, live chat, direct mail, marketing materials and social media. CRM systems can also give customer-facing staff detailed information on customers' personal information, purchase history, buying preferences and concerns.

What is VTiger CRM?

Vtiger CRM is an Open Source CRM software, used mainly by small and medium-sized businesses. Vtiger CRM can be used to manage your company's wide CRM and Inventory Management activities, such as sales force automation, customer support & service, marketing automation, procurement & fulfillment effectively.

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 and Configure LAMP and Others Dependencies for the VTiger CRM :

# yum -y install httpd httpd-devel
# yum -y install mysql-server
# service httpd start
# service mysqld start
# chkconfig httpd on
# chkconfig mysqld on
# mysql_secure_installation (Set MySQL Root Password)
# yum install -y php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-snmp php-soap php-tidy libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel zlib openssl openssl-devel krb5-devel php php-gd php-imap gd gd-devel gcc wget

Step 3: Download and Configure Php for VTiger CRM :

# cd /tmp
# wget http://jaist.dl.sourceforge.net/project/vtigercrm/vtiger%20CRM%206.5.0/Core%20Product/vtigercrm6.5.0.tar.gz
# tar -zxvf vtigercrm6.5.0.tar.gz -C /var/www/html
# chown -Rf apache:apache /var/www/html/vtigercrm/
# chmod -Rf 755 /var/www/html/vtigercrm/
# vi /etc/php.ini

## Change the following lines as per below mentioned--

allow_call_time_pass_reference on ## Line Number 335
error_reporting E_WARNING & ~E_NOTICE ## Line Number 513
safe_mode off ## Line Number 339
display_errors on ## Line Number 530
file_uploads on ## Line Number 869
max_execution_time 600 ## Line Number 440
memory_limit 64M ## Line Number 457
log_errors off ## Line Number 551
output_buffering on ## Line Number 264
register_globals off ## Line Number 693
short_open_tag on ## Line Number 229

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

# service httpd restart

# mysql -u root -p
Enter Password:

mysql> create database vtigerdb;
mysql> grant all privileges on vtigerdb.* to vtiger@'localhost' odentified by 'redhat';
mysql> grant all privileges on vtigerdb.* to vtiger@'%' odentified by 'redhat';
mysql> flush privileges;
mysql> \q

Step 4: Open the Browser and Install the rest of the part of the VTiger CROM through browser :

Open: http://<Server-IP>/vtigercrm/index.php

click on "Install" button in the welcome screen --> click "I Agree" to proceed ahead --> Check your PHP Configurations and make sure that Required Values are in compliance with Present Values. Click "Next" to proceed with the installation --> Please provide Mysql credentials of your server under Database Information block. Also, configure default currency and personal information through System Information and Admin User Information blocks respectively. After providing appropriate values, click "Next" --> Confirm your configuration settings and click "Next" --> You're done! Within just a few seconds, your Vtiger CRM account will be provisioned and ready for use.

After Installation Complete the Modules will come to the screen, Select all the modules for install to the CRM.

Step 5: Configure Apaache Virtual Host for VTiger CRM :


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

## Add after line number 312

<Directory /var/www/html/vtigercrm>
    Options  -Indexes +Multiviews +FollowSymLinks
        DirectoryIndex index.php index.html
    AllowOverride All
    Allow from all
</Directory>

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

# vi /etc/httpd/conf.d/vtiger.example.com.conf

<VirtualHost *:80>

  # Admin email, Server Name (domain name) and any aliases
  ServerName www.vtiger.example.com
  ServerAlias vtiger.example.comi


  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.php index.html
  DocumentRoot /var/www/html/vtigercrm


  # Custom log file locations
  LogLevel warn
  ErrorLog  /logs/vtiger.example.com-error_log
  SetEnvIf Request_URI "\.(jpg|xml|png|gif|ico|js|css|swf|js?.|css?.)$" DontLog
  CustomLog /logs/vtiger.example.com-access_log combined Env=!DontLog

</VirtualHost>

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

# mkdir /logs
# service httpd restart

Open in Browser: http://<Server-IP>/vtigercrm or http://vtiger.example.com
User: admin
Pass: <Admin-Pass-Set-At-Time-Of-Installation>


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

Wednesday, 24 August 2016

How to Install FreeRadius for SSH Authentication on Centos 6


Install FreeRadius for SSH Authentication (Two-Factor Authentication)


What is FreeRadius?

Radius is a great standard. It is powerful enough to accomplish a great deal and simple enough to be easy to handle. Freeradius is an excellent, open source radius server that ships with many Linux variants. It is well documented and well supported. The WiKID Strong Authentication server is a commercial/open source two-factor authentication system that uses public key encryption to transmit PINs and one-time passcodes securely to software tokens running on Blackberries, cell phones, Palms, PocketPCs or, using the J2SE client, Linux, Macs and Windows PCs. You can think of WiKID like certificates, but without the hassles of white lists/black lists and more secure - because the PIN is validated on the server preventing offline brute-force attacks.



Requirement: 1. 2 CentOS 6 Server (1 for FreeRadius & 1 for SSH Authentication)



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


# 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

** Configure FreeRadius Server:

Step 2: Install and Configure Radius Server and its Dependencies :


# yum install freeradius freeradius-mysql freeradius-utils mysql-server -y
# service mysqld start

* Set MySQL Root Password by the Following Command:

# mysql_secure_installation

mysql -uroot -p
Enter password:

mysql> CREATE DATABASE radius;
mysql> GRANT ALL PRIVILEGES ON radius.* TO radius@localhost IDENTIFIED BY "radpass";
mysql> flush privileges;
mysql> use radius;
mysql> SOURCE /etc/raddb/sql/mysql/schema.sql;
mysql> \q

* Edit and Check the DB Connection once-

# vi /etc/raddb/sql.conf

### (In Between Line Number 36-42)

# Connection info:
       server = "localhost"
       #port = 3306 login = "radius"
       password = "mypassword"

       # Database table configuration for everything except Oracle
       radius_db = "radius"
 
---- save & quit (:wq) ----

# vi /etc/raddb/radiusd.conf

## Uncomment the Following Line (Line Number 735)

$INCLUDE sql.conf

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

# vi /etc/raddb/sites-available/default

### uncomment the line containing ‘sql’ in theauthorize{} section and ‘sql’ in the accounting {} section, also uncomment ‘sql’ under session{}

### Line Number 177 & Line Number 406


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

# vi /etc/raddb/sites-available/inner-tunnel

### uncomment the line containing ‘sql’ under “authorize {}” and under session {}

## Line Number 132

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

* For change the secret key of the radius server-

# vi /etc/raddb/clients.conf

### Change: secret = testing123 to secret = <your-secret-password>

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

# service radiusd restart

Step 3: Adding Clinets and Users to the Radius Server :


# vi /etc/raddb/clients.conf

client SERVER_IP {
              secret          = YOUR SECRET
              shortname       = yourVPN
 nastype        = other
   }
 
---- save & quit (:wq) ----

# service radiusd restart

# mysql -uroot –p
Enter password:

mysql> use radius;
mysql> INSERT INTO `radcheck` (`username`, `attribute`, `value`) VALUE ('testuser', 'password', 'User_Password');
mysql> \q

* Test the Radius Authentication--

# radtest testuser password localhost 1812 <Radius-Server-Secret-Key>

rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=185, length=20

Step 4: Configure the SSH Server to Connect the Radius Server and Authentication from Radius Server :


# yum -y install pam pam-devel gcc
# cd /tmp
# wget ftp://ftp.freeradius.org/pub/radius/pam_radius-1.4.0.tar.gz
# tar zxf pam_radius-1.4.0.tar.gz
# cd pam_radius-1.4.0
# ./configure
# make
# cp pam_radius_auth.so /lib/security/

** Modify the Pam File of sshd and passwd for the Radius Authentication--

# vi /etc/pam.d/sshd

## Add this Line at 2nd Line--

auth sufficient /lib/security/pam_radius_auth.so

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

# vi /etc/pam.d/passwd

## Add the line at 3rd Line--

password sufficient /lib/security/pam_radius_auth.so

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

# vi /etc/ssh/sshd_config

## Change or Uncomment Line Number 48

PubkeyAuthentication no

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

# mkdir /etc/raddb/
# cp /tmp/pam_radius-1.4.0/pam_radius_auth.conf /etc/raddb/server
# vi /etc/raddb/server

## # Radius Server IP address           Secret                                   Timeout
<Radius-Server-IP> <Secret-Key-of-Radius-Server> 10

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

# service sshd restart
# useradd testuser

Note: Which Users will be authenticate from the Radius Server, those users should be there in the Radius Server Database and the User must exist on the SSH Server as well but no password has to be set on the SSH Server for the user, the password will be set at the database of the Radius Server.


** For Example as per the Doc:
user: testuser
pass: User_Password

# ssh testuser@<SSH-Server-IP>
Password: User_Password

** You should able to login now!

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

Tuesday, 9 August 2016

How to Install NewRelic Agent on RHEL/Centos/Ubuntu/Debian/Windows

Install NewRelic on RHEL/Centos/Ubuntu/Debian/Windows


What is NewRelic?

New Relic is an American software analytics company based in San Francisco, California. Lew Cirne founded New Relic in 2008 and currently acts as the company's CEO. New Relic's technology, delivered in a software as a service (SaaS) model, monitors Web and mobile applications in real-time that run in cloud, on-premises, or hybrid environments. The name "New Relic" is an anagram of founder Lew Cirne's name.


Create a New Account for New Relic Free of cost: https://newrelic.com/
Sign up here & find out you License Key.
After Creating a new Account Login to your Account & Click on Right top Corner Drop down List , Then click on Account Settings.
Then you will find out th License key from the Right Panel.


1. For RHEL/CentOS 6 :


Step 1: Install & Add the New Relic yum repository :


# rpm -Uvh https://download.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm

Step 2: Install the Server Monitor package :


# yum install newrelic-sysmond -y

Step 3: Add license key to config file: (See /etc/newrelic/nrsysmond.cfg for other config options) :


# nrsysmond-config --set license_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Step 4: Start the NewRelic Monitor Process :


# /etc/init.d/newrelic-sysmond start

2. For Ubuntu/Debian :


Step 1: Add the New Relic apt repository :


# echo deb http://apt.newrelic.com/debian/ newrelic non-free >> /etc/apt/sources.list.d/newrelic.list
# wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -
# apt-get update -y

Step 2: Install the Server Monitor package :


# apt-get install newrelic-sysmond -y

Step 3: Add license key to config file: (See /etc/newrelic/nrsysmond.cfg for other config options) :


# nrsysmond-config --set license_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Step 4: Start the NewRelic Monitor Process :


# /etc/init.d/newrelic-sysmond start

3. For Windows:


Step 1: Download the NewRelicServerMonitor msi/zip file :


Download Link:-- 

https://download.newrelic.com/windows_server_monitor/release/NewRelicServerMonitor_x64_3.3.5.0.msi /

Step 2: Run the Installer and the Put the License Key :

License Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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

How to Install Bamboo With JIRA & BitBuckeet Integration in Ubuntu




Install Bamboo With JIRA & BitBuckeet Integration in Ubuntu


What is Bamboo?

Bamboo is a continuous integration server from Atlassian, the makers of JIRA, Confluence and Crowd. Bamboo is free for open-source projects.


What is JIRA?

JIRA is a tool developed by Australian Company Atlassian. It is used for bug tracking, issue tracking, and project management. The name "JIRA" is actually inherited from the Japanese word "Gojira" which means "Godzilla". The basic use of this tool is to track issues, and bugs related to your software and mobile apps.


What is BitBucket?

Bitbucket is a web-based hosting service for projects that use either the Mercurial (since launch) or Git (since October 2011) revision control systems. Bitbucket offers both commercial plans and free accounts.


N.B: Get a Bamboo Server/JIRA Server/BitBucket Server License from https://id.atlassian.com/login?application=mac&continue=https://my.atlassian.com
Create a Account here and Get the License Key. And 2 GB Ram Recommanded for the Server.


Step 1: Install Dependencies For Bamboo:


# apt-get install software-properties-common
# add-apt-repository ppa:openjdk-r/ppa
# apt-get update
# apt-get install openjdk-8-jdk

Step 2: Download & Install Bamboo Server:


# wget https://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-5.10.1.1.tar.gz
# tar -xvf atlassian-bamboo-5.10.1.1.tar.gz
# mv atlassian-bamboo-5.10.1.1 /opt/bamboo
# cd /opt/bamboo

**N.B: Edit the bamboo-init.properties from the bamboo installation directory and set the bamboo home environment:-

# vi /opt/bamboo/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties

### Add the line at last

bamboo.home=/home/bamboo/bamboo-home

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

# mkdir -p /home/bamboo/bamboo-home

Step 3: To bamboo as service & auto-start with system boot follow in steps in given below:


# vi /etc/init.d/bamboo

JAVA_OPTS=" -Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx2048m -XX:NewSize=1536m -XX:MaxNewSize=2048m -XX:SurvivorRatio=6  -XX:MaxPermSize=2048m -XX:+DisableExplicitGC"
export JAVA_OPTS
JAVA_HOME=/usr/share/java/
CATALINA_HOME=/opt/bamboo
export CATALINA_HOME
BAMBOO_HOME=/opt/bamboo/bin
START_BAMBOO=/opt/bamboo/bin/startup.sh
STOP_BAMBOO=/opt/bamboo/bin/shutdown.sh
start() {
echo -n "Starting bamboo: "
cd $BAMBOO_HOME
${START_BAMBOO}
echo "done."
}
stop() {
echo -n "Stopping bamboo"
cd $BAMBOO_HOME
${STOP_BAMBOO}
echo "done."
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 10
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
esac
exit 0

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

# chmod 755 /etc/init.d/bamboo
# update-rc.d bamboo defaults

** Change Bamboo Service Port Number from 8085 to 80:-

# vi /opt/bamboo/conf/server.xml

Line Number 50: Change the port from 8085 to 80

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

# service bamboo restart

Step 4: Check the Bamboo Installation on Browser:


http://IP-Address

Enter the License Key --> Choose Express Installation --> Fill up required field

Step 5: Download & Install JIRA:


# wget https://downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-7.1.0-jira-7.1.0-x64.bin
# chmod 755 atlassian-jira-software-7.1.0-jira-7.1.0-x64.bin
# ./atlassian-jira-software-7.1.0-jira-7.1.0-x64.bin

Step 6: Check the JIRA Installation on Browser:


http://IP-Address:8080

Then Follow the Instruction and Install it. Get a JIRA Server License from https://id.atlassian.com/login?application=mac&continue=https://my.atlassian.com
Create a Account here and Get the License Key.


Step 7: Download and Install Dependebicies & BitBucket:


# wget https://downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-4.3.2-x64.bin
# apt-get -y install git
# chmod 755 atlassian-bitbucket-4.3.2-x64.bin
# ./atlassian-bitbucket-4.3.2-x64.bin

Destination Directory: /opt/atlassian/bitbucket
Default location of plugin and other data: /var/atlassian/application-data/bitbucket

N.B: For external database need connector. Download the JDBC Connector.

# wget http://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.38.tar.gz
# tar -xvf mysql-connector-java-5.1.38.tar.gz
# cd mysql-connector-java-5.1.38
# cp mysql-connector-java-5.1.38-bin.jar /opt/atlassian/bitbucket/lib
# chown atlbitbucket:atlbitbucket mysql-connector-java-5.1.38-bin.jar
# service atlbitbucket stop
# service atlbitbucket start

Step 8: Check the BitBucket Installation on Browser With Integrated JIRA & Bamboo:


http://IP-Address:7990

Fill up the required field and select Integrate with Jira.
After that provide Jira url connection with port and username with password and select connect.
Select Linked Repository --> Select Add Repository --> Finish.

** To Link Repository From Bitbucket to Bamboo:

Go to Bamboo Administration Right Side Top Panel --> Overview --> Select Application Links from Left Side Panel --> Give the Bamboo Server URL --> Create New Link --> Done.

N.B: Now both Bamboo with JIRA & BitBucket Integration is Done. Find out all the Things altogether from any one server at the Left Top Drop Down List.

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

How to Install SSHFS on Centos/RHEL/Ubuntu


Install SSHFS on Centos/RHEL/Ubuntu

** What is SSHFS?

SSHFS is a filesystem based on the SSH File Transfer Protocol (SFTP). On remote side we just need to install SSH server, Since most of SSH servers already support this, there are nothing to do on remote server except installing SSH server. On client side we need to install fuse sshfs packages to mount remote filesystem. Newer version of SSHFS uses FUSE.
We Can user it as Alternative of NFS.

** Features of SSHFS:

1. Based on FUSE (Best userspace filesystem framework for linux)
2. Multithreading: more than one request can be on it’s way to the server
3. Allowing large reads (max 64k)
4. Caching directory contents

** Requirement:

1. 2 Centos/Ubuntu Server
2. SSH Key Authentication on the Servers


Step 1: Stop the IPTables and Selinux, and Update the Date Time on the Servers and SSH Authentication on the Servers:

# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux

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

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

On Server 1:
# ssh-keygen -t rsa (Enter 3 Times)
# ssh-keygen -t dsa (Enter 3 Times)
# cd /root/.ssh
# cat id_rsa.pub >>authorized_keys
# cat id_dsa.pub >>authorized_keys

On Server 2:
# ssh-keygen -t rsa (Enter 3 Times)
# ssh-keygen -t dsa (Enter 3 Times)
# cd /root/.ssh
# cat id_rsa.pub >>authorized_keys
# cat id_dsa.pub >>authorized_keys

** Now Open the authorized_keys file on both Server and Paste the Server 1's Key to Server 2's authorized_keys File and vice-versa.

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

Step 2: Install FUSE-SSHFS :


For CentOS/RHEL users, Fuse SSHFS is available under epel repository, So make sure you have install epel repository in your system. Now execute following command to install it.

On CentOS/RHEL:

# yum -y install epel-release
# yum install -y fuse-sshfs

On Ubuntu & Dabian:

$ sudo apt-get update
$ sudo apt-get install sshfs

Step 3: Mount Remote Directory :


Lets mount remote server directory using sshfs, make sure remote system has running ssh server with proper ssh connectivity from your system.
First create a mount point:

# mkdir /mntssh

Lets mount the remote directory. For this example we are mounting /home/remoteuser directory from x.x.x.x (remote.example.com) system to our local system.

# sshfs remoteuser@remote.example.com:/home/remoteuser /mntssh

[Sample output]

The authenticity of host 'remote.example.com (x.x.x.x)' can't be established.
RSA key fingerprint is 77:85:9e:ff:de:2a:ef:49:68:09:9b:dc:f0:f3:09:07.
Are you sure you want to continue connecting (yes/no)? yes
remoteuser@remote.example.com's password: yes

Step 4: Verify Mount :


After mounting remote filesystem on local mount point, verify it by running mount command.

# mount

/dev/mapper/vg_svr1-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
remoteuser@remote.example.com:/home/remoteuser on /mntssh type fuse.sshfs (rw,nosuid,nodev)

Also naviate to your mount point, you will see files there from remote system

# cd /mntssh
# ls

Step 5: Mount Directory on System Boot :


If you want to mount remote filesystem automatically each time when your system reboots, Add following entry to /etc/fstab file. Make sure you have have key based ssh setup between remote and local system.

# vi /etc/fstab

remoteuser@remote.example.com:/home/remoteuser /mntssh fuse.sshfs defaults 0 0

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

Step 6: Unmount Directory :


If your work is over and you don’t need anymore the mounted directory, Simply unmount is using following command.

# umount /mntssh

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

Saturday, 6 August 2016

How to Import SSL to the Existing Openfire Server in Linux Server

How to import SSL in the Existing Openfire Installation




What is Openfire?


Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber).



Step 1: Put the Keys and Certificates:

Put the Cert and the Key and the CA Cert in the /etc/ssl/ Directory

# ll /etc/ssl/

-rw-r--r--  1 root root  4795 Aug  1 11:39 ca-bundle.crt
-rw-r--r--  1 root root  1838 Aug  1 11:39 ca-cert.crt
-rw-r--r--  1 root root  1704 Aug  1 11:39 ca-cert.key

Step 2: Create a Init Script for Run Openfire Run as a Service:

# vi /etc/init.d/openfire

#!/bin/bash
# description: Openfire Service Status
# processname: openfire
# chkconfig: 234 20 80
OPENFIRE_HOME=/opt/openfire

case $1 in
start)
sh $OPENFIRE_HOME/bin/openfire start
;;
stop)
sh $OPENFIRE_HOME/bin/openfire stop
;;
restart)
sh $OPENFIRE_HOME/bin/openfire restart
;;
status)
sh $OPENFIRE_HOME/bin/openfire status
;;
esac
exit 0

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

# chmod 755 /etc/init.d/openfire

Step 3: Create a Shell Script for Importing the Certs  keys to the JAVA Platform:

# vi /mnt/key-import.sh

### Add these lines

JavaDir="/opt/openfire/resources/security" ### Openfire Installation Directory for Store the Imported Keys
PASS="changeit" ### SSl Exportable & Openfire Admin Certificate Stores Passord
cert="ca-cert" ### Cert Name only
certdir="/etc/ssl" ### Cert Directory
tmp="/root" ### Temporary Folder
ca="/etc/ssl/ca-bundle.crt" ### CA Cert Name

test -e "${JavaDir}/truststore" && rm -f "${JavaDir}/truststore"  ### Checking if there is anything stored already in trustore
test -e "${JavaDir}/keystore" && rm -f "${JavaDir}/keystore"  ### Checking if there is anything stored already in keystore

service openfire stop
cat "${certdir}/${cert}.crt" "${ca}" > ${tmp}/"combined.crt"
keytool -import -trustcacerts -storepass $PASS -alias "StartSSL Class 2" -file "${ca}" -keystore "${JavaDir}/truststore"
openssl pkcs12 -export -in "${tmp}/combined.crt" -inkey "${certdir}/${cert}.key" -out "${tmp}/${cert}.p12" -name "${cert}" -CAfile "${ca}" -passout pass:"${PASS}"
keytool -importkeystore -deststorepass "$PASS" -srcstorepass "$PASS" -destkeystore "${JavaDir}/keystore" -srckeystore "${tmp}/${cert}.p12" -srcstoretype PKCS12 -alias "${cert}"
chmod 640 "${JavaDir}/truststore" "${JavaDir}/keystore"
chown openfire:openfire "${JavaDir}/truststore" "${JavaDir}/keystore"
service openfire start

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

# useradd -s /sbin/nologin openfire
# chown -Rf openfire:openfire /opt/openfire
# chmod -Rf 775 /opt/openfire
# vi /etc/sudoers

### Add at last of the File

openfire  ALL=(ALL)       NOPASSWD:ALL

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

N.B: After creating the openfire User can run the Key Import Script, then the Keys will be imported to the Openfire

# sh /mnt/key-import.sh
# ll /opt/openfire/resources/security

-rw-r----- 1 openfire openfire 6117 Aug  1 12:35 keystore
-rw-r----- 1 openfire openfire 1309 Aug  1 12:35 truststore

Step 4: Now login into the Openfire Admin Panel and Do the Rest:

http://<server-ip>:9090
User: admin
Pass: password

Click on TLS/SSL Certificates --> Give the Password that has been Used in the Script to Every Password Section Here one by one --> Save Settings (one by one) --> Done.

Step 5: Login to the Server via SSH and Shutdown Openffire Properly and then Start again:

# service openfire stop
# ps -ef |grep java

## Kill all the Processes that are running for Java

# kill -9 <PID>

Then statr the Openfire Again

# service openfire start

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

Monday, 11 July 2016

How to Install & Configure Docker in Centos/RHEL 6

Install & Configure Docker in Centos/RHEL 6


What is Docker?


Docker is all about making it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.

In a way, Docker is a bit like a virtual machine. But unlike a virtual machine, rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they're running on and only requires applications be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application.



And importantly, Docker is open source. This means that anyone can contribute to Docker and extend it to meet their own needs if they need additional features that aren't available out of the box.



Requirements:-


1. Centos/RHEL 6.X
2. 2 GB RAM (Recommanded)
3. 50 GB HDD
4. Virtual IP on a Virtual NIC (** For production the Virtual IP Will be a Public IP)

** Here the Virtual IP is: 10.100.100.118 & the Virtual NIC is eth0:1

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 ntpd restart
# ntpdate pool.ntp.org
# chkconfig ntpd on

Step 2: Install & Configure Docker :



# yum -y install epel-release
# yum -y update
# yum -y install docker-io
# service docker start
# chkconfig docker on
# service iptables save

Note: ** Now the IPTales will save with all the Rules & Chains will save to the IPTables Main File.



Step 3: Download Images and Configure Docker Container :



Note: ** What kind of OS need that can be find by the Docker Search, Here using the centos6.6 Image for Example, For find a Image with the Version Run the Below Command-



# docker search <OS> (i.e., # docker search ubuntu)

** We are doing with Centos 6.6-
** To download an Image Run the Below Command

# docker pull centos:6.6

** To see the Downloaded Image Run the Below Command

# docker images

** To create a Docker Instance With a Dedicated IP and with the Port Binding for Accessing the VMs from Outside Do the Following things



# cd /etc/sysconfig/network-scripts/
# cp ifcfg-eth0 ifcfg-eth0:1
# vi ifcfg-eth0:1

### Delete All Lines and Add these Lines

DEVICE=eth0:1
TYPE=Ethernet
UUID=0c1b31b3-bcde-4a28-b2b0-581d3f01e33a
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=10.100.100.118
NETMASK=255.255.0.0
GATEWAY=10.100.1.1

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

# ifup eth0:1

** If the NIC doesn't comes up then Run the Below Command-



# service network restart

# ifconfig

** Check the NIC's once that every NIC is up.



** Now Create a Docker Container with the IP 10.100.100.118 with Port Bind to Host Port 5000 to Container's 22 Port-



# docker run -i -t -p <IP>:<Host Port>:<Container's Port> --privileged --name <Any Name> <Image name> <Command> ## --privileged is for run the container with a Root Privileges

# docker run -i -t -p 10.100.100.118:5000:22 --privileged --name NEWVM centos:6.6 /bin/bash

** After run this Command you will Enter into the Container



[root@df4b1cb88bd8 /]# yum -y install openssh*
[root@df4b1cb88bd8 /]# vi /etc/ssh/sshd_config

## Uncomment the Line at Line Number 42
PermitRootLogin yes

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

# service sshd restart
# chkconfig sshd on

** Set root Password; for here its Passw0rd



# passwd root
# netstat -tulpn |grep 22

** To check that the SSH port is Running and Open.



** Now connect the Container from Outside by the IP: 10.100.100.118 Port: 5000 User: root Pass: Passw0rd



Step 4: Set the Httpd for the Created Container with the Virtual IP with 8080 Port :



# service iptables save
# docker stop NEWVM
# docker commit NEWVM newimage02
# docker run -i -t -p 10.100.100.118:5000:22 -p 10.100.100.118:8080:80 --privileged --name NEWVM newimage02 /bin/bash

[root@df4b1cb88bd8 /]# service sshd restart
[root@df4b1cb88bd8 /]# exit

# service iptables save

** Connect the VM through SSH from Outside by the IP: 10.100.100.118 Port: 5000 User: root Pass: Passw0rd



[root@df4b1cb88bd8 /]# yum -y install httpd httpd-devel
[root@df4b1cb88bd8 /]# service httpd restart
[root@df4b1cb88bd8 /]# chkconfig httpd on

** Now check on Brwoser Apache Default Page Will come:



http://10.100.100.118:8080

Step 5: Set the MySLQ for the Created Container with the Virtual IP with 3030 Port :



# service iptables save
# docker stop NEWVM
# docker commit NEWVM newimage01
# docker rm NEWVM
# docker run -i -t -p 10.100.100.118:5000:22 -p 10.100.100.118:3030:3306 --privileged --name NEWVM newimage01 /bin/bash

[root@df4b1cb88bd8 /]# service sshd restart
[root@df4b1cb88bd8 /]# exit

# service iptables save

** Connect the VM through SSH from Outside by the IP: 10.100.100.118 Port: 5000 User: root Pass: Passw0rd



[root@df4b1cb88bd8 /]# yum -y install mysql-server mysql-devel
[root@df4b1cb88bd8 /]# service mysqld restart
[root@df4b1cb88bd8 /]# chkconfig mysqld on
[root@df4b1cb88bd8 /]# mysql_secure_installation

Step 6: Some Special Notes:-



** After Restarting the Docker Container/Main Server if the SSH not working with the Virtual/Public IP the have to login into the Docker and Restart the SSH once.



** To check the Docker Containers Lists-



# docker ps -a

# docker exec -it <Container Name> /bin/bash
[root@df4b1cb88bd8 /]# service sshd restart
[root@df4b1cb88bd8 /]# service httpd restart

Then check the SSH & Http Connections Again

** To take Backup of a Container or Create an Image from a Container Run the Following Command:-



# docker commit <Container Name/ID> <New Image Name>
# docker commit NEWVM image01

** To Check the Ports that Which Host Port Assign to Which Container's Port Run the Following Command:-



# docker port <Container Name/ID>
# docker port NEWVM


*** If Need to Open more that the Existing port for the Container then do the Following Things:-



# docker stop <Container Name/ID>
# docker commit <Container Name/ID> <New Image Name>
# docker rm <Container Name/ID>
# docker run -i -t -p <Virtual IP>:<Physical Host>:<Container's Port> -p <Virtual IP>:<Physical Host>:<Container's Port> -p <Virtual IP>:<Physical Host>:<Container's Port> --privileged --name <New Container Name> <The Saved Image Name> /bin/bash

** Then Check the Container As Previously Described



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

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.