zoukankan      html  css  js  c++  java
  • 脚本安装halo

    1. 安装halo

    #!/bin/bash
    
    cd /opt && wget http://172.27.16.133:8090/halo.tar.gz
    tar xf halo.tar.gz -C /opt
    ll /root/.halo/application.yam || curl -o ~/.halo/application.yaml --create-dirs https://dl.halo.run/config/application-template.yaml
    #注释H2 DB
    sed -i '10,14s/^/#/' /root/.halo/application.yaml
    #修改mysql db配置
    sed '17,20s/^#//' /root/.halo/application.yaml
    sed -i '18s/127.0.0.1/172.27.16.38/' /root/.halo/application.yaml
    sed -i '20s/password:.*/password: 0N9LZr3ksu/' /root/.halo/application.yaml
    #创建halo数据库
    mysql -uroot -p0N9LZr3ksu -h172.27.16.38 -e "create database halodb character set utf8mb4 collate utf8mb4_bin;"
    #后台运行halo
    cd /opt/halo && nohup java -jar halo-1.4.0.jar > log.file  2>&1 &

    2. 停止halo运行

    ps -ef | grep halo | grep -v grep | awk '{print $2}' | xargs kill
  • 相关阅读:
    laravel5.2总结--blade模板
    laravel5.2总结--响应
    laravel5.2总结--请求
    git总结
    laravel5.2总结--路由
    Get与Post的一些总结
    python库安装
    iptables的recent模块
    iptables
    dmucs与distcc
  • 原文地址:https://www.cnblogs.com/jin-yuana/p/14101155.html
Copyright © 2011-2022 走看看