Install Nodejs in the aws linux

[git, yarn, nvm, node설치] $ sudo yum update git설치 $   sudo yum install git yarn설치 $   curl -o- -L https://yarnpkg.com/install.sh | bash $   source ~/.bashrc nvm설치 $   curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash $   . ~/.nvm/nvm.sh node설치 $ nvm install 16 [node 설치 에러 시 조치] $   nvm install node (최신 버전 18.0.0 이 자동 설치되어 에러발생) v18 .0 .0 is already installed. node : /lib64/ libm. so .6 : version `GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version ` GLIBC_2 .28 ' not found (required by node) nvm is not compatible with the npm config "prefix" option: currently set to "" Run `nvm use --delete-prefix v18.0.0` to unset it. $ nvm ls (설치버전 확인) $ nvm uninstall 18.0.0 (최신버전 삭제) $ nvm install 16 (stable 버전 설치) [react 설치] $ npx -y create-react-app <프로젝트명>

Install the Dsearch

[Table of contents] Install the Python Install the virtual environment of the Python Install the Django Install the Django Rest Framework Install others' apps of the Django Install pyhwp Install the elasticsearch Install uwsgi Install nginx [Install the Python] python 3.7 higher (from package or source) [ Install the virtual environment of the Python ] $ pip install virtualenv $ pip install virtualenvwrapper $ cd $HOME $ mkdir .virtualenvs $ vi .bashrc 아래 내용을 파일의 마지막 라인에 추가 # Virtualenvwrapper settings: export  VIRTUALENVWRAPPER_PYTHON= /usr/bin/python3 export  WORKON_HOME= $HOME /.virtualenvs export  VIRTUALENVWRAPPER_VIRTUALENV= $HOME /.local/bin/virtualenv source  ~/.local/bin/virtualenvwrapper.sh export  PATH= .: $PATH 다시로그인 $ mkvirtualenv ds (ds라는 이름으로 가상환경 생성) $ workon (현재 생성된 가상환경 리스트 보기) ds $ workon ds (가상환경에 들어가기) (ds) $ deactivate (가상환경에 나오기) $ rmvirtualenv ds (가상환경 삭제하기) [Install the Django] (ds) $ cd $HOME (ds) $ pip install django==3.2.13 (ds) ...

Install Python 3.8 in Redhat from source

 [AWS Redhat] Step1. 사전 준비 파이썬 설치를 위해서는 GCC 컴파일러가 필수입니다. 설치가 필요한 서버에 ssh or shell로 접속합니다. 그리고 이외 필수로 필요한 라이브러리를 설치합니다. # yum install gcc openssl-devel bzip2-devel libffi-devel make Step2. 다운로드 Python 3.8 파이썬 공식사이트에 접속하여 Python 3.8 최신 버전을 확인 후 링크를 복사 후 아래의 커멘드를 사용하여 다운로드 합니다.   # cd /opt # sudo wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz Step3. Python 3.8 설치 아래의 커멘드로 파이썬을 컴파일합니다. cd Python -3.8 .0 sudo ./configure --enable-optimizations sudo make altinstall Step4. Python 버전 확인 아래 처럼 파이썬을 버전을 확인합니다. # python3.8 -V Python 3.8 .0 Step5. alias 추가 cd $HOME vi .bashrc alias python=”/usr/local/bin/python3.8" alias pip="/usr/local/bin/pip3.8" source .bashrc

react, redux, react-redux, redux-persist, redux-saga

[Concepts] react : UI components redux : state management redux-saga :  react-redux : more easy for redux redux-persist : keep redux store persistantly src/ds/store/store.js import storage from "redux-persist/lib/storage" ; import { configureStore } from "@reduxjs/toolkit" ; import { persistReducer } from "redux-persist" ; import createSagaMiddleware from "redux-saga" ; import rootSaga from "../saga" ; import rootReducer from "../reducer" ; const persistConfig = { key : "root" , storage , }; const persistedReducer = persistReducer ( persistConfig , rootReducer ); const sagaMiddleware = createSagaMiddleware (); function createStore () { const store = configureStore ({ reducer : persistedReducer , middleware : [ sagaMiddleware ], devTools : true , }); sagaMiddleware . run ( rootSaga ); return store ; } const store = createStore (); export default store ; src/d...

Install the Nori

[nori install] elasticsearch shutdown #ES_HOME/bin/elasticsearch-plugin install analysis-nori [nori dictionary files] $ES_HOME/config/ dictionary/user.txt (사용자사전) 이동길 홍길동                                   # 사용자 단어 삼성전자 삼성 전자             # 복합명사 $ES_HOME/config/ dictionary/synonym.txt (동의어사전) Elasticsearch, 엘라스틱서치         # 동의어 Apple -> 사과                                # 치환 $ES_HOME/config/ dictionary/stopword.txt (불용어사전) 바보 개새끼 [index settings] "settings": {     "number_of_shards": 1,     "number_of_replicas": 0,     "analysis": {       "analyzer": {         "nori_mixed": {           "tokenizer" : "nori_token...

Dsearch Index

[index] ds_content : 문서인덱스 [ds_content] PUT ds_content {   "settings": {     "number_of_shards": 1,     "number_of_replicas": 0,     "analysis": {       "analyzer": {         "nori_analyzer_mixed": {           "tokenizer" : "nori_tokenizer_mixed",           "filter": [             "nori_synonym",             "nori_stoptag",             "nori_stopword"           ]         }       },        "tokenizer": {         "nori_tokenizer_none": {           "type": "nori_tokenizer",           "decompound_mode": "none",           "user_dictionary": "dictionary/user.txt"         },       ...