Question review:
Today in compiling PHP fileinfo This module, the memory space of less than 1G error, and then check the memory size with free-m , a look and less than 150M
Note:
1, our company all uses is Aliyun the ECS instance, this is our use environment
2, the way to compile the PHP module see my blog (and compile memcache and other modules are the same method)
http://blog.csdn.net/m0_37886429/article/details/68065510
Swap production process:
1, create a large 2G file
[root@iz23hh6yk41z www]# dd if=/dev/zero of=/home/www/swapfile bs=1m count=2048
2. Format into swap
[root@iz23hh6yk41z www]# mkswap/home/www/swapfile
Setting up Swapspace version 1, size = 2097148 KiB
No label, uuid=7073e823-8f8c-476a-90c2-414383f15457
#查看设备文件系统
[root@iz23hh6yk41z www]# file Swapfile
Swapfile:linux/i386 swap file (new style), version 1 (4K pages), size 524287 pages, no label, uuid=7073e823-8f8c-476a-90c 2-414383f15457
3, open swap
[root@iz23hh6yk41z www]# swapon/home/www/swapfile
Swapon:/home/www/swapfile:insecure permissions 0644, 0600 suggested.
4. Mount
4.1 [root@iz23hh6yk41z www]# echo "uuid=7073e823-8f8c-476a-90c2-414383f15457 swap defaults 0 0" >>/etc/fs tab
Note: It is best to select the UUID when mounting, which is the unique identification of the device
4.2 Ways to view device UUID:
[root@iz23hh6yk41z ~]# blkid/home/www/swapfile
/home/www/swapfile:uuid= "7073e823-8f8c-476a-90c2-414383f15457" type= "swap"
4.3 Put the mounted equipment into effect immediately
[root@iz23hh6yk41z www]# mount-a
5, recompile php FileInfo module
Compiling methods See my blog:
http://blog.csdn.net/m0_37886429/article/details/68065510
To see if the module compiles successfully:/usr/local/php/bin/php-m | grep FileInfo
6, view the memory situation
[root@iz23hh6yk41z ~]# free-m