본문 바로가기

전체 글182

CentOS 7 싱글모드로 부팅해서 패스워드 변경하기 오늘은 CentOS 7의 싱글모드에 관해 정리합니다.이전 버전에서는 single 하나만 치면 간단하게 들어갈수있었는데 7버전에 들어서 바뀐것같습니다. 이 글에 사용된 서버는 버추얼 박스를 이용한 CentOS 7버전입니다. 1. centos 로그인시 계정 선택(ex. root 계정) 2. [Alt+R] 을 눌러 재부팅 3. 리부팅되고 있을 때 [e] 를 누르면 아래와 같은 창이 뜸. 1. 'e' 버튼을 눌러줍니다. 2. rhgb quiet를 init=/bin/bash로 변경한후 Ctrl -x를 눌러 싱글모드로 진입합니다. CentOS 5 또는 6와는 싱글모드 진입이 변경된것을 알수있습니다. # rhgb quiet 삭제 init=/bin/bash 추가 3. 부팅후 한번 패스워드를 변경해봅시다. 하지만 바로 .. 2017. 9. 17.
[codility] 1 BinaryGap Question1) BinaryGapFind longest sequence of zeros in binary representation of an integer. (출처 : https://codility.com/programmers/lessons/1-iterations/binary_gap/#disqus_thread) A.) import java.util.*; class Solution { public int solution(int[] A, int[] B, int[] C) { int begin = 0; int end = C.length - 1; int res = -1; while (begin 2017. 9. 12.
하둡 설치 [1] Virtualbox와 CentOS(DVD ISO) 설치 CentOS URL : https://www.centos.org/download/ [DVD ISO] 버튼 클릭 - Actual Country http://mirror.navercorp.com/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1611.iso Virtualbox URL : https://www.virtualbox.org/wiki/Downloads - VirtualBox binaries Windows hosts 다운 그냥 디폴트 값 되어 있는체로 [next] 하다가 다음과 같은 경고창 뜨면 [설치] 클릭 이 장치 소프트웨어를 설치하시겠습니까? "Oracle Corporation"의 소프트웨어는 항상 신뢰(A) [설치(I)] [설치 안 함(N)] 참조 : http://j.. 2017. 9. 10.
파이썬 MySQL 설치 1. PC에 mySQL 설치 1) 아래 사이트에서 본인의 PC에 맞는 파일 다운로드 하기 (cp 다음 숫자는 python 버전임. win32로 끝나면 32bit, amd64로 끝나면 64bit 임.) URL: http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python 2) 설치하기 명령프롬프트(cmd) 창에서 다운받은 파일이 있는 폴더 경로로 가서, 다음과 같이 install 명령어 실행하여 설치. cd C:\Users\Downloads pip install mysqlclient‑1.3.12‑cp36‑cp36m‑win32.whl 3. PyMySQL 설치 파이썬에서 PyMySQL을 이용하여 MySQL 쓸 때, 다음과 같은 라이브러리 설치 pip install PyM.. 2017. 9. 3.
python - UnicodeEncodeError (유니코드 에러) UnicodeEncodeError: 'cp949' codec can't encode character u'\u0411' in position... 위와 같은 UnicodeEncodeError 가 나면, 다음과 같이 소스에 추가해주면 된다. # -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*- import requests def main(): main_url = "https://www.test.co.kr/" response = requests.get(main_url) print(response.text) 2017. 9. 2.
Can't open file “django-admin.py”: No such file or directory Q.) Can't open file “django-admin.py”: No such file or directory A.)down voteacceptedTry running without pythondjango-admin.py startproject myprojectExplanation: It's because django-admin.py is added in one of the bin folders. Also, pythonexpects a file path. problem) 윈도에서 python.exe django-admin.py startproject [projectName] 로 했더니 위와 같은 에러 발생. Solution) django-admin.py startproject [projectName.. 2017. 8. 20.
반응형