본문 바로가기

리눅스

[draft] 우분투에 Composer를 설치하고 사용하는 방법 우분투에 Composer를 설치하고 사용하는 방법Composer는 PHP 프로젝트의 의존성 관리를 위한 도구로 PHP 패키지를 쉽게 설치하고 관리할 수 있게 도와줍니다.테스트 환경$ lsb_release -dDescription: Ubuntu 22.04.2 LTSComposer 설치Composer (composer.phar) 파일 다운로드하고 설치Composer의 공식 웹사이트에서 제공하는 설치 명령어를 실행합니다.sudo curl -Ssf https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin/$ sudo curl -Ssf https://getcomposer.org/installer | sudo php -- --in.. 더보기
growpart 명령어 growpart 명령어 growpart는 리눅스에서 파티션 크기를 조정하는 명령어입니다. 이 명령어는 파티션 크기를 확장하거나 줄이는 데 사용됩니다. growpart(cloud-utils-growpart) 패키지 설치 yum install -y cloud-utils-growpart $ which growpart /bin/growpart 기본 문법 growpart [옵션] 디스크명 파티션번호 주요 옵션 -h, --help: 도움말 메시지 표시. -v, --verbose: 자세한 출력 표시. -N, --dry-run: 실제로 파티션 크기를 조정하지 않고 시뮬레이션만 수행. -f, --force: 파티션 크기를 조정할 때 경고를 무시하고 강제로 진행. -u, --unit unit: 단위를 지정 (K, M, G.. 더보기
MongoDB의 샤딩을 활성화(enable sharding)하고 샤딩된 클러스터에서 쿼리를 테스트하는 방법 MongoDB의 샤딩을 활성화(enable sharding)하고 샤딩된 클러스터에서 쿼리를 테스트하는 방법 MongoDB의 샤딩은 데이터베이스를 여러 서버에 분산 저장하고 대량의 데이터를 효율적으로 처리하기 위한 기술입니다. 샤딩 전략 해시 기반 샤딩(Hash-based sharding) 범위 기반 샤딩(Range-based sharding) 새 데이터베이스(exampleDB) 생성 use exampleDB db.stats() 인덱스 생성 db.exampleCollection.createIndex({ name : 1 }) show collections db.exampleCollection.getShardDistribution() mongos> db.exampleCollection.getShardDistr.. 더보기
주요 SQL과 NoSQL 데이터베이스 유형 및 특징 주요 SQL과 NoSQL 데이터베이스 유형 및 특징 SQL (관계형 데이터베이스) 데이터 모델: 테이블 형식의 관계형 데이터 모델을 사용합니다. 데이터는 정형화되며, 각 테이블에는 열과 행이 있습니다. 스키마: 정적 스키마를 사용하며, 데이터 구조가 미리 정의되어 있어야 합니다. 쿼리 언어: SQL(Structured Query Language)을 사용하여 데이터를 검색, 수정 및 관리합니다. 확장성: 수직 확장이 주로 사용되며, 성능을 향상시키려면 더 많은 리소스가 필요합니다. 사용 사례: 트랜잭션 처리, 데이터 일관성 및 정확성이 필요한 응용 프로그램에 적합합니다. NoSQL (비관계형 데이터베이스) 데이터 모델: 다양한 데이터 모델을 사용할 수 있으며, 주로 비정형 또는 반정형 데이터를 저장합니다... 더보기
[draft] MongoDB 5.0+에는 AVX를 지원하는 CPU가 필요함 MongoDB 5.0+에는 AVX를 지원하는 CPU가 필요함WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!mongos1 | WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!mongos1 | see https://jira.mongodb.org/browse/SERVER-54407mongos1 | see also https://www.mongodb.com/community/forums/t/mongodb-5-0-.. 더보기
[리눅스] 도커 컨테이너로 몽고디비 클러스터 구성하기(mongodb shard cluster) 도커 컨테이너로 몽고디비 클러스터 구성하기(mongodb shard cluster) MongoDB의 복제 Primary with Two Secondary Members (PSS) Primary with a Secondary and an Arbiter (PSA) 테스트 환경 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) $ docker version Client: Docker Engine - Community Version: 20.10.21 API version: 1.41 Go version: go1.18.7 Git commit: baeda1f Built: Tue Oct 25 18:04:24 2022 OS/Arch: linux/amd64 C.. 더보기
yum(dnf) 설치 및 업데이트 시 발생하는 패키지 충돌 문제 해결 방법 yum(dnf) 설치 및 업데이트 시 발생하는 패키지 충돌 문제 해결 방법yum update -yproblem with installed package perl-ExtUtils-MakeMaker-1:7.34-1.el8.noarch(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)이 오류는 설치하려는 패키지가 시스템의 기존 패키지와 버전이나 의존성 문제로 인해 충돌이 발생할 때 나타납니다.$ yum update -yLast metadat.. 더보기
레디스 서버 설정(redis backup) 레디스 서버 설정(redis backup) 레디스 - AOF 오류 Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis. appendonly yes -> AOF 파일 읽음(AOF 백업) appendonly no -> RDB 파일 읽음(RDB 백업) info persistence 127.0.0.1:6379> info persistence # Persistence loading:0 async_loading:0 current_cow_peak:0 current_cow_size:0 current_cow_siz.. 더보기