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服务,并设置成开机启动。
systemctl start httpd.service
systemctl enable httpd.service
tpd.service,如下图ll /etc/systemd/system/multi-user.target.wants/
total 0
lrwxrwxrwx. 1 root root 38 Sep 16 19:08 auditd.service -> /usr
b/systemd/system/auditd.servicelrwxrwxrwx. 1 root root 44 Sep 16 19:08 avahi-daemon.service -> /usr
b/systemd/system/avahi-daemon.servicelrwxrwxrwx. 1 root root 37 Sep 16 19:08 crond.service -> /usr
b/systemd/system/crond.servicelrwxrwxrwx. 1 root root 37 Sep 17 02:38 httpd.service -> /usr
b/systemd/system
tpd.servicelrwxrwxrwx. 1 root root 42 Sep 16 19:08 irqbalance.service -> /usr
b/systemd/system/irqbalance.servicelrwxrwxrwx. 1 root root 37 Sep 16 19:08 kdump.service -> /usr
b/systemd/system/kdump.servicelrwxrwxrwx. 1 root root 46 Sep 16 19:08 NetworkManager.service -> /usr
b/systemd/system/NetworkManager.servicelrwxrwxrwx. 1 root root 39 Sep 16 19:08 postfix.service -> /usr
b/systemd/system/postfix.servicelrwxrwxrwx. 1 root root 40 Sep 16 19:08 remote-fs.target -> /usr
b/systemd/system/remote-fs.targetlrwxrwxrwx. 1 root root 39 Sep 16 19:08 rsyslog.service -> /usr
b/systemd/system/rsyslog.servicelrwxrwxrwx. 1 root root 36 Sep 16 19:08 sshd.service -> /usr
b/systemd/system/sshd.servicelrwxrwxrwx. 1 root root 37 Sep 16 19:08 tuned.service -> /usr
b/systemd/system/tuned.service <?xml version="1.0" encoding="utf-8"?>
<zone>
<short>Public</short>
<description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
<service name="dhcpv6-client"/>
<service name="http"/>
<service name="ssh"/>
<service name="https"/>
</zone>
注意不要将此处firewalld管理的service与systemd中的sevice配置单元混淆,两者没有任何关系。
http服务是安装firewalld时自动安装的,这个服务的配置文件为 /usr
b/firewalld
rvices
tp.xml,我们来看看这个文件。<?xml version="1.0" encoding="utf-8"?>
<service>
<short>WWW (HTTP)</short>
<description>HTTP is the protocol used to serve Web pages. If you plan to make your Web server publicly available, enable this option. This option is not required for viewing pages locally or developing Web pages.</description>
<port protocol="tcp" port="80"/>
<
rvice>据此知道http服务对应的就是tcp协议的80端口。firewalld根据zone配置文件中的服务名http,依次在/etc/firwalld
rvices/目录,/usr
b/firewalld
rvices/目录查找名为http.xml的文件,找到即停止继续查找,所以位于/etc/firwalld
rvices/目录的配置文件优先级更高。4 与CentOS6.5的区别
总体思路是一致的,都是防火墙放行,把服务加入运行级配置文件。只是CentOS7中防火墙和运行级管理程序均发生彻底改变了。firewalld代替iptables,systemd代替SystemV init,所以需要重新熟悉相关命令。个人感觉新的程序更加人性化,操作也很容易。 配置文件也都采用了标准的xml格式,放弃了容易出错的老式配置文件。
centos7安装httpd和php的更多相关文章
- centos7 安装 httpd并打开测试页
systemctl start firewalld.service#启动firewallsystemctl stop firewalld.service#停止firewallsystemctl dis ...
- centos7 apache httpd安装和配置django项目
一.安装httpd服务 apache在centos7中是Apache HTTP server.如下对httpd的解释就是Apache HTTP Server.所以想安装apache其实是要安装http ...
- Centos7安装Docker 基于Dockerfile 搭建httpd运行环境
Centos7安装Docker 基于Dockerfile 搭建httpd运行环境 docker docker搭建 docker build 本文档完成目标内容如下 使用Docker搭建http服务器一 ...
- CentOS7.3环境下源码安装httpd
CentOS7.3环境下源码安装httpd 本文在CentOS7.3下,源码安装apache服务httpd2.4. 1.下载好源码安装包 [root@localhost ~]#ll total 625 ...
- centos7和centos6安装httpd
编译安装httpd http://apr.apache.org/download.cgi 下载 apr-util-1.6.1.tar.bz2 apr-1.6.5.tar.bz2 http://http ...
- CentOS7安装Apache2.4+PHP5.6
linux系统CentOS7 先下载Apache需要依赖的软件 1.APR 下载地址http://apr.apache.org/download.cgi wget下载路径http://mirror.b ...
- CentOS7安装配置Apache HTTP Server
RPM安装httpd 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 # yum -yinstall http ...
- CentOS7 安装LNMP(Linux+Nginx+MySQL+PHP)
由于工作须要,须要学习php,本来想安装lamp的可是考虑到如今nginxserver有良好的性能且应用广泛. 这里我决定搭建Linux(CentOS7+Nginx+MySQL+PHP)下的webse ...
- Centos7安装jexus,部署asp.net core,asp.net mvc
什么是Jexus 官网解释:https://www.jexus.org/ Jexus是一款Linux平台上的高性能WEB服务器和负载均衡网关,Jexus Web Service,简称JWS,以支持AS ...
随机推荐
- Objective-C日记-Bounds和Frame
今天在学习有关UIView时,关于Bounds和Frame的问题困扰多时,今日研究了一翻,有所收获,遂记之. 一.问题来源 网上有关bounds和frames的比较的文章主要就是一篇:http://b ...
- 1022: [SHOI2008]小约翰的游戏John
1022: [SHOI2008]小约翰的游戏John Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 1322 Solved: 829[Submit][ ...
- Nginx uWSGI web.py 站点搭建
一.安装nginx 在安装nginx前,需要先装nginx的依赖包. 1.如果没有yum则先安装yum 删除原有的yum rpm -aq|grep yum|xargs rpm -e --node ...
- pageRank算法 python实现
一.什么是pagerank PageRank的Page可是认为是网页,表示网页排名,也可以认为是Larry Page(google 产品经理),因为他是这个算法的发明者之一,还是google CEO( ...
- 谈谈数据库中MyISAM与InnoDB区别 针对业务类型选择合适的表
MyISAM:这个是默认类型,它是基于传统的ISAM类型, ISAM是Indexed Sequential Access Method (有索引的顺序访问方法) 的缩写,它是存储记录和文件的标准方法. ...
- Ubuntu部署Jupyter
前言 Jupyter Notebook(此前被称为 IPython notebook)是一个交互式笔记本,支持运行 40 多种编程语言.在本文中,我们将介绍 Jupyter notebook 的主要特 ...
- Atom 编辑器试用
简介 它号称"21世纪可黑客的文本编辑器".GitHub支持并开源,并支持跨平台.和brackets编辑器一样基于浏览器开发,意味着你可以使用less(包含css)来定制编辑器界面 ...
- 免费SSL证书PK付费SSL证书 花落谁家
3月17日和18日,Google Chrome 57.0.2987.110与Mozilla Firefox 52.0.1分别上线,而这两款浏览器都出现了一个共同点:打压HTTP协议.在Firefox ...
- javascript与jQuery选项卡效果
HTML结构: <!doctype html><html><head><meta charset="utf-8"><title ...
- 老李谈HTTP1.1的长连接
老李谈HTTP1.1的长连接 poptest是国内唯一一家培养测试开发工程师的培训机构,以学员能胜任自动化测试,性能测试,测试工具开发等工作为目标.如果对课程感兴趣,请大家咨询qq:9088214 ...