Install and deploy Apache on CentOS
Environment
Virtual Machine: VMWare10.0.1 build-1379776
Operating System: 64-bit CentOS7
Procedure
1. Install using yum
Yum install httpd-devel
2. Start
Apachectl start
Start Service Installation
1. Create an httpd file in the/etc/init. d directory.
Vi/etc/rc. d/init. d/httpd
Httpd File Content
#! /Bin/sh
#
# Startup script for the Apache Web Server
#
# Chkconfig: 345 85 15
# Description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# Processname: httpd
# Source function library.
./Etc/rc. d/init. d/functions
# See how we were called.
Case "$1" in
Start)
Echo-n "Starting httpd :"
/Usr/sbin/apachectl start
;;
Stop)
Echo-n "Shutting down httpd :";
/Usr/sbin/apachectl stop
;;
Status)
/Usr/sbin/apachectl status
;;
Restart)
Echo-n "Restarting httpd :";
/Usr/sbin/apachectl restart
;;
Reload)
Echo-n "Reloading httpd :"
/Usr/sbin/apachectl restart
Echo
;;
*)
Echo "Usage: $0 {start | stop | restart | reload | status }"
Exit 1
Esac
Exit 0
2. Modify the execution permission of/etc/rc. d/init. d/httpd.
Chmod 755/etc/rc. d/init. d/httpd
3. Add to System Service
Chkconfig -- add httpd
Chkconfig -- levels 2345 httpd on
Install a Web Server on Ubuntu Server 14.04 (Linux + Apache + MySQL + PHP)
Install and configure the PHP environment in Linux (Apache2)
Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04
Compile and install LAMP in CentOS 5.9 (Apache 2.2.44 + MySQL 5.6.10 + PHP 5.4.12)
Source code for Web server architecture in RedHat 5.4 build the LAMP environment and application PHPWind
Apache details: click here
Apache: click here
This article permanently updates the link address: