본문 바로가기

리눅스

우분투에서 HAProxy를 설치하고 구성하는 방법 우분투에서 HAProxy를 설치하고 구성하는 방법 테스트 환경 운영체제 버전 정보 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy 도커 버전 정보 $ docker version Client: Docker Engine - Community Version: 20.10.22 API version: 1.41 Go version: go1.18.9 Git commit: 3a2c30b Built: Thu Dec 15 22:28:04 2022 OS/Arch: linux/amd64 Context: default Experimental.. 더보기
PHP 8.1에서 MongoDB 확장 모듈을 설치하는 방법 PHP 8.1에서 MongoDB 확장 모듈을 설치하는 방법 테스트 환경 $ lsb_release -a No LSB modules are available. Distributor ID:Ubuntu Description:Ubuntu 22.04 LTS Release:22.04 Codename:jammy MongoDB 확장 모듈 설치하기 PHP 리포지토리 추가 sudo apt install software-properties-common sudo add-apt-repository ppa:ondrej/php apt 데이터베이스 업데이트 apt-get update mongodb 확장 모듈 설치 sudo apt-get install -y php8.1-mongodb mongodb 확장 모듈 확인 php -m | gre.. 더보기
Ubuntu에서 Supervisor를 설치하는 방법 Ubuntu에서 Supervisor를 설치하는 방법 Supervisor는 Linux 시스템에서 백그라운드 프로세스 및 작업을 관리하는 도구입니다 테스트 환경 $ lsb_release -a No LSB modules are available. Distributor ID:Ubuntu Description:Ubuntu 22.04 LTS Release:22.04 Codename:jammy apt 패키지 목록 업데이트 sudo apt-get update supervisor 설치 supervisor 패키지 설치 sudo apt-get install -y supervisor supervisor 버전 확인 supervisord --version $ supervisord --version 4.2.1 supervisor .. 더보기
웹 서버에서 HSTS(HTTP Strict Transport Security)를 설정하는 방법 웹 서버에서 HSTS(HTTP Strict Transport Security)를 설정하는 방법 HSTS(Strict Transport Security)는 웹 사이트의 보안을 강화하기 위한 메커니즘 중 하나로, HTTPS를 통해 통신하는 것을 강제하고 중간자 공격을 방지하는 기능을 제공합니다. HSTS를 설정함으로써 클라이언트(웹 브라우저)는 지정된 기간 동안 해당 웹 사이트와의 모든 통신을 HTTPS를 통해서만 수행하도록 강제됩니다. Redirect HTTP connections to HTTPS Apache 설정 ServerName example.com RewriteEngine on RewriteCond %{HTTPS} !on RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [.. 더보기
[draft] 우분투에 redis를 설치하는 방법 우분투(ubuntu 22.04)에 redis를 설치하는 방법테스트 환경$ lsb_release -dDescription: Ubuntu 22.04 LTSredis 설치redis repository 추가curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpgecho "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.listapt 패키.. 더보기
[draft] 우분투에 node와 npm을 설치하는 방법 우분투에 Node.js와 npm을 설치하는 방법우분투 리포지토리에 있는 Node.js 패키지를 사용하여 설치할 수 있지만 일반적으로는 Node.js 공식 버전을 설치하는 것이 좋습니다.테스트 환경$ cat /etc/lsb-releaseDISTRIB_ID=UbuntuDISTRIB_RELEASE=22.04DISTRIB_CODENAME=jammyDISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"NodeSource를 통해 설치1. NodeSource PPA 추가NodeSource PPA를 추가하고 apt-get update를 자동으로 실행합니다.curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -$ curl -fsSL http.. 더보기
apt(dpkg) error apt(dpkg) error - 패키지들간의 의존성 문제 테스트 환경 $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS" apt(dpkg) error $ apt install nodejs ... Errors were encountered while processing: mysql-server-8.0 needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) apt(dpkg) error 해결 방법 cd .. 더보기
[draft] 우분투에서 MySQL 8을 바이너리 파일로 설치하는 방법 우분투에서 MySQL 8.0.31을 바이너리 파일로 설치하는 방법테스트 환경$ lsb_release -dDescription: Ubuntu 22.04.1 LTSMySQL 설치MySQL 바이너리 파일 다운로드☞ MySQL Community Downloads- https://dev.mysql.com/downloads/mysql1. 필수 패키지 설치sudo apt-get updatesudo apt-get install -y libaio1 libncurses5 libnuma12. MySQL 사용자 및 그룹 생성** ubuntu sudo 그룹에서 group id 27번을 사용하고 있음.더보기Ubuntu 패키지 매니저를 사용하여 MySQL을 설치할 때, mysql 계정 정보$ cat /etc/passwd | gre.. 더보기