понедельник, 18 марта 2019 г.

UniFi Controller Setup for Ubiquiti Access Points

How to set up a UniFi controller and add WiFi Access Points to it.
Controller is available for Windows, as well as for Linux.

Install UniFi controller


Download and install the controller for you OS
https://www.ui.com/download/unifi

Setup you Access Point

Before you start the access point, you have to setup special DHCP settings on your router or DHCP server you have. You´ll need the MAC-address of your Access Point. On the Acccess Point's back you'll find smth linke 1709KF09FC27CEF1E-IZSvX6 - the MAC part is: F09F C27C EF1E
Convert it into Cisco format:
just add 01 + MAC (and place the dots in the proper positions) - 01f0.9fc2.7cef.ef

Cisco DHCP setup for your Access Points.
ip dhcp pool UniFi411
   host 192.168.4.11 255.255.255.0 - IP Адрес для ваше точки доступа
   client-identifier 01f0.9fc2.7cef.ef   - MAC точки доступа
   client-name UniFi411                    - Имя, на ваше усмотрение
   option 43 hex 0104.c0a8.033a     - Адрес UniFi контроллера

Convert the IP into HEX format (for 43 dhcp option):

After the Access Point will appear in your UniFi controller - click Adopt.

Reset to Factory Defaults

1) Connecto over SSH to the Access Point and execute:
     syswrapper.sh restore-default
OR
2) Press Reset button on AP's back more than 5 sec. Sometimes you need firstly shutdown the access point, press Reset, turn on the AP back, wait more than 5 seconds, then release Reset button.

воскресенье, 10 марта 2019 г.

Install Docker on Ubuntu/Debian

Installation steps Ubuntu/Debian
#apt-get install apt-transport-https ca=certificates curl software-properties-common

Configure repository
#curl -fsSL https://download.docker./com/linux/ubuntu/gpg | sudo apt-key add -

#sudo add-apt-repository "deb {arch+amd64} https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

#apt-get update

Install Docker
#apt-get install docker-ce

пятница, 8 марта 2019 г.

Get a Dockerfile from an Image

docker history --no-trunc [IMAGE]| tac | tr -s ' ' | cut -d " " -f 5- | sed 's,^/bin/sh -c #(nop) ,,g' | sed 's,^/bin/sh -c,RUN,g' | sed 's, && ,\n  & ,g' | sed 's,\s*[0-9]*[\.]*[0-9]*[kMG]*B\s*$,,g' | head -n -1

воскресенье, 3 марта 2019 г.

Install Docker Compose

yum install epel-release
yum -y install python-pip
pip install --upgrade-pip
pip install --upgrade pip
pip install docker-compose