n today’s tutorial, I would like to show how to install Metatrader 4 or Metatrader 5 for Debian Linux distribution. The license fees for Windows Server are more than high and this can be the way how to save money for the VPS or physical server operating system.
Considering that some unexpected installation issues may occur during the installation or when running the Metatrader 4/5 process alone, this article is more considered for advanced users.
So let´s start. What are we going to need?
- A computer with installed Debian Jessie distribution
- MT4 installation package, which you can download from our partner – Purple Trading
Now let’s start with the Wine installation:
1. In order to avoid writing sudo with every command, switch to root user with the command and insert password.
2. First we allow the installation of the 32-bit packages
dpkg –add-architecture i386
3. Add a key for wine repository:
wget -nc https://dl.winehq.org/wine-builds/Release.key
apt-key add Release.key
4. Add this repository line to the file /etc/apt/source.list file
deb https://dl.winehq.org/wine-builds/debian/ jessie main
5. Install package support from https using the command:
apt-get install apt-transport-https
6. Then update the list of packages from the repository using the run command:
7. Then install Wine using the command:
apt-get install –install-recommends winehq-stable
8. After Wine is installed, it is necessary to configure the wine and run it with the command:
after running this command, the pop up window will appear with the message that there are missing additional packages, that has to be installed, so click to download and install them.
9. When you start a winecfg, you need to set the emulation for Windows 7 (check the screen bellow):
We can now install Metatrader 4
1. Run the Metatrader 4 installation package and change the installation folder
2. Run Metatrader 4 and enter your login details
If we want to install MT5, we will use the same procedure. Metatrader 4 runs on Linux directly in portable mode, but the MT4 data are in a different location than in Windows.
!!! ATTENTION !!! Metatrader 4 data with strategies and indicators can be found in the following folder:
Note at the end
I wanted to know how the MT4 on Linux is demanding CPU vise, so I made an experiment. I ran the same amount of MT4 instances on Linux and Windows. My measurements were clear, the Windows emulation is worth some HW costs. On Linux, the CPU usage was roughly twice as on Windows.