10s 内得到一个干净、开箱即用的 Linux 系统

安装

使用官方脚本安装我的服务器不行

官方脚本

mkdir instantbox && cd $_
bash <(curl -sSL https://raw.githubusercontent.com/instantbox/instantbox/master/init.sh)

下面是我的完整安装过程

mkdir /opt/instantbox
cd /opt/instantbox

1.脚本文件 (这个没用,只是官方脚本会下载这个文件)

vim init.sh

内容如下

#!/bin/sh
#
# Install script for instantbox
# Home Page: https://github.com/instantbox/instantbox
#
# Usage:
#  mkdir instantbox && cd $_
#  bash <(curl -sSL https://raw.githubusercontent.com/instantbox/instantbox/master/init.sh)"
#  docker-compose up -d
#

check_cmd() {
    command -v "$1" >/dev/null 2>&1
}

echo "Welcome to instantbox, please wait..."
echo ""

if check_cmd docker; then
    echo "docker is installed"
else
    echo "docker is not installed, please try again after it's installed"
    exit 1
fi

if check_cmd docker-compose; then
    echo "docker-compose is installed"
else
    curl -sSL https://raw.githubusercontent.com/docker/compose/master/script/run/run.sh > /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose || exit 1
fi

curl -sSLO https://raw.githubusercontent.com/instantbox/instantbox/master/docker-compose.yml

echo "Enter your IP (optional): "
read IP
echo "Choose a port (default: 8888): "
read PORT

[  -z "$IP" ] || sed -i -e "s/SERVERURL=$/SERVERURL=$IP/" docker-compose.yml
[  -z "$PORT" ] || sed -i -e "s/8888:80/$PORT:80/" docker-compose.yml

echo "You're all set! "
echo "Run 'docker-compose up -d' then go to http://${IP:-localhost}:${PORT:-8888} on your browser."

2.编写docker-conpose.yml

vim docker-conpose.yml

内容如下

version: '3'

services:
  server:
    image: instantbox/instantbox:latest
    container_name: instantbox_server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - SERVERURL=
    networks:
      - instantbox_net

  frontend:
    image: instantbox/instantbox-frontend:latest
    container_name: instantbox_frontend
    links:
      - server
    ports:
      - 8888:80
    networks:
      - instantbox_net

  cron:
    image: instantbox/cron:latest
    container_name: instantbox_cron
    links:
      - frontend
    environment:
      - CRON_STRINGS=* * * * * wget -qO /dev/null http://frontend/api/v2/superinspire/prune
    networks:
      - instantbox_net

networks:
  instantbox_net:

启动

docker compose up -d

使用

浏览器打开

http://192.168.168.111:8888/

1.首页

2.选择系统

3.使用

创建后直接可以使用

和一般的linux系统没有任何区别

相关推荐
Nerd Nirvana19 分钟前
软考—系统架构设计(案例 | 论文)
linux·系统架构·软件工程·软考·计算机基础
勤奋的凯尔森同学1 小时前
webmin配置终端显示样式,模仿UbuntuDesktop终端
linux·运维·服务器·ubuntu·webmin
技术小齐5 小时前
网络运维学习笔记 016网工初级(HCIA-Datacom与CCNA-EI)PPP点对点协议和PPPoE以太网上的点对点协议(此处只讲华为)
运维·网络·学习
ITPUB-微风6 小时前
Service Mesh在爱奇艺的落地实践:架构、运维与扩展
运维·架构·service_mesh
打不了嗝 ᥬ᭄6 小时前
Linux的权限
linux
落幕6 小时前
C语言-进程
linux·运维·服务器
深度Linux6 小时前
C++程序员内功修炼——Linux C/C++编程技术汇总
linux·项目实战·c/c++
chenbin5206 小时前
Jenkins 自动构建Job
运维·jenkins
java 凯6 小时前
Jenkins插件管理切换国内源地址
运维·jenkins
AI服务老曹6 小时前
运用先进的智能算法和优化模型,进行科学合理调度的智慧园区开源了
运维·人工智能·安全·开源·音视频