Centminmod, letsencrypt and Cloudflare DNS API

Just quick note for myself for add new domain within cloudflare . I got trouble with ‘ordinary’ add domain via option 2 in centminmod menu.

After search for manual and forum post I can implement https using letsencrypt follow direction from this link.

1. Edit custom_config.inc

This file located in :


2. Add more data inside this file


For CF_Account_ID you can get from overview section.

For CF_Token you can click ‘Get your API token’ link, make sure set ‘Read and Edit’ for Zone. Let other option as is and click ‘Continue to Summary’ followed by ‘Create Token’ button.

Copy both value to your custom_config.inc

2. Run this command


3. Add domain as usual and choose letsencrypt


4. Make sure to choose ‘Full’ at SSL/TLS section at cloudflare

Install Ted on Centos 7.4

Long time hiatus 🙂 . Yes, being busy with unnecessary things but its fine I come back after a year hahaha.

Today I want to share proces for install Ted, I need this for rtftopdf purpose. rpm file not work for my case since I use latest CentOS (7.4 at this moment).

The install process is straight, lets get start!

Install required tools

yum install gcc gcc-c++ autoconf automake libXpm-devel pcre-devel
zlib-devel ImageMagick libtiff-devel libpng-devel libjpeg-devel gtk+
gtk+-devel gtk2-devel zlib-devel libpng-devel libjpeg-devel gtk2-devel

Get latest Ted and install

wget http://ftp.nluug.nl/pub/editors/ted/ted-2.23.src.tar.gz

tar xvzf ted-2.23.src.tar.gz

cd Ted-2.23/
make package
make install

which Ted

To get rtf2pdf work you’ll need ghostscript

Install Ghostscript

yum install ghostscript

Download rtf to pdf

wget http://ftp.nluug.nl/pub/editors/ted/rtf2pdf.sh


How to open a port on Centos 7

Today I need to open a port on my Centos 7 box and I’m glad I know nothing but iptables which is give me ‘silent’ result 🙂 . After digging a few command from Redhat documentation I found its extremely easy.

As usual I make my note here for my future reference in case I need copy and paste method :-).

Centos 7 comes with firewalld by default. Its use firewall-cmd . For my need to open port 8082 tcp then I just need to type :

firewall-cmd –get-active-zones

interfaces: eth0

Yes, I only have ‘public’ zone.

To open port 8082 :

firewall-cmd –zone=public –add-port=8082/tcp –permanent


Save it.

firewall-cmd –reload

To check if this port (8082) is opened :

firewall-cmd –zone=public –list-all

public (default, active)
interfaces: eth0
services: dhcpv6-client http ssh
ports: 3306/tcp 53/udp 8082/tcp
masquerade: no
rich rules:

Yes, 8082 listed.

Very neat in my opinion 🙂


systemctl status firewalld

firewall-cmd –state

for check if the service (firewalld) run

Fix different date between PHP and CentOS server

Odd thing happen today when I see big difference between date from PHP output and date from shell.

PHP output :

22-12-2015 06:15:43

Shell output :

# date
Sel Des 22 13:19:54 WIB 2015

7 hour difference.

A few checklist for this case :

  1. Copy right timezone to localtime

# cp /usr/share/zoneinfo/Asia/Jakarta /etc/localtime

2.  Add right timezone to php.ini

#nano /usr/local/lib/php.ini

date.timezone = “Asia/Jakarta”

3. Check sysconfig clock

# nano /etc/sysconfig/clock

change Zone to “Asia/Jakarta”

4. Check for hardware clock aka hwclock

# hwclock
Sel 22 Des 2015 06:34:40 WIB -0.707297 seconds


Fix Starting httpd: (98)Address already in use

Quick note for myself. Today I have to increase php upload maximum size in Centos server.

I got this error :

# /sbin/service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs


Everything is fine and nothing change for configuration, the only strange is so many child process of apache.

# fuser 80/tcp
80/tcp:                398  1404  1546  2715  2762  2810  3750  4017  5110  5561  6714  7456  8079  8178  8179  8180  8665  8937  8938  8939  8947  8948  8949  8950  8951  8952  8953  8954  8955  8956  8959  8960  8977  8978  8979  9186 11382 13507 13547 13548 13574 13584 13587 13588 13589 14092 14570 15236 15742 20804 22014 23891 24560 24846 27136 27268 27269 27272 27996 29080 29268 29394 29395 29396 29803 30398 31883 32078 32555

Killall command is very suitable in this case :

# killall httpd

Try again :

# service httpd start
Starting httpd:                                            [  OK  ]

It works now 🙂