I'm trying to set up my first ever VPS on CentOS 5.6 (128 MB RAM) and was following some tutorials found online, but I've ran into a problem I can't fix. The VPS is bought from a hoster, so I can't give myself more memory :)
Running yum -y update gives me
[root@vps ~]# yum -y update
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package glibc.i686 0:2.5-58.el5_6.4 set to be updated
---> Package glibc-common.i386 0:2.5-58.el5_6.4 set to be updated
---> Package nscd.i386 0:2.5-58.el5_6.4 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================================
Updating:
glibc i686 2.5-58.el5_6.4 updates 5.3 M
glibc-common i386 2.5-58.el5_6.4 updates 16 M
nscd i386 2.5-58.el5_6.4 updates 167 k
Transaction Summary
=======================================================================================================================================================================================
Install 0 Package(s)
Upgrade 3 Package(s)
Total size: 22 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
memory alloc (12 bytes) returned NULL.
I've found that it may be connected to insufficient memory, but it doesn't seem to be the case:
[root@vps ~]# cat /proc/meminfo
MemTotal: 131072 kB
MemFree: 110356 kB
[root@vps ~]# free -m
total used free shared buffers cached
Mem: 128 20 107 0 0 0
-/+ buffers/cache: 20 107
Swap: 0 0 0
After trying TiZon's suggestion:
[root@vps ~]# dd if=/dev/zero of=/swapfile bs=1024 count=65536
65536+0 records in
65536+0 records out
67108864 bytes (67 MB) copied, 0.222831 seconds, 301 MB/s
[root@vps ~]# mkswap /swapfile
Setting up swapspace version 1, size = 67104 kB
[root@vps ~]# swapon /swapfile
swapon: /swapfile: Operation not permitted
free -m? – Bart De Vos Aug 4 '11 at 14:29