zoukankan      html  css  js  c++  java
  • contos7 安装Apache以及配置vue项目

    安装Apache

    yum install httpd -y

    查看Apache 运行状态

    systemctl status httpd.service

    启动Apache 服务

    systemctl start httpd.service

    重启Apache

    systemctl restart httpd.service

    查看防火墙状态

    firewall-cmd --state

    查看防火墙所有开放的端口

    firewall-cmd --zone=public --list-ports

    开放和关闭端口

    firewall-cmd --zone=public --add-port=5672/tcp --permanent # 开放5672端口
    firewall-cmd --zone=public --remove-port=5672/tcp --permanent #关闭5672端口
    firewall-cmd --reload # 配置立即生效

    关闭防火墙

    systemctl stop firewalld.service
    systemctl disable firewalld  #禁用防火墙

    查看监听的端口

    netstat -lnpt

     检查端口被哪个进程占用

    netstat -lnpt |grep 1003

    查看进程的详细信息

    ps 1003

     中止进程

    kill -9 1003

    Apache 配置文件默认地址是:/etc/httpd/conf/httpd.conf

    vue 项目上传地址是:/var/www/html

    修改项目文件访问权限

    cd /var/www/html
    chmod -R 777 html

    重启httpd

    systemctl restart httpd.service #重启
    systemctl enable httpd.service #开机启动并重启服务
  • 相关阅读:
    Java 多线程概述
    Java 线程的创建和启动
    状态模式
    Spring 依赖注入
    Spring IOC
    在JavaEE中使用Mybatis框架
    Active Reports 补空白行
    SpreadForWin 清空Sheet
    日期格式转换
    Select Case 的实现
  • 原文地址:https://www.cnblogs.com/yangyongxin/p/14921471.html
Copyright © 2011-2022 走看看