[部署]CentOS安装apache
环境
虚拟机: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的更多相关文章
- centos 安装apache 和 php5.6
centos 安装 php5.6,安装前需要先安装数据库和apache 安装 apache2.4 安装基础依赖:# yum install gcc gcc-c++ glibc glibc-devel ...
- centos安装apache
查询是否已安装apache: rpm -qa httpd 安装apache: yum install httpd -y 查询: chkconfig httpd on 启动: service http ...
- 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 ...
- CentOS 安装apache
yum 安装apache yum –y install httpd 设置开机启动 chkconfig --levels 235 httpd on 启动 /etc/init.d/httpd start ...
- 阿里云 centos 安装apache和php
mysql使用阿里云的rds httpd服务 1. 安装apr和apr-util 2. 安装 httpd apache.org,apr.apache.org 安装命令: ./configure --p ...
- centos 安装apache activemq
安装说明 安装环境:CentOS-6.3 安装方式:源码安装 软件:apache-tomcat-7.0.29.tar.gz下载地址http://activemq.apache.org/downloa ...
- [部署]CentOS安装PHP环境
环境 虚拟机:VMWare10.0.1 build-1379776 操作系统:CentOS7 64位 HTTP Server:Apache(httpd) 步骤 PHP环境需要HTTP服务器支持,本文使 ...
- [部署]CentOS安装MariaDB
环境 虚拟机:VMWare10.0.1 build-1379776 操作系统:CentOS7 64位 步骤 1.添加MariaDB的yum仓库源,在/etc/yum.repos.d/ 下建立 Mari ...
- Centos 安装Apache软件
检查rpm -qa httpd [root@luozhonghua icons]# rpm -qa |grep httpd httpd-2.2.15-30.el6.centos ...
随机推荐
- Vector Clock/Version Clock
physical clock 机器上的物理时钟,不同的机器在同一个时间点取到的physical clock不一样,之间会存在一定的误差,NTP可以用来控制这个误差,同一个机房内的机器之间的时钟误差可以 ...
- sql server索引功能资料
无论何时对基础数据执行插入.更新或删除操作,SQL Server 数据库引擎都会自动维护索引.随着时间的推移,这些修改可能会导致索引中的信息分散在数据库中(含有碎片).当索引包含的页中的逻辑排序(基于 ...
- iOS开发系列通讯录、蓝牙、内购、GameCenter、iCloud、Passbook系统服务开
--系统应用与系统服务 iOS开发过程中有时候难免会使用iOS内置的一些应用软件和服务,例如QQ通讯录.微信电话本会使用iOS的通讯录,一些第三方软件会在应用内发送短信等.今天将和大家一起学习如何使用 ...
- datagrid动态数据添加超链接的方法
首先,我我们要有一个json格式的datagrid_data.json文件,如下:
- POJ 1681---Painter's Problem(高斯消元)
POJ 1681---Painter's Problem(高斯消元) Description There is a square wall which is made of n*n small s ...
- php中的引用类型和值类型
PHP中的四种简单类型和复杂类型array都是值类型.同类型间赋值传递的是值,即创建一个副本给新变量. 例如: $int1 = 123; $int2 = $int1;//直接传递的是值,只是做了一个叫 ...
- eclipse中的web项目路径和发布好的项目路径
现在企业开发中,我们都会创建一个javaWeb工程,在eclipse中指的是新建一个dynamic web project,创建完工程之后,我们在IDE中大体看到如下的工程目录: 我们主要关心的文件夹 ...
- android: DOC命令:查看后台运行的activity:
DOC命令:查看后台运行的activity: adb shell dumpsys activity running activity: 模拟器曾经运行过的 activity:
- Plug-in 'org.eclipse.cdt.ui' contributed an invalid Menu Extension
终于在mac上配置了最新的eclipse和adt(Win和Mac oxs通用),然后就Error Log报这种错误,运行了hello word,没有影响,但是依旧有这种错误! 记录下错误: eclip ...
- webform(内置对象)
一.内置对象 (一)Response - 响应请求对象1.定义:Response对象用于动态响应客户端请示,控制发送给用户的信息,并将动态生成响应.Response对象只提供了一个数据集合cookie ...