Apache Upgrading to 2.4.2 on Solaris servers
CONTENTS:
1) Introduction
to Apache
2) Scope
3) Basics
related to Apache and Pre-checks/ Important points
4) Installation
steps of Apache
5) Glossary
6) References
Introduction
to Apache Web Server:
Apache
web server is an open source HTTP web server that provides secure and efficient
HTTP services in sync with current HTTP standards. There will be frequent
releases in the Apache HTTP server project and this makes other related
software developments to depend on these releases. The document mainly
describes on how to install/upgrade Apache 2.4.2 on Solaris Operating System if
it has previous versions of Apache.
Basics
related to Apache and Pre-checks/Important points:
1) To check
if Apache web server is running on the Solaris machine, run the following
command.
$ps –ef |
grep httpd
2) Several
important folders of Apache are listed as follows with their description.
· cgi-bin :
is the place where the cgi scripts are placed (like the Perl or Python scripts)
· htdocs : is the
place where we place the html/php files that are to be located. logs:
is folder that contains 3 files with important information along with the logs
· conf: contains
the configuration files such as httpd.conf that are
most important for running of Apache web server. The conf files provide
facility to change several options that serve as input parameters to apache
engine.
· bin:
contains utility scripts and executables like apachectl and httpd.
· lib: contains
the library modules.
3) The
apache web server can be started using the command
/opt/apache/bin/apachectl
start
and
can be stopped/restarted using the commands
/opt/apache/bin/apachectl
stop
/opt/apache/bin/apachectl
restart
Both the
above commands are given assuming that apache is installed at the location
/opt/apache.
4) It is
strongly recommended to back up the httpd.conf file of the current website
before doing any modifications/upgradations to the same.
5) Although
Apache can be installed at any location like /etc/apache and /usr/local/apache
etc, it is recommended to install at the path where it is previously installed
because the scripts/html pages related to the website are located in that
path and it sometimes become very difficult to move all those scripts and
folders to the new location if the install destination path is changed to a new
location other than the current location. Obviously, the new
installation/up-gradations will only modify the files with same names to new
files and the other entire tree structure not related to apache stay as they
are before. If the install location is changed all the scripts need to be
changed to the new location which is tough task along with the changes in the
scripts to suite to the new location. It is obvious that the new
installations/up-gradations will only modify the files with same names to new
files and the other entire tree structure/remaining files not related to apache
stay as they are before.
6) The httpd is
Apache HTTP daemon. The commands that are useful while dealing with Apache
httpd are as given below.
· /opt/apache/bin/httpd
–v returns the version of httpd and exits
· /opt/apache/bin/httpd
–V returns the version and build parameters of httpd.
· /opt/apache/bin/httpd
–l outputs the list of modules compiled into the server
· /opt/apache/bin/httpd
–S shows the setting parsed from the httpd.conf file.
Refer to
manual page for more options. Apache is assumed to be installed at /opt/apache.
7) There
should be C compiler already installed on the Solaris servers. Else please
install a C compiler. If it is already installed, the path where the C compiler
is present should be set in path variable.
The
Installation steps of Apache 2.4.2 on Solaris servers at /opt/apache:
The
following steps should be followed for installing Apache. Here it is assumed
that older version of apache is already installed at /opt/apache.
2) FTP to
the solaris server that requires the Apache upgrade and put the installable in
a temporary folder (say /tmp/apache).
3) Uncompress
and extract the Apache installable scripts to a folder using the ‘gunzip
<filename>’ and ‘tar –xvf <filename>’ commands.
4) Go to
existing /opt/apache/conf folder and copy the httpd.conf and other conf files
to the above mentioned temporary folder.
5) Take a
complete back up of the /opt/apache folder in the /opt as apache_bakup.tar
using the command
tar –cvf
“apache_bakup.tar” /opt/apache
6) Now,
compile the extracted apache installation scripts. The options used in the
compilation will affect the functioning of the apache web server. Go to the
temporary folder into which apache is extracted and run the following commands.
./configure
--prefix=/opt/apache --enable-module=so
This
configures the installation to be done at the path /opt/apache and to enable to
use modules of type ‘so’. Use the --enable-module=NAME and --disable-module=NAME options
to enable or disable a particular already distributed module from the Apache
src/Configuration.tmpl file.
7) Then run
the following commands for building and installing the compiled and configured
packages.
$make
$make
install
8) Check if
the old httpd.conf file is present at the path /opt/apache/conf. Else copy the
httpd.conf file that is backed up in the temporary folder to this folder.
9) Try
starting the Apache Web server using the following command.
$/opt/apache/bin/apachectl
start
10) The services should start
saying that the “Apache web services started successfully”.
11) If the apache start shows
some error saying that “Unable to Load Module…… ” , the environment variables
related to the module should be set using the scripts related to the module and
should be investigated. ‘LoadModule’ directive in httpd.conf is used in loading
modules of some other software or agents whenever apache services are started.
12) Restart the apache services
by the command $/opt/apache/bin/apachectl start.
I am looking information on apache webserver.thank you for upgrade information.
ReplyDeleteRegards,
Lucidtechsystems.