linux

[HOW TO] Fix PYCURL ERROR 6 – “Couldn’t resolve host ‘mirrorlist.centos.org'”

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

To fix this error I updated NM_CONTROLLED to “no” in the file /etc/sysconfig/network-scripts/ifcfg-eth0

After this I restarted the network interface using the following commands:

ifdown eth0
ifup eth0

dns9.greencom.com.tw

modify /etc/resolv.conf

SShd 設定

SSH 伺服器的設定檔是 /etc/ssh/sshd_config,以下是一些 SSH 的安全配置:

為了加強SSH安全性, 除了限制root帳號登入這種必備的手段之外, 還參照了前輩們的做法, 從三部分來著手:

59.125.229.7: root nologin

2 3 6 8  modify /etc/hosts.allow and /etc/hosts.deny only 2-14

umount 時 出現 "Device is busy" 的解法

umount: /johnext: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))

c: current directory.
e: executable being run.
f: open file. f is omitted in default display mode.
F: open file for writing. F is omitted in default display mode.
r: root directory.
m: mmap'ed file or shared library.

$ fuser /johnext/ # 檢視在 mount 點有哪些 process 在跑.

/johnext: 26674c
$ ps -aux | grep 26674

How to Create Bootable USB Key CentOS 7

In this Linux install tooling tutorial we will take a look how to create a bootable usb key with CentOS 6.5 (and higher) or CentOS 7. We have also add how to create a bootable CentOS 7 USB key from Mac OSX.

From a Linux System

To create a bootable CentOS 7 USB key you need an CentOS DVD image and an USB key that has at least 4.2 gigabytes of space.

The starting from CentOS 6.5 (or higher) you can install from USB keys by simply transferring the desired ISO using the dd command line utility. For instance using the following command: