Git Product home page Git Product logo

auto-ddns's Introduction

auto-ddns

项目介绍

阿里域名IP动态绑定
该项目帮助家用服务器无固定IP的同学,通过固定域名可以访问到自己家的服务器
项目执行后会在本地存储一个IP文件,下次执行时会比对当前IP跟历史IP是否一致,如果IP发生改变则自动将域名绑定设置未新的IP
生效时间受阿里云域名解析影响,可能存在一定延迟

前提

执行绑定的二级域名必须先在阿里云中配置,如未配置不会主动新增二级域名

项目打包运行

mvn package进行打包

项目部署

创建目录

mkdir /root/auto-ddns

拷贝文件

将lib目录和auto-ddns.jar文件拷贝到/root/auto-ddns目录下
将ali.properties,domains.properties,startup.sh文件也放置auto-ddns目录下
修改ali.properties 将access_key_id,access_key_secret更改为自己阿里云的密钥对
修改domains.properties将域名和前缀修改为自己的域名、前缀 chmod +X startup.sh 给startup.sh文件赋权

单次执行

cd /root/auto-ddns 进入目录
./startup.sh 运行即可

定时执行(centos7)

  • 配置定时器
    • crontab -e
    • 增加 */5 * * * * /root/auto-ddns/startup.sh
  • 配置完成后系统每5分钟调度执行一次auto-ddns

auto-ddns's People

Contributors

mfish-qf avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.