chmod 777 /dev/shm/tmp
mount -B /dev/shm/tmp /tmp
將php的session文件放在/tmp下
vim /etc/php.ini
有則修改,無則添加
session.save_path = “/tmp”
/dev/shm/tmp目錄重啟以后會(huì)丟失,設(shè)置重啟自動(dòng)重新添加/dev/shm/tmp
touch shmTmp.sh
chmod x shmTmp.sh
vim shmTmp.sh
添加:
#!/bin/bash
mkdir /dev/shm/tmp
chmod 777 /dev/shm/tmp
mount -B /dev/shm/tmp/ /tmp
設(shè)置開機(jī)自動(dòng)執(zhí)行腳本
vim /etc/rc.local
末尾添加:
/root/shmTmp.sh
保存退出,增加執(zhí)行文件屬性
chmod x /etc/rc.local
更多關(guān)于云服務(wù)器,域名注冊(cè),虛擬主機(jī)的問題,請(qǐng)?jiān)L問西部數(shù)碼官網(wǎng):www.ps-sw.cn