opened image

    RouterOS is an operating system for routers of the MikroTik family. RouterOS can be installed on a virtual or dedicated server running Linux. A regular VPS/VDS with minimal resources is enough. In this article, we will cover installing RouterOS on CentOS7.
    Important note: after installing RouterOS, all data on the server will be deleted. For this reason, we recommend installing RouterOS on a server that does not have important data.

    So let's get started.

    1. Connect to the server via SSH (how to do it)

    2. Go to the official Mikrotik website to the Software section ( Let's install the version of the Stable distribution, although you can choose Long-term. Next, you need to open Cloud Hosted Router and copy the link to download the Raw image (Raw disk image).

    3. In the server console, run the command to download the Raw image to the server


    4. Install the unzip utility on the server by running the command:

    yum install unzip

    and unzip the installation image:


    Note: The file name may be different. To check the name of the image file, run the command in the console 
    ls -la
    and you will see approximately such a list, which will contain the necessary file

    5. Find out the name of the server disk on which we will install RouterOS. To do this, run the command:

    fdisk -l

    The output of the command will be something like this:

    6. Run the command to write the previously unzipped chr-7.5.img installation image to the /dev/vda disk

    dd if=chr-7.5.img of=/dev/vda bs=4M oflag=sync

    7. Let's restart the server in a not quite usual way (which is sometimes used, for example, when the disk is unavailable). To do this, run the commands to the server console one by one:

    echo 1 > /proc/sys/kernel/sysrq
    echo b > /proc/sysrq-trigger

    After that, the server will no longer be accessible via SSH.

    8. In order to be able to connect to RouterOS, for example, using WinBox, SSH or web access, you need to configure the network interface on the server.
    To do this, connect to the server via VNC: go to your Personal Account ( - Services - Virtual servers - select a server - Go - you will be taken to the vmmanager panel - Management - Virtual machines - select a server - click VNC button.

    In the login prompt, enter


    and when prompted for a password, just press Enter.
    After that, RouterOS will prompt you to familiarize yourself with the license and request a password change. Enter a new password and confirm it.

    The IP address, mask and gateway of the server can be found in the vmmanager server control panel. To do this, highlight the server and click the IP Addresses button.

    After that, in the RouterOS console, enter the command to configure the IP address:

    ip address add interface=ether1

    where is the IP address of the server (from the vmmanager panel)

    and the gateway configuration command

    ip route add gateway=yyy.yyy.yyy.yyy

    where yyy.yyy.yyy.yyy is the server gateway (from the vmmanager panel)

    9. To access the RouterOS settings, follow the link in your browser


    where is the IP address of your server.