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.