INSTALLATION
INSTALLATION FOR HTTPD SERVER IN CENTOS
> /* install httpd server*/
yum install httpd>
==============================================================================
sp;Package Arch Version Repository Size
===================================================================================
Installing:
httpd x86_64 2.4.6-88.el7.centos base 2.7 M
httpd-devel x86_64 2.4.6-88.el7.centos base 196 k
httpd-manual noarch 2.4.6-88.el7.centos base 1.3 M
httpd-tools x86_64 2.4.6-88.el7.centos base 90 k
Installing for dependencies:
apr x86_64 1.4.8-3.el7_4.1 base 103 k
apr-devel x86_64 1.4.8-3.el7_4.1 base 188 k
apr-util x86_64 1.5.2-6.el7 base 92 k
apr-util-devel x86_64 1.5.2-6.el7 base 76 k
cyrus-sasl-devel x86_64 2.1.26-23.el7 base 310 k
expat-devel x86_64 2.1.0-10.el7_3 base 57 k
libdb-devel x86_64 5.3.21-24.el7 base 38 k
mailcap noarch 2.1.41-2.el7 base 31 k
openldap-devel x86_64 2.4.44-20.el7 base 804 k
===========================================================
$ vi /etc/httpd/conf/httpd.conf /* this is to httpd configuration file.
$ cd /var/www/html/ /*index file for the html pages or css pages.
$ sudo vi index.html
$ service httpd restart /* service httpd starts.
Redirecting to /bin/systemctl restart httpd.service
Apache running status.
$ systemctl status httpd
( or )
$ service httpd status
Active: active (running) since Tue 2018-12-25 00:09:56 PST; 29min ago.
Main PID: 11821 (httpd)
Status: "Total requests: 70; Current requests/sec: 0; Current traffic: 0 B/sec"
Dec 25 00:09:56 inddlvtwlmas01.weblogic.net systemd[1]: Starting The Apache HTTP...
Dec 25 00:09:56 inddlvtwlmas01.weblogic.net systemd[1]: Started The Apache HTTP ...
HTTPD INSTALLING EXAMPLE
$ yum install httpd*
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: mirrors.nhanhoa.com
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-88.el7.centos will be installed
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-88.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-88.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-88.el7.centos.x86_64
---> Package httpd-devel.x86_64 0:2.4.6-88.el7.centos will be installed
--> Processing Dependency: apr-util-devel for package: httpd-devel-2.4.6-88.el7.centos.x86_64
--> Processing Dependency: apr-devel for package: httpd-devel-2.4.6-88.el7.centos.x86_64
---> Package httpd-manual.noarch 0:2.4.6-88.el7.centos will be installed
---> Package httpd-tools.x86_64 0:2.4.6-88.el7.centos will be installed
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed
---> Package apr-devel.x86_64 0:1.4.8-3.el7_4.1 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package apr-util-devel.x86_64 0:1.5.2-6.el7 will be installed
--> Processing Dependency: openldap-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: libdb-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: expat-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-10.el7_3 will be installed
---> Package libdb-devel.x86_64 0:5.3.21-24.el7 will be installed
---> Package openldap-devel.x86_64 0:2.4.44-20.el7 will be installed
--> Processing Dependency: cyrus-sasl-devel(x86-64) for package: openldap-devel-2.4.44-20.el7.x86_64
--> Running transaction check
---> Package cyrus-sasl-devel.x86_64 0:2.1.26-23.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
httpd x86_64 2.4.6-88.el7.centos base 2.7 M
httpd-devel x86_64 2.4.6-88.el7.centos base 196 k
httpd-manual noarch 2.4.6-88.el7.centos base 1.3 M
httpd-tools x86_64 2.4.6-88.el7.centos base 90 k
Installing for dependencies:
apr x86_64 1.4.8-3.el7_4.1 base 103 k
apr-devel x86_64 1.4.8-3.el7_4.1 base 188 k
apr-util x86_64 1.5.2-6.el7 base 92 k
apr-util-devel x86_64 1.5.2-6.el7 base 76 k
cyrus-sasl-devel x86_64 2.1.26-23.el7 base 310 k
expat-devel x86_64 2.1.0-10.el7_3 base 57 k
libdb-devel x86_64 5.3.21-24.el7 base 38 k
mailcap noarch 2.1.41-2.el7 base 31 k
openldap-devel x86_64 2.4.44-20.el7 base 804 k
Transaction Summary
===================================================================================
Install 4 Packages (+9 Dependent packages)
Total download size: 6.0 M
Installed size: 22 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/apr-1.4.8-3.el7_4.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for apr-1.4.8-3.el7_4.1.x86_64.rpm is not installed
(1/13): apr-1.4.8-3.el7_4.1.x86_64.rpm | 103 kB 00:00:00
(2/13): expat-devel-2.1.0-10.el7_3.x86_64.rpm | 57 kB 00:00:00
(3/13): apr-devel-1.4.8-3.el7_4.1.x86_64.rpm | 188 kB 00:00:00
(4/13): apr-util-devel-1.5.2-6.el7.x86_64.rpm | 76 kB 00:00:00
(5/13): httpd-devel-2.4.6-88.el7.centos.x86_64.rpm | 196 kB 00:00:00
(6/13): httpd-tools-2.4.6-88.el7.centos.x86_64.rpm | 90 kB 00:00:00
(7/13): libdb-devel-5.3.21-24.el7.x86_64.rpm | 38 kB 00:00:00
(8/13): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00:00
(9/13): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00:00
(10/13): cyrus-sasl-devel-2.1.26-23.el7.x86_64.rpm | 310 kB 00:00:01
(11/13): httpd-2.4.6-88.el7.centos.x86_64.rpm | 2.7 MB 00:00:01
(12/13): httpd-manual-2.4.6-88.el7.centos.noarch.rpm | 1.3 MB 00:00:00
(13/13): openldap-devel-2.4.44-20.el7.x86_64.rpm | 804 kB 00:00:01
-----------------------------------------------------------------------------------
Total 2.6 MB/s | 6.0 MB 00:02
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-6.1810.2.el7.centos.x86_64 (@anaconda)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : apr-1.4.8-3.el7_4.1.x86_64 1/13
Installing : apr-util-1.5.2-6.el7.x86_64 2/13
Installing : apr-devel-1.4.8-3.el7_4.1.x86_64 3/13
Installing : httpd-tools-2.4.6-88.el7.centos.x86_64 4/13
Installing : expat-devel-2.1.0-10.el7_3.x86_64 5/13
Installing : cyrus-sasl-devel-2.1.26-23.el7.x86_64 6/13
Installing : openldap-devel-2.4.44-20.el7.x86_64 7/13
Installing : libdb-devel-5.3.21-24.el7.x86_64 8/13
Installing : apr-util-devel-1.5.2-6.el7.x86_64 9/13
Installing : mailcap-2.1.41-2.el7.noarch 10/13
Installing : httpd-2.4.6-88.el7.centos.x86_64 11/13
Installing : httpd-devel-2.4.6-88.el7.centos.x86_64 12/13
Installing : httpd-manual-2.4.6-88.el7.centos.noarch 13/13
Verifying : httpd-devel-2.4.6-88.el7.centos.x86_64 1/13
Verifying : httpd-manual-2.4.6-88.el7.centos.noarch 2/13
Verifying : apr-devel-1.4.8-3.el7_4.1.x86_64 3/13
Verifying : apr-util-devel-1.5.2-6.el7.x86_64 4/13
Verifying : mailcap-2.1.41-2.el7.noarch 5/13
Verifying : apr-util-1.5.2-6.el7.x86_64 6/13
Verifying : libdb-devel-5.3.21-24.el7.x86_64 7/13
Verifying : openldap-devel-2.4.44-20.el7.x86_64 8/13
Verifying : httpd-tools-2.4.6-88.el7.centos.x86_64 9/13
Verifying : httpd-2.4.6-88.el7.centos.x86_64 10/13
Verifying : cyrus-sasl-devel-2.1.26-23.el7.x86_64 11/13
Verifying : apr-1.4.8-3.el7_4.1.x86_64 12/13
Verifying : expat-devel-2.1.0-10.el7_3.x86_64 13/13
Installed:
httpd.x86_64 0:2.4.6-88.el7.centos
httpd-devel.x86_64 0:2.4.6-88.el7.centos
httpd-manual.noarch 0:2.4.6-88.el7.centos
httpd-tools.x86_64 0:2.4.6-88.el7.centos
Dependency Installed:
apr.x86_64 0:1.4.8-3.el7_4.1 apr-devel.x86_64 0:1.4.8-3.el7_4.1
apr-util.x86_64 0:1.5.2-6.el7 apr-util-devel.x86_64 0:1.5.2-6.el7
cyrus-sasl-devel.x86_64 0:2.1.26-23.el7 expat-devel.x86_64 0:2.1.0-10.el7_3
libdb-devel.x86_64 0:5.3.21-24.el7 mailcap.noarch 0:2.1.41-2.el7
openldap-devel.x86_64 0:2.4.44-20.el7
Complete!
httpd.conf magic
[bala@inddlvtwlmas01 ~]$ vi /etc/httpd/conf/httpd.conf
you are able to modify web server in this file.This is the most important configuration file.
[bala@inddlvtwlmas01 ~]$ cd /var/www/html/Location of the static content like web pages html.
[bala@inddlvtwlmas01 html]$ vi index.html.
Main file for the website building or web pages integrated or indexed file.
[bala@inddlvtwlmas01 html]$ vi index.htmlYou can write this with vi editor only when root access is given you should enter this command other wise if you are the admin user then you can take sudo access
[bala@inddlvtwlmas01 html]$ sudo vi index.html[sudo] password for bala:
[bala@inddlvtwlmas01 html]$ sudo vi index.html
[bala@inddlvtwlmas01 html]$ service httpd restart
httpd service is started
Apache configuration
Download
httpd-2.4.37.tar
Extract
httpd-2.4.37
$ tar xvzf httpd-2.4.37.tar
Download pcre
pcre2-10.21.tar.gzExtract
pcre2-10.21.tar.gz
$tar xvzf pcre2-10.21.tar.gz
$cd pcre2-10.21
$ ./configure --prefix=/apps/apache/pcre2-10.21
$ make
$ make install
$ make
$ make install
Go back to where your Apache installation is and compile Apache with PCRE:
$ cd /apps/apache/httpd-2.4.37
$ ./configure --with-pcre=/apps/apache/pcre2-10.21/bin/pcre2-config
$ ./configure --with-pcre=/apps/apache/pcre2-10.21/bin/pcre2-config
output
Server Version: 2.4.37Install prefix: /usr/local/apache2
C compiler: gcc -std=gnu99
CFLAGS: -pthread
CPPFLAGS: -DLINUX -D_REENTRANT -D_GNU_SOURCE
LDFLAGS:
LIBS:
C preprocessor: gcc -E
Comments
Post a Comment