avatar

Andres Jaimes

How to setup a FastCGI development environment in CentOS 6

Install the development environment Install the C/C++ development tools to your server: yum install gcc gcc-c++ autoconf automake Now, before installing fcgi we need to add the epel repository: rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm Once it is installed we can proceed to get the fcgi packages: yum install fcgi-devel spawn-fcgi Let’s see if we can compile a simple file. Create a file named example.c and copy and paste the following code in it:

One-liner to minimize your CSS files

The following one-liner will help you remove comments, spaces, and more from your CSS files. Suggestions are always welcomed. Important: Before running this command, create a copy of your original file. Try the resulting CSS in a test environment before releasing it. cat style.css | sed -e ' s/^[ t]*//g; # leading spaces s/[ t]*$//g; # trailing spaces s/([:{;,]) /1/g; # spaces after a colon, brace, semicolon, or comma s/ {/{/g; # spaces before a brace /^$/d # blank lines ' | sed -e :a -e '$!

Create a DNS zone file

by FreeBSD.orgAn example master zone file for example.org(existing within /etc/namedb/master/example.org) is as follows: $TTL 3600 ; 1 hour default TTL example.org. IN SOA ns1.example.org. admin.example.org. ( 2006051501 ; Serial 10800 ; Refresh 3600 ; Retry 604800 ; Expire 300 ; Negative Response TTL ) ; DNS Servers IN NS ns1.example.org. IN NS ns2.example.org. ; MX Records IN MX 10 mx.example.org. IN MX 20 mail.example.org. IN A 192.168.1.1 ; Machine Names localhost IN A 127.

CentOS useful commands

To get your CentOS version type: cat /etc/redhat-release To update all your CentOS packages at once: yum update To install nslookup, dig and other network utilities: yum install bind-utils -y

Installing a PDF print server on Ubuntu Server

This article was originally written for Ubuntu 7, but we now know it works for Ubuntu 10 as well. Thanks Shooda! To start, install the CUPS service and CUPS-PDF files: sudo apt-get install cupsys sudo apt-get install cups-pdf Now configure CUPS to allow remote administration: sudo nano /etc/cups/cupsd.conf Modify the port where CUPS listens from: Listen localhost:631 to: Listen 631 Listen /var/run/cups/cups.sock Listen 192.168.1.1:9100 The 192.