LAMP server quick, secure and abbreviated install manual 0

0 Introduction

Caution: I didn’t consider strict security in this document. You should know much more about the OS on your server to maintain proper securities for publications to the worldwide web. So I will firmly recommend this server to be constructed here shall be used for your study on how to make LAMP(Linux-Apache-MySQL-Perl, PHP, Python) webserver. If you want to get further knowledge, visit related links suggested below. That would be a good help for you. Oh, for my financial reasons, I use just OSSs all the time.
In past days, I made an instruction to build up a LAMP server in a legacy way. Now, The Docker application becomes very popular. It is advantageous and powerful. So at this time, I have decided to use Docker.
However, one thing, Docker manipulation needs basic knowledge for each application(OS, Shell, Firewall, Security, Webserver, Script languages, Antivirus, and so on). To learn this knowledge, you would understand the legacy way of install. So in this textbook, I mentioned the legacy ways first. Then go to Docker way.

Note: Placeholders are shown as < >. you must replace it with your data. […] means key input.

#You need these;

VPS(Virtual Private Server) under such a provider as ‘’ and others.) or Virtual Machine such as Hyper-V on Windows10
SSH Client Software TeraTermPro(jp)-ssh client for Windows WinSCP & PuTTY -SCP client and ssh client
Web Browser
Note: Mouse does not possibly work on Google Chrome. You need a Firefox browser. e.g., a path at Windows
shell “C:\Program Files (x86)\Mozilla Firefox\firefox.exe”

You have several ways to prepare your host machine and OS.

<PLAN A VPS> VPS(KVM) minimum plan
Virtual 3 core cpu and 2GB memory vda120GBHDD+vdb80GBHDD(default)

Caution: It’s better KVM than LXC, OpenVZ.

<PLAN B Virtual Machine>
ex. Lenovo Yoga 920 with Windows10 Pro Memory 16GB+SSD 500GB
Virtual Machine(Hyper-V)
BIOS set to Inter virtualization technology ON.
Virtual max 8core, memory 1GB, virtual Storage 127GB(Custom)

<PLAN C Docker Machine>
<PLAN D AWS, the other cloud services>

This manual takes the plan A, then C. Let’s go!


How to use Metatrader4 on affordable VPS

For example, VPS(KVM) by


0  VPS contract and login
I made an MetaTrader4 platform on the virtual private server(VPS-KVM) provided by “”.
This server has such specs below;
-CPU: shared virtual Core2DuoT7700 2.4Ghz
-RENDERER: Gallium 0.4 on llvmpipe (LLVM 3.8, 128 bits)

You can jump to the “” web site, and make a contract of smallest size VPS(KVM) that has memory size 1GB.  Don’t select any bigger one.  You don’t need higher spec over 2GB memory for this aim, in this case, to install and run the MetaTrader4 and some related programs.
Then you can get “Login ID” and “Password” of your VPS, go to the login page “”, and start your control panel.
Click the VPS name field (for example “kvm00XXXXXX”).


1  Installation of Operating System and some others
Next, you have to install the Operating System, desktop manager, and WINE Windows(R) compatibility layer program.
I would recommend “lubuntu” the lighter version of “Ubuntu”.
The reasons are ;
– Lightweight action and less memory use
– Support the Ubuntu kernel and WINE package.
Well, Let’s start the installation processes.

1) First, you have to visit the “lubuntu” web site and download the latest “-.iso” image file. Do not download the Japanese localized version, since saving memory. In this case, you cannot use Japanese IME at your VPS.
2) Then, enter userID and password to open the control panel of your VPS,

2016-05-13 (7)
STEP1 Make SSH connect

3) The “-.iso” file previously downloaded must be inserted to the special “image” folder of the common server at ONAMAE.COM. You can use “WinSCP(SFTP software for Windows)“. If you are using the other Operating System, you can use your SFTP client suited your OS).
4) At your WinSCP, Select “New Site” > SFTP , and fill Hostname > User name > Password.

WinSCP login

And you have to hit the “Settings” button. You can find SSH > “Permission” at menu tree on the left, Select “Secret Key” from the file already downloaded. You will find a notification saying some cautions. You have to create and save a “private key” as .ppk format. After you saved that key, you should select again the saved key(-.ppk not -.key) and press the login button on the WinSCP.

key to PPK

5) After copying the iso image into the server, You have to go back to the server control panel. Click the server listing area “KVM/////”, press the “please select image” drop-box, scroll down , choose “[kvm///]lubuntu///]”, hit “insert” button, then click “restart” button.

Control panel load the iso data and prepare the install menu. Follow the instructions of the installer. Nothing will be bothering you during the installing process.
The installer shows a restart order on-screen. You have to remove force the iso image. After that, hit the “restart” button again.
If you complete the process, the lubuntu desktop will appear on-screen.  Resolution can be changed from menu > Preferences > Monitor Settings.
Are you ready?
So, Let’s go the next step.

2  OS initialization
Next, You would install WINE.
The site “” will help you well.
1) Login Control panel, and start server.
2) Start 32bit architecture
sudo dpkg –add-architecture i386
3) Add repository for wine
sudo add-apt-repository ppa:wine/wine-builds
4) Update for packages
sudo apt-get update
5) Install WINE developer version (latest 1.9)
sudo apt-get install –install-recommends winehq-devel

*Notice: Stable version 1.8 have some trouble with winhttp, so MetaTrader4 installer will lost network connectivity, and may cause of install failure(so-called “proxy problem”).
WINE installer help you when you need to install other necessary program. Please obey their suggestions.

6) Visit the MetaTrader4 download page (anywhere you like), download, and save the .exe file.
7) Start Filer, and open the metatrader.exe by Wine program loader. Install process will begin.

That’s all for installation. Try metatrader4 on your VPS.
If you have an original Expert Adviser or Indicator etc. already, it would be better to install SSH and FTP server on your VPS. Let’s try the final step.

3 Server settings for management
If you need to handle your VPS with remote, these applications below must be helpful to save your time.
1) OpenSSH
Sudo apt-get install openssh-serve
*It’s easy! However, it may cause a security problem, so you must install a firewall.
I recommend “WinSCP” as a client for Windows.

There is one difference between .iso loading process and after OS installed.
If you installed OS from your uploaded .iso file, you don’t have to hit the “Settings” button. You could find SSH > “Permission” at the menu tree on the left. However, You can connect by password, so you don’t need to download the “Secret Key”.

One caution is that password authentication includes security risks. So you must install Firewall on your server and close port, while you don’t handle remote file handling.

2) Vsftp
Sudo apt-get install vsftpd
*It also has a security risk, so you must install a firewall.
I recommend “TeraTerm” as a client for Windows.

3) Firewall GUI (*VERY IMPORTANT!)
sudo apt-get install gufw
* When you don’t need a remote filehandle, It would be better to set the firewall “on”.

That’s all from me.
If you need more information, please search for internet resources.