flyzy博客
分享便宜VPS与网络优惠
搬瓦工

群晖Virtual Machine Manager安装RoutesrOS

主要思路:VMM安装CentOS7后,dd RouterOS

个人操作,略绕,介意的可以直接centos7 –> ros:

1. 群晖安装Virtual Machine Manager.
2. Ubuntu官网下载完整版ISO镜像Ubuntu18 server //
    安装完成后,ssh登录;如果不能连接,可以vnc手动安装openssh server,重启后连接ssh //
    dd centos7 //

    安装好linux建议先修改为国内dns echo nameserver 223.5.5.5 > /etc/resolv.conf && echo nameserver 119.29.2复制代码
3. CentOS7上dd RouterOS
    脚本下载后,解压扔到root下,给予0755权限后运行即可
wget https://www.inkscloud.com/wp-content/uploads/2021/07/1627246350-7e08a36aac8e952.zip unzip 1627246350-7e08a36aac8e952.zip chmod +x RouterOS.s && ./RouterOS.sh 或 [code] #!/bin/bash # VPS2RouterOS # https://github.com/Jamesits/vps2routeros # This script will cause permanent data loss # Please read the documentation prior to running this # You have been warned # ======================= please change these ================================= # your network interface to internet # this is used to auto configure IPv4 after reboot # (this may not work for every device) # eth0 for most devices, ens3 for VULTR # you can use `ip addr` or `ifconfig` to find out this # default: the interface on the default route MAIN_INTERFACE=$(ip route list | grep default | cut -d’ ‘ -f 5) # HDD device (not partition) # May not be compatible with SCSI drives; see official document of RouterOS CHR # you can use `lsblk` to find out this # default: the disk with a partition mounted to `/` DISK=$(mount | grep ‘ / ‘ | cut -d’ ‘ -f1 | sed ‘s/[0-9]*$//g’) # get IPv4 address in IP-CIDR format # do not modify unless you know what you are doing ADDRESS=$(ip addr show $MAIN_INTERFACE | grep global | cut -d’ ‘ -f 6 | head -n 1) # get gateway IP # do not modify unless you know what you are doing GATEWAY=$(ip route list | grep default | cut -d’ ‘ -f 3) # URL to RouterOS CHR ROUTEROS_URL=https://download.mikrotik.com/routeros/6.48.1/chr-6.48.1.img.zip # Note: you can customize commands to be executed when RouterOS initializes. # Search `Auto configure script` below # do not modify that unless you know what you are doing # ======================= no need to modify below ============================ set -euo pipefail # check if this script is running under root if [[ $EUID -ne 0 ]]; then    echo “This script must be run as root” 1>&2    exit 1 fi # https://stackoverflow.com/a/3232082/2646069 confirm() {     # call with a prompt string or use a default     read -r -p “${1:-Are you sure? [y/N]} ” response     case “$response” in         [yY][eE][sS]|[yY])             true             ;;         *)             false             ;;     esac } echo -e “Please confirm the settings:” echo -e “Installation destination: ${DISK}” echo -e “Network information:” echo -e “\tinterface: ${MAIN_INTERFACE}” echo -e “\tIPv4 address: ${ADDRESS}” echo -e “\tIPv4 gateway: ${GATEWAY}” echo -e “\nIf you continue, your disk will be formatted and no data will be preserved.” confirm || exit -1 echo “installing packages” yum -y install wget echo “download image” wget ${ROUTEROS_URL} -O chr.img.zip echo “unzip image” gunzip -c chr.img.zip > chr.img echo “mount image” mount -o loop,offset=512 chr.img /mnt echo “Get address and gateway and assign variable” mkdir -p /mnt/rw \echo “/ip address add address=${ADDRESS} interface=[/interface ethernet find where name=ether1] /ip route add gateway=${GATEWAY} ” > /mnt/rw/autorun.scr echo “Unmount the image” umount /mnt echo “Your old OS is being wiped while running, good luck” echo “If the device stopped responding for more than 30 minutes, please issue a reboot manually” sleep 5 echo “write disk” echo u > /proc/sysrq-trigger echo “sync disk” dd if=chr.img bs=1024 of=${DISK} echo “wait a while” sleep 5 || echo “please wait 5 seconds and execute\n\techo b > /proc/sysrq-trigger\nmanually, or hard reset device” echo “rebooting” reboot 复制代码

4.winBox搜索局域网找到RouterOS,点击connet连接配置

以上全为借鉴,无任何原创
   https://post.smzdm.com/p/a5dn78pl
   https://www.right.com.cn/forum/forum-72-1.html
   https://www.inkscloud.com/archives/406
   https://www.inkscloud.com/wp-content/uploads/2021/07/1627246350-7e08a36aac8e952.zip[/code]

江西省网友说:ubuntu DD centos
centos DD ros
我是真不会啊。。我问下。那为啥不直接装centos DD Ros呢?

浙江省网友说:太绕了,没有层次

首先应该是pve
然后才应该是群晖主nas
routeos主软路由。

在nas中装软路由不伦不类

福建省网友说:告诉我,为什么要搞个垃圾pve?
服务器装windows不香吗?

台湾省网友说:那你仔细看下第二句话啊
我VMM常备装ubuntu,debian,;但是centos最烂的系统,如果没有必要,当然不安装

赞(0) 打赏
关注我们
未经允许不得转载:flyzy博客 » 群晖Virtual Machine Manager安装RoutesrOS
分享到: 更多 (0)

这是一种鼓励

支付宝扫一扫打赏

微信扫一扫打赏