[Linux] tar: /path/to/filename.bz2: Wrote only 4096 of 10240 bytes

[root@test ~]# tar jcpfP /path/to/filename.bz2 /path/to/directory/* /bin/sh: line 1: bzip2: command not found tar: /path/to/filename.bz2: Wrote only 4096 of 10240 bytes tar: Child returned status 127 tar: Error is not recoverable: exiting now "Wrote only 4096 of 10240 bytes"는 파일 압축이 제대로 되지 않았음을 뜻할 수 있다. 이 경우에는 bzip2 프로그램이 깔리지 않아서 tar 파일...

[PHP] 이름이 같은 함수를 또 선언했을 때 - PHP Fatal error: Cannot redeclare...

PHP Fatal error: Cannot redeclare my_function() (previously declared in /.../index.php:150) in /.../index.php on line 159 이름이 같은 함수를 다시 선언하면 위와 같은 오류가 나올 수 있다. 이미 만든 함수 내용을 복사하고 붙여넣기하여 다른 함수를 만들다가 함수 이름을 바꾸는 것을 깜빡하면 이런 오류를 겪을 수 있다. <?php ... function my_function() { ... } function my_function() { ... } .....

[최불암 시리즈] 한밤의 북소리

미리보기 그림 - [최불암 시리즈] 한밤의 북소리
최불암의 대학 자취 시절 술에 만취한 친구를 업고 집까지 바래다 주고는 통행금지에 걸려 하루 신세를 지게 되었다. 잠이 막 들려는 무렵, 목이 마른지 벌떡 일어난 친구는 물을 주전자째 벌컥벌컥 마시더니 갑자기 머리를 방바닥에 왼쪽으로 3번, 오른쪽으로 3번 박치기하더니 자 버리는 것이었다. 이상하게 생각한 최불암. 자기도 주전자째로 물을 벌컥벌컥 마셔 보았다. 그리고 머리가 부서져라 왼쪽으로 3번, 오른쪽으로...

[dnf/yum] Killed

# sudo yum update Killed # sudo dnf update Killed # sudo dnf module list php Killed yum이나 dnf를 실행할 때 모두 Killed라고 나오고 멈춘다면, 메모리가 모자라기 때문일 수 있다. # sudo sysctl vm.swappiness vm.swappiness = 0 sysctl로 vm.swappiness 값을 확인해 본다. 값이 0이면 가상 메모리를 쓰지 못하는 상태일 수 있으므로, 1 이상으로 높혀 준다. # sudo sysctl vm.swappiness=30 vm.swap...

[openssh] [SELinux] Cannot bind any address

Dec 15 02:21:34 MyServer systemd[1]: sshd.service: Main process exited, code=exited, status=255/EXCEPTION ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: https://access.redhat.com/support ░░ ░░ An ExecStart= process belonging to unit sshd.service has exited. ░░ ░░ The process' exit code is 'exited' and its exit status is 255. Dec 15 0...

[nginx] getpwnam("apache") failed in /etc/nginx/nginx.conf:1

# nginx -t nginx: [emerg] getpwnam("apache") failed in /etc/nginx/nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed nginx를 깔면 nginx가 사용자로 등록된다. 그러므로 nginx.conf 파일에 nginx가 사용자로 들어가야 맞다. 그러나 apache를 깐 적이 없어도 nginx.conf에 apache가 사용자로 들어가 있기도 해서 이런 오류가 나올 수 있다. /etc/nginx/nginx.conf 파일을 열어...

[Linux] certbot 1.11.0

certbot 1.11.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ... Certbot can obtain and install HTTPS/TLS/SSL certificates. By default, it will attempt to use a webserver both for obtaining and installing the certificate. The most common SUBCOMMANDS and flags are: obtain, insta...