January 22, 2011 | Posted by
admin | Category: Linux Administration
The HTTP rewrite module requires the PCRE library during the Nginx compilation. The PCRE package contains Perl Compatible Regular Expression libraries useful for implementing regular expression pattern matching.
If PCRE package is not installed on the server, NGINX installation will fail with the following message:
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
./configure: the HTTP rewrite module requires the PCRE library.
You can disable the module by using --without-http_rewrite_module
or install the PCRE library into the system,
or build the PCRE library statically from the source with nginx
by using--with-pcre=<path> option.
How to Install the PCRE library?
1) SSH to the server and go to a temporary directory
# cd /usr/local/src
2) Download PCRE:
# wget http://downloads.sourceforge.net/pcre/pcre-8.10.tar.bz2
3) Unpack and change to the pcre directory
# tar -jxf pcre-8.10.tar.bz2
# cd pcre-8.10
4) Confiure PCRE:
# ./configure
5) Create the installation files and install PCRE
# make
# make install
Once done, you should be able to install Nginx with the HTTP rewrite module.
Comments Off on PCRE Library Not Found: Nginx compilation
January 13, 2011 | Posted by
admin | Category: Installations
PDFlib is a free library used for generating and manipulating files in Portable Document Format (PDF). The primiary goal of PDFlib is to create dynamic PDF documents on a Web server OR similar systems and to allow a “save as PDF” capability.
The following steps will help you to install PDFlib-lite and PDFlib on a CentOS server OR even on a cPanel and Plesk servers.
SSH to the server as a ‘root’ user:
1) Download the PDFlib-Lite package required for PDFlib installation in a temporary directory
# cd /usr/local/src
# wget http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5.tar.gz
2) Unpack the package and goto the PDFlib-Lite directory
# tar -zxf PDFlib-Lite-7-*
# cd PDFlib-Lite-7.0*
3) Now, configure PDFlib-Lite
# ./configure --prefix=/usr/local
4) Create the installation files and install PDFlib-Lite
# make
# make install
5) Once PDFlib-Lite is installed, download ‘PDFlib’ using pecl.
# pecl download pdflib
6) Unpack the package and goto the PDFlib-Lite directory
# tar xvzf pdflib-*.tgz
# cd pdflib-*
7) Create configuration files
# phpize
8 ) Now, configure PDFlib
# ./configure
9) Create the installation files and install PDFlib
# make
# make install
A pdf.so file will be created in the PHPs extension directory which you can locate using the following command. If the file is not created there, copy it from the current location to the extension directory.
# php -i | grep extension_dir
The final step is to add the PDFLib extension in the php.ini file and restart the Web Server.
extension="pdf.so"
Note: Using the above instructions, PDFlib can be installed on the cPanel and Plesk servers as well. Though the location of extension_dir and php.ini are different, they can easily be located using the commands above.
January 2, 2011 | Posted by
admin | Category: Plesk Management
Plesk supports Qmail and Postfix mail servers, however, only one MTA (Message Transfer Agents) can be installed and used at a time. To check the current MTA in use, look at
Plesk -> Settings -> Services Management
OR you can execute the following command from SSH
# /usr/local/psa/admin/bin/mailmng --features | grep SMTP_Server
$features['SMTP_Server'] = "QMail";
$features['SMTP_Server_package'] = "psa-qmail";
The above output shows that Qmail is currently your Mail server. Plesk offers an ‘autoinstaller’ script to install/upgrade various components, and is used to switch from Qmail to Postfix OR vice-versa.
Stop the SMTP service before you switch between the Mail servers, to avoid accepting of new emails and to deliver the emails that are in the mail queue.
Stop the SMTP service:
# /usr/local/psa/admin/sbin/mailmng --stop-smtpd
Switch MTA from Qmail to Postfix:
# /usr/local/psa/admin/sbin/autoinstaller --select-release-current \
--install-component postfix
OR switch MTA from PostFix to Qmail:
# /usr/local/psa/admin/sbin/autoinstaller --select-release-current \
--install-component qmail
That’s it.
Note: The change of mail server won’t change the mail format and the directory location where the messages are stored. However, the emails in the mail queue will be removed since the MTA is reconfigured.