xiaohei417 / ZDHsys

新手小白编写的,基于golang和saltstack实现自动安装操作系统的平台

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZDHsys

Platform for automatic installation of operating system based on golang and saltstack

The main implementation of binding MAC address, independent installation of the operating system, change the host name, IP address

The project is still being updated...

Installation

Installing golang(linux)

  • Download address:https://golang.google.cn/dl/

  • package :go1.12.6.linux-amd64.tar.gz

  • uncompress

    # tar -C /usr/local/ -zxf go1.11.2.linux-amd64.tar.gz
  • Setting environment variables

    # echo export PATH=$PATH:/usr/local/go/bin/ >> /etc/profile
    # source /etc/profile
    # go env\

Installing beego

# yum install -y git
# go get github.com/astaxie/beego
# go get github.com/beego/bee
# go get github.com/astaxie/beego/orm
# echo export PATH=$PATH:/root/go/bin >> /etc/profile
# source /etc/profile
# bee

Installing other packages

  • Json parsing library
  • mysql driver
  • call python for golang
# go get github.com/bitly/go-simplejson
# go get github.com/go-sql-driver/mysql
# yum install -y python-devel
# go get github.com/sbinet/go-python
# mkdir -p /root/go/src/golang.org/x
# cd /root/go/src/golang.org/x
# git clone https://github.com/golang/crypto.git

Installing mysql

  • download:mysql

  • create a remote login user

    mysql> grant all on *.* to "root"@"192.168.100.111" identified by "WWW.1.com";
    mysql> flush privileges;
  • create database

    mysql> create database test charset=utf8;

Installing cobbler

  • slightly

Installing ZDHsys

  • attention:The path of ZDHsys is /root/go/src/ZDHsys

  • run the script

    bash /root/go/src/ZDHsys/setup.sh
  • register and login

    注册

    登陆

  • create server(Bind system to MAC address)

    录入主机

    mac

    sss

  • then a system will be create in the cobbler

About

新手小白编写的,基于golang和saltstack实现自动安装操作系统的平台


Languages

Language:CSS 35.7%Language:JavaScript 24.9%Language:Go 19.2%Language:Smarty 9.1%Language:HTML 8.7%Language:Shell 2.1%Language:Python 0.5%