Intall
- 开始安装系统,
Install or upgrade an existing system
选择Skip
,语言选择English
选择基本存储设备
,是,放弃所有数据
- [
配置网络DHCP+自动连接
],时区选择上海
设置root密码
,创建自定义布局
,
# for 2T HardDisk
/boot:ext4:500M
/swap:Memory*2 (for mem<4G) and Memory (for mem>4G)
/:ext4:150G
/home:ext4:rest
# for >4T HardDisk
/boot:ext4:1G
LVM:
/swap:Memory*2 (for mem<4G) and Memory (for mem>4G)
/:ext4:200G
/home:ext4:rest
格式化
将改写写入磁盘
DeskTop+现在自定义
选择合适的软件
- 一步一步安装。
SSH without password
Unidirectional
- at node02,
ssh-keygen -t rsa
,一直Enter。
scp ~/.ssh/id_rsa.pub node01:/root/.ssh/
- login node01,
cd ~/.ssh/ && cat id_rsa.pub>>authorized_keys & chmod 600 authorized_keys
- node02 can login node01, but node01 can not login node02.
Interflow
- at node01,
ssh-keygen -t rsa
,一直Enter。
cd ~/.ssh/ && cp id_rsa.pub authorized_keys && chmod 600 authorized_keys
scp -r ~/.ssh/* node02:.ssh/
Add port
su root
# vi /etc/ssh/sshd_config
Port 22
Port 8022
# Add port to firewall
firewall-cmd --permanent --add-port=8022/tcp
firewall-cmd --reload
firewall-cmd --list-all
# Add port to Selinux
semanage port -a -t ssh_port_t -p tcp 8022
semanage port -l |grep ssh
systemctl restart sshd.service
Dell IDRAC
- Bois: IDRAC setting->NetWork->IP设置
- 浏览器访问IDRAC IP,初始用户名和密码:root/calvin
Reset Time
临时修改时间
date -s '2019-09-18 09:25:23'
永久修改时间
hwclock --set --date '2019-09-18 09:25:23'
hwclock --hctosys
clock -w
date
远程开机
多个网卡
单个网卡
- BIOS设置来电自动启动
- 使用wifi智能插座
- 关机时,执行
halt
,注意不要使用poweroff
,然后在手机上app关闭智能插座。
- 开机时,手机上app打开智能插座。
永久修改时区
tzselect
,选择 Asia->Hong Kong.
cp /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime
hwclock -w
Linux Softs
latex,ImageMagick and gnuplot
yum install texlive-latex
yum install ImageMagick
yum install gnuplot
Plotutils
graph -T png -W 0.005 -C -m 1 -S 4 0.05 -g 3 -f 0.05 -X "My X" -Y "My Y" -L "example" < a.dat >b.png
Other Tips
- Whole line replacement:
sed -i "/path to env_sched/c export soft_root=\$(dirname \$(cd \$(dirname \${BASH_SOURCE}) && pwd))" topnode
NFS
Server
Install
su root
yum install nfs-utils rpcbind
systemctl enable rpcbind
systemctl enable nfs
systemctl start rpcbind
systemctl start nfs
Firewall
su root
firewall-cmd --zone=public --permanent --add-service={rpc-bind,mountd,nfs}
firewall-cmd --reload
firewall-cmd --list-all
Share Folder
su root
mkdir /data
chmod 755 /data
### vim /etc/exports
/data/ 172.24.3.0/24(rw,async)
systemctl restart nfs
showmount -e localhost
Client on linux
Manual mount
mkdir /home/data
sudo mount -t nfs xx.xx.xx.xx:/data/ /home/data/
sudo mount |grep data
Auto mount
###/etc/fstab
xx.xx.xx.xx:/data/ /home/data/ nfs
mount -a
Client on Windows
- Start
NFS service
on windows (prefessional version).
mount -o \\xx.xx.xx.xx\data\ K:
- or
win+E
, open Map Network Drive
and add.
VNC
Server on Cent OS 7.4
VNC Setting
su root
yum install tigervnc tigervnc-server
firewall-cmd --list-all
firewall-cmd --permanent --add-port=5936/tcp
firewall-cmd --reload
firewall-cmd --list-all
``
```sh
###
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:53.service
## Chang <USER> to your username (e.g., mu) in /etc/systemd/system/vncserver@:53.service as follows:
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
#User=<USER>
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=-/usr/bin/vncserver -kill %i
ExecStart=/usr/sbin/runuser -l mu -c "/usr/bin/vncserver %i"
PIDFile=/home/mu/.vnc/%H%i.pid
ExecStop=-/usr/bin/vncserver -kill %i
[Install]
WantedBy=multi-user.target
Service and Firewall
###
su mu
vncpasswd
### vim /home/mu/.vnc/config
geometry=1920x11080
su root
systemctl start vncserver@\:53.service
systemctl daemon-reload
systemctl enable vncserver@\:53.service
Viewer
CUDA installation on Cent OS 7.4
Ban nouvean
module
su root
lsmod | grep nouveau
## vi /etc/modprobe.d/blacklist-nouveau.conf and /etc/modprobe.d/blacklist.conf, and add
blacklist nouveau
options nouveau modeset=0
#####
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
reboot
lsmod | grep nouveau
Installation
su root
## install base
sh cuda_9.2.148_396.37_linux.run
## install patch
sh cuda_9.2.148_1_linux.run
GCC
gcc 7.5 installation
http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-7.5.0/gcc-7.5.0.tar.gz
tar -xf gcc-7.5.0.tar.gz
cd gcc-7.5.0
contrib/download_prerequisites
mkdir gccbuild
cd gccbuild
../configure --prefix=/home/ywmu/backup/Src/gcc/gcc75 --enable-boostrap --disable-multilib --enable-languages=c,c++,fortran,lto,go
make
make install
Add GPT Disk
su root
fdisk -l
lsblk
parted /dev/sdc
(parted)mklabel gpt
(parted)mkpart paper xfs 0% 100%
(parted)p
(parted)q
mkfs.xfs -f /dev/sdc1
blkid /dev/sdc1
mkdir /home/muyw/paper2
mount -t xfs /dev/sdc1 /home/muyw/paper2
df -Th
# vi /etc/fstab
UUID=0d50d979-8479-42ef-b2a6-XXXXX /home/muyw/paper2 xfs defaults 0 0
mount -a
SSH
Keep SSH Connection Alive
- On target host and transit servers (including frp server),
sudo vi /etc/ssh/sshd_config
## modify
TCPKeepAlive yes
ClientAliveInterval 30
ClientAliveCountMax 30
## end
sudo systemctl restart sshd
- On Putty
# Connection -> Seconds between keepalive(0 to turn off), set 10