본문 바로가기

분류 전체보기

[draft] PHP의 설정 파일인 php.ini 파일의 위치를 찾는 방법 PHP의 설정 파일인 php.ini 파일의 위치를 찾는 방법1. 명령줄을 사용하여 찾기php -i | grep "Configuration File"$ php -i | grep "Configuration File"Configuration File (php.ini) Path: /etc/php.ini또는php --ini | grep php.ini$ php --ini | grep php.ini Configuration File (php.ini) Path: /usr/local/apache2/confLoaded Configuration File: /usr/local/apache2/conf/php.ini2. phpinfo() 함수를 사용하여 찾기PHP 스크립트를 작성하고 ph.. 더보기
[draft] Fleet Server 호스트 추가 Fleet Server 호스트 추가다이어그램(diagram)Elasticsearch에서 보안 및 API 키 인증 기능을 활성화elasticsearch 구성 파일 편집xpack.security.authc.api_key.enabled: true 추가vim /etc/elasticsearch/elasticsearch.yml...# Enable security featuresxpack.security.enabled: truexpack.security.enrollment.enabled: truexpack.security.authc.api_key.enabled: true# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and .. 더보기
[draft] Metricbeat 설치하는 방법 Metricbeat 설치하는 방법Metricbeat 패키지 설치yum install --enablerepo=elasticsearch -y metricbeatMetricbeat(metricbeat.yml) 설정 확인cat /etc/metricbeat/metricbeat.yml | egrep -v '^$|^#|#'$ cat /etc/metricbeat/metricbeat.yml | egrep -v '^$|^#|#'metricbeat.config.modules: path: ${path.config}/modules.d/*.yml reload.enabled: falsesetup.template.settings: index.number_of_shards: 1 index.codec: best_compressi.. 더보기
[draft] Elasticsearch와 Kibana를 설치하고 연동하는 방법(single node) Elasticsearch와 Kibana를 설치하고 연동하는 방법(single node)테스트 환경$ cat /etc/os-releaseNAME="Amazon Linux"VERSION="2"ID="amzn"ID_LIKE="centos rhel fedora"VERSION_ID="2"PRETTY_NAME="Amazon Linux 2"ANSI_COLOR="0;33"CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"HOME_URL="https://amazonlinux.com/"Elasticsearch 설치Elasticsearch 다운로드 페이지https://www.elastic.co/downloads/elasticsearchhttps://www.elastic.co/guide/en/elas.. 더보기
[draft] Elastic Stack 설치 Elastic Stack 설치설치 순서 다음 순서대로 사용하려는 Elastic Stack 제품을 설치하세요. Elasticsearch(설치 지침)Kibana(설치)Logstash(설치)Beats(설치 지침)APM(설치 지침)Elasticsearch Hadoop(설치 지침)Logstash 설치Logstash 패키지 설치yum install --enablerepo=elasticsearch -y logstash 참고URL- Elasticsearch와 Kibana를 설치하고 연동하는 방법(single node) : https://scbyun.com/1571- installing the elastic stack : https://www.elastic.co/guide/en/elastic-stack/8.6/insta.. 더보기
[draft] Nginx에서 X-Forwarded-For(XFF) 설정하는 방법 Nginx에서 X-Forwarded-For(XFF) 설정하는 방법Nginx에서 X-Forwarded-For (XFF) 헤더를 설정하는 것은 주로 프록시 서버나 로드 밸런서와 같은 중간 서버를 통해 클라이언트의 IP 주소를 추적하려는 경우에 사용됩니다. XFF 헤더는 클라이언트의 실제 IP 주소를 서버로 전달하기 위해 사용됩니다. X-Forwarded-For 헤더를 사용하여 클라이언트의 실제 IP 주소를 확인할 수 있다.Nginx 설정 파일 편집set_real_ip_from ;real_ip_header X-Forwarded-For;sudo vim /etc/nginx/nginx.confhttp { ... set_real_ip_from 0.0.0.0/0; real_ip_header X-For.. 더보기
[draft] zabbix(zabbix-agent) php-fpm의 성능 상태를 모니터링하는 방법 zabbix(zabbix-agent) php-fpm의 성능 상태를 모니터링하는 방법php-fpm(www.conf) 설정$ cat /etc/php-fpm.d/www.conf | grep pm.status_pathpm.status_path = /statusnginx(default.conf) 설정$ cat /etc/nginx/conf.d/default.conf... # nginx, php-fpm status location ~ ^/(status|ping)$ { fastcgi_pass unix:/run/php-fpm/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fas.. 더보기
[draft] Ubuntu에서 MongoDB Community Server를 설치하는 방법 Ubuntu에서 MongoDB Community Server를 설치하는 방법1. MongoDB의 GPG key를 가져오기 위해 다음 명령어를 실행합니다.wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -2. MongoDB의 repository를 APT에 추가합니다.echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -sc)/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list3. APT 패키지 목록을 업데이트합니다.sudo .. 더보기