SIGN IN / UP
    opened image

    RouterOS is the operating system for MikroTik router family. RouterOS can be installed on a virtual or dedicated server with Linux OS. A regular VPS/VDS with minimal resources is sufficient. In this article, we will look at 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 contain important data.

    So, let's get started.

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

    2. Go to the Software section on the official Mikrotik website (https://mikrotik.com/download). We will install the Stable distribution version, although you can choose Long-term as well. Next, you need to open Cloud Hosted Router and copy the link to download the Raw disk image.


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

     wget https://download.mikrotik.com/routeros/7.5/chr-7.5.img.zip

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

    yum install unzip

    and unzip the installation image:

    unzip chr-7.5.img.zip

    Note: the file name chr-7.5.img.zip may be different. To check the image file name, execute the command in the console
    ls -la
    and you will see a list approximately like this, which will include the required file

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

    fdisk -l

    The command output will be approximately like this:

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

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

    7. Restart the server in an unusual way (which is sometimes used, for example, when the disk is unavailable). To do this, execute the following commands in the server console one by one:

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

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

    8. 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 the Personal Account (https://cp.zomro.com/billmgr) - Services - Virtual Servers - select the server - Go to - you will enter the vmmanager panel - Management - Virtual Machines - select the server - click the VNC button.

    In the login prompt line, enter

    admin

    and when prompted for a password, just press Enter.
    After this, RouterOS will offer to review the license and request a password change. Enter a new password and confirm it.

    You can find out the server's IP address, mask, and gateway in the vmmanager server control panel. To do this, select the server and click the IP addresses button.

    After this, enter the IP address configuration command in the RouterOS console:

    ip address add address=xxx.xxx.xxx.xxx/24 interface=ether1

    where xxx.xxx.xxx.xxx is the server's IP address (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's gateway (from the vmmanager panel)

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

    http://xxx.xxx.xxx.xxx/webfig/

    where xxx.xxx.xxx.xxx is your server's IP address.