• 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 #开机启动并重启服务
  • 相关阅读:
    使用C#实现计划任务(corn job)
    python 修改xml文件
    redis安装
    Nginx的安装
    nginx配置
    用泛型减少重复代码,使代码更合理、更优雅
    Tomcat server.xml配置详解
    二维码生成
    轻量级的中文分词工具包
    HTML解析利器
  • 原文地址:https://www.cnblogs.com/yangyongxin/p/14921471.html
Copyright © 2020-2023  润新知