글

[Django Install] Ubuntu Timezone Setting

[timezone 확인] more /etc/timezone [timezone 변경] sudo dpkg-reconfigure tzdata Asia 선택 Seoul 선택

[Django Install] Selenium Standalone Server Install & Crawling Python Test

[Selenium Standalone Server 설치] cd mkdir xvfb mkdir xvfb/bin mkdir xvfb/ tar mkdir xvfb/ jar mkdir xvfb/logs mkdir aicrawler mkdir aicrawler/bin mkdir aicrawler/logs # jdk 1.8 설치   sudo apt-get update   sudo apt-get install openjdk-8-jdk # xvfb 설치 sudo apt-get install -y unzip xvfb libxi6 libgconf-2-4   #구글 크롬설치  ( 아래는 루트 권한으로 실행해야 합니다.) sudo curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add sudo touch /etc/apt/sources.list.d/google-chrome.list sudo chmod 777 /etc/apt/sources.list.d/google-chrome.list sudo echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list  sudo apt-get -y update   sudo apt-get -y install google-chrome-stable #자신의 크롬 버젼에 맞는 최신 크롬드라이버 주소를 찾아 다운로드 받습니다.   google-chrome --version  (구글크롬 버전 확인) https://sites.google.com/a/chromium.org/chromedriver/downloads (여기서 버전 확인하고 아래에 버전을 맞춘다.) cd $HOME/xvfb/tar wget https://chromedriv...

[Elastic] APM Agent 설치

[설치] [APM Agent 다운로드] https://search.maven.org/search?q=g:co.elastic.apm%20AND%20a:elastic-apm-agent [Tomcat 설정] export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/path/to/elastic-apm-agent-<version>.jar" (다운로드받은 Agent 경로 및 파일명) export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.service_name=my-cool-service” (서비스 이름 아무거나 지정해 주세요.) export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.application_packages=org.example,org.another.example” (도메인명 아무거나 지정해 주세요.) export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.server_urls= http://1.234.25.136:40002 ” (APM 서버 ip 및 포트 이럴로 해주세요.) [Java 프로그램 설정] java  -javaagent:/path/to/elastic-apm-agent-<version>.jar (다운로드받은 Agent 경로 및 파일명) -Delastic.apm.service_name=my-cool-service -Delastic.apm.application_packages=org.example,org.another.example -Delastic.apm.server_urls=http://1.234.25.136:40002  -jar my-application.jar ( 실행할 프로그램 )

[Elastic] Filebeat 설치

[설치] curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.6.2-linux-x86_64.tar.gz tar xzvf filebeat-7.6.2-linux-x86_64.tar.gz [설정] filebeat.inputs: - type: log   enabled: true   paths:     - /var/log/*.log output.elasticsearch:   hosts: ["myEShost:9200"]   username: "filebeat_internal"   password: "YOUR_PASSWORD"  setup.kibana:   host: "mykibanahost:5601"   username: "my_kibana_user"     password: "YOUR_PASSWORD"

[Elastic] Install elasticsearch cluster

[elasticsearch install - linux Version] wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-linux-x86_64.tar.gz wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-linux-x86_64.tar.gz.sha512 shasum -a 512 -c elasticsearch-7.6.2-linux-x86_64.tar.gz.sha512  tar -xzf elasticsearch-7.6.2-linux-x86_64.tar.gz cd elasticsearch-7.6.2/ node별로 설치한다. [elasticsearch configuration for a cluster] Node별로 $ES_HOME/config/elasticsearch.yml을 아래와 같이 설정한다. [node1] cluster.name: elastic-poc node.name: elastic-node1 path.data: /home/pocuser/elastic-node1/elasticsearch/data path.logs: /home/pocuser/elastic-node1/elasticsearch/logs network.host: 1.234.25.136 http.port: 49100 transport.port: 49110 discovery.seed_hosts: ["1.234.25.136: 49110 ", "1.234.25.136: 49210 ", "1.234.25.136: 49310 "] cluster.initial_master_nodes: ["elastic-node1", "elastic-node2", "elastic-node3...

[Ubuntu] 환경변수 설정, 확인, 삭제, 버전확인

환경변수 설정 export AAA=bbb 환경변수 확인 env | grep AAA 환경변수 삭제 unset AAA 버전확인 cat /etc/issue

[Elastic] kibana reporting error

[에러메시지] log   [08:12:47.276] [error][reporting] The Reporting plugin encountered issues launching Chromium in a self-test. You may have trouble generating reports.  error  [08:12:47.276] [error][reporting] Error: Failed to launch chrome! /home/ubuntu/elastic/kibana-7.6.2-linux-x86_64/data/headless_shell-linux/headless_shell: error while loading shared libraries: libnss3.so : cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md     at onClose (/home/ubuntu/elastic/kibana-7.6.2-linux-x86_64/node_modules/puppeteer-core/lib/Launcher.js:349:14)     at Interface.helper.addEventListener (/home/ubuntu/elastic/kibana-7.6.2-linux-x86_64/node_modules/puppeteer-core/lib/Launcher.js:338:50)     at Interface.emit (events.js:203:15)     at Interface.close (readline.js:397:8)     at Socket.onend (readline.js:173:1...