Linux :: Create Swap File

24 sec read

:: What is swap in linux
Swap in linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space.

 
:: How to create swap file in Linux
+ Create file (1GB) for add swap

dd if=/dev/zero of=/swapfile bs=1024 count=1048576

+ Make swap file

mkswap /swapfile

+ Change owner and permission

chown root.root /swapfile
chmod 0600 /swapfile

+ Enable swap file

swapon /swapfile

+ Checking

free -m

+ configure /etc/fstab to save configuration permanently

vi /etc/fstab
# add swap file configuration like this:
/swapfile swap swap defaults 0 0 

 
:: Link
+ Google
+ Cyberciti

How to fix problem with the editor ‘vi’

:: git error with vi error: There was a problem with the editor 'vi'   :: how to fix the problem 0. check path...
Sysadmin.ID
10 sec read

Apache :: MP4 Streaming

:: How to Enable mp4 Streaming in Apache + Installing mod h624 streaming wget //h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz tar -xzf apache_mod_h264_streaming-2.2.7.tar.gz cd mod_h264_streaming-2.2.7/ ./configure --with-apxs=`which apxs2` make...
Sysadmin.ID
18 sec read

Apache :: Flash / FLV Streaming

:: How to Configure Apache for FLV Streaming + Installing mod_flvx wget //people.apache.org/~pquerna/modules/mod_flvx.c which apxs /usr/bin/apxs /usr/bin/apxs -cia mod_flvx.c + setup mod_flvx in http.conf...
Sysadmin.ID
15 sec read

Leave a Reply

Your email address will not be published. Required fields are marked *