设置SWAP

$ mkdir /data
$ dd if=/dev/zero of=/data/swap bs=512 count=8388616
$ mkswap /data/swap
$ vi /etc/sysctl.conf, vm.swappiness设置为60
$ vi /etc/fstab   添加  /data/swap swap swap defaults    0  0
$ apt-get update
$ apt-get install nfs-common
$ mkdir /app_home
$ mount -t nfs -o vers=4.0,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport file-system-id-xxxx.region.nas.aliyuncs.com:/ /app_home
$ vi /etc/fstab  添加  file-system-id-xxxx.region.nas.aliyuncs.com:/ /app_home  nfs4 vers=4.0,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,_netdev,noresvport 0 0