首页 > 系统相关 >Centos7安装web环境

Centos7安装web环境

时间:2023-04-17 17:13:46浏览次数:35  
标签:iptables web service httpd 防火墙 Centos7 关闭 安装 localhost


1、安装Apache

[root@localhost ~]# yum -y install httpd

# 开机自启动

[root@localhost ~]#chkconfig httpd on

# 启动httpd 服务

[root@localhost ~]# service httpd start

现在直接在浏览器键入http://localhost  或 http://本机IP  ,应该会看到Apache的测试页面

这里需要注意关闭防火墙

CentOS 6.5关闭防火墙步骤

关闭命令:  service iptables stop 
永久关闭防火墙:chkconfig iptables off
两个命令同时运行,运行完成后查看防火墙关闭状态 
service iptables status

CentOS 7关闭防火墙步骤

systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动

标签:iptables,web,service,httpd,防火墙,Centos7,关闭,安装,localhost
From: https://blog.51cto.com/u_12374018/6195600

相关文章

  • Centos7安装Cmake3.0
    下载Cmakewgethttps://cmake.org/files/v3.0/cmake-3.0.0.tar.gz解压Cmaketarxvfcmake-3.0.0.tar.gz&&cdcmake-3.0.0/编译安装cmake./bootstrapgmakegmakeinstall查看编译后的cmake版本/usr/local/bin/cmake--version移除原来的cmake版本yumremovecmake-y新建软连接ln......
  • CentOS7更新yum源
    [1]首先备份mv/etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.backup[2]进入yum源配置文件所在文件夹cd/etc/yum.repos.d/[3]下载163的yum源配置文件,放入/etc/yum.repos.d/(操作前请做好相应备份)wgethttp://mirrors.163.com/.help/CentOS7-Base-163.......
  • Centos7安装高版本Cmake
    下载Cmakewgethttps://cmake.org/files/v3.6/cmake-3.6.2.tar.gz解压Cmaketarxvfcmake-3.6.2.tar.gz&&cdcmake-3.6.2/编译安装cmake./bootstrapgmakegmakeinstall查看编译后的cmake版本/usr/local/bin/cmake--version移除原来的cmake版本yumremovecmake-y新建软连接ln......
  • centos7 安装SSH
    1.安装OpenSSH服务(CentOS系统默认安装了openssh)yuminstall-yopenssh-server2.配置OpenSSH服务(默认的配置已可以正常工作)vim /etc/ssh/sshd_config常见的配置选项:ListenAddress192.168.0.222 设置服务监听的地址ListenAddress127.0.0.1 设置服务监听的地址PermitRootL......
  • CentOS7卸载Cmake
    Cmake安装好后会在安装目录生成install_manifest.txt里面有安装的所有东西的路径,删除它们即可......
  • CentOS7配置SFTP
    1、创建用户组groupaddsftp2、创建用户useradd-Gsftp-s/sbin/nologintest-s禁止用户ssh登陆 -G加入sftp用户组3、设置用户密码passwdtest4、修改配置文件vim/etc/ssh/sshd_config##下面这行注释掉#Subsystemsftp/usr/libexec/openssh/sftp-server##后面加入Subsy......
  • CentOS 8 安装 sonarqube 8.3.1
    安装SonarQube需要的包dnf-yinstalljava-11-openjdkpostgresql-serverpostgresqlpostgresql-contribunzip创建sonar用户SonarQube不能使用root用户启动,需创建普通用户useraddsonarpasswdsonar下载安装SonarQubewgethttps://binaries.sonarsource.com/Distribution/sonar......
  • IOS Swift WKWebView使用以及与JS交互
    一、SwiftWKWebView使用1、加载百度网站打开xcode,在最上方工具栏新建project注意要选Storyboard工程建好后 ViewController.swift 这个文件是编写主视图文件,改成下面importUIKitimportWebKitclassViewController:UIViewController,WKUIDelegate{varwebView:WKWe......
  • CentOS 7 安装 NVIDIA 显卡驱动
    SystemVersion:CentOS7.7.1908kernelVersion:3.10.0-1062.el7.x86_64条件禁止Nouveau安装kernel-devel或kernel-source、kernel-header;安装binutils,路径/usr/bin/ld;1.安装依赖yum-yinstallepel-releaseyum-yinstallgccbinutilswgetyum......
  • 1 redis介绍 、2 redis linux下安装 、3 redis启动方式、4 redis典型场景 、5 redis通
    目录1redis介绍2redislinux下安装3redis启动方式3.1最简启动3.2动态参数启动3.3配置文件启动3.4客户端连接命令4redis典型场景5redis通用命令6数据结构和内部编码7redis字符串类型1redis介绍#特性Redis特性(8个)#速度快:10wops(每秒10w读写),数据存在内存中,c语言实现......