Sunday, December 20, 2015

Tips Pemasangan Docker Bagi Linux Ubuntu Server

Tips Pemasangan Docker Bagi Linux Ubuntu Server

1) Pemasangan Linux Ubuntu Server. Bagi nota ini adalah versi Linux Ubuntu Server 14.04 LTS


Pastikan sewaktu pemasangan anda, pada langkah kedua selepas pemilihan bahasa, tekan butang F4. Ini akan memberikan anda pilihan Mode pemasangan.

Buat pilihan minimal system jika anda memasang pada perkakasan dan minimal virtual machine jika anda memasang dalam Virtual Machine (VM) seperti Vmware, VirtualBox atau Proxmox.



2) Pemasangan yang asas untuk keselamatan. Saya memasang Fail2ban dan UFW untuk perlindungan awal.

apt-get install fail2ban ufw

Bagi konfigurasi ufw

ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
ufw status
ufw default deny

Pada arahan ufw status pastikan periksa dahulu port SSH (22/tcp) telah open. Fail2ban akan lindungi bruteforce. Adalah penting untuk lindungi dengan password yang keras dan username yang susah teka.

Jangan lupa dalam pemasangan nanti untuk allow ports yang berkaitan dengan Docker dan Fowardered. Baca manual secara keseluruhan.


3) Pemasangan Docker

Permasangan yang sesuai adalah dengan mengikut nota yang disediakan oleh pihak docker sendiri di


Perkara penting sebelum memasang Docker. Kemaskini Kernel dengan apt-get dist-upgrade dan reboot server.

4) Saya menggunakan unbound bagi tujuan cache DNS pada host server. Pastikan DNS konfigurasinya telah dibuat. Rujuk kepada /etc/resolv.conf

apt-get install unbound

Seterusnya Docker Rancher.


Harisfazillah Jamel / LinuxMalaysia

Lean & Mean

20 Dis 2015

ps -ef | grep docker

Thursday, February 20, 2014

Tunnel To a Server With A LAN only IP From a Server with Public Internet IP

Tunnel To a Server With A LAN only IP From a Server with Public Internet IP

I'm assuming you know OpenSSH and terminal commands.

We have a server called Server A thats can be remote SSH from public Internet. We have a Server B, with LAN only IP with same segment as Server A. Server B can only can be access from Server A. With Only port SSH open for both servers. SSH port monitored by using fail2ban.

We want to access a Postgresql Database in Server B by using of PgAdmin and I'm using Ubuntu desktop. From command line terminal by using this command, I'm accessing Server A.

Step 1 :-
ssh -L 35432:localhost:35432 [email protected]

Step 2 :-

Successfully access server A, I will SSH to Server B with this command.

ssh -L 35432:localhost:5432 [email protected]

Step 3 :-

And then using Pgadmin to access localhost port 35432 to access the Postgresql Server B.

For more info

http://ubuntuguide.org/wiki/Using_SSH_to_Port_Forward

Using Windows Desktop? You may use putty to tunnel to server A for step 1.

https://code.google.com/p/putty-tunnel-manager/

Perl Locale Failed Warning Messages For Ubuntu

New installation for Ubuntu 10.04 and 12.04 most of the time, I will get this warning messages. Its only a warning will not impact the command executed using the perl.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_PAPER = "ms_MY",
    LC_ADDRESS = "ms_MY",
    LC_MONETARY = "ms_MY",
    LC_NUMERIC = "ms_MY",
    LC_TELEPHONE = "ms_MY",
    LC_IDENTIFICATION = "ms_MY",
    LC_MEASUREMENT = "ms_MY",
    LC_TIME = "ms_MY",
    LC_NAME = "ms_MY",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

To fix this issue. Used this command. Im from Malaysia using locale ms_MY, please change your setting locale to yours. Your command messages may different from mine. I'm generating for ms_MY and en_US.UTF8.

$ sudo locale-gen ms_MY
Generating locales...
  ms_MY.ISO-8859-1... done
Generation complete.

$ sudo locale-gen en_US.UTF-8
Generating locales...
  en_US.UTF-8... done
Generation complete.

$ sudo dpkg-reconfigure locales
Generating locales...
  en_US.UTF-8... up-to-date
  ms_MY.ISO-8859-1... done
Generation complete.

Ubuntu Locale
https://help.ubuntu.com/community/Locale

Package for Ubuntu is language-pack-ms









Today Notes Blog About Linux Open Source Computer Internet

comments powered by Disqus

Popular Posts