본문 바로가기

리눅스

리눅스에 프록시를 지정하는 방법 리눅스에 프록시를 지정하는 방법 1. 환경 변수를 설정하는 방법 터미널을 열고 다음 명령어를 실행하여 환경 변수를 설정합니다. export http_proxy=http://: export https_proxy=http://: proxy_host와 proxy_port는 실제 프록시 서버의 호스트와 포트로 대체되어야 합니다. 설정한 환경 변수는 현재 터미널 세션에서만 유효하므로, 다른 터미널 세션에서도 사용하려면 해당 명령어를 실행해야 합니다. 2. 시스템 설정을 통해 프록시를 지정하는 방법 ubuntu 터미널을 열고 /etc/environment 파일을 수정합니다. sudo vim /etc/environment 파일 내에 다음 라인을 추가합니다. http_proxy=http://: https_proxy=h.. 더보기
[draft] Squid를 Docker 컨테이너로 실행하는 방법 Squid를 Docker 컨테이너로 실행하는 방법1. Docker 설치Docker를 설치해야 합니다.2. Squid Docker 이미지 다운로드Docker Hub에서 Squid의 공식 이미지를 다운로드하실 수 있습니다. docker hubhttps://hub.docker.com/r/ubuntu/squid3. docker compose 파일 생성vim docker-compose.yamlversion: '3.9'services: squid-container: image: ubuntu/squid:5.2-22.04_beta restart: always container_name: squid-container volumes: - ./squid.conf:/etc/squid/squid.. 더보기
우분투에서 Squid 및 Webmin을 설치하는 방법 우분투에서 Squid 및 Webmin을 설치하는 방법 테스트 환경 $ lsb_release -d Description:Ubuntu 22.04.2 LTS Squid 설치 sudo apt-get update sudo apt-get install -y squid vim /etc/squid/squid.conf cat /etc/squid/squid.conf | egrep -v '^$|^#' $ cat /etc/squid/squid.conf | egrep -v '^$|^#' acl localnet src 0.0.0.1-0.255.255.255# RFC 1122 "this" network (LAN) acl localnet src 10.0.0.0/8# RFC 1918 local private network (LAN) .. 더보기
docker proxy 설정하는 방법(환경 변수 구성) docker proxy 설정하는 방법(환경 변수 구성) 폐쇄망 인터넷망 비고 도커 데몬 프록시 서버 테스트 환경 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) 프록시 서버 지정하기 전에는 아래와 같이 타임아웃 발생 $ docker search ubuntu Error response from daemon: Get "https://index.docker.io/v1/search?q=ubuntu&n=25": dial tcp 52.1.184.176:443: i/o timeout Configuring environment variables 1. /etc/systemd/system/docker.service.d 디렉토리 생성 mkdir /etc/sys.. 더보기
nginx와 php-fpm을 사용하는 경우 *.html 파일에서도 PHP 코드를 실행하도록 설정하는 방법 nginx와 php-fpm을 사용하는 경우 *.html 파일에서도 PHP 코드를 실행하도록 설정하는 방법 테스트 환경 운영체제 버전 정보 $ lsb_release -d Description:Ubuntu 22.04 LTS NGINX 버전 정보 $ nginx -v nginx version: nginx/1.24.0 PHP-FPM 버전 정보 $ php-fpm8.1 -v PHP 8.1.18 (fpm-fcgi) (built: Apr 14 2023 04:39:44) Copyright (c) The PHP Group Zend Engine v4.1.18, Copyright (c) Zend Technologies with Zend OPcache v8.1.18, Copyright (c), by Zend Technologie.. 더보기
우분투에서 최신 버전의 ansible을 설치하는 방법 우분투에서 최신 버전의 ansible을 설치하는 방법 테스트 환경 $ lsb_release -d Description: Ubuntu 22.04.2 LTS 우분투에서 apt를 사용하여 최신 버전의 ansible을 설치하려면 다음과 같은 단계를 따르면 됩니다. 1. 패키지 관리자의 패키지 목록을 업데이트합니다. sudo apt update sudo apt install software-properties-common 2. Ansible PPA 저장소를 추가합니다. sudo add-apt-repository --yes --update ppa:ansible/ansible $ sudo add-apt-repository --yes --update ppa:ansible/ansible Repository: 'deb h.. 더보기
[리눅스] SecureCRT에서 우분투 서버로 접속되지 않을 때 SecureCRT에서 우분투 서버로 접속되지 않을 때 테스트 환경 서버 $ lsb_release -d Description: Ubuntu 22.04.2 LTS 클라이언트 SecureCRT 8.3.2 SSH 공개 키 오류 $ tail -f /var/log/auth.log May 8 00:23:02 ip-10-51-92-219 sshd[1360]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth] May 8 00:23:02 ip-10-51-92-219 sshd[1360]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth] 이 오류는 SSH.. 더보기
[리눅스] 우분투 계정 보안 조치 우분투 계정 보안 조치 패스워드 복잡성 설정 /etc/login.defs cat /etc/login.defs | egrep -v '^#' | egrep 'PASS_MIN_LEN|PASS_MAX_DAYS|PASS_MIN_DAYS|PASS_WARN_AGE' $ cat /etc/login.defs | egrep -v '^#' | egrep 'PASS_MIN_LEN|PASS_MAX_DAYS|PASS_MIN_DAYS|PASS_WARN_AGE' PASS_MAX_DAYS99999 PASS_MIN_DAYS0 PASS_WARN_AGE7 sudo sed -i 's/PASS_MAX_DAYS\s*99999/PASS_MAX_DAYS\t90/g; s/PASS_MIN_DAYS\s*0/PASS_MIN_DAYS\t1/g; s/#PAS.. 더보기