글

groupadd

그룹 추가 - groupadd groupadd 명령어로 생성되는 그룹은 특별한 옵션이 주어지지 않는 한 GID는 499 까지는 할당되지 않는다. 즉, GID 가 500 이상인 그룹들 가운데 가장 낮은 GID 번호로 그룹을 생성하게 된다( -r 옵션 사용시에는 예외). groupadd teamzezz 아무 옵션없이 새로운 그룹을 생성하면 기존에 있던 그룹의 마지막 번호 다음번호를 GID 로 할당하여 teamzezz 라는 그룹이 생성된다. grep teamzezz /etc/group teamzezz:x: 501 : 특정 GID를 할당하여 그룹을 생성 groupadd -g 1000 admin 이후부터 추가되는 그룹은 GID 가 1001 로 지정된다. 항상 가장 마지막 GID 다음 번호로 할당됨을 유념하자. tail -f /etc/group ... (중략) nestgoer:x: 500 : teamzezz:x: 501 : admin:x: 1000 : 시스템용 그룹 (GID 499 이하)을 생성 groupadd -r sysadmin 위와 같이 -r 옵션을 사용하면 0 번 부터 499 까지의 할당되어 있지 않은 GID 중 가장 높은 번호를 할당해 준다. 그룹 삭제 - groupdel groupdel sysadmin 그룹 확인 - groups groups nestgoer wheel 그룹 관리 - gpasswd 리눅스 시스템을 사용하는 주체는 두가지로 볼 수 있는데 그것은 사용자이거나 그룹이다. 특정 그룹에 사용자를 추가하거나 제거하고 특정 그룹에 패스워드를 설정하는 작업은 gpasswd를 이용한다. gpasswd 옵션 -a user : 특정 그룹에 새로운 그룹멤버를 추가함. -d user : 특정 그룹에서 지정한 그룹멤버를 제거함. -r : 특정 그룹의 패스워드를 제거함 -R : 특정 그룹에 접근을 제한함 -A user, ... : 특정 그룹의 그룹관리자를 설정함 -M...

MySQL root password reset

1. Stop mysql : systemctl stop mysqld 2. Set the mySQL environment option systemctl set-environment MYSQLD_OPTS = "--skip-grant-tables" 3. Start mysql usig the options you just set systemctl start mysqld 4. Login as root mysql - u root 5. Update the root user password with these mysql commands mysql > UPDATE mysql . user SET authentication_string = PASSWORD ( 'MyNewPassword' ) -> WHERE User = 'root' AND Host = 'localhost' ; mysql > FLUSH PRIVILEGES ; mysql > quit 6. Stop mysql systemctl stop mysqld 7. Unset the mySQL envitroment option so it starts normally next time systemctl unset-environment MYSQLD_OPTS 8. Start mysql normally : systemctl start mysqld Try to login using your new password : 7. mysql - u root - p

SSL Certification

Generating a Private Key openssl genrsa -des3 -out xxx.key 2048 openssl rsa -noout -text -in xxx.key Generating a CSR openssl req -new -key xxx.key -out xxx.csr openssl req -noout -text -in xxx.csr

Python Virtual Environment

Usage usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear]             [--upgrade] [--without-pip] [--prompt PROMPT]             ENV_DIR [ENV_DIR ...] positional arguments:   ENV_DIR               A directory to create the environment in. optional arguments:   -h, --help            show this help message and exit   --system-site-packages                         Give the virtual environment access to the system                         site-packages dir.   --symlinks            Try to use symlinks rather than copies, when symlinks                         are not the default for the platform.   --c...

한글 단어 유사도 측정

한글 단어 유사도 측정 음절을 음소로 나눠서 비교 (ex: 정승현 -> ㅈㅓㅇㅅㅡㅇㅎㅕㄴ) 초성에는 가산점 (ex: 정승현 -> ㅈㅓ@ㅇㅅ@ㅡㅇㅎ@ㅕㄴ) (참고 자료:  한글_edit_distance.pd ) 한글 문장 형태소 기반 비교 형태소 기반은 큰 의미가 없음. 일단 딜이나 옵션의 제목은 그 특성상 명사 외의 형태소를 쓰는 경우가 드물기 때문. 옴파로스 겨울 신상 더마시오 옛날 통닭 브랜드나 상품의 특징을 나타내는 고유 명사가 아닌 이상 정확도가 매우 떨어짐. 위의 예에서 "겨울", "신상", "옛날", "통닭" 등의 단어는 큰 의미가 없음. "옴파로스", "더마시오"와 같은 단어가 결정적인 단어임. 하지만 일반 명사가 필요 없는 것은 아님. "나이키 운동화"와 "나이키 패딩"은 구분해야하기 때문. 비교 수단 상품코드  (Optional) 제목에서 찾아야함. MTM-N포인트 올리브:2XL MTM-69 블랙:2XL BTS3211M_RED-100 J1000MREBKS-100 10030BNAS-105 Z34193-95 TR01BKP-110 K41-O-722_베이지/M PK-301CC (Black) 424TF-L424-ST 245 SHD-FR130BT 644869-601(GS) 16. [MEN] 브이넥 스웨터 #42330186 / 그레이 헤더 S 선택32)캐시어하이넥N669 / 차콜(Charcoal) 선택 13 폴로 걸즈 럭비 드레스 / 13-1 Fuchsia-5 선택 7 타미 힐피거 여성 스웨터 / 7-2 Heather Grey-M 선택2. 3-5세/주황-M1411002 선택6) 얼스프렌들리 유아섬유세제 1,500ml 선택4)[오후출발]4박5일-아동399000원 / 03월 03일 화요일 02_밀키드레스 필굿 코튼 15sh...

Tensorflow RC version installation on Windows 64

pip3 install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.1.0rc0-cp35-cp35m-win_amd64.whl

Docker for Mac Remote API with Socat

cd /Library/LaunchDaemons sudo vi kr.co.devlog.socat.docker.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0">     <dict>         <key>Label</key>         <string>kr.co.devlog.socat.docker</string>         <key>Disabled</key>         <false/>         <key>RunAtLoad</key>         <true/>         <key>KeepAlive</key>         <true/>         <key>ProgramArguments</key>         <array>             <string>/usr/local/bin/socat</string>             <string>-...

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 Settin...

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 ...