본문 바로가기

리눅스

C276x260.fwebp.q85 [draft] PHP Redis 확장(Extension) 모듈을 설치하는 방법 PHP Redis 확장(Extension) 모듈을 설치하는 방법redis server 설치sudo yum install -y gcc gcc-c++ make jemalloc tclsudo yum install -y redissystemctl --now enable redisredis-cli -h 127.0.0.1 -p 6379 pingredis extension 모듈 설치phpredis 패키지 다운로드wget https://github.com/phpredis/phpredis/archive/develop.zipunzip develop.zipcd phpredis-developphpredis 소스 코드 컴파일 및 설치/usr/local/php/bin/phpize ./configure --with-php-conf.. 더보기
C276x260.fwebp.q85 [draft] PHP zip 확장(Extension) 모듈 설치 PHP zip 확장(Extension) 모듈 설치테스트 환경$ cat /etc/redhat-releaseCentOS Linux release 7.9.2009 (Core)zip 패키지 다운로드https://pecl.php.net/package/ziplibzip.x86_64 : C library for reading, creating, and modifying zip archiveslibzip-devel.x86_64 : Development files for libzipyum info libzip$ yum info libzipLoaded plugins: fastestmirror, ovlLoading mirror speeds from cached hostfile * base: mirror.navercorp.c.. 더보기
C276x260.fwebp.q85 [draft] ubuntu "Could not get lock" APT 오류 ubuntu "Could not get lock" APT 오류apt 패키지 설치 시 에러Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 14185 (apt)[방법 1]apt 프로세스 확인ps aux | grep -i apt$ ps aux | grep -i aptroot 14185 0.0 0.3 74864 65204 pts/1 S+ 17:53 0:00 apt install -y php8.1-cli php8.1-common php8.1-mysql php8.1-zip php8.1-gd php8.1-mbstring php8.1-curl php8.1-xml php8... 더보기
C276x260.fwebp.q85 [draft] elasticsearch TLS 암호화 및 HTTPS 활성화 elasticsearch TLS 암호화 및 HTTPS 활성화elasticsearch tls 통신을 위한 인증서elasticsearch https 통신을 위한 인증서/usr/share/elasticsearch/bin/elasticsearch-certutil http --silent$ /usr/share/elasticsearch/bin/elasticsearch-certutil http --silent## Elasticsearch HTTP Certificate Utility## Do you wish to generate a Certificate Signing Request (CSR)?Generate a CSR? [y/N]y## Do you wish to generate one certificate per no.. 더보기
C276x260.fwebp.q85 [draft] 우분투에 screen을 설치하고 사용하는 방법 우분투에 screen을 설치하고 사용하는 방법Screen은 리눅스에서 여러 개의 가상 터미널 세션을 관리하고 장기 실행되는 작업을 백그라운드에서 실행하고 다시 연결할 수 있는 유용한 도구입니다.1. screen 설치screen을 설치하려면 터미널에서 다음 명령을 실행합니다.sudo apt-get updatesudo apt-get install -y screen위 명령을 실행하여 필요한 패키지를 업데이트하고 Screen을 설치합니다.2. screen 시작하기screen을 시작하려면 터미널에서 screen 명령을 입력합니다.screen이렇게 하면 새로운 Screen 세션이 시작됩니다.3. screen 세션 사용하기Screen 세션에서 다음과 같은 유용한 명령을 사용할 수 있습니다.새 창 열기 : Ctrl +.. 더보기
C276x260.fwebp.q85 [draft] screen 명령어 screen 명령어Summary : A screen manager that supports multiple logins on one terminalscreen 설치yum install -y screenscreen 세션 시작세션 생성screen -S [session name]screen -S sangchul[detached from 4008445.sangchul]세션 나기기Ctrl + a, d세션 리스트 확인screen -lsThere are screens on: 4008445.sangchul (Detached) 4008392.sangchu (Detached)2 Sockets in /var/run/screen/S-root.세션 다시 연결screen -r [session name]screen -r sangc.. 더보기
C276x260.fwebp.q85 [draft] Apache 및 PHP 버전 정보 노출 막기 Apache(HTTP) 및 PHP 버전 정보 노출 막기HTTP 헤더에서 Apache 및 PHP 버전 확인curl -I http://localhostHTTP/1.1 302 FoundDate: Fri, 28 Jan 2022 01:57:45 GMTServer: Apache/2.4.46 (Unix) OpenSSL/1.1.1k PHP/7.3.25Location: http://www.sangchul.kr/404.htmlContent-Type: text/html; charset=iso-8859-1 wget --server-response --spider http://localhost-S,--server-response : HTTP 서버에서 보낸 헤더와 FTP 서버에서 보낸 응답을 인쇄합니다.--spider : 이 옵.. 더보기
C276x260.fwebp.q85 [draft] PHP의 설정 파일인 php.ini 파일의 위치를 찾는 방법 PHP의 설정 파일인 php.ini 파일의 위치를 찾는 방법1. 명령줄을 사용하여 찾기php -i | grep "Configuration File"$ php -i | grep "Configuration File"Configuration File (php.ini) Path: /etc/php.ini또는php --ini | grep php.ini$ php --ini | grep php.ini Configuration File (php.ini) Path: /usr/local/apache2/confLoaded Configuration File: /usr/local/apache2/conf/php.ini2. phpinfo() 함수를 사용하여 찾기PHP 스크립트를 작성하고 ph.. 더보기