Meaning of Linux directries
- /bin - Binaries.
- /boot - Files required for booting.
- /dev - Device files.
- /etc - Et cetera. The name is inherited from the earliest Unixes, which is when it became the spot to put config-iles.
- /home - Where home directories are kept.
- /lib - Where code libraries are kept.
- /media - A more modern directory, but where removable media gets mounted.
- /mnt - Where temporary file-systems are mounted.
- /opt - Where optional add-on software is installed. This is discrete from /usr/local/ for reasons I’ll get to later.
- /run - Where runtime variable data is kept.
- /sbin - Where super-binaries are stored. These usually only work with root.
- /srv - Stands for “serve”. This directory is intended for static files that are served out. /srv/http would be for static websites, /srv/ftp for an FTP server.
- /tmp - Where temporary files may be stored.
- /usr - Another directory inherited from the Unixes of old, it stands for “UNIX System Resources”. It does not stand for “user” (see the Debian Wiki). This directory should be sharable between hosts, and can be NFS mounted to multiple hosts safely. It can be mounted read-only safely.
- /var - Another directory inherited from the Unixes of old, it stands for “variable”. This is where system data that varies may be stored. Such things as spool and cache directories may be located here. If a program needs to write to the local file-system and isn’t serving that data to someone directly, it’ll go here.
Create group and user
1 |
|
disable firewall
1 |
|
Setup local yum source
upload CentOS-7-x86_64-DVD-1611 to /opt
1 |
|
and then update yum repo file
1 |
|
Run ssh-keygen and add public key to authorized_keys
1 |
|
then insert public key to target server ~/.ssh/authorized_keys
Setup nfs
1 |
|
Make file-system using gdisk for over 2T disk
Using fdisk tool can only process at maximum 2T disk, while using parted tool will recognise the file system as ‘Microsoft Basic Data’ incorrectly. Therefore should use the gdisk tool.
1 |
|
Lookup CPU info
Over all, the Total Physical CPU Number == No. of Physical CPU * No. of Core(s) per physical CPU And the Total Logical CPU Number == No. of Physical CPU * No. of Core(s) per physical CPU * No. of Thread(s) per core
- Socket(s) #主板插槽,通常称为n路
The number of the physical socket to which the CPU belongs.
1
lscpu | grep 'Socket'
The socket(s) number is same as the physical CPU number
- Physical CPU number
1
cat /proc/cpuinfo | grep 'physical id' | sort | uniq | wc -l
- Core(s) per socket or core(s) per physical CPU
This number represents the count of the physical core (CPU) to which the hardware thread (logical CPU) belongs.
1
lscpu | grep 'Core(s) per socket'
or
1
cat /proc/cpuinfo | grep 'cpu cores' | uniq
or
1
cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l
- Thread(s) per core #超线程数
This number represents the Logical CPU count under each Core. Each thread under a core is worked as Logical CPU. These threads are also called as Hardware Thread. Hardware Thread supports executing multiple threads simultaneously on each core and every thread runs as an independent CPU instance.
1
lscpu | grep 'Thread(s) per core'
- CPU(s)
The total number of Logical CPUs available on the board.
1
lscpu | grep 'CPU(s)'
or
1
cat /proc/cpuinfo | grep 'processer' | wc -l
- NUMA node(s) #非均匀内存访问架构
Non-uniform memory access node.
1
lscpu | grep 'NUMA'