03Sep 2012

Here’s a way to add JSON support for PHP on your CentOS server. yum install php-pear php-devel gcc make pecl install json cd /etc/php.d echo “” >> json.ini service httpd restart After these, you can easily check if it has been installed correctly. Either check your phpinfo() page or execute the following command.   php […]

24Aug 2012

mod_python is one of the easiest ways to use your Python Scripts as web pages. To install mod_python on your Centos 6 server, simply follow the steps below. We also recommend using our LAMP installer, this method can easily be implemented with our installer. To install mod_python, we need the EPEL repositories: rpm –import […]

18Aug 2012

People using Direct Admin usually do the mistake to install anything new by using the yum repositories. In fact, Direct Admin has a custom build method, so when you want to add something new to your system, you might need to recompile what’s allready installed. The same goes for the PHP-SOAP too. Yet don’t freak […]

25Jul 2012

Installation of IonCube Loader on any variaty of Linux is very simple. Just get the copy from ioncube webpage itself, We will download the 64-bit version for our example. Then extract the file, copy the shared object file that matches your PHP version to an appropriate folder. To learn your PHP version you can […]

02Jul 2012

rsync is a very useful tool when it comes to backing up multiple files from remote or local targets. Below are a few nice examples you can use. To backup the whole contents of your /home directory to let’s say a usb disk, use the following. rsync -av /home /media/usb_disk Note that this will create […]

20Jun 2012

Version Info: V0.2 21/06/2012 DO you ever wanted to set-up a testing server with – Apache virtual config, logs, paths setted, – MySQL server with password set, – FTP Server (Vsftpd), – PHP and PhpMyAdmin installed & configured on your server or VPS in seconds? If you answer “yes” to the question, you are in […]

19Jun 2012

Using short open tags, such as <? on your PHP code is not so clever. Other than the debate going on whether short open tags won’t be available on PHP6 or not, it is possible that your shared hosting has disabled it for some reason, or you might have to migrate your code sometime somewhere […]

09Jun 2012

If you get a 550 error as a reply when you email a user with directadmin, saying Remote host said: 550 “Unknown User” or The error that the other server returned was: 550 550 “Unknown User” (state 13). or something equivalent, then the problem might be your virtual domainowner settings. This happens with exim especially […]

01Jun 2012

Even though it’s easier to use yum, sometimes we need to compile PHP from source code. Below I’ll describe a method for compiling PHP 5.4.3 on CentOS, this works both on 5.x and 6.x and all the dependencies (except for PHP itself, of course ) will be retrieved via yum. After a fresh install of […]

30May 2012

rdesktop is the essential tool for Remote Desktop Management of Windows boxes using Linux as your local machine. It is sometimes crucial to be able to transfer files using rdesktop, especially when there isn’t any FTP service (or equivalent). Luckily rdesktop supports file transfer modes. Before connecting you the Windows box, let’s make a directory […]

24May 2012

Apache rewrite is an apache web server module which gives opportunity to change URL folders during opening of pages. At first it is hard to understand mod_rewrite but if you know what you are doing then it will become a usefull tool. You can reach the documents supplied by developer site located here: Apache Docs […]

24May 2012

BackupPC uses ssh and rsync to connect to the client hosts, backuppc user’s shared key must be distributed to client hosts in order log-in to the clients without password, you receive the error “filelist receive failed” as backuppc cannot log-in or cannot find rsync on the client. We assume that you already generated a private […]

22May 2012

Even though major system scripting is usually done via bash (or other shell) scripting, it’s almost as common to see Python as a system administration scripting platform. Today, most major installers, daemons and package management software are written in Python. While using Python as a system scripting tool, it’s essential to keep using the standard […]

17May 2012

Below I’ll describe a couple of nice methods to generate passwords using Python and Bash. Actually there are a lot of ways you can accomplish this especially with bash, but using the /dev/urandom file seems to be the most clever one. The /dev/urandom device doesn’t only generate read-friendly characters, so it’s best to filter out […]

07May 2012

If you have a .pfx file and you need it’s private.key, then you can use OpenSSL for extracting .pem from .pfx ( the openssl software is available at ) To export the private key ( .pem ) from the PFX file and save it to a PEM file : $openssl pkcs12 -in /path/to/file_name.pfx -nocerts […]

04May 2012

[zimbra@ck]$ zmcontrol start Host Starting ldap…Done. Unable to determine enabled services from ldap. Enabled services read from cache. Service list may be inaccurate. Starting logger…Failed. Starting logswatch…ERROR: service.FAILURE (system failure: ZimbraLdapContext) (cause: PKIX path building failed: unable to find valid certification path to requested target) zimbra logger service is not enabled! […]

02May 2012

The beauty of having multiple IP addresses on a single server is that you can run several services with different addressing. This way you can announce your FTP service on a different address and your HTTP on another. Below I’ll describe how to achieve this in Debian based and Red Hat based distros seperately. Using […]

30Apr 2012

Sometimes you need to search the contents of .gz files in your system. Unfortunately, grep doesn’t work on compressed files. To overcome this, people usually advise to first  uncompress the file(s), and then grep your text, after that finally re-compress your file(s)… You don’t need to uncompress them in the first place. You can use […]

30Apr 2012

Cpanel’s Mailman is an open-source mailing list application. The problem is that there is no easy way to export subscribers from a list. Yet, here’s the solution. Step 1: Login into account via SSH ( as root ). Step 2: Find mailman directory. ( Default Location : /usr/local/cpanel/3rdparty/mailman/bin )

25Apr 2012

If you want to clear contents of a file in unix, you could just delete the file and recreate it. But there are much more simple alternatives. You can use echo method. To empty a file just enter the command below. I use my php_error.log file for example. echo -n > /home/base/logs/php_error.log That’s it. Your […]

25Apr 2012

Here is a clumsy script to check on an FTP Service on a remote server if running or down. The script is written in Python and is a very draft one, but does the job. The main goal is to check whether we get any response from the FTP server while we try to connect […]

16Apr 2012

IMPORTANT NOTE: Never assume the directory structures exist in your system as written in the document. Never blindly follow security instructions — read, review, compare, apply as it fits your system., Update your server as necessary As its nature, Linux is a multi-developer operating system and you might see an update on any package everyday, an updater like […]

16Apr 2012

The other day I was working on a server and needed the LARGEST files on some directory – including its subdirectories. As it turns out, it’s a very simple task limiting the file size you want with the output of the find tool. The -size argument will define the borders of your output. Let’s say […]

16Apr 2012

DirectAdmin determines the admin password during installation and saves these passwords into the file called setup.txt. If you havent changed this password, you can find it in this file, to see the file contents: less /usr/local/directadmin/scripts/setup.txt adminpass= you can find admin password here, and if you didn’t change it after installing you should be able […]