리눅스에서 삭제된 파일을 복구하는 방법은 무엇입니까?
Linux에서 삭제된 파일을 복구하는 방법은 무엇입니까? 다음 기사에서는 Linux에서 삭제된 파일을 복구하는 방법을 소개합니다. 도움이 필요한 친구들이 모두 참고할 수 있기를 바랍니다.
Linux에는 Windows와 같은 휴지통이 없습니다. 기본적으로 rm -rf *
를 사용하여 파일을 검색할 수 없습니다. rm -rf *
基本上文件是找不回来的。
那么问题来了:
对于linux下误删的文件,我们是否真的无法通过软件进行恢复呢?
答案当然是否定的,对于误删的文件,我们还是能通过软件恢复过来的。对于误删文件还原可以分为两种情况:
一种是删除以后在进程存在删除信息
一种是删除以后进程都找不到,只有借助于工具还原。
接下来以例子分别解说下两种不同的误删还原方式:
误删除文件进程还在的情况:
这种一般是有活动的进程存在持续标准输入或输出,到时文件被删除后,进程PID依旧存在。这也是有些服务器删除一些文件但是磁盘不释放的原因。
打开一个终端对一个测试文件做cat追加操作:
[root@docking ~]# echo "This is DeleteFile test." > deletefile.txt [root@docking ~]# ls deletefile.txt [root@docking ~]# cat >> deletefile.txt Add SomeLine into deletefile for fun.
打开另外一个终端查看这个文件可以清楚看到内容:
[root@docking ~]# ls deletefile.txt [root@docking ~]# cat deletefile.txt This is DeleteFile test. Add SomeLine into deletefile for fun.
此时,删除文件rm -f deletefile.txt
[root@docking ~]# rm -f deletefile.txt [root@docking ~]# ls #命令查看这个目录,文件已经不存在了,那么现在我们将其恢复出来。
lsof查看删除的文件进程是否还存在。
如没有安装请自行
yum install lsof
或者apt-get install lsof
1、类似这种情况,我们可以先lsof查看删除的文件 是否还在
[root@docking ~]# lsof | grep deletefile cat 21796 root 1w REG 253,1 63 138860 /root/deletefile.txt (deleted)
2、恢复cp /proc/pid/fd/1 /指定目录/文件名
进入 进程目录,一般是进入/proc/pid/fd/,针对当前情况:
[root@docking ~]# cd /proc/21796/fd [root@docking fd]# ll 总用量 0 lrwx------ 1 root root 64 1月 18 22:21 0 -> /dev/pts/0 l-wx------ 1 root root 64 1月 18 22:21 1 -> /root/deletefile.txt (deleted) lrwx------ 1 root root 64 1月 18 22:21 2 -> /dev/pts/0
恢复操作:
[root@docking fd]# cp 1 ~/deletefile.txt.backup [root@docking fd]# cat ~/deletefile.txt.backup This is DeleteFile test. Add SomeLine into deletefile for fun.
3、恢复完成。
误删除的文件进程已经不存在,借助于工具还原
准备一些文件目录
#准备一份挂载的盘 mkdir backuptest cd backuptest mkdir deletetest mkdir deletetest/innerfolder echo "Delete a folder test." > deletetest/innerfolder/deletefile.txt echo "tcpdump:x:172:72::/:/sbin/nologin" > tmppasswd
最后准备的目录结构如下:
taroballs@taroballs-PC:/media/taroballs/taroballs/backuptest$ cd .. taroballs@taroballs-PC:/media/taroballs/taroballs$ tree backuptest/ backuptest/ ├── deletetest │ └── innerfolder │ └── deletefile.txt └── tmppasswd 2 directories, 2 files
现在开始删除该目录rm -rf backuptest/
taroballs@taroballs-PC:/media/taroballs/taroballs$ rm -rf backuptest/ taroballs@taroballs-PC:/media/taroballs/taroballs$ ls -l 总用量 0
这种情况一般是没有守护进行或者后台进程对其持续输入,所以删除就真的删除了。lsof也看不到,故需要采用工具进行恢复。
现在开始进行误删除文件的恢复。
我们采用的工具是extundelete第三方工具。恢复步骤以及注意事项如下:
停止对当前分区做任何操作,防止inode被覆盖。inode被覆盖基本就告别恢复了。
夸张一点讲,比如停止所在分区的服务,卸载目录所在的设备,有必要的情况下都可以断网。
通过dd命令对 当前分区进行备份,防止第三方软件恢复失败导致数据丢失。
适合数据非常重要的情况,这里是例子,所以就没有备份,如备份可以考虑如下方式:dd if=/path/filename of=/dev/vdc1
通过umount命令,对当前设备分区卸载。或者fuser 命令umount /dev/vdb1
如果提示设备busy,可以用fuser命令强制卸载:fuser -m -v -i -k ./
下载第三方工具extundelete安装,搜索误删除的文件进行还原
extundelete工具安装
extundelete下载地址:http://extundelete.sourceforge.net/
wget https://nchc.dl.sourceforge.net/project/extundelete/extundelete/0.2.4/extundelete-0.2.4.tar.bz2
解压该文件tar jxvf extundelete-0.2.4.tar.bz2
若报这种错误
[root@docking ~]# tar jxvf extundelete-0.2.4.tar.bz2 tar (child): bzip2:无法 exec: 没有那个文件或目录 tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now
则使用yum -y install bzip2
进行解决
[root@docking ~]# tar jxvf extundelete-0.2.4.tar.bz2 extundelete-0.2.4/ extundelete-0.2.4/acinclude.m4 extundelete-0.2.4/missing extundelete-0.2.4/autogen.sh extundelete-0.2.4/aclocal.m4 extundelete-0.2.4/configure extundelete-0.2.4/LICENSE extundelete-0.2.4/README ...................................................
cd extundelete-0.2.4 ./configure
若这步骤报错
[root@docking extundelete-0.2.4]# ./configure Configuring extundelete 0.2.4 configure: error: in `/root/extundelete-0.2.4': configure: error: C++ compiler cannot create executables See `config.log' for more details
则使用yum -y install gcc-c++
解决.
若执行上一步仍然报错,
[root@docking extundelete-0.2.4]# ./configure Configuring extundelete 0.2.4 configure: error: Can't find ext2fs library
则使用yum -y install e2fsprogs e2fsprogs-devel
来解决。#Ubuntu的解决办法为sudo apt-get install e2fslibs-dev e2fslibs-dev
不出意外的话到这里应该configure能够顺利完成.
[root@docking extundelete-0.2.4]# ./configure Configuring extundelete 0.2.4 Writing generated files to disk [root@docking extundelete-0.2.4]#
最后make
然后 make install
[root@docking extundelete-0.2.4]# make make -s all-recursive Making all in src extundelete.cc: 在函数‘ext2_ino_t find_inode(ext2_filsys, ext2_filsys, ext2_inode*, std::string, int)’中: extundelete.cc:1272:29: 警告:在 {} 内将‘search_flags’从‘int’转换为较窄的类型‘ext2_ino_t {aka unsigned int}’ [-Wnarrowing] buf, match_name2, priv, 0}; ^ [root@docking extundelete-0.2.4]# make install Making install in src /usr/bin/install -c extundelete '/usr/local/bin'
extundelete安装完成.
扫描误删除的文件:
使用df -lh
查看挂载:
taroballs@taroballs-PC:~$ df -lh 文件系统 容量 已用 可用 已用% 挂载点 udev 1.9G 0 1.9G 0% /dev tmpfs 387M 1.8M 385M 1% /run /dev/sda2 92G 61G 26G 71% / tmpfs 1.9G 49M 1.9G 3% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup /dev/sda3 104G 56G 44G 57% /home tmpfs 387M 40K 387M 1% /run/user/1000 /dev/sda4 70G 20G 47G 30% /media/taroballs/d8423f8c-d687-4c03-a7c8-06a7fb57f96d /dev/sdb1 6.8G 4.1G 2.8G 60% /media/taroballs/taroballs /dev/sr0 4.0G 4.0G 0 100% /media/taroballs/2018-01-16-12-36-00-00 taroballs@taroballs-PC:~$ cd /media/taroballs/taroballs/ taroballs@taroballs-PC:/media/taroballs/taroballs$
可以看到,我们的目录/media/taroballs/taroballs
挂载到/dev/sdb1 这个文件系统中.
umount我们的挂载盘
比如:
taroballs@taroballs-PC:~$ df -lh | grep /dev/sdb1 /dev/sdb1 6.8G 4.1G 2.8G 60% /media/taroballs/taroballs
umount这个目录
taroballs@taroballs-PC:~$ umount /media/taroballs/taroballs taroballs@taroballs-PC:~$ df -lh | grep /dev/sdb1 taroballs@taroballs-PC:~$ #记得删除一定要后umount哦,不然二次写入谁也帮不了你呢。
通过inode节点恢复
taroballs@taroballs-PC:~$ mkdir recovertest taroballs@taroballs-PC:~$ cd recovertest/ taroballs@taroballs-PC:~/recovertest$
执行恢复extundelete /dev/sdb1 --inode 2
taroballs@taroballs-PC:/media/taroballs/taroballs$ sudo extundelete /dev/sdb1 --inode 2 NOTICE: Extended attributes are not restored. Loading filesystem metadata ... 8 groups loaded. Group: 0 Contents of inode 2: . .省略N行 File name | Inode number | Deleted status . 2 .. 2 deletetest 12 Deleted tmppasswd 14 Deleted
通过扫描发现了我们删除的文件夹,现在执行恢复操作。
(1)恢复单一文件tmppasswd
taroballs@taroballs-PC:~/recovertest$ extundelete /dev/sdb1 --restore-file passwd NOTICE: Extended attributes are not restored. Loading filesystem metadata ... 8 groups loaded. Loading journal descriptors ... 46 descriptors loaded. Successfully restored file tmppasswd
恢复文件是放到了当前目录RECOVERED_FILES。
查看恢复的文件:
taroballs@taroballs-PC:~/recovertest$ cat tmppasswd tcpdump:x:172:72::/:/sbin/nologin
(2)恢复目录deletetest
extundelete /dev/sdb1 --restore-directory deletetest NOTICE: Extended attributes are not restored. Loading filesystem metadata ... 8 groups loaded. Loading journal descriptors ... 46 descriptors loaded. Searching for recoverable inodes in directory deletetest ... 5 recoverable inodes found. Looking through the directory structure for deleted files ...
(3)恢复所有
taroballs@taroballs-PC:~/recovertest$ extundelete /dev/sdb1 --restore-all NOTICE: Extended attributes are not restored. Loading filesystem metadata ... 8 groups loaded. Loading journal descriptors ... 46 descriptors loaded. Searching for recoverable inodes in directory / ... 5 recoverable inodes found. Looking through the directory structure for deleted files ... 0 recoverable inodes still lost. taroballs@taroballs-PC:~/recovertest$ tree backuptest/ ├── deletetest │ └── innerfolder │ └── deletefile.txt └── tmppasswd 2 directories, 2 files
(4)恢复指定inode
taroballs@taroballs-PC:~/recovertest$ extundelete /dev/sdb1 --restore-inode 14 NOTICE: Extended attributes are not restored. Loading filesystem metadata ... 8 groups loaded. Loading journal descriptors ... 46 descriptors loaded. taroballs@taroballs-PC:~/recovertest$ cat file.14 tcpdump:x:172:72::/:/sbin/nologin #注意恢复inode的时候,恢复 出来的文件名和之前不一样,需要单独进行改名。
最后附上extundelete
- 🎜하나는 삭제 후 과정에서 삭제 정보가 있다는 것🎜 < li> 🎜하나는 삭제 후에는 프로세스를 찾을 수 없으며 도구를 통해서만 복원할 수 있다는 것입니다. 🎜
$ extundelete --help Usage: extundelete [options] [--] device-file Options: --version, -[vV] Print version and exit successfully. --help, Print this help and exit successfully. --superblock Print contents of superblock in addition to the rest. If no action is specified then this option is implied. --journal Show content of journal. --after dtime Only process entries deleted on or after 'dtime'. --before dtime Only process entries deleted before 'dtime'.Actions: --inode ino Show info on inode 'ino'. --block blk Show info on block 'blk'. --restore-inode ino[,ino,...] Restore the file(s) with known inode number 'ino'. The restored files are created in ./RECOVERED_FILES with their inode number as extension (ie, file.12345). --restore-file 'path' Will restore file 'path'. 'path' is relative to root of the partition and does not start with a '/' The restored file is created in the current directory as 'RECOVERED_FILES/path'. --restore-files 'path' Will restore files which are listed in the file 'path'. Each filename should be in the same format as an option to --restore-file, and there should be one per line. --restore-directory 'path' Will restore directory 'path'. 'path' is relative to the root directory of the file system. The restored directory is created in the output directory as 'path'. --restore-all Attempts to restore everything. -j journal Reads an external journal from the named file. -b blocknumber Uses the backup superblock at blocknumber when opening the file system. -B blocksize Uses blocksize as the block size when opening the file system. The number should be the number of bytes. --log 0 Make the program silent. --log filename Logs all messages to filename.--log D1=0,D2=filename Custom control of log messages with comma-separated Examples below: list of options. Dn must be one of info, warn, or --log info,error error. Omission of the '=name' results in messages --log warn=0 with the specified level to be logged to the console. --log error=filename If the parameter is '=0', logging for the specified level will be turned off. If the parameter is '=filename', messages with that level will be written to filename. -o directory Save the recovered files to the named directory. The restored files are created in a directory named 'RECOVERED_FILES/' by default.🎜다른 터미널을 열어 파일을 보면 내용을 명확하게 볼 수 있습니다. 🎜rrreee🎜이때 파일을 삭제합니다.
rm -f deletefile .txt</code >🎜rrreee<ul style="list-style-type: disc;"><li>🎜lsof는 삭제된 파일 프로세스가 아직 존재하는지 확인합니다. 🎜</li><li>🎜설치되지 않은 경우 <code>yum install lsof
또는 apt-get install lsof
🎜🎜1을 실행하세요. , 유사 이 경우 먼저 삭제된 파일이 아직 있는지 lsof로 확인할 수 있습니다🎜rrreee🎜2. cp /proc/pid/fd/1 /지정된 디렉터리/파일 이름
🎜🎜Enter 프로세스 디렉터리는 일반적으로 /proc/pid/fd/에 입력됩니다. 현재 상황: 🎜rrreee🎜복구 작업: 🎜rrreee🎜3. 🎜🎜실수로 삭제한 파일 프로세스는 더 이상 존재하지 않습니다. 도구를 사용하여 복원하세요.🎜🎜일부 파일 디렉터리를 준비하세요🎜rrreee🎜마지막으로 준비된 디렉터리 구조는 다음과 같습니다.🎜rrreee🎜이제 디렉터리 삭제를 시작하세요.
rm -rf backuptest/
🎜rrreee🎜 이런 경우에는 일반적으로 지속적으로 입력하는 데몬이나 백그라운드 프로세스가 없으므로 삭제하면 실제로 삭제됩니다. lsof도 볼 수 없으므로 복원하려면 도구를 사용해야 합니다. 🎜🎜지금 실수로 삭제한 파일 복구를 시작하세요. 🎜🎜우리가 사용하는 도구는 extundelete 타사 도구입니다. 복구 단계 및 주의 사항은 다음과 같습니다. 🎜- 🎜inode를 덮어쓰는 것을 방지하려면 현재 파티션에서 모든 작업을 중지하세요. inode를 덮어쓰면 기본적으로 복원된다. 🎜
- 🎜예를 들어 과장하려면 파티션이 있는 파티션의 서비스를 중지하고 디렉터리가 있는 장치를 제거하고 필요한 경우 네트워크 연결을 끊습니다. 🎜
- 🎜타사 소프트웨어 복구 실패로 인한 데이터 손실을 방지하려면 dd 명령을 사용하여 현재 파티션을 백업하세요. 🎜
- 🎜데이터가 매우 중요한 상황에 적합합니다. 여기에는 백업이 없으므로 다음 방법을 고려할 수 있습니다. dd if=/path/filename of=/ dev/vdc1🎜
- 🎜umount 명령을 사용하여 현재 장치 파티션을 마운트 해제하세요. 또는 umount /dev/vdb1🎜
- 🎜퓨저 명령을 사용하세요. 장치가 사용 중이라는 메시지가 표시되면 퓨저 명령을 사용하여 강제로 제거할 수 있습니다.fuser -m -v -i -k ./🎜
- 🎜타사 도구 extundelete 설치 다운로드, 실수로 삭제한 파일 검색하여 복원 🎜
tar jxvf extundelete-0.2.4.tar.bz2
🎜🎜이 오류가 보고되면🎜rrreee🎜 파일을 추출하고 yum -을 사용하세요. y install bzip2
를 사용하여 문제를 해결하세요🎜 rrreeerrreee🎜이 단계에서 오류가 보고되면🎜rrreee🎜, yum -y install gcc-c++
를 사용하여 문제를 해결하세요. 🎜🎜 이전 단계를 실행한 후에도 여전히 보고되는 경우 🎜rrreee🎜yum -y install e2fsprogs e2fsprogs -devel
을 사용하여 문제를 해결하세요. #Ubuntu의 솔루션은 sudo apt-get install e2fslibs-dev e2fslibs-dev
입니다.🎜🎜예기치 못한 일이 발생하지 않으면 여기에서 구성을 성공적으로 완료할 수 있습니다.🎜rrreee🎜마지막으로 make
그런 다음 make install
🎜rrreee🎜extundelete 설치가 완료됩니다.🎜🎜실수로 삭제된 파일 검사:🎜🎜df -lh
사용 마운트 보기: 🎜rrreee🎜우리 디렉토리 /media/taroballs/taroballs🎜🎜가 파일 시스템 /dev/sdb1.🎜🎜마운트 디스크 마운트 해제🎜🎜에 마운트된 것을 볼 수 있습니다. 예: 🎜rrreee🎜이 디렉토리를 마운트하세요🎜rrreee🎜inode 노드를 통해 복원🎜rrreee🎜복구 수행 extundelete /dev/sdb1 --inode 2
🎜rrreee🎜스캔을 통해 발견되었습니다. 폴더를 삭제하고 이제 복구 작업을 수행하세요. 🎜🎜(1) 단일 파일 복원 tmppasswd🎜rrreee🎜복구된 파일은 현재 디렉터리 RECOVERED_FILES에 저장됩니다. 🎜🎜복구된 파일 보기: 🎜rrreee🎜 (2) 디렉터리 복구 deletetest🎜rrreee🎜 (3) 모두 복구 🎜rrreee🎜 (4) 지정된 inode 복구🎜rrreee🎜마지막으로 extundelete
의 사용법은 다음과 같습니다. 첨부: 🎜$ extundelete --help Usage: extundelete [options] [--] device-file Options: --version, -[vV] Print version and exit successfully. --help, Print this help and exit successfully. --superblock Print contents of superblock in addition to the rest. If no action is specified then this option is implied. --journal Show content of journal. --after dtime Only process entries deleted on or after 'dtime'. --before dtime Only process entries deleted before 'dtime'.Actions: --inode ino Show info on inode 'ino'. --block blk Show info on block 'blk'. --restore-inode ino[,ino,...] Restore the file(s) with known inode number 'ino'. The restored files are created in ./RECOVERED_FILES with their inode number as extension (ie, file.12345). --restore-file 'path' Will restore file 'path'. 'path' is relative to root of the partition and does not start with a '/' The restored file is created in the current directory as 'RECOVERED_FILES/path'. --restore-files 'path' Will restore files which are listed in the file 'path'. Each filename should be in the same format as an option to --restore-file, and there should be one per line. --restore-directory 'path' Will restore directory 'path'. 'path' is relative to the root directory of the file system. The restored directory is created in the output directory as 'path'. --restore-all Attempts to restore everything. -j journal Reads an external journal from the named file. -b blocknumber Uses the backup superblock at blocknumber when opening the file system. -B blocksize Uses blocksize as the block size when opening the file system. The number should be the number of bytes. --log 0 Make the program silent. --log filename Logs all messages to filename.--log D1=0,D2=filename Custom control of log messages with comma-separated Examples below: list of options. Dn must be one of info, warn, or --log info,error error. Omission of the '=name' results in messages --log warn=0 with the specified level to be logged to the console. --log error=filename If the parameter is '=0', logging for the specified level will be turned off. If the parameter is '=filename', messages with that level will be written to filename. -o directory Save the recovered files to the named directory. The restored files are created in a directory named 'RECOVERED_FILES/' by default.
推荐:《linux教程》
위 내용은 리눅스에서 삭제된 파일을 복구하는 방법은 무엇입니까?의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

핫 AI 도구

Undress AI Tool
무료로 이미지를 벗다

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

Chrome에 파일을 업로드하는 데 문제가 있습니까? 이것은 짜증나는 것일 수 있습니다. 문서를 이메일에 첨부하거나 소셜 미디어에서 이미지 공유 또는 직장이나 학교에 중요한 파일을 제출하든 원활한 파일 업로드 프로세스가 중요합니다. 따라서 파일 업로드가 Windows PC의 Chrome에서 계속 실패하면 실망 스러울 수 있습니다. 좋아하는 브라우저를 포기할 준비가되지 않은 경우 Windows Google Chrome에서 파일을 업로드 할 수없는 수정 사항에 대한 몇 가지 팁이 있습니다. 1. 고급 문제 해결 팁에 대해 배우기 전에 Universal Repair부터 시작하면 아래에 언급 된 기본 솔루션을 사용해 보는 것이 가장 좋습니다. 인터넷 연결 문제 해결 : 인터넷 연결

Linux 사용자 그룹을 관리하려면보기, 작성, 삭제, 수정 및 사용자 속성 조정 작업을 마스터해야합니다. 사용자 그룹 정보를 보려면 CAT/etc/Group 또는 GetEntGroup을 사용하여 그룹 [사용자 이름] 또는 ID [사용자 이름]을 사용하여 사용자가 속한 그룹을보십시오. GroupAdd를 사용하여 그룹을 만들고 GroupDel을 사용하여 GID를 지정합니다. GroupDel을 사용하여 빈 그룹을 삭제하십시오. usermod-ag를 사용하여 그룹에 사용자를 추가하고 usermod-g를 사용하여 기본 그룹을 수정하십시오. usermod-g를 사용하여 /etc /group을 편집하거나 vigr 명령을 사용하여 그룹에서 사용자를 제거하십시오. GroupMod-N (변경 이름) 또는 GroupMod-G (GID 변경)를 사용하여 그룹 속성을 수정하고 관련 파일의 권한을 업데이트해야합니다.

Linux Systems에서 1. IPA 또는 HostName-I 명령을 사용하여 개인 IP를보십시오. 2. curlifconfig.me 또는 curlipinfo.io/ip를 사용하여 공개 IP를 얻습니다. 3. 데스크탑 버전은 시스템 설정을 통해 개인 IP를 볼 수 있으며 브라우저는 특정 웹 사이트에 액세스하여 공개 IP를 볼 수 있습니다. 4. 일반 명령은 빠른 호출을위한 별칭으로 설정할 수 있습니다. 이러한 방법은 간단하고 실용적이며 다양한 시나리오에서 IP 시청 요구에 적합합니다.

LinuxCanRunonOnModestHardWareWithSpecificminIumpiRements.a1ghzprocessor (x86orx86_64)는 withedual-corecperececended.r AMSHOUDDBEATLEAST512MBFORCOMMAND-LINEUSOR2GBFORDESKTOPENVIRONTMENTS.DISKSPACEREQUIRESAMINIMUMOF5–10GB, 그러나 25GBISBETTERFORAD

디지털 세계의 선구자 인 Bitcoin의 독특한 코드 이름과 기저 기술은 항상 사람들의 관심의 초점이었습니다. 표준 코드는 BTC이며 국제 표준을 충족하는 특정 플랫폼에서 XBT라고도합니다. 기술적 인 관점에서 Bitcoin은 단일 코드 스타일이 아니라 거대하고 정교한 오픈 소스 소프트웨어 프로젝트입니다. 핵심 코드는 주로 C로 작성되며 암호화, 분산 시스템 및 경제 원칙을 통합하여 누구나 코드를보고 검토하고 기여할 수 있습니다.

PHP 컨테이너가 자동 구성을 지원할 수 있도록 핵심은 CI (Continuous Integration) 프로세스를 구성하는 데 있습니다. 1. DockerFile을 사용하여 기본 이미지, 확장 설치, 종속성 관리 및 권한 설정을 포함하여 PHP 환경을 정의합니다. 2. Gitlabci와 같은 CI/CD 도구를 구성하고 .gitlab-ci.yml 파일을 통해 빌드, 테스트 및 배포 단계를 정의하여 자동 구성, 테스트 및 배포를 달성합니다. 3. PHPUNIT와 같은 테스트 프레임 워크를 통합하여 코드 변경 후 테스트가 자동으로 실행되도록합니다. 4. Kubernetes와 같은 자동 배포 전략을 사용하여 배포 .yaml 파일을 통해 배포 구성을 정의합니다. 5. Dockerfile 최적화 및 다단계 구조를 채택하십시오

Linux/MACOS의 종료 명령은 매개 변수를 통해 종료, 다시 시작 및 시간화 작업을 수행 할 수 있습니다. 1. 기계를 즉시 끄고 SudoshutdownNow 또는 -h/-p 매개 변수를 사용하십시오. 2. 종료 시간 또는 특정 시점을 사용하여 -C 사용을 취소하십시오. 3. -r 매개 변수를 사용하여 다시 시작하고 시간이 지정된 재시작을 지원하십시오. 4. Sudo 권한의 필요성에주의를 기울이고 원격 작동에주의를 기울이고 데이터 손실을 피하십시오.

독립적 인 PHP 작업 컨테이너 환경 구축은 Docker를 통해 구현할 수 있습니다. 특정 단계는 다음과 같습니다. 1. Docker 및 DockerCompose를 기초로 설치하십시오. 2. DockerFile 및 Crontab 파일을 저장하기위한 독립 디렉토리를 만듭니다. 3. PHPCLI 환경을 정의하고 CRON 및 필요한 확장을 설치하려면 dockerfile을 작성하십시오. 4. 타이밍 작업을 정의하기 위해 Crontab 파일을 작성하십시오. 5. docker-compose.yml 마운트 스크립트 디렉토리를 작성하고 환경 변수를 구성하십시오. 6. 컨테이너를 시작하고 로그를 확인하십시오. 웹 컨테이너에서 타이밍 작업을 수행하는 것과 비교할 때 독립 컨테이너는 자원 격리, 순수한 환경, 강력한 안정성 및 쉬운 확장의 장점이 있습니다. 로깅 및 오류 캡처를 보장합니다
