Posts

Showing posts with the label linux

wkHTMLToPDF chinese/japanese/korean character support on Linux based systems

This post will explain how to add support for Chinese or Japanese or Korean characters in wkHTMLToPDF - the famous tool that converts HTML pages to PDF documents seamlessly. By default, if you have Chinese characters in your HTML page and convert the page to PDF with wkHTMLToPDF, nothing comes out (blanks replace chinese characters). I doubt this subject will be helpful to a lot of people around the world, but I might need to use this trick again in the future so why not blog about it? The trick is to install Chinese character support on your OS and rebuild the cache. Under Ubuntu, I ran this command to install Chinese fonts: apt-get install fonts-wqy-microhei ttf-wqy-microhei fonts-wqy-zenhei ttf-wqy-zenhei  Note: package names might be different if you aren't under Ubuntu (try  apt-cache search  ... to search for packages) Then, run this command to update the font cache: fc-cache -f -v For Japanese and Korean please use those: https://help.ubuntu.com/community

How to set up a simple mail server on Debian in 5 easy steps

Image
This tutorial will take you through the steps of setting up and configuring a simple mail server (SMTP, POP3, IMAP) on Debian/Linux. The instructions will be given for Debian, but they can be adapted quite simply to other distributions such as Ubuntu and other Debian-based OSes; you could even pretty much follow the same steps if you're running Red-Hat based systems such as CentOS or Fedora. I can promise you that this is as easy as it gets, provided you have correctly verified and validated the pre-requisites step. What we will achieve in this tutorial We will be setting up a simple email server with the following basic functionality: The server will be able to both send (via SMTP) and receive emails (via IMAP and POP3) optionally with SSL functionality User accounts and  passwords will be encrypted and stored in a simple text file , which can be managed easily with a text editor. It will support a potentially infinite amount of mailboxes over one or more domains As

Setting up and using memcached & memcache on Linux CentOS 5/Plesk 9

Image
The second part of my tutorial on optimizing your server for hosting high traffic websites: installing and configuring memcached and the memcache php extension for your server. This is a little easier than the first step (setting up nginx as reverse proxy, see article below) and can be applied to any kind of dynamic website. What's the point ? On highly dynamic websites such as forums, news sites or any user content based website, the database server load is often very high. The more traffic you get, the more cluttered your database server becomes, sometimes rendering your website completely unavailable to visitors. Using a data caching daemon will allow you to save some data in memory instead of fetching the data from the database every time. You should know that memcached is used by major websites such as Wikipedia, SourceForge, SlashDot... need I say more? What is memcached ? Memcached is the daemon running on your server. Its usage is extremely simple, there are no confi