2016의 게시물 표시

Docker Usage

이미지 1. 베이스 이미지 2. 도커 이미지 컨테이너 : 이미지가 실행된 상태 docker images docker images [image name] docker images ubunto docker ps docker ps -a https://hub.docker.com/ docker search [image name] docker search ubuntu docker pull [image-name]:[tag] docker pull ubuntu:latest docker run [image-name] : 이미지로 컨테이너 생성 docker run -i -t --name my-container ubunto /bin/bash docker start [container-name] : 컨테이너 시작 docker attach [container-name] : 실행중인 컨테이너에 접속 Ctrl+p, Ctrl+q : 컨테이너 접속 해제 (컨테이너는 살아있음) docker exec [container-name] [command] docker restart [container-name] : 컨테이너 재시작 docker stop [container-name] : 컨테이너 정지 docker rm [conatainer-name] : 컨테이너 제거 docker rmi [image-name]:[tag] : 이미지 제거

Ubuntu 16.04 + Docker Installation, Upgrade, Remove

https://docs.docker.com/engine/installation/linux/ubuntulinux/ Ubuntu Xenial 16.04 (LTS) 커널 버전 확인 uname -r apt가 https에서도 동작하도록 인증서 설치 sudo apt-get update sudo apt-get install apt-transport-https ca-certificates GPG키 추가 sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D docker.list 생성 혹은 수정 /etc/apt/sources.list.d/docker.list 아래 entry를 docker.list 파일에 추가 deb https://apt.dockerproject.org/repo ubuntu-xenial main APT 업데이트 sudo apt-get update lxc-docker(옛날 저장소) 제거 sudo apt-get purge lxc-docker APT가 제대로된 저장소를 바라보고 있는 지 확인 apt-cache policy docker-engine APT 업데이트 sudo apt-get update linux-image-extra 패키지 설치 sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtua APT 업데이트 sudo apt-get update Docker 설치 sudo apt-get install docker-engine Docker 서비스 시작 sudo service docker start 테스트로 hello-world 이미지 돌려보기 sudo docker run hello-world 시스템 서비스로 등록 sudo systemctl ena

Ubuntu Java Installation

apt-get --installed list sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer sudo update-alternatives --config java sudo gedit /etc/environment [sudo nano /etc/environment] [sudo vi /etc/environment] JAVA_HOME="/usr/lib/jvm/java-8-oracle" source /etc/environment

Android Wireless Debug

Wireless usage adb is usually used over USB. However, it is also possible to use over Wi-Fi, as described here. Connect your Android device and adb host computer to a common Wi-Fi network accessible to both. We have found that not all access points are suitable; you may need to use an access point whose firewall is configured properly to support adb. Note:  If you are attempting to connect to a Wear device, force it to connect to Wi-Fi by shutting off Bluetooth on the phone connected to it. Connect the device to the host computer with a USB cable. Set the target device to listen for a TCP/IP connection on port 5555. $ adb tcpip 5555 Disconnect the USB cable from the target device. Find the IP address of the Android device. For example, on a Nexus device, you can find the IP address at  Settings  > About tablet  (or  About phone ) >  Status  >  IP address . Or, on an Android Wear device, you can find the IP address at Settings  >  Wi-Fi Settings  >  Advance

Brew

Tip #1: Update Your Homebrew You want to always ensure that you’re running the newest version of Homebrew and that it has the newest list of formulae available from the main repository. This is done with the “brew update” command: 1 2 $ brew update Already up - to - date . Tip #2: Know What You Have Installed The problem with a package management tool is that it can cause app-creep, as new and wonderful software gets downloaded to your Mac, and then never gets used again. So, every once in a while you should type “brew list,” which will show everything installed on your machine with Homebrew: 1 2 $ brew list lynx openssl wget As usual, you can then use “brew info [package]” to get more info on an individual package: 1 $ brew info wget Tip #3: Uninstall Unused Software If you find software that’s outdated, it’s easy to get rid of it. You just “brew uninstall [package]” and the software disappears: 1