1、nfs服务端,修改/etc/idmapd.conf,将Domain前的#去掉,最终为Domain = local.domain.edu,执行命令:service rpcidmapd restart(重启nfs服务端的rpcidmapd服务)。
2、nfs客户端,修改/etc/idmapd.conf,将Domain前的#去掉,最终为Domain = local.domain.edu(nfs客户端和nfs服务端的Domain必须完全一致),执行命令:nfsidmap -c(清除nfs客户端的idmap缓存),切换到nfs文件夹后,发现属主已经正常了。

设置nofile和nproc参数(详情参见:linux设置nofile和nproc参数
ufw disable #禁用防火墙
dpkg-reconfigure dash #选择no,让sh默认使用bash而不用dash
apt-get update
apt-get install -y zip unzip
apt-get install -y automake autotools-dev binutils bzip2 elfutils expat gawk gcc gcc-multilib g++-multilib ksh less lib32z1 libaio1 libaio-dev libc6-dev libc6-dev-i386 libc6-i386 libelf-dev libltdl-dev libmotif4 libodbcinstq4-1 libpth-dev libpthread-stubs0-dev libstdc++5 lsb-cxx make openssh-server pdksh rlwrap rpm sysstat unixodbc unixodbc-dev unzip x11-utils zlibc

- 阅读剩余部分 -

CentOS设置示例【重新登录后生效】:

chmod +x /etc/rc.d/rc.local
echo "ulimit -n `cat /proc/sys/fs/nr_open`" >> /etc/rc.local
echo "ulimit -u 1048576" >> /etc/rc.local
echo "source /etc/profile" >> /etc/rc.local
echo "* soft nofile `cat /proc/sys/fs/nr_open`" >> /etc/security/limits.conf
echo "* hard nofile `cat /proc/sys/fs/nr_open`" >> /etc/security/limits.conf
echo "* soft nproc 1048576" >> /etc/security/limits.conf
echo "* hard nproc 1048576" >> /etc/security/limits.conf
sed -ri "s/^[^#]/#\0/" /etc/security/limits.d/*-nproc.conf

- 阅读剩余部分 -

安装和启动服务:

yum install -y wget gcc git python-setuptools && easy_install pip
#优先从github安装最新版本,如果从github安装失败,则使用备用方案,执行此命令安装:pip install shadowsocks
pip install git+https://github.com/shadowsocks/shadowsocks.git@master

- 阅读剩余部分 -

sort命令将文件/文本按行排序,可以从指定文件或标准输入中读数据,参数详解如下:
-n:按数值进行比较,如果不设置这个参数将按ASCII码值进行比较
-r:顺序反转,也就是倒序
-k:按第几个字段排序,字段下标从1开始
-t:指定字段分隔符
-u:去重,只输出排序字段相同的值第一次出现的行
示例:sort -nrk1 access.log

#system config
#systemctl stop firewalld & systemctl disable firewalld
#hostnamectl set-hostname server1 (must reconnect ssh for SecureCRT)
#chmod +x /etc/rc.d/rc.local

#configure hosts
echo '200.200.200.51 server1' >> /etc/hosts
echo '200.200.200.52 server2' >> /etc/hosts
echo '200.200.200.53 server3' >> /etc/hosts

- 阅读剩余部分 -

修改系统配置

chmod +x /etc/rc.d/rc.local
echo "ulimit -n `cat /proc/sys/fs/nr_open`" >> /etc/rc.local
echo "ulimit -u 1048576" >> /etc/rc.local
echo "source /etc/profile" >> /etc/rc.local
echo "* soft nofile `cat /proc/sys/fs/nr_open`" >> /etc/security/limits.conf
echo "* hard nofile `cat /proc/sys/fs/nr_open`" >> /etc/security/limits.conf
echo "* soft nproc 1048576" >> /etc/security/limits.conf
echo "* hard nproc 1048576" >> /etc/security/limits.conf
sed -ri "s/^[^#]/#\0/" /etc/security/limits.d/*-nproc.conf

- 阅读剩余部分 -