Files
caliverse_doc/04. 서버설정/Shell Script/copy_service.sh
2025-05-01 07:27:54 +09:00

38 lines
1.1 KiB
Bash

#!/bin/bash
sudo apt-get update && sudo apt-get upgrade -y
# .service 파일을 압축 해제할 디렉토리 경로 (변경 필요)
service_destination="/etc/systemd/system/"
sudo tar xvzf service.tar.gz
sudo tar xvzf server.tar.gz
# 압축 해제 완료 메시지 출력
echo "압축 해제가 완료되었습니다."
#openssl
sudo apt-get install -y build-essential zlib1g-dev
sudo tar xvzf openssl-1.0.2u.tar.gz
cd openssl-1.0.2u/
sudo ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
sudo make && sudo make install
# Fluentd
sudo curl -fsSL https://toolbelt.treasuredata.com/sh/install-ubuntu-jammy-fluent-package5-lts.sh | sh
sudo fluent-gem install fluent-plugin-mongo
# .Net
sudo sudo apt install -y dotnet-sdk-7.0 unixodbc-dev
# .service file move
sudo mv *.service "$service_destination"
# 압축 해제 완료 메시지 출력
echo "*.service 파일이 $service_destination 경로로 이동되었습니다."
sudo mv ./fluentd* /etc/fluent/
echo "fluentd 설정 파일이 /etc/fluent/ 경로로 이동되었습니다."
sudo systemctl enable StartServer
sudo systemctl enable fluentd