环境

虚拟机:VMWare10.0.1 build-1379776

操作系统:CentOS7 64位

步骤

1、使用yum安装

yum install httpd httpd-devel

2、启动

apachectl start

开机启动服务安装

1、在/etc/init.d目录先建立httpd文件

vi /etc/rc.d/init.d/httpd

httpd文件内容

#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig:
# 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
esac exit

2、修改/etc/rc.d/init.d/httpd的执行权限

chmod  /etc/rc.d/init.d/httpd

3、加入系统服务

chkconfig --add httpd
chkconfig --levels 2345 httpd on

[部署]CentOS安装apache的更多相关文章

  1. centos 安装apache 和 php5.6

    centos 安装 php5.6,安装前需要先安装数据库和apache 安装 apache2.4 安装基础依赖:# yum install gcc gcc-c++ glibc glibc-devel ...

  2. centos安装apache

    查询是否已安装apache:  rpm -qa httpd 安装apache: yum install httpd -y 查询: chkconfig httpd on 启动: service http ...

  3. CentOS 安装apache 及所需的 apr,apr-util,pcre

    安装apache前确定已安装 apr,apr-util,pcre 一.安装apr [root@xt test]# tar -zxf apr-1.4.5.tar.gz [root@xt test]# c ...

  4. CentOS 安装apache

    yum 安装apache yum –y install httpd 设置开机启动 chkconfig --levels 235 httpd on 启动 /etc/init.d/httpd start ...

  5. 阿里云 centos 安装apache和php

    mysql使用阿里云的rds httpd服务 1. 安装apr和apr-util 2. 安装 httpd apache.org,apr.apache.org 安装命令: ./configure --p ...

  6. centos 安装apache activemq

    安装说明 安装环境:CentOS-6.3 安装方式:源码安装  软件:apache-tomcat-7.0.29.tar.gz下载地址http://activemq.apache.org/downloa ...

  7. [部署]CentOS安装PHP环境

    环境 虚拟机:VMWare10.0.1 build-1379776 操作系统:CentOS7 64位 HTTP Server:Apache(httpd) 步骤 PHP环境需要HTTP服务器支持,本文使 ...

  8. [部署]CentOS安装MariaDB

    环境 虚拟机:VMWare10.0.1 build-1379776 操作系统:CentOS7 64位 步骤 1.添加MariaDB的yum仓库源,在/etc/yum.repos.d/ 下建立 Mari ...

  9. Centos 安装Apache软件

    检查rpm    -qa    httpd [root@luozhonghua icons]# rpm    -qa   |grep  httpd httpd-2.2.15-30.el6.centos ...

随机推荐

  1. MVC应用程序实现上传文件

    学习MVC以来,一直想实现上传文件的功能,使用jQuery来实现上传,有很多插件.此篇演示中,Insus.NET是使用Uploadify.http://www.uploadify.com/,它有更多的 ...

  2. 【循序渐进学Python】6.Python中的函数

    1. 创建函数 一个函数代表一个行为并且返回一个结果(包括None),在Python中使用def关键字来定义一个函数,如下: def hello(name): print 'hello,' + nam ...

  3. 【GPU编解码】GPU硬解码---DXVA

    前面介绍利用NVIDIA公司提供的CUVID库进行视频硬解码,下面将介绍利用DXVA进行硬解码. 一.DXVA介绍 DXVA是微软公司专门定制的视频加速规范,是一种接口规范.DXVA规范制定硬件加速解 ...

  4. 误报的java.sql.SQLException: Parameter number 21 is not an OUT parameter

    今天为了模拟一个mysql内存不释放问题,要测试一个存储过程,同时具有出参和入参,启动时报了上述错误. <select id="funcl_trd_secu_execution_que ...

  5. [转]MVC、MVP、MVVM

    界面之下:还原真实的 MVC.MVP.MVVM 模式 [日期:2015-10-28] 来源:github.com/livoras  作者:戴嘉华 [字体:大 中 小]   前言 做客户端开发.前端开发 ...

  6. ALV常用参数详细描述

    调用功能模块: CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_interface_check        = ''               ...

  7. Microsoft Dynamics CRM 2011/2013 JS操作集锦

    1.Xrm.Page.context用户ID:getUserId()用户角色:getUserRoles()用户语言:getUserLcid()组织名称:getOrgUniqueName()组织语言:g ...

  8. An unexpected error has occurred" error appears when you try to create a SharePoint Enterprise Search Center on a Site Collection

    The Enterprise Search Center requires that the Publishing feature be enabled. To enable the Publishi ...

  9. dom4j创建xml

    在前边介绍SAX,PULL等等既然能解析,当然也能生成.不过这里介绍dom4j创建xml文件,简单易懂. dom4j是独立的api,官网:http://www.dom4j.org/    可以去这下载 ...

  10. Android项目结构分析

    andriod项目目录结构如下图: 1. src目录 该目录一个普通的保存java源文件的目录,其和普通java工程中的src目录是一样的. 2. gen目录 此目录用于存放所有由ADT插件自动生成的 ...