반응형 분류 전체보기258 [leetcode-Database-sqli] Combine Two Tables Table: Person+-------------+---------+| Column Name | Type |+-------------+---------+| personId | int || lastName | varchar || firstName | varchar |+-------------+---------+personId is the primary key (column with unique values) for this table.This table contains information about the ID of some persons and their first and last names. Table: Address+-------------+---------+| Colum.. 2026. 6. 11. proxmox 한국ip대역만 허용 방화벽 차단 # 기존 cluster.fw 파일 백업cp /etc/pve/firewall/cluster.fw /etc/pve/firewall/cluster.fw.backup# 한국 IP 대역 다운로드wget -qO- http://ftp.apnic.net/stats/apnic/delegated-apnic-latest | \ awk -F'|' '/KR\|ipv4/ { ip=$4; hosts=$5; cidr=32-log(hosts)/log(2); printf "%s/%d\n", ip, cidr }' > /tmp/kr-ipv4.txt# 파일 끝에 IPSet 추가echo "" >> /etc/pve/firewall/cluster.fwecho "[IPSET korea-ipv4]" >> /etc/pve.. 2026. 2. 5. docker 시스템 용량 정리 바로 할 수 있는 확인 명령어용량 많이 차지하는 곳 찾기sudo du -xh / | sort -h | tail -20 특히 자주 문제되는 곳df -h sudo du -sh /var/* sudo du -sh /home/* 임시로라도 공간 확보하는 방법1️⃣ apt 캐시 정리sudo apt clean sudo apt autoremove -y 2️⃣ 로그 파일 정리sudo journalctl --vacuum-size=200M3️⃣ Docker 쓰는 경우docker system prune -a 🔥 당장 해야 할 응급조치 (안전)1️⃣ 컨테이너 로그 파일 비우기 (삭제 ❌, truncate ⭕)컨테이너 안 죽이고 용량만 회수 sudo sh -c 'truncate -s 0 /var/lib/docker/cont.. 2026. 2. 2. ubuntu JAVA_HOME GRADLE_HOME 설정 설치 1. Java 설치 및 JAVA_HOME 설정 1.1. OpenJDK 설치bashsudo apt update# OpenJDK 17 설치 (가장 많이 사용됨)sudo apt install openjdk-17-jdk -y# 설치 확인java -version1.2. Java 설치 경로 확인JAVA_HOME 설정을 위해 실제 설치 경로를 찾아야 합니다. bashreadlink -f /usr/bin/javac결과 예시: /usr/lib/jvm/java-17-openjdk-amd64/bin/javac여기서 /usr/lib/jvm/java-17-openjdk-amd64 부분이 JAVA_HOME 경로입니다. 1.3. 환경 변수 설정/etc/profile 파일을 편집하여 시스템 전체에 적용하거나, ~/.bashrc에 설.. 2026. 1. 27. 자기 자신의 SMB 서버를 /img 디렉토리로 마운트하는 방법 ✅ 1️⃣ 필수 패키지 설치sudo apt updatesudo apt install -y cifs-utils✅ 2️⃣ 마운트 대상 디렉토리 준비sudo mkdir -p /imgsudo chown www-data:www-data /img✅ 3️⃣ SMB 계정 정보 파일 생성 (보안 중요)sudo nano /root/.smbcredentialsusername=smbuserpassword=SMB비밀번호sudo chmod 600 /root/.smbcredentials✅ 4️⃣ SMB 공유 테스트 마운트 (즉시 확인)자기 자신 서버이므로 IP = 127.0.0.1 또는 서버 내부 IPsudo mount -t cifs \//127.0.0.1/share \/img \-o credentials=/root/.smbcre.. 2026. 1. 22. ubuntu 24.04 Nginx, Https 1️⃣ 기본 업데이트sudo apt update && sudo apt upgrade -y2️⃣ Nginx 설치sudo apt install nginx -ysudo systemctl status nginx설정파일 수정#설정파일 수정vi /etc/nginx/nginx.conf6️⃣ 적용 명령sudo nginx -tsudo systemctl reload nginx✅ 3. nginx 기본 확인sudo systemctl start nginxsudo systemctl stop nginxsudo systemctl enable nginxsudo systemctl status nginx smb 패키지 설치#root 권한으로apt-get update && apt-get install -y \ smbclient \ .. 2026. 1. 22. Proxmox 업데이터 에러 해결 ✅ 해결 방법1) Enterprise repo 비활성화vi /etc/apt/sources.list.d/pve-enterprise.list아래와 같이 줄 앞에 #을 추가해 주석 처리합니다:# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise2) No-Subscription Repository 활성화/etc/apt/sources.list에 아래 라인을 추가하거나, 따로 파일로 만들어 넣습니다vi /etc/apt/sources.listdeb http://download.proxmox.com/debian/pve bookworm pve-no-subscription노트: 꼭 http://, **https://**로 혼용되지 않도록 주의하세요.. 2026. 1. 22. Proxmox에서 VM 디스크 용량 늘리기 1️⃣ Proxmox에서 VM 디스크 용량 늘리기 (호스트에서)Proxmox 웹 UI 접속대상 VM 선택Hardware → Hard Disk (scsi0 / virtio0 등) 선택Resize disk 클릭늘릴 용량 입력 (예: +50G)적용👉 이 단계는 가상 디스크 크기만 증가시키는 것👉 아직 리눅스 내부에서는 용량이 늘어나지 않음2️⃣ 리눅스 VM 내부 작업 (가장 중요)📌 현재 디스크 상태 확인lsblkdf -h보통 이런 구조일 거야:/dev/sda └─/dev/sda3 └─vg0-root (LVM)3️⃣ 파티션 확장 (GPT/MBR 공통)🔹 growpart 설치apt updateapt install cloud-guest-utils🔹 파티션 확장growpart /dev/sda 3/de.. 2026. 1. 22. ubuntu 24.04 jenkins 설치 Ubuntu 24.04 서버에 Jenkins 설치 → Bitbucket 레포에서 소스 가져오기 → Spring Boot를 Docker로 빌드/실행1️⃣ Ubuntu 24.04에 Jenkins 설치1-1. Java 설치 (Jenkins 필수)sudo apt updatesudo apt upgrade -ysudo apt install -y openjdk-21-jdkjava -version1-2. Jenkins 설치Jenkins GPG Key 추가sudo wget -O /etc/apt/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian-stable/jenkins.io-2026.key저장소 등록echo "deb [signed-by=/etc/apt/keyr.. 2026. 1. 19. jenkins docker 설정 Docker CLI 설치docker exec -u root -it jenkins-container-name bashapt updateapt install -y docker.ioexitdocker exec -it cat /var/jenkins_home/secrets/initialAdminPassword 2. 필수 플러그인 설치아래 플러그인들이 모두 설치되어 있어야 Docker 에이전트 사용 가능Docker PipelinePipelinePipeline: Model DefinitionPipeline: DeclarativeDocker CommonsDocker API Plugin🔐 Bitbucket에 SSH 키 등록하는 방법1️⃣ SSH 키 생성 (이미 생성되어 있으면 이 단계는 생략)ssh-keygen -t.. 2025. 5. 26. Proxmox 설치 방법 USB 부팅 Proxmox ISO 이미지 (공식 웹사이트)다운로드 링크: https://www.proxmox.com/en/downloadsUSB 메모리 (4GB 이상)ISO to USB 툴: balenaEtcher, Rufus, 또는 VentoyProxmox를 설치할 PC 또는 서버1. Proxmox ISO 다운로드공식 다운로드 링크최신 버전의 proxmox-ve_x.x.iso 파일을 받으세요.02. 부팅 USB 만들기Rufus 또는 balenaEtcher 실행다운로드한 ISO 파일 선택 → USB 디바이스 선택 → "Start"완료 후 USB에 부팅 이미지가 생성됨3. PC 부팅 및 Proxmox 설치부팅 USB를 Proxmox 설치 대상 PC에 삽입BIOS/UEFI 진입 → 부팅 순서 변경 → USB로 부팅부팅 .. 2025. 5. 19. PostgresSql Sql 문법 List rolesIn psql \\duor select * from pg_rolesChange a user’s passwordALTER ROLE [role_name] WITH PASSWORD '[new_password]'; Allow user to create databasesALTER USER WITH CREATEDB;List all databasesin psql \\lCreate databaseon the command line sudo -u postgres createdb [name] -O [role_name]in `psql` CREATE DATABASE [name] OWNER [role_name];Drop databaseon the command line sudo -u postgres drop.. 2025. 3. 14. ubuntu 24.04 PostgreSql 설치 시스템 패키지 업데이트sudo apt update && sudo apt upgrade -yPostgreSQL 설치sudo apt install -y postgresql postgresql-clientPostgreSQL 서비스 상태 확인psql --versionsudo systemctl status postgresqlPostgreSQL 서비스 시작 및 활성화sudo systemctl start postgresqlsudo systemctl enable postgresqlPostgreSQL 기본 설정 # postgres라는 사용자 계정을 생성 sudo -i -u postgres# 쉘접속psql# 종료\q새 사용자 및 데이터베이스 생성# PostgreSQL에서 새로운 사용자와 데이터베이스CREATE USER k.. 2025. 3. 14. ubuntu 24.04 mysql 설치 패키지 목록 업데이트sudo apt updatesudo apt upgrade -yMySQL 서버 설치sudo apt install -y mysql-serverMySQL 서비스 상태 확인sudo systemctl status mysqlsudo systemctl enable mysqlsudo systemctl start mysql # 시작sudo systemctl stop mysql # 중지sudo systemctl restart mysql # 재시작MySQL 보안 설정 (권장)sudo mysql_secure_installationVALIDATE PASSWORD COMPONENT 활성화: 비밀번호 강도를 검사하는 기능 (Y/N 선택 가능)MySQL 루트 계정 비밀번호 설정익명 사용자 제거원격 루트 .. 2025. 3. 13. ubuntu 24.04 도커 Nginx, Https, Samba 설치 ~/.profile에 추가:export VISUAL=viexport EDITOR=vi적용source ~/.profile ✅ 1. Certbot, nginx 관련 패키지 완전 제거 (purge)sudo apt purge nginx nginx-common nginx-core certbot python3-certbot-nginx -ysudo apt autoremove --purge -y✅ 2. Certbot 및 nginx 재설치sudo apt updatesudo apt install nginx certbot python3-certbot-nginx -y✅ 3. nginx 기본 확인sudo systemctl start nginxsudo systemctl stop nginxsudo systemctl enable n.. 2025. 3. 10. ujubuntu 24.04 원격데스크탑 접속 홈> Settings > System > Remote Desktop 이동 Desktop Sharing > 체크Remote Control > 체크Port 3389 > 확인username > 로그인아이디 확인Password > 설정적용 MobaXterm 설치 및 RDP 로그인 2025. 3. 8. MobaXTerm 으로 복사 붙여넣기 할때 in '^[[200~required text~' vim ~/.inputrc# disable set enable-bracketed-paste 0# wq # save터미널을 종료후 재로그인하면터미널이 더러워지지 않음을 볼수 있습니다. 2025. 3. 7. ubuntu 24.04 Samba(SMB) 설치 1. Samba(SMB) 설치sudo apt install -y sambasudo smbpasswd -a [계정명]2. Samba 설정 파일 수정sudo vi /etc/samba/smb.conf추가할 내용:[nas]path = /NasPool/NasDataset browsable = yes read only = no guest ok = yes3. Samba 재시작sudo systemctl restart smbd4. 네트워크 공유 드라이브 추가\\[ip]\nassudo apt install smbclientsmbclient //127.0.0.1/nas -N🔒 사용자 기반 SMB 접근 설정 (선택사항)Samba 유저 생성:useradd smbuser passwd smbuser smbpasswd -a smb.. 2025. 3. 7. ubuntu 24.04 자동 로그인 GUI환경에서 자동 로그인 설정설정 열기사용자 설정 변경왼쪽 메뉴에서 System 선택User 메뉴에서 사용자 계정 클릭자동 로그인 활성화관리자 권한 비밀번호 입력 후 활성화"Automatic Login" 스위치 ON 2025. 3. 7. ubuntu 24.04 ZFS USB 마운트 USB 장치 확인lsblksudo fdisk -lZFS 설치sudo apt updatesudo apt install zfsutils-linuxZFS Pool 확인 후 Importsudo zpool importsudo zpool import -f NasPoolZFS 풀 확인sudo zpool statusZFS 파일 시스템 확인sudo zpool listUSB 장치 분리 및 안전한 해제sudo zpool export NasPool 2025. 3. 7. 라즈베리파이 크롬 실행 오류 The profile appears to be in use by another Chromium process (1851) on another computer (raspberrypi).Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium.이 오류는 호스트 이름을 변경한 후에 발생할 수 있습니다. 아래 명령을 실행하면 해결 할 수 있습니다.rm -rf ~/.config/chromium/Singleton* 2025. 1. 28. Xpenology 7.2v 설치하기 부트로더 준비부트로더 다운로드 https://github.com/PeterSuh-Q3/tinycore-redpill/releases/download/v1.1.0.1/tinycore-redpill.v1.1.0.1.m-shell.img.gz Releases · PeterSuh-Q3/tinycore-redpillContribute to PeterSuh-Q3/tinycore-redpill development by creating an account on GitHub.github.comWin32 Imager로 USB에 부트로더 만들기https://win32diskimager.b-cdn.net/win32diskimager-1.0.0-install.exe 이미지 빌드하기USB 부팅 2025. 1. 26. TrueNAS Scale 설치하기 3 User Group 추가하기 Credentials을 클릭하면 Users와 Groups가 있음그룹을 먼저 추가이름과 SMB Group 체크User추가Credentials 에서 Users 클릭이름 패스워드 입력Primary Group에서 만들어둔 그룹을 지정Create New Primary Group 는 비활성Home Directory Permissions 확인Shell 은 기본값 nologin SMB User 체크 2025. 1. 26. TrueNAS Scale 설치하기 2 Pool Datasets 만들기 Storage에서 Pool 만들기 Stripe (스트라이핑): 여러 디스크에 데이터를 연속적으로 분산하여 저장합니다. 이 방식은 성능은 향상시키지만, 단일 디스크 장애가 전체 데이터 손실을 초래할 수 있어 안정성은 낮습니다.Mirror (미러링): 두 디스크에 동일한 데이터를 저장하여 하나의 디스크가 실패해도 데이터를 보호할 수 있습니다. 미러링은 데이터 안정성을 제공하지만, 사용 가능한 총 스토리지 용량은 절반으로 줄어듭니다.RAIDZ1: 단일 패리티를 사용하여 디스크 한 개가 실패해도 데이터를 복구할 수 있는 구성입니다. 데이터 보호와 용량 효율성 사이의 균형을 제공합니다.RAIDZ2: 두 개의 패리티를 사용하여 두 개의 디스크가 실패해도 데이터를 보호할 수 있습니다. 더 높은 데이터 안정성을 제공하.. 2025. 1. 25. TrueNas Scale 설치하기 1 - 나만의 홈나스 설치 TrueNAS Scale 설치파일 다운로https://www.truenas.com/download-truenas-scale/ Download TrueNAS SCALE - Data Storage SoftwareDownload TrueNAS SCALE - the data storage software that helps you store and access your data with ease. Add free apps to expand NAS capabilities.www.truenas.comTrueNAS 버전별 차이점TrueNAS Core홈 사용자 및 소규모 사무실오픈 소스, ZFS, 파일 공유, 스냅샷, 복제TrueNAS SCALE중대규모 사업, 클러스터링 필요 사용자오픈 소스, ZFS, 가상화 지원, .. 2025. 1. 25. ubuntu raspberryPi install sudo apt install ./grass_4.29.0_amd64.deb 2025. 1. 19. ubuntu 24.04.1 설치 저장소 업데이트sudo apt updateifconfig 유틸 설치sudo apt install net-toolssudo apt install vimopenssh-server 설치sudo apt install openssh-serverssh 자동 재실행sudo systemctl enable ssh.servicessh 실행 상태 체크sudo systemctl status ssh 2025. 1. 19. ubuntu 2024 CLI cheat sheet 2025. 1. 18. 윈도우11 특정 드라이브 숨기거나 표시하기 윈도우 특정 드라이브 숨기기(탐색기에 나타나지 않게 하기)E: 드라이브를 윈도우 파일 탐색기에 나타나지 않도록 해 보겠습니다.Windows + R 키를 눌러 실행 창을 띄워 regedit 실행해서 레지스트리 편집기 화면을 띄웁니다.위치 : HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies위의 위치로 이동하여 Explorer 키를 생성 합니다. 이미 생성되어져 있다면 Skip하면 됩니다.Explorer를 선택한 상태에서 마우스 오른쪽 버튼을 클릭하여 새로 만들기(N) - DWORD(32비트) 값(D) 선택 합니다.새로 추가된 DWORD 값의 이름을 "**NoDrivers"**라고 변경해 줍니다.NoDrivers를 더블클릭해서 DWOR.. 2025. 1. 18. BootStrap 정보 모 # 부트스트랩(Bootstrap) 공백(Spacing) 주기부트스트랩 다운로드 - https://getbootstrap.com/docs/5.2/getting-started/download/Get Start With BootStrap : https://getbootstrap.com/docs/5.2/getting-started/introduction/부트스트랩 card 컴포넌트 : https://getbootstrap.com/docs/5.2/components/card/Spring Boot Validation• https://beanvalidation.org/부트스트랩 pagination https://getbootstrap.com/docs/5.2/components/pagination/ 2025. 1. 18. 이전 1 2 3 4 ··· 9 다음 반응형