cPanel: How to export SSL from cPanel

With cPanel control panel, they do not provide any tool to export the SSL certificate. To done this, you may easily get the SSL export with Linux command through SSH.

To get this done, you may access to SSH through Terminal to Putty.
1. First of all, you need to ensure that you have the root access. Otherwise, contact the server administrator.
2. Log into the SSH.
3. Run the following command and replace the domain_name with your domain name such as mickgenie.com,

# openssl pkcs12 -export -out /backup/domain_name.pfx -inkey /etc/ssl/private/domain_name.key -in /etc/ssl/certs/domain_name.crt

Howto: Install Apache 2.2.x and PHP 5.3.x on CentOS 5

Assume that you do not want to spend money on your server to have a control panel and having minimal requirement for your website,

1. Install the required packages,

yum install bison flex gcc db4 db4-devel libxml2-devel libpng-devel mysql-devel make

2. Download Apache source (refer the latest one from http://httpd.apache.org/)

wget http://apache.petsads.us//httpd/httpd-2.2.21.tar.gz

3. Download PHP source (refer the latest one from http://www.php.net/)

wget http://my.php.net/get/php-5.3.8.tar.gz/from/us.php.net/mirror

4. Build the Apache,

tar zxvf httpd-2.2.21.tar.gz
cd httpd-2.2.21
./configure --enable-so --enable-rewrite=shared
make
make install
cd ..

5. Build the PHP,

tar zxvf php-5.3.8.tar.gz
cd ../php-5.3.8
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-bcmath \
--enable-ftp --enable-magic-quotes --with-pear --enable-sockets --with-zlib --with-gd
make
make install
cp php.ini-production /usr/local/lib/php.ini
cd ..

6. Now, start the Apache services,

/usr/local/apache2/bin/apachectl start

Install Memcache with cPanel that running CentOS

I was trying to install Memcache from cPanel from yesterday night but it seems to be sucks when installing from cPanel control panel.

Hence, I am sharing the step as below which I used to compiled manually from the shell.

Create a temporary folder
1. As it is a manually work, you might want to clear the source file after the installation, so create a folder as command below.

mkdir ~/memcache

Install LibEvent
To install memcache, you will need LibEvent, go to their site to get the latest version.

cd ~/memcache
wget http://monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
tar zxvf libevent-1.4.14b-stable.tar.gz
cd libevent-1.4.14b-stable
./configure
make
make install

Install Memcache
Now, install the memcache and get the latest version from their site.

cd ~/memcache
wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
tar zxvf memcached-1.4.5.tar.gz
cd memcached-1.4.5
./configure --with-lib-event=/usr/local/
make
make install

Install PHP Memcache
Now, install PECL Memcache and get the latest version.

cd ~/memcache
wget http://pecl.php.net/get/memcache-2.2.6.tgz
tar zxvf memcache-2.2.6.tgz
cd memcache-2.2.6
phpize
./configure
make
make install
vi /usr/local/lib/php.ini

Find the extension as below and if it is not existed, add it in the php.ini.

extension=memcache.so

Restart the Apache services.

service httpd restart

Windows:Run Task Scheduler with System user

Task scheduler or scheduled task is very important for a system administrator to manage the self design script to monitor from a server.

However, you might found out when you schedule a task from Windows Server 2003 with your used user such as batch file with .bat, you will get a command prompt popped up every time you are performing other task where this is annoyed.

To overcome this problem, I just found out that we can use System user to set the task without worry the above problem and it could solve when you have implement forced password change from a server.

I have come out the solution for Windows Server 2003 and Windows Server 2008.

Windows Server 2003,
With Windows Server 2003, you may look for the scheduled task from Control Panel, and look for Scheduled Task.

If you are creating the new task, just enter the information needed and use the user of “System”(Exactly, case sensitive) as the user.
Note: System or NT AUTHORITY\SYSTEM, where I will use System only where it is easy to remember.

If you are modifying old task, change the user to System and use empty password.

Windows Server 2008,
With Windows Server 2008, go to the Administrative tool and look for Task Scheduler.

When you create the task or modify it, just click the button of “Change User or Group…” and change it to SYSTEM. That all.

MySQL: Load Data Infile or Outfile

For many cases, you might want to load your data out from the database to a text file or dump the database through the SQL query with a .sql file without a control panel such as phpmyadmin, etc. You may actually done it through the MySQL console query engine.

In this article, Mick Genie will guide you on Load Data Infile and Outfile from MySQL databases query.

Basically, you will need to understand what is infile and what is outfile, to differentiate it, you might refer to the detail as below.
infile: when you using infile, that meant you are inserting data to the database and it is the same when you are using < symbol from the MySQL console.
outfile: If you understand infile, then you shall understand outfile is use to grep the data from the database and store to the text.

Below is the sample script with infile could be used from the PHP script.

$tableName¬† = ‘mickgenie’;
$query = “LOAD DATA INFILE ‘mickgenie.sql’ INTO TABLE $tableName”;
$result = mysql_query($query);

Below will be the outfile sample from the MySQL query.

SELECT * INTO OUTFILE ‘data.txt’ FIELDS TERMINATED BY ‘,’ FROM table2;

How to set OpenDNS as your Internet DNS with Windows 7

OpenDNS is widely used by the Internet user as it do come with some security protection and many more.

With Microsoft Windows 7, you may easily setup your Internet DNS with OpenDNS.

Use the following step to get your OpenDNS setting up.


1. Open your Control Panel and look for Network. Click on “Network and Sharing Center”.

2. You shall see the active network as above where Mick Genie using bogo as the network SSID and you may click on the Connections where I am using Wireless Network now.
3. Click on the Properties button.
4. Double click on the “Internet Protocol Version 4(TCP/IP4)”.

5. Select “Use the following DNS server addresses:”.
6. Insert the IP as below,
208.67.222.222
208.67.220.220

Site Hacked and get alert from Google Safe Browsing

Sometime, you might see the Google Safe Browsing prompt when you browse to any of the website with Mozilla Firefox or any Internet Browser or even your own website.

You might wonder why you will getting these alert? There are many reasons.

1. Blame your webmaster who help you to upload your web file to the server and their PC got trojan, etc and indirectly infected your site.
2. If you are the one who upload or update the website content, please don’t surf porn site :-P, don’t surf free codec site, etc etc.
3. Try not to use shareware software where will come with the so called addon.
4. Lastly, blame your hosting server is not save.

By right, if you are the domain administrator and if your site get infected, all of the email as user ID below will get the notification.

Next, you should clean the malware or replace the hacked script.
1. Take down your website from public access.
2. Scan the script through the up-to-date Anti-Virus software.
3. Remove the attacked script or file.
4. Reset all password such as control panel, FTP, administrative section, etc.

Lastly, you should ask Google to review your website again.
1. Log into the Google Webmaster Tool.
2. Click on the Diagnostic and click on Malware.
3. Click request a review.

Cannot run the FrontPage Server Extensions on this page

By using Microsoft Frontpage Extension, you might easily get this error if you not manage well for your folder permission.

Cannot run the FrontPage Server Extensions on this page: “http://www.domain.com/form.html”

Error Message:
Cannot run the FrontPage Server Extensions on this page:”http://www.domain.com/form/html”

Solution:
1. Go to the web server for this domain name.
2. Open IIS 6.0 from Start -> Control Panel -> Administrative Tools -> Internet Information Services(IIS) Manager or run a short cut named “inetmgr”.
3. Go to the virtual directory’s properties.
4. Look for “Server Extensions 2002” tab and select on the “Setting” button.
5. An Internet Browser will prompt out and asking for your username and password, try to login with your user account.
6. Insert all the related information such as your host name, webmaster email, etc and submit it.
7. Go back to IIS Manager and right click on the virtual directory, go to All Task and select on Check Server Extension 2002.
8. Click all the checkbox in repair field and submit it.
9. Go back to IIS Manager and right click on the virtual directory, go to All Task and select on Recalculate Server Extension 2002.
10. Well done, you did it. Try to check your form as it is working now.