728x90

Linux 26

tar 압축 및 해제 (또는 압축 시 제외폴더 선정)

압축tar -cvf [압축폴더 파일명.tar] [압축할 폴더명]ex) tar -cvf backup.tar thisfolder 만약에 특정 디렉토리 제외 압축할 경우 (여기선 /etc/file/을 제거 후 압축)ex) tar -cvf backup.tar --exclude=' etc/file/' foldername/절대경로는 절대 안되며상대경로로 작성해야한다./www/include/file/일때 file을 삭제하고 싶으면/폴더까지 들어가서 tar -cvf backup.tar --exclude='include/file/' www을 하면된다 tar -cvf backup.tar --exclude=www/wms/include/file www만약 현재 내가 있는 위치가 www와 같아야하며, www/wms/includ..

Linux 2024.05.08

Linux (리눅스) SSL 인증서 갱신

0. 관리자 로그인 su password 1. apache 프로세스 확인 ps -ef | grep httpd -> /usr/sbin/httpd 경로일 경우 환경설정 파일은 /etc/httpd/conf, /etc/httpd/conf.d에 위치 /etc/httpd/conf.d/ssl.conf 에 들어가면 설정 값 확인 가능 여기에서 # Server Certificate: # Server Private Key: # Server Certificate Chain: # Certificate Authority (CA): 값들이 뭐하는 건지 확인 2. apache/bin 폴더에서 httpd -v -> 아파치 버전 내 서버 경우 ssl폴더안에 있어서 /etc/httpd/ssl/ 에서 기존 꺼 백업 후 새로운 ssl 갱신..

Linux 2023.12.07

Linux : 서버 이전, $result = bool(false)

기존 서버를 새로운 서버로 이전 이후 페이지에서 데이터값을 입력 후 전송 시 값이 안들어가는 현상이 발생 >> tar로 압축하여 보내 값이 다 똑같다 생각했으나 $result = mysqli_query($con, $sql);에서 var_dump($result); 실행 시 $result값이 bool(false)로 나옴 에러 로그 확인을 위해 $result = mysqli_query($con, $sql); // 쿼리 실행 if (!$result) { // 쿼리 실행이 실패한 경우 $error_message = mysqli_error($con); // 오류 메시지 가져오기 echo "쿼리 실행 오류: " . $error_message; } 구문 입력 후 [ERROR] MYSQL : Data too long f..

Linux 2023.07.04

Linux : systemctl (stop) -> enable , systemctl start 오류, Job for ~~. service failed because~~

CentOS 계열에서는 service xxx start 대신에 systemctl start xxx.service 형태로 변경되었다. systemctl start xxx.service 를 실행 했을 때 서비스가 시작되지 않을 때는 여러가지 원인이 있다. systemctl status xxx.service 를 하면 현재 상태를 볼 수 있다. 예를 들어 아래 svnserve 를 실행했지만, 서비스가 실행되지 않았다. 상태를 파악하기 위해서 status 를 실행해 보면 "disabled, vendor preset:disabled 라는 로그를 볼 수 있다. [root@cnode01-m etc]# systemctl start svnserve.service Job for svnserve.service failed b..

728x90