Category Archives: How To

Iptables Firewall Basics

This article is aimed at providing the basics to using iptables as a fire wall for your personal home or production server, we won’t be covering every thing here but what we will be covering will give you enough information to demystify their man pages and get you going. Firstly, the firewall and how it [...]

Zip a file or folder in Linux

To zip particular files, you can use the following: zip yourarchive.zip file1 file2 file3 To zip full directories recursively, you will add the -r flag. zip -r nameofyourarchive.zip folder That will zip everything everything that is in the folder that you choose, including any other folders that are inside of it. Know of other ways [...]

Configure history to show the time and date

Normally by default, your history will show just the number of the command that was run and the command. root@server [~]# history | head 10 top 11 df -h 12 hostname -i There are many times that you will want the time and date as well though, such as for server auditing and security reasons. [...]

Find out how much memory is used and available on your Linux computer

To see the amount of memory that is free on your computer, you can use the free command. This will show you the amount of memory that you have total, as well as how much is being used. Using the free command with no flags will show you the amount in bytes. [~]# free total [...]

Tweaks for linux/freebsd apache and mysql – control the load with these tweaks

#Apache httpd.conf tweak: prefork.c module #Add this to httpd.conf ===================== <IfModule prefork.c> StartServers 15 MinSpareServers 10 MaxSpareServers 40 ServerLimit 256Max Clients 256 MaxRequestsPerChild 1000 </IfModule> =====================   #mysql tweak: #add this to my.cnf ===================== key_buffer = 48 Mmax_allowed_packet = 8M table_cache = 128 sort_buffer_size = 48M net_buffer_length = 8M thread_cache_size = 4 query_cache_type = 1 [...]

Create an ISO Image File from a CD or DVD

To create an exact image of a cd or dvd, you are able to use the dd command. If your disk is mounted at /mnt/disk, you can use this command to make an image file named disk.iso. dd if=/mnt/disk of=/home/disk.iso In that command, dd is the program that is used, if is the input file, [...]

Disable shell access for a user

If you need to disable shell access for a particular user, that can be done by editing the line for that user in the /etc/passwd file. So if we needed to change it for a user that is named user, you would open that file with a text editor, then change the line that begins [...]

Install ProFTPd on Ubuntu

To install ProFTPd on Ubuntu, you will simply need to run these commands. You can run them all as is if you are logged in as root, but will need to add sudo to the beginning of each command if you are a regular user. apt-get update apt-get proftpd Then just type y at the [...]

Setting the Path

The $PATH variable in Linux is a set of directories that it will look in for executable files when you run a command. To see what is currently in your path, you can run the following command: root@server [~]#echo $PATH Which should give some output like this: /usr/local/bin:/bin:/usr/bin:/home/username/bin If there was a directory that you [...]

Install ProFTP on CentOS

To install ProFtp on CentOS, the first thing that you will want to do is to make sure that vsFTP is not already installed on your server. root@server[~]#yum remove vsftpd Then, you will want to go into the /usr/src directory and download the latest version of ProFTP to that folder. root@server [~]#cd /usr/src root@server [/usr/src]# [...]