Ubuntu 18.04 LTS에 Splunk 로그 분석기를 설치하는 방법
이 페이지에서
- 요구 사항\n
- Splunk 설치
- Splunk 웹 인터페이스 액세스
- 링크
Splunk는 웹 인터페이스를 통해 컴퓨터에서 생성된 빅 데이터를 검색, 모니터링 및 분석하는 데 사용할 수 있는 강력한 로그 데이터베이스입니다. 데이터 분석, 탐색 및 검색에 매우 유용한 도구입니다. Splunk를 사용하여 애플리케이션, 웹 서버, 데이터베이스, 서버 플랫폼, 클라우드 네트워크 등에서 실시간으로 대규모 데이터 스트림을 쉽게 인덱싱, 검색, 수집 및 시각화할 수 있습니다.
세 가지 주요 구성 요소로 구성된 Splunk:
- Splunk Forwarder : 로그 수집에 사용됩니다.
- Splunk Indexer : 데이터 파싱 및 인덱싱에 사용됩니다.
- Splunk 검색 헤드: 검색, 분석 및 보고를 위한 웹 인터페이스를 제공합니다.\n
이 튜토리얼에서는 Ubuntu 18.04 LTS(Bionic Beaver) 서버에 Splunk를 설치하는 방법에 대해 알아봅니다.
요구 사항
- 시스템에 Ubuntu 18.04를 실행하는 서버.\n
- sudo 권한이 있는 루트가 아닌 사용자.\n
스플렁크 설치
Splunk는 Windows, Linux, FreeBSD, OSX, Solaris, AIX 등을 포함한 광범위한 운영 체제를 지원합니다. 공식 웹 사이트에서 최신 버전의 Splunk를 다운로드하거나 다음 명령을 사용할 수 있습니다.
wget https://download.splunk.com/products/splunk/releases/7.1.1/linux/splunk-7.1.1-8f0ead9ec3db-linux-2.6-amd64.deb
다운로드가 완료되면 다음 명령을 사용하여 다운로드한 파일을 설치합니다.
sudo dpkg -i splunk-7.1.1-8f0ead9ec3db-linux-2.6-amd64.deb
설치가 성공적으로 완료되면 다음 출력이 표시됩니다.
(Reading database ... 218552 files and directories currently installed.) Preparing to unpack splunk-7.1.1-8f0ead9ec3db-linux-2.6-amd64.deb ... Unpacking splunk (7.1.1) over (7.1.1) ... Setting up splunk (7.1.1) ... complete
다음으로 부팅 시 시작하도록 Splunk 서비스를 활성화해야 합니다. 다음 명령을 실행하여 이를 수행할 수 있습니다.
sudo /opt/splunk/bin/splunk enable boot-start
여기에서 라이선스 계약에 동의하고 아래와 같이 관리자 암호를 제공해야 합니다.
Splunk Software License Agreement 04.24.2018 Do you agree with this license? [y/n]: y This appears to be your first time running this version of Splunk. An Admin password must be set before installation proceeds. Password must contain at least: * 8 total printable ASCII character(s). Please enter a new password: Please confirm new password: Copying '/opt/splunk/etc/openldap/ldap.conf.default' to '/opt/splunk/etc/openldap/ldap.conf'. Generating RSA private key, 2048 bit long modulus ..................+++ ..............................................................................+++ e is 65537 (0x10001) writing RSA key Generating RSA private key, 2048 bit long modulus .............+++ ...................................+++ e is 65537 (0x10001) writing RSA key Moving '/opt/splunk/share/splunk/search_mrsparkle/modules.new' to '/opt/splunk/share/splunk/search_mrsparkle/modules'. Adding system startup for /etc/init.d/splunk ... /etc/rc0.d/K20splunk -> ../init.d/splunk /etc/rc1.d/K20splunk -> ../init.d/splunk /etc/rc6.d/K20splunk -> ../init.d/splunk /etc/rc2.d/S20splunk -> ../init.d/splunk /etc/rc3.d/S20splunk -> ../init.d/splunk /etc/rc4.d/S20splunk -> ../init.d/splunk /etc/rc5.d/S20splunk -> ../init.d/splunk Init script installed at /etc/init.d/splunk. Init script is configured to run at boot.
그런 다음 다음 명령을 사용하여 Splunk 서비스를 시작합니다.
sudo service splunk start
다음 출력이 표시되어야 합니다.
Starting splunk server daemon (splunkd)... Generating a 2048 bit RSA private key ............+++ ............................................................................................................................................+++ writing new private key to 'privKeySecure.pem' ----- Signature ok subject=/CN=Node3/O=SplunkUser Getting CA Private Key unable to write 'random state' writing RSA key Done Waiting for web server at http://127.0.0.1:8000 to be available........ Done If you get stuck, we're here to help. Look for answers here: http://docs.splunk.com The Splunk web interface is at http://Node3:8000
Splunk 웹 인터페이스에 액세스
이제 Splunk 서버가 실행 중이며 포트 8000에서 수신 대기 중입니다. 웹 브라우저를 열고 URL http://your-server-ip:8000을 입력하면 다음 페이지로 리디렉션됩니다.
여기에서 관리자 로그인 자격 증명을 제공한 다음 로그인 버튼을 클릭하면 다음 화면에 Splunk 대시보드가 표시됩니다.
연결
- Splunk 웹사이트