Common Administrative Tasks


There are several common administrative tasks that you will find yourself being involved with. You are either going to need to do something all of the time or you are going to forget how your originally did it.

In this section we are going to explore some of those tasks that you will find yourself doing and try and give some helpful tips to see if we can't speed up the process.

Cronjobs - Scheduled Tasks:

Installing a cronjob job is extremely useful. As most of you are already familiar with scheduled tasks are a regular occurence in the administration field. That is what cronjob is for. If you want to install an administrative scheduled task then su into the server and install a new cronjob. If you just want to install a regular user cronjob, login as the user and install your cronjob. It is that easy.

  1. Description of crontab format
    1. The crontab line consist of 6 fields separated by spaces
      1. minutes (00 to 59)
      2. hour (00 to 23)
      3. day (1 to 31)
      4. month (1 to 12)
      5. day of the week (0 to 6 with 0=Sun)
      6. command to execute
    2. Possible values are as follows:
      1. An asterisk is used to match all possible values
      2. Single integer that matches exact values
      3. List of integers separated by commas (no spaces)
      4. Two integers separated by a dash (a range)

        eg: 30 2 1 * * /etc/

        This will run the /etc/ command on the fist of every month at 2:30 am

  2. Install a new cronjob
    1. The command to install a new cronjob is as follows:
      	# crontab -e
    2. Enter in the appropriate information to run the cronjob
      	eg: 0 3 1 * * cvsup /usr/local/etc/ports-supfile

Installing Ports - Applications:

Quite often you will need/want to upgrade your existing software or install new software on your server. One of the easiest ways to do that is to use the ports collection on your server (Remember CVSup!?).

Step 1: Searching the Ports

  1. If you wish to search the porst collection for a particular value use this command
    	# cd /usr/ports
    	# make search key=value

Step 2: Installing from the Ports

  1. If you find the port you wish to install first change to the directory
    	# cd /usr/ports/misc/screen
  2. Once you are in the directory of the port you wish to install:
    	# make all install clean

Step 3: Removing an item installed from ports

  1. Change to the directory of the port you wish to remove
    	# cd /usr/ports/misc/screen
  2. Once you are in the directory of the port you wish to remove:
    	# make deinstall