메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.


Jupyter CentOS 7.x에 Jupyter설치

총관리자 2018.04.18 00:05 조회 수 : 550

1. python3.4및 pip3설치

yum install -y epel-release

yum install python34-pip


1-2. Jupyter를 아래의 명령으로 설치한다.

  - pip3.4 install foo


2. Jupyter notebook디폴트 환경설정파일 생성한다.

  - sudo jupyter notebook -- generate-config


3. 사용자 계정 홈 디렉토리에 jupyter라는 이름의 디렉토리를 생성한다.

    (jupyter notebook이 사용할 디렉토리이며 이름은 아무거나 상관없음)

  - mkdir jupyter


4. ipython을 실행하여 Jupyter Notebook 서버에 접속할 때 사용할 패스워드의 해시값을 생성하고 복사해 둔다.


root@gsda4:~/:$ ipython

Python 3.5.2 (default, Nov 23 2017, 16:37:01)

Type 'copyright', 'credits' or 'license' for more information

IPython 6.3.1 -- An enhanced Interactive Python. Type '?' for help.


In [1]: from IPython.lib import passwd

In [2]: passwd()

Enter password:

Verify password:

Out[2]: 'sha1:a334bc73b70e:8c2d56e5dd27deca01bbdb06549655b51af22e6a'


Do you really want to exit ([y]/n)?


5. 사용자 계정 홈디렉토리에는 숨겨진 디렉토리 .jupyter가 생성되어 있다. 이 디렉토리로 가서 서버 인증서 파일을 아래의 명령으로 생성한다.

root@gsda4:~/.jupyter# openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem

Generating a 1024 bit RSA private key

.............................................++++++

....................................................++++++

writing new private key to 'mycert.pem'

-----

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter '.', the field will be left blank.

-----

Country Name (2 letter code) [AU]:KR

State or Province Name (full name) [Some-State]:Seoul

Locality Name (eg, city) []:Seoul

Organization Name (eg, company) [Internet Widgits Pty Ltd]:FreeL

Organizational Unit Name (eg, section) []:Dev

Common Name (e.g. server FQDN or YOUR name) []:SangHyeonPark

Email Address []:gooper@gooper.com


6. /svc/apps/gsda/bin/hadoop/.jupyter디렉토리로 가보면 jupyter_notebook_config.py파일을 열어서 다음 항목을 수정한다.

## The full path to an SSL/TLS certificate file.

c.NotebookApp.certfile = u'/svc/apps/gsda/bin/hadoop/.jupyter/mycert.pem'


## The IP address the notebook server will listen on.
c.NotebookApp.ip = '*'

## The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = u'/svc/apps/gsda/bin/hadoop/jupyter'

## Whether to open in a browser after starting. The specific browser used is
#  platform dependent and determined by the python standard library `webbrowser`
#  module, unless it is overridden using the --browser (NotebookApp.browser)
#  configuration option.
c.NotebookApp.open_browser = False

#  The string should be of the form type:salt:hashed-password.
c.NotebookApp.password = u'sha1:a334bc73b70e:8c2d56e5dd27deca01bbdb06549655b51af23e6a'

## The port the notebook server will listen on.
c.NotebookApp.port = 8888

7. jupyter notebook실행(백그라운드로 실행)
jupyter notebook --allow-root &

8. brower로 확인
https://gsda4:8888

*주의 : http로 접근하면 "[W 18:06:51.864 NotebookApp] SSL Error on 10 ('39.115.133.57', 53438): [SSL: WRONG_VERSION_NUMBER] wron number (_ssl.c:645)" 와 같은 Error가 발생하므로 https로 지정해서 접근해야 하며 brower에서 안정하지 않은 연결이 표시되더라도 "안전하지 않은 상태로" 진행하면 로그인 화면이 뜬다.


번호 제목 글쓴이 날짜 조회 수
557 hive metastore ERD file 총관리자 2018.09.20 723
556 hortonworks에서 제공하는 메모리 설정값 계산기 사용법 file 총관리자 2015.06.14 719
555 update를 많이 하면 heap memory가 많이 소진되고 최종적으로 OOM가 발생하는데 이에 대한 설명 총관리자 2017.04.10 717
554 SASL configuration failed: javax.security.auth.login.LoginException: java.lang.NullPointerException 오류 해결방법 총관리자 2015.04.02 701
553 secureCRT에서 backspace키가 작동하지 않는 경우 해결방법 총관리자 2015.05.11 699
552 oozie가 말하는 start시간은..서버에서 확인되는 시간이 아닙니다. 총관리자 2014.05.14 698
551 mysql 5.5.34-0ubuntu0.13.04용 설치/진행 화면 총관리자 2014.09.10 697
550 [Impala 3.2버젼]compute incremental stats db명.테이블명 수행시 ERROR: AnalysisException: Incremental stats size estimate exceeds 2000.00MB. 오류 발생원인및 조치방안 gooper 2022.11.30 694
549 sendmail전송시 421 4.3.0 collect: Cannot write ./dfv5BA2EBS010579 (bfcommit, uid=0, gid=114): No such file or directory 발생시 조치사항 총관리자 2017.06.11 694
548 lateral view 예제 총관리자 2014.09.18 691
547 source의 type을 spooldir로 하는 경우 해당 경로에 파일이 들어오면 파일단위로 전송함 총관리자 2014.05.20 687
546 [springframework]Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Could not read resultset: unexpected end of stream, read 0 bytes from 4 오류 발생시 조치사항 총관리자 2017.01.23 678
545 znode /hbase recursive하게 지우기 총관리자 2015.05.06 671
544 sqoop으로 mariadb에 접근해서 hive 테이블로 자동으로 생성하기 총관리자 2018.08.03 667
543 hadoop cluster에 포함된 노드중에서 문제있는 decommission하는 방법및 절차 file 총관리자 2017.12.28 654
542 서버 5대에 solr 5.5.0 설치하고 index data를 HDFS에 저장/search하도록 설치/설정하는 방법(SolrCloud) 총관리자 2016.04.08 654
541 "File /user/hadoop/share/lib does not exist" 오류 해결방법 총관리자 2015.06.07 654
540 solr 인스턴스 기동후 shard에 서버가 정상적으로 할당되지 않는 경우 해결책 총관리자 2016.04.29 653
539 springframework를 이용한 war를 생성하는 build.gradle파일(참고용) 총관리자 2016.08.19 650
538 AIX 7.1에 Python 2.7.11설치하기 총관리자 2016.10.06 648

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로