Install Mikrotik CHR on CentOS 7

Guide to installing Mikrotik CHR on CentOS 7. In this tutorial using Mikrotik CHR 6.48.7.


1. You must install CentOS 7 first.



2. Login SSH as root.



3. Start installing the required package:


yum install wget unzip -y
wget https://download.mikrotik.com/routeros/6.48.7/chr-6.48.7.img.zip -O chr.img.zip
unzip chr.img.zip
mount -o loop,offset=512 chr-6.48.7.img /mnt


4. Check /mnt if it is mounted correctly.


ls /mnt


5. If it's correct, we continue.


vi /mnt/rw/autorun.scr

Then fill it in with this:


$ ADDRESS=`ip addr show eth0 | grep global | cut -d' ' -f 6 | head -n 1` && \
GATEWAY=`ip route list | grep default | cut -d' ' -f 3` && \
echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1]
/ip route add gateway=$GATEWAY
/ip dns set servers=8.8.8.8,1.1.1.1"


6. Make sure this autorun.scr is correct as we have typed it before.


cat /mnt/rw/autorun.scr


7. The final process is triger, write to disk, and reboot.


echo u > /proc/sysrq-trigger
dd if=chr-6.48.7.img bs=1024 of=/dev/vda
reboot

8. For the final verification step, you can download WInBox on the official Mikrotik page:  https://mikrotik.com/download


Then try to connect with your server IP.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.