Home > Article > Operation and Maintenance > What to do if there is not enough tmp space in Linux
Solution: 1. Use "vim /etc/fstab" to redistribute the tmp directory size; 2. Add "tmpfs /tmp tmpfs nodev,nosuid,size=required space size 0 0" to change the tmp file is the specified space size; 3. After restarting, use "df -h" to view the changed tmp space size.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
Cause: When installing the database, the temporary directory /tmp will be used, but if /tmp is too small, an error will be reported
Solution:
1. Need to reallocate the /tmp directory size
vim /etc/fstab
2. Add a line
tmpfs /tmp tmpfs nodev,nosuid,size=2G 0 0
to change the /tmp file to 2G space. This The operation requires a restart to take effect.
3. After booting, use df -h to view the
/tmp directory size is 2G //If you have other size requirements, you can freely change it
Expand knowledge
The following situation occurs during compilation:
Solution: Enter in the command line and perform the following three steps:
mkdir /home/usrname/tmp export TMPDIR=/home/usrname/tmp source ~/.bashrc
Problem It will be solved.
Practical operation:
Recommended learning: Linux video tutorial
The above is the detailed content of What to do if there is not enough tmp space in Linux. For more information, please follow other related articles on the PHP Chinese website!