Test Block Top

The Blog...
Articles, Tips & Trick and Other Interesting Information...

29 April 2012

Install Apache Webserver Pada CentOS

Sebelum konten halaman web dinamic (PHP, ASP, Perl, dlsb) dapat ditampilkan pada halaman web browser, web server (misalnya: apache) harus terlebih dahulu terinstall pada mesin server. Apache merupakan salah satu webserver gratis paling poluler yang banyak digunakan oleh webmaster dan juga dapat handle bermacam tipe website (PHP, ASP, Perl, dlsb). Pada artikel kali ini akan mengulas tentang cara install apache webserver pada sistem operasi CentOS.

Berikut cara simpel install Apache Webserver pada OS CentOS:
Buka terminal atau connect ke webserver menggunakan putty atau program sejenis lainnya, kemudian ketikkan command yum -y groupinstall "Web Server"



[root@server5 ~]# yum -y groupinstall "Web Server"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.biz.net.id
* extras: centos.biz.net.id
* updates: mirror.averse.net
Setting up Group Process
Checking for new repos for mirrors
http://centos.biz.net.id/6.2/os/x86_64/repodata/badeded316fc87571779d92c5cde816fdc357646b84cb191c4611e05c981ffa1-c6-x86_64-comps.xml.gz: [Errno 14] PYCURL ERROR 18 - "transfer closed with 203863 bytes remaining to read"
Trying other mirror.
base/group_gz                                            | 199 kB     00:00
Warning: Group MySQL Database does not exist.
Resolving Dependencies
--> Running transaction check
---> Package crypto-utils.x86_64 0:2.4.1-24.2.el6 will be installed
--> Processing Dependency: perl(Newt) for package: crypto-utils-2.4.1-24.2.el6.x86_64
---> Package httpd.x86_64 0:2.2.15-15.el6.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos.1 for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.2.15-15.el6.centos.1.x86_64
---> Package httpd-manual.noarch 0:2.2.15-15.el6.centos.1 will be installed
---> Package mod_perl.x86_64 0:2.0.4-10.el6 will be installed
--> Processing Dependency: perl(ExtUtils::MakeMaker) for package: mod_perl-2.0.4-10.el6.x86_64
--> Processing Dependency: perl(BSD::Resource) for package: mod_perl-2.0.4-10.el6.x86_64
---> Package mod_ssl.x86_64 1:2.2.15-15.el6.centos.1 will be installed
---> Package mod_wsgi.x86_64 0:3.2-1.el6 will be installed
---> Package webalizer.x86_64 0:2.21_02-3.3.el6 will be installed
--> Processing Dependency: libgd.so.2()(64bit) for package: webalizer-2.21_02-3.3.el6.x86_64
--> Processing Dependency: libpng12.so.0()(64bit) for package: webalizer-2.21_02-3.3.el6.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.3.9-3.el6_1.2 will be installed
---> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package gd.x86_64 0:2.0.35-10.el6 will be installed
--> Processing Dependency: libXpm.so.4()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libfontconfig.so.1()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libfreetype.so.6()(64bit) for package: gd-2.0.35-10.el6.x86_64
--> Processing Dependency: libjpeg.so.62()(64bit) for package: gd-2.0.35-10.el6.x86_64
---> Package httpd-tools.x86_64 0:2.2.15-15.el6.centos.1 will be installed
---> Package libpng.x86_64 2:1.2.48-1.el6_2 will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
---> Package perl-BSD-Resource.x86_64 0:1.29.03-3.el6 will be installed
---> Package perl-ExtUtils-MakeMaker.x86_64 0:6.55-119.el6_1.1 will be installed
--> Processing Dependency: perl(Test::Harness) for package: perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64
--> Processing Dependency: perl-devel for package: perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64
---> Package perl-Newt.x86_64 0:1.08-26.el6 will be installed
--> Running transaction check
---> Package fontconfig.x86_64 0:2.8.0-3.el6 will be installed
---> Package freetype.x86_64 0:2.3.11-6.el6_2.9 will be installed
---> Package libX11.x86_64 0:1.3-2.el6 will be installed
--> Processing Dependency: libX11-common = 1.3-2.el6 for package: libX11-1.3-2.el6.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.3-2.el6.x86_64
---> Package libXpm.x86_64 0:3.5.8-2.el6 will be installed
---> Package libjpeg.x86_64 0:6b-46.el6 will be installed
---> Package perl-Test-Harness.x86_64 0:3.17-119.el6_1.1 will be installed
---> Package perl-devel.x86_64 4:5.10.1-119.el6_1.1 will be installed
--> Processing Dependency: perl(ExtUtils::ParseXS) for package: 4:perl-devel-5.10.1-119.el6_1.1.x86_64
--> Running transaction check
---> Package libX11-common.noarch 0:1.3-2.el6 will be installed
---> Package libxcb.x86_64 0:1.5-1.el6 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.5-1.el6.x86_64
---> Package perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-119.el6_1.1 will be installed
--> Running transaction check
---> Package libXau.x86_64 0:1.0.5-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package                   Arch     Version                     Repository
Size
================================================================================
Installing:
crypto-utils              x86_64   2.4.1-24.2.el6              base       76 k
httpd                     x86_64   2.2.15-15.el6.centos.1      updates   813 k
httpd-manual              noarch   2.2.15-15.el6.centos.1      updates   781 k
mod_perl                  x86_64   2.0.4-10.el6                base      3.2 M
mod_ssl                   x86_64   1:2.2.15-15.el6.centos.1    updates    87 k
mod_wsgi                  x86_64   3.2-1.el6                   base       66 k
webalizer                 x86_64   2.21_02-3.3.el6             base      128 k
Installing for dependencies:
apr                       x86_64   1.3.9-3.el6_1.2             base      123 k
apr-util                  x86_64   1.3.9-3.el6_0.1             base       87 k
apr-util-ldap             x86_64   1.3.9-3.el6_0.1             base       15 k
fontconfig                x86_64   2.8.0-3.el6                 base      186 k
freetype                  x86_64   2.3.11-6.el6_2.9            updates   359 k
gd                        x86_64   2.0.35-10.el6               base      142 k
httpd-tools               x86_64   2.2.15-15.el6.centos.1      updates    70 k
libX11                    x86_64   1.3-2.el6                   base      582 k
libX11-common             noarch   1.3-2.el6                   base      188 k
libXau                    x86_64   1.0.5-1.el6                 base       22 k
libXpm                    x86_64   3.5.8-2.el6                 base       59 k
libjpeg                   x86_64   6b-46.el6                   base      134 k
libpng                    x86_64   2:1.2.48-1.el6_2            updates   181 k
libxcb                    x86_64   1.5-1.el6                   base      100 k
mailcap                   noarch   2.1.31-2.el6                base       27 k
perl-BSD-Resource         x86_64   1.29.03-3.el6               base       35 k
perl-ExtUtils-MakeMaker   x86_64   6.55-119.el6_1.1            base      290 k
perl-ExtUtils-ParseXS     x86_64   1:2.2003.0-119.el6_1.1      base       42 k
perl-Newt                 x86_64   1.08-26.el6                 base       72 k
perl-Test-Harness         x86_64   3.17-119.el6_1.1            base      229 k
perl-devel                x86_64   4:5.10.1-119.el6_1.1        base      420 k

Transaction Summary
================================================================================
Install      28 Package(s)

Total download size: 8.3 M
Installed size: 24 M
Downloading Packages:
(1/28): apr-1.3.9-3.el6_1.2.x86_64.rpm                   | 123 kB     00:00
(2/28): apr-util-1.3.9-3.el6_0.1.x86_64.rpm              |  87 kB     00:00
(3/28): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm         |  15 kB     00:00
(4/28): crypto-utils-2.4.1-24.2.el6.x86_64.rpm           |  76 kB     00:00
(5/28): fontconfig-2.8.0-3.el6.x86_64.rpm                | 186 kB     00:00
(6/28): freetype-2.3.11-6.el6_2.9.x86_64.rpm             | 359 kB     00:01
(7/28): gd-2.0.35-10.el6.x86_64.rpm                      | 142 kB     00:00
(8/28): httpd-2.2.15-15.el6.centos.1.x86_64.rpm          | 813 kB     00:03
(9/28): httpd-manual-2.2.15-15.el6.centos.1.noarch.rpm   | 781 kB     00:03
(10/28): httpd-tools-2.2.15-15.el6.centos.1.x86_64.rpm   |  70 kB     00:00
(11/28): libX11-1.3-2.el6.x86_64.rpm                     | 582 kB     00:02
(12/28): libX11-common-1.3-2.el6.noarch.rpm              | 188 kB     00:00
(13/28): libXau-1.0.5-1.el6.x86_64.rpm                   |  22 kB     00:00
(14/28): libXpm-3.5.8-2.el6.x86_64.rpm                   |  59 kB     00:00
(15/28): libjpeg-6b-46.el6.x86_64.rpm                    | 134 kB     00:00
(16/28): libpng-1.2.48-1.el6_2.x86_64.rpm                | 181 kB     00:00
(17/28): libxcb-1.5-1.el6.x86_64.rpm                     | 100 kB     00:00
(18/28): mailcap-2.1.31-2.el6.noarch.rpm                 |  27 kB     00:00
(19/28): mod_perl-2.0.4-10.el6.x86_64.rpm                | 3.2 MB     00:13
(20/28): mod_ssl-2.2.15-15.el6.centos.1.x86_64.rpm       |  87 kB     00:00
(21/28): mod_wsgi-3.2-1.el6.x86_64.rpm                   |  66 kB     00:00
(22/28): perl-BSD-Resource-1.29.03-3.el6.x86_64.rpm      |  35 kB     00:00
(23/28): perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64 | 290 kB     00:01
(24/28): perl-ExtUtils-ParseXS-2.2003.0-119.el6_1.1.x86_ |  42 kB     00:00
(25/28): perl-Newt-1.08-26.el6.x86_64.rpm                |  72 kB     00:00
(26/28): perl-Test-Harness-3.17-119.el6_1.1.x86_64.rpm   | 229 kB     00:01
(27/28): perl-devel-5.10.1-119.el6_1.1.x86_64.rpm        | 420 kB     00:01
(28/28): webalizer-2.21_02-3.3.el6.x86_64.rpm            | 128 kB     00:00
--------------------------------------------------------------------------------
Total                                           217 kB/s | 8.3 MB     00:39
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : apr-1.3.9-3.el6_1.2.x86_64                                  1/28
Installing : apr-util-1.3.9-3.el6_0.1.x86_64                             2/28
Installing : 2:libpng-1.2.48-1.el6_2.x86_64                              3/28
Installing : freetype-2.3.11-6.el6_2.9.x86_64                            4/28
Installing : fontconfig-2.8.0-3.el6.x86_64                               5/28
Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                        6/28
Installing : httpd-tools-2.2.15-15.el6.centos.1.x86_64                   7/28
Installing : 1:perl-ExtUtils-ParseXS-2.2003.0-119.el6_1.1.x86_64         8/28
Installing : 4:perl-devel-5.10.1-119.el6_1.1.x86_64                      9/28
Installing : perl-Test-Harness-3.17-119.el6_1.1.x86_64                  10/28
Installing : perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64            11/28
Installing : libXau-1.0.5-1.el6.x86_64                                  12/28
Installing : libxcb-1.5-1.el6.x86_64                                    13/28
Installing : libjpeg-6b-46.el6.x86_64                                   14/28
Installing : mailcap-2.1.31-2.el6.noarch                                15/28
Installing : httpd-2.2.15-15.el6.centos.1.x86_64                        16/28
Installing : perl-Newt-1.08-26.el6.x86_64                               17/28
Installing : perl-BSD-Resource-1.29.03-3.el6.x86_64                     18/28
Installing : libX11-common-1.3-2.el6.noarch                             19/28
Installing : libX11-1.3-2.el6.x86_64                                    20/28
Installing : libXpm-3.5.8-2.el6.x86_64                                  21/28
Installing : gd-2.0.35-10.el6.x86_64                                    22/28
Installing : webalizer-2.21_02-3.3.el6.x86_64                           23/28
Installing : mod_perl-2.0.4-10.el6.x86_64                               24/28
Installing : crypto-utils-2.4.1-24.2.el6.x86_64                         25/28
Installing : httpd-manual-2.2.15-15.el6.centos.1.noarch                 26/28
Installing : mod_wsgi-3.2-1.el6.x86_64                                  27/28
Installing : 1:mod_ssl-2.2.15-15.el6.centos.1.x86_64                    28/28

Installed:
crypto-utils.x86_64 0:2.4.1-24.2.el6
httpd.x86_64 0:2.2.15-15.el6.centos.1
httpd-manual.noarch 0:2.2.15-15.el6.centos.1
mod_perl.x86_64 0:2.0.4-10.el6
mod_ssl.x86_64 1:2.2.15-15.el6.centos.1
mod_wsgi.x86_64 0:3.2-1.el6
webalizer.x86_64 0:2.21_02-3.3.el6

Dependency Installed:
apr.x86_64 0:1.3.9-3.el6_1.2
apr-util.x86_64 0:1.3.9-3.el6_0.1
apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1
fontconfig.x86_64 0:2.8.0-3.el6
freetype.x86_64 0:2.3.11-6.el6_2.9
gd.x86_64 0:2.0.35-10.el6
httpd-tools.x86_64 0:2.2.15-15.el6.centos.1
libX11.x86_64 0:1.3-2.el6
libX11-common.noarch 0:1.3-2.el6
libXau.x86_64 0:1.0.5-1.el6
libXpm.x86_64 0:3.5.8-2.el6
libjpeg.x86_64 0:6b-46.el6
libpng.x86_64 2:1.2.48-1.el6_2
libxcb.x86_64 0:1.5-1.el6
mailcap.noarch 0:2.1.31-2.el6
perl-BSD-Resource.x86_64 0:1.29.03-3.el6
perl-ExtUtils-MakeMaker.x86_64 0:6.55-119.el6_1.1
perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-119.el6_1.1
perl-Newt.x86_64 0:1.08-26.el6
perl-Test-Harness.x86_64 0:3.17-119.el6_1.1
perl-devel.x86_64 4:5.10.1-119.el6_1.1

Complete!
[root@server5 ~]#

Kemudian jalankan apache webserver dengan mengetikkan command service httpd start.



[root@server5 ~]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for server5
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[  OK  ]
[root@server5 src]#

Untuk load apache ketika mesin boot (start up), ketikkan command chkconfig httpd on.



[root@server5 ~]# chkconfig httpd on
[root@server5 ~]#

Untuk cek versi apache, ketikkan command rpm -q httpd.



[root@server5 ~]# rpm -q httpd
httpd-2.2.15-15.el6.centos.1.x86_64
[root@server5 ~]#

Screenshot tampilan halaman default apache:
Apache Default Page

Apache Default Page

Selesai. Semoga Membantu...
:)

Tidak ada komentar:

Posting Komentar

Loncat ke Atas ↑