Xin chào, khi tôi quyết định viết bài này, tôi buộc lòng phải thừa nhận, tôi không thể nhớ command cũng như các tham số của tar. Bài viết này là dành cho tôi, xem lại sử dụng lệnh tar.
1. Cách tạo lưu trữ (archive) và nén
$ tar-cJvf file_name.tar.xz directory_full_path
Giải thích các tham số:
-c: tạo archive/lưu trữ
-J: nén với định dạng xz, mục đích của nó là giảm dung lượng file lưu trữ. Không có cũng được.
-v: verbose, hiện thông tin chi tíết khi chạy lệnh. Không có cũng được.
-f: tên file file_name.tar.xz
2. Cách mở lưu trữ (extract)
$ tar-xvf file_name.tar.xz
Giải thích các tham số:
-x: extract, mở lưu trữ
-v: verbose, hiện thông tin chi tíết khi chạy lệnh. Không có cũng được.
This guide is all about copy/extract file from docker build process, then copy it to host machine.
This method is very useful when you have to release/package .rpm file for further usage, but in this post,
I will use mkdocs for example, I build mkdocs html files with docker, then copy those html files to host
machine.
I am the owner of a K1 Max 3D printer, the built-in lightning system is not good enought for me. In fact, it’s quite dark.
This project aims at improving the lightning system for K1 Max 3D printer!
I designed the lightning frame myself with Plasticity, due to limited size of K1 Max, I have split the whole big model into 8 parts, then print them one by one.
In addition, there are holes to use LED bars with zip ties, no messy with double-size tapes. You gonna be surprise while cleaning a mess of double-size tapes, and I hate it.
[1] 3D design[2] Light's ON/OFF[3] Finished Product
Name:asic-sentryVersion:1.0.0Release:1%{?dist}Summary:ASIC Sentry is a monitoring software designed to collect and send operational logs from ASIC Miners to a Mining Rig MonitorLicense:GNU General Public License v3.0URL:https://github.com/nguyenvinhlinh/ASIC-SentrySource0:asic-sentry-1.0.0.tar.xz%descriptionASIC Sentry is a monitoring software designed to collect and send operational logs from ASIC Miners to a Mining Rig Monitor%global debug_package %{nil}%prep%autosetup%buildcd assets;npm install;cd ..;mix deps.get --only prodMIX_ENV=prod mix compileMIX_ENV=prod mix assets.deployMIX_ENV=prod mix release%installmkdir -p %{buildroot}/opt/asic_sentrycp -r _build/prod/rel/asic_sentry/* %{buildroot}/opt/asic_sentry%files......A long list of installed files....%changelog*Tue Feb 04 2025 Nguyen Vinh Linh <nguyenvinhlinh93@gmail.com>-Support KS5L asic
Step 3. Run rpmbuild
$ cd SPECS;$ rpmbuild -bb asic-sentry-1.0.0.spec
Gonna see error:
ERROR 0002: file '/opt/asic_sentry/lib/crypto-5.5/priv/lib/crypto.so' contains an invalid runpath '/usr/local/lib64'
crypto is an erlang module. I dont know how to modify it. this is a work around!
4. Firewall-cmd service - /etc/firewalld/services/woodpecker-server.xml
<?xml version="1.0" encoding="utf-8"?><service><short>Woodpecker Server</short><description>This option allows woodpecker to use tcp port 443 HTTPS</description><portprotocol="tcp"port="443"/></service>
After along time disable SELinux, now you might want to enable it in Enforcing mode. After OS boot, in terminal,
you may not login even though you did enter correct username/password. It’s because your files not to be labeled or
labeled with SELinux context not matching the install policy.
The solution is that you ask SELinux to re-label in the next reboot. Enter the following command.
$ touch /.autorelabel
Then reboot!
In case you forget to do it. you need to go to rescue mode while booting the system, the GRUB2 menu will be displayed.
To boot the system into rescue mode using bash follow these steps:
Select the boot entry you wish to edit with the arrow keys.
Select the entry you wish to edit by pressing e.
Use the arrow keys to go to select the line beginning with linux, linux16, or linuxefi.
Go the the end of that line and include a space and the following rw init=/bin/bash.
If your disk is encrypted, you may need to add plymouth.enable=0
Press Ctrl-x or F10 to boot the entry
Then enter command line touch /.autorelabel and reboot!