centos7 install httpd

[1]Install Httpd for Centos7-media

# yum --enablerepo=centos7-media -y install httpd
Installed:
  httpd.x86_64 0:2.4.6-18.el7.centos

[2]start httpd,开机启动

# systemctl start httpd.service
# systemctl enable httpd.service
ln -s ‘/usr/lib/systemd/system/httpd.service‘ ‘/etc/systemd/system/multi-user.target.wants/httpd.service‘

[3]Test Access httpd

http://$ip/

[4]configure httpd server

# rm -f /etc/httpd/conf.d/welcome.conf     #删除默认欢迎界面
# vi /etc/httpd/conf/httpd.conf
86 ServerAdmin [email protected]
95 ServerName mariadb.carso.cn:80
151     AllowOverride All
164     DirectoryIndex index.html index.cgi index.php
配置文件最后添加:
ServerTokens Prod    # 禁止显示或发送Apache版本号
KeepAlive On
# systemctl restart httpd.service
# vi /var/www/html/index.html
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Welcom to Carson Space!
</div>
</body>
</html>

[5]访问测试

Welcom to Carson Space!

centos7 install httpd

时间: 2024-10-13 18:38:41

centos7 install httpd的相关文章

centos7 apache httpd安装和配置django项目

一.安装httpd服务 apache在centos7中是Apache HTTP server.如下对httpd的解释就是Apache HTTP Server.所以想安装apache其实是要安装httpd. httpd.x86_64 : Apache HTTP Server 安装: # yum install httpd 设置httpd服务开机启动 [[email protected] httpd]# /sbin/chkconfig httpd on Note: Forwarding reques

centos7安装httpd和php

centos7许多命令都变了,又要重新记了. centos7默认安装了httpd吧?记不清了,看一下: rpm -qa |grep httpd 没有的话,安装一下吧. yum -y install httpd yum -y install php yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel 二.启动httpd服务

CentOS7 Install Shipyard

# 采集木jj 原文:http://www.cnblogs.com/caoguo/p/5735189.html # CentOS7 Install Shipyard# yum install docker# systemctl restart docker# docker login -u user-p password -e sample.aliyun.com registry.aliyuncs.com # 上面docker加速一大段实际就下面这一句# vi /etc/sysconfig/do

Centos7 install Openstack - (第四节)添加计算服务(Nova)

Centos7 install Openstack - (第四节)添加计算服务(Nova) 我的blog地址:http://www.cnblogs.com/caoguo 该文根据openstack官方文档配置 官方文档地址: http://docs.openstack.org/juno/install-guide/install/yum/content/# 0x01. Install and configure controller node (在控制节点安装配置一下内容) 一) 配置基本环境

CentOS7 Install Consul

Centos7 Install Consul 原文链接:http://www.cnblogs.com/caoguo/p/5959962.html 1) 环境 192.168.217.158 consul-1 192.168.217.159 consul-2 192.168.217.160 consul-3 192.168.217.161 agent-1 2) 安装 # yum install -y unzip # wget https://releases.hashicorp.com/consu

centos7 install lnmp

centos7 install lnmp yum install epel-releaseyum install php php-fpm nginx mariadb-devel mariadb-server mariadb test php 模块 vim /etc/nginx/nginx.confnotice:在location 下面添加这一行就可以 location ~* \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FI

centos7 install vim8

centos7 install vim8 Git and dependency Git: https://github.com/vim/vim # yum install -y perl-devel configure CFLAGS="-I/usr/lib64/perl5/CORE/" ./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-pythoninterp=yes

CentOS7配置httpd虚拟主机

本实验旨在CentOS7系统中,httpd-2.4配置两台虚拟主机,主要有以下要求: (1) 提供两个基于名称的虚拟主机: www1.stuX.com,页面文件目录为/web/vhosts/www1:错误日志为/var/log/httpd/www1/error_log,访问日志为/var/log/httpd/www1/access_log: www2.stuX.com,页面文件目录为/web/vhosts/www2:错误日志为/var/log/httpd/www2/error_log,访问日志为

centos7 install 安装mysql

CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载 # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server   成功安装之后重启mysql服务 # service mysqld r