Chủ Nhật, 05/04/2020 - [17:17:45]
linux logo

How to Start/Stop or Enable/Disable firewalld on CentOS 7

How to Start/Stop or Enable/Disable firewalld on CentOS 7 - | firewalld (Dynamic Firewall Manager) tool provides a dynamically managed firewall. The tool enables network/firewall zones to define the trust level of network connections and/or interfaces. It has support both for IPv4 and IPv6 firewall settings. Also, it supports Ethernet bridges and allow you to separate between runtime and permanent configuration options. Finally, it supports an interface for...

How to generate random password string in Python

How to generate random password with Python programming language ? Ok, i will introduce you a good way with some neccessary modules to make a strong password (digits + upper character + lower character), the min length of password string will be 8. In this post, i will use Python 2.7 syntax for example, if you choose Python 3.x you need to search document of module. 1. Using module string...
linux logo

How to set password for Single-User mode on Linux (CentOS/RHEL)

What is Single-User mode on Linux? That is a mode help you restore some config or operation on OS Linux like reset password root when you forgot it,... However, if you don't try to protect this mode, your system will have a exploited vulnerability so you need to set password for Single-user mode. (single-user grub mode, before prompt pass single-mode appear phase) Note: - When you set password for single-user mode on...

How to install TFTP Server on CentOS 7

In this post i will show you how to install TFTP Server on CentOS 7. Trivial File Transfer Protocol (TFTP) is a small Internet service ultility that can help use to transfer file easier than FTP Service. TFTP does not require authentication from client and client cannot list file on directory of TFTP Server. TFTP use UDP Protocol at port number 69, you can read more from RFC 1350....

How to use “tree” command to list directory with tree structure on Linux

Tree command is a application in UNIX/Linux OS that can help you list all files/directories at specific path directory with the format view of tree style. This command can scan recursively sub directory to find all files for listing. It's very help ful for you, trust me. Installing and using command tree command on Linux 1. Installing application command 'tree' - Default, 'tree' is not installed in Linux/UNIX so you can have it with...
logo ubuntu

[Ubuntu] Fix error “Fatal error: Python.h: No such file or Directory” when using pip

When you want to install an application or build a module for specific python version by command 'pip' on OS Ubuntu/Debian. You are not lucky when have to encounter the error "Fatal error: Python.h: No such file or Directory" like example below : You will consider what is 'Python.h' and search google for finding the resolution to handle this case. So we will go to next part, how to fix...

Fix error ‘rpmdb: PANIC: fatal region error detected’ when use yum on CentOS/RHEL

You are using CentOS/RHEL OS and perform some action with ‘yum’ to install package through repository. Then you encounter this kind error ‘rpmdb: PANIC: fatal region error detected; run recovery’ : How to fix errror ‘rpmdb: PANIC: fatal region error detected’ on CentOS/RHEL This is messed case, but you can follow the way to fix it by cleaning out RPM DB and rebuild it. First of all, you need to backup...

[Linux] How to install EPEL Repository on CentOS/RHEL 6/7

In this post, i will show you how to install EPEL Repository on CentOS/RHEL 5/6/7, then you will also know how to check EPEL installed successfuly or not. What is EPEL Repository? EPEL (Extra Packages for Enterprise Linux) is open source and free community based repository project from Fedora team which provides 100% high quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS, and Scientific Linux Why...

[Linux] Fix error EPEL Repo “Cannot retrieve metalink for repository” on CentOS

When you installed EPEL Repository on CentOS, you use "yum" to install some application but the issue appears (Cannot retrieve metalink for repository: epel) : Reason: - Default in EPEL Repo is configured to connect to EPEL Server by HTTPS Connection, however in some cases the information Certificate Chain/Root Certificate on CentOS doesnt have good-new Certificates so you cannot connect to EPEL Server for retrieving metalink. Fix error "Cannot retrieve metalink for...

[Bash] How to extract number from string in bash shell

I will list some ways to extract number from string in bash shell script. We will set two sample variables to use with commands for extracting. VAR1="Im 25 years old." VAR2="Im 25 years old. I have worked as system admin for 5 years." Four ways to extract number from string in bash shell 
1. 'tr' command   
2. ‘sed' command 
3. bash built-in or 4. 'grep' command   May be we have more than ways better to extract number from... Protection Status
error: Content is protected !!