How to recover email service (google apps) after downtime

One of our friend domain is down due to web hosting problem. Main domain of hosting service is not renewed at proper time and the contact person is not responding. Two things that need to get recovered:

1. Domain and email service

2. Website file and database

Since we don’t know where is the main host reside then nearest option we have is recover email service that fortunately using google apps. Another fortune we have is domain access is in my control so I can recover it quickly. Here the steps :

Update name server to new one

Since the domain registrar is namecheap I can easily use namecheap nameserver. Simply by click :

Domain Name -> Transfer DNS to Us

Change MX record to Google Apps setting

Click Host Management -> Mail Settingsgoogle apps namecheap How to recover email service (google apps) after downtime

Pick “User” and Choose “automatically set MX records necessary for Google Apps Email.

Save changes.

Click Save changes one more time.

email2 How to recover email service (google apps) after downtime

At this time namecheap will update mx record and user can relax now. Waiting for propagation time (maximum 3 x 24 hours).

You also able to verify setting by using intodns service.

Enter domain name and click report button. Pay attention for result, specially on MX section. If you also see like this one then everything is fine.

google apps intodns How to recover email service (google apps) after downtime

Another work to do after this work is pointing A record to my vps for temporary service.

Fix hatom error (missing author, entry-title and updated) in live-wire wordpress theme

Another theme is need to fix after emphaino case. This time hatom error came to live-wire theme.

Quick fix for error :

1. Open Admin dashboard

2. Click Appearance -> Editor

Choose content.php

Fix missing:updated error and missing:author

find :

<?php echo apply_atomic_shortcode( ‘byline’, ‘<div class=”byline”>’ . __( ‘Published by [entry-author] on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]‘, ‘live-wire’ ) . ‘</div>’ ); ?>

change into :

<span class=”vcard author post-author “><span class=”fn”><span class=”post-date updated”><?php echo apply_atomic_shortcode( ‘byline’, ‘<div class=”byline”>’ . __( ‘Published by [entry-author] on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]‘, ‘live-wire’ ) . ‘</div>’ ); ?></span></span></span>

Fix missing:entry title error

find :

<?php echo apply_atomic_shortcode( ‘entry_title’, ‘[entry-title]‘ ); ?>

change into :

<span class=”entry-title”><?php echo apply_atomic_shortcode( ‘entry_title’, ‘[entry-title]‘ ); ?></span>

Click Update File.

Testing again via google webmaster snippet tools and voila, everything fine now.

How to fix hatom error in google webmaster tools : emphaino theme case

I used to visit google webmaster tools for checking error related to my blog. Update new theme, changing hosting, domain propagation sometime went bad after sometime. Google webmaster tools is my friend to detect such error.

When I log in to google webmaster tools I found “exclamation mark” next to “search appearance” of this domain.

hatom wordpress1 How to fix hatom error in google webmaster tools : emphaino theme case

Further click lead me to structured data error.

Wow, 191 item with error.

hatom wordpress2 How to fix hatom error in google webmaster tools : emphaino theme case

Click the number give me ore detail error about blog post that affected with that error.

hatom wordpress3 How to fix hatom error in google webmaster tools : emphaino theme case

Further check using richsnippets tools give me exact error.

hatom wordpress4 How to fix hatom error in google webmaster tools : emphaino theme case

Its seem that I only need to fix ‘updated’ error section. Raymondware give great explanation about other error that might encounter.

Solution :

Login to wordpress admin page :

1. Click Appearance -> Editor

By default you need to look for single.php and see the content.

Looking for ‘date’ section and wrap it with class “post-date-updated”. Unfortunately in my case ( I use Emphaino theme) I must digging more to find relevant php file that contain the target. Its in ‘content-single.php”.

hatom wordpress5 How to fix hatom error in google webmaster tools : emphaino theme case

Change :

<?php emphaino_posted_on(); ?>

Into :

<span class=”post-date updated”><?php emphaino_posted_on(); ?></span>

Save and retry look it up from richsnippet tools.

hatom wordpress6 How to fix hatom error in google webmaster tools : emphaino theme case

The error is gone now icon smile How to fix hatom error in google webmaster tools : emphaino theme case

Softaculous Tips for WordPress Installation

wordpress tips1 Softaculous Tips for Wordpress InstallationCommon problem that exist for ‘hack attack’ on wordpress are :

1. Old wordpress version

2. Using old theme

3. Using old plugins

Those 3 factors combined together and lead to ‘unstable’ self hosting wordpress.

Newest wordpress offer automatic upgrade for the version but you must do the rest (upgrading theme and plugins).

Those issue corrected by Softaculous. If you want to install new blog I suggest you to use these settings :

1. Database name : enter your blog name as component. ex, if your blog is about flower then fill flowerdb or mydbflower. It will save you from headache in the future.

2. Table prefix : enter shortname of your blog, ex: flo_ . Don’t use wp_ .

3. Use strong password. You can click ‘key’ icon next to admin password input.

4. Use advanced option. Make sure to check 3 options (auto upgrade, auto upgrade wordpress plugin and auto upgrade wordpress theme).

Using that setting will give you ‘health’ wordpress that give you long run blogging platform without worrying about late update action.

How about existing blog?

I’ll create separate post to explain it in step by step mode.

stay tune!

How to Install Gitlab on VPS for less than $20 budget under 5 minutes

Yes. The title is taken from email subject icon smile How to Install Gitlab on VPS for less than $20 budget under 5 minutes

After I help my friend set spf record for his gitlab I got email from a friend who has a computer course. His student around 400 and he want to give ‘collaboration’ feel to their programming curriculum. He ask me to help him install gitlab with $20 budget.

I told him to use free github.com account or free gitlab.com account but he refuse. He also want his staff has control for their server. I give him a few reference from internet but he got confuse and already dizzy at the first time he saw console icon smile How to Install Gitlab on VPS for less than $20 budget under 5 minutes

Due to distance problem I decide to use vps from vultr than using his server. (Actuallly the server is connected to internet using adsl and only fast access via lan connnection that make me worry about the performance.).

Choose provider

Based on gitlab ce (community edition) requirement I need vps that match :

CPU : 2 cores

Memory : 2GB ( for up to 500 user)

Storage : > 20 GB and SSD preferred.

Latency : closest one to my country (check via ping, the lower respond than the connectivity is great).

Based on that requirement I choose $15 package from vultr.

More

How to add spf record for subdomain on cpanel (gitlab case)

This is a long time draft that I thought already publish till I update some wordpress plugin. My friend who open software house came send me private message. He ask me if I have an idea why his email not delivered. He install a software called gitlab. This software basically manage operation of git from web based application.

After login to his server I realize that his vps provider blocked port 25. This port is designed for send email. To overcome this issue just open a ticket and told them about the problem. Attach the output of this command :

mailq

After few minutes (almost one hour) ticket responded and port unblocked. Now I see email arrive to mailbox.

More

What I got inside my VPS

#  cat /proc/cpuinfo | grep processor
processor    : 0
processor    : 1
processor    : 2
processor    : 3

I got 4 processor.

# free -m
total       used       free     shared    buffers     cached
Mem:          2048        347       1700          0          0         99
-/+ buffers/cache:        247       1800
Swap:         2048          0       2048

I got memory 2GB and also 2GB for swap.

# cat /proc/user_beancounters
Version: 2.5
uid  resource                     held              maxheld              barrier                limit              failcnt
112:  kmemsize                 28933925             30662656            975175680           1073741824                    0
lockedpages                     0                 1008               262144               262144                    0
privvmpages                197953               295114  9223372036854775807  9223372036854775807                    0
shmpages                    16658                57806  9223372036854775807  9223372036854775807                    0
dummy                           0                    0  9223372036854775807  9223372036854775807                    0
numproc                        59                  132  9223372036854775807  9223372036854775807                    0
physpages                   88832               241468                    0               524288                    0
vmguarpages                     0                    0                    0  9223372036854775807                    0
oomguarpages                56353                57070                    0  9223372036854775807                    0
numtcpsock                      7                   14  9223372036854775807  9223372036854775807                    0
numflock                       24                   32  9223372036854775807  9223372036854775807                    0
numpty                          1                   10  9223372036854775807  9223372036854775807                    0
numsiginfo                      0                   30  9223372036854775807  9223372036854775807                    0
tcpsndbuf                  150880               683328  9223372036854775807  9223372036854775807                    0
tcprcvbuf                  114688              4167240  9223372036854775807  9223372036854775807                    0
othersockbuf               168776               395968  9223372036854775807  9223372036854775807                    0
dgramrcvbuf                     0                 4624  9223372036854775807  9223372036854775807                    0
numothersock                  134                  171  9223372036854775807  9223372036854775807                    0
dcachesize               19465689             22209127            487587840            536870912                    0
numfile                       543                 1105  9223372036854775807  9223372036854775807                    0
dummy                           0                    0  9223372036854775807  9223372036854775807                    0
dummy                           0                    0  9223372036854775807  9223372036854775807                    0
dummy                           0                    0  9223372036854775807  9223372036854775807                    0
numiptent                      20                   20  9223372036854775807  9223372036854775807                    0

It means I got OpenVZ

# df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/simfs       11G  1.5G  9.3G  14% /
none            1.1G  4.1k  1.1G   1% /dev
none            215M  1.1M  214M   1% /run
none            5.3M     0  5.3M   0% /run/lock
none            859M     0  859M   0% /run/shm
none            105M     0  105M   0% /run/user

Means I have 11GB space.

# dd if=/dev/zero of=sb-io-test bs=1M count=1k conv=fdatasync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 15.2927 s, 70.2 MB/s

versus SSD vps hosting

# dd if=/dev/zero of=sb-io-test bs=1M count=1k conv=fdatasync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 6.14146 s, 175 MB/s

Bigger result with short time mean better HD.

# swapon -s
Filename                Type        Size    Used    Priority
/dev/null                               partition    2097152    0    -1

Mean swap enable on my vps.

 

 

 

 

Using Gparted for VPS Disk Partition

Install slackware in a vps is assignment I create for student. The challenge is rather different than install others (BSD or Linux distro) operating system. Yes, create partition is a must in this work. If Ubuntu or CentOS or OpenSUSE provide easy way to create partition then Slackware is strict.

The minimal solution is still the same. Create swap and native but you must use command line tools like cfdisk or fdisk. One of my student admire if he did different way to accomplish the job. He use Gparted to create the partition followed by Slackware installation.

I think his way might be useful for others who want to achieve the same target : install slackware in vps.  So, here the steps I try to recreate for that aim.

Preparing Gparted & Slackware ISO

I use vps provider that let me use custom iso like Vultr. After login then click ‘My ISO’ to upload the iso.

I use Gparted from Jaist mirror.

I also use Slackware 14.1 iso from Slackware mirror.

Both of iso use 64 bit version.

Enter location of iso file then upload.

install slackware 14 vps1 Using Gparted for VPS Disk Partition

More

Find out uptime of VPS

My friend send email asking for command line. His boss don’t believe on uptime report  he made. He told me that he got the report from 3rd party that manage the server.  He want to know it and will show the result to his boss.

As far as I know the command for checking are :

1. uptime

# uptime
04:17:02 up 82 days, 23:34,  1 user,  load average: 0.00, 0.00, 0.00

2. w

# w

04:17:05 up 82 days, 23:34,  1 user,  load average: 0,00, 0,00, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    36.68.204.105    04:16    0.00s  0.03s  0.02s w

As usual for more detail or option available using man.

# man uptime

UPTIME(1)                     Linux User’s Manual                    UPTIME(1)

NAME
uptime – Tell how long the system has been running.

SYNOPSIS
uptime
uptime [-V]

DESCRIPTION
uptime  gives  a one line display of the following information.  The current time, how long the system has been running, how many users are cur-
rently logged on, and the system load averages for the past 1, 5, and 15 minutes.

This is the same information contained in the header line displayed by w(1).

FILES
/var/run/utmp  information about who is currently logged on
/proc     process information

AUTHORS
uptime was written by Larry Greenfield <greenfie@gauss.rutgers.edu> and Michael K. Johnson <johnsonm@sunsite.unc.edu>.

Please send bug reports to <albert@users.sf.net>

SEE ALSO
ps(1), top(1), utmp(5), w(1)

Cohesive Systems                  26 Jan 1993                        UPTIME(1)

If you want to print it you might want to export it first.

# man uptime > uptime.txt

If you have vps or dedicated server then you can compare it versus confirmation email from provider.

How to install OpenSUSE 13.1 Server in VPS using custom iso

Today, my class will be discuss on how to install Zimbra Collaboration Suite. One of my student want to try it using different OS. As we don’t have access for Linux Suse Enterrprise Server 11 then we’ll try it on OpenSuse 13.1 . I never try it beside using Ubuntu but it won’t hurt right icon smile How to install OpenSUSE 13.1 Server in VPS using custom iso . VPS is ready for such action.

I start by install OpenSUSE 13.1 server using VPS that support custom iso with these details :

  1. Location : Frankfurt
  2. Memory : 1GB (lowest memory available is 768 but I’ll try 1 GB)
  3. HD : 20 GB
  4. Technology : KVM
  5. Price : $7/mo

Lets get start!

More

How to Install DragonFlyBSD in VPS using custom iso feature

Distrowatch told me about newest version of DragonFlyBSD (3.8.0) . This version also in my waiting list as I know this BSD variant since beginning. When DragonFlyBSD begin using ports  aka dports to their software installation management then I’m happily use this version as server.

For documentation process when I delegate installation process for my staff I create this simple guide.

Of course its VPS based as we try to minimize physical server for our company icon smile How to Install DragonFlyBSD in VPS using custom iso feature

Create temporary iso location

DragonFlyBSD provide .iso.bz2 link and I have to convert it to .iso first. The idea is create temporary location for iso file and use it for Vultr custom iso.

I think my lowendspririt vps is good place to hold temporary image.

$ ssh root@162.251.114.76 -p 17020
root@162.251.114.76’s password:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 2.6.32-042stab084.17 i686)

* Documentation:  https://help.ubuntu.com/
Last login: Mon Jun  9 13:23:09 2014 from 36.68.189.115
# cd /var/www/oteos.com/htdocs/
# wget -c http://avalon.dragonflybsd.org/iso-images/dfly-x86_64-3.8.0_REL.iso.bz2
–2014-06-10 10:17:20–  http://avalon.dragonflybsd.org/iso-images/dfly-x86_64-3.8.0_REL.iso.bz2
Resolving avalon.dragonflybsd.org (avalon.dragonflybsd.org)… 2001:470:1:43b:1::72, 199.233.90.72
Connecting to avalon.dragonflybsd.org (avalon.dragonflybsd.org)|2001:470:1:43b:1::72|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 208704827 (199M) [application/x-bzip2]
Saving to: `dfly-x86_64-3.8.0_REL.iso.bz2′

More

Moving users folder and create symlink

Today I got “error, can not write” message on the bottom of my blog. I think its temporary since I often see the message before (with bluehost).

This afternoon I got another message that confirm me if the message is not usual one. The message is sign of storage full. Yes, the blog move to vps and after checking the status :

# df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       8.4G  7.9G     0 100% /
none            4.1k     0  4.1k   0% /sys/fs/cgroup
udev            511M  4.1k  511M   1% /dev
tmpfs           105M  410k  104M   1% /run
none            5.3M     0  5.3M   0% /run/lock
none            522M     0  522M   0% /run/shm
none            105M     0  105M   0% /run/user
/dev/vdb1        22G   47M   20G   1% /data
# cd /

My VPS utilize 100% of / partition (I thought soft limit is there) and lead me to error message.

I forgot if this VPS use two drive : /dev/vda1 for operating system and /dev/vdb1 for data storage.

To fix the problem I just need to move content from /dev/vda1 to /dev/vdb1

# mv /srv/users/ /data/
# ln -s /data/users /srv/
# ls -l /srv/

total 0
lrwxrwxrwx 1 root root 11 Jun 15 14:56 users -> /data/users

Checking current status now :

# df -H

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       8.4G  3.6G  4.4G  46% /
none            4.1k     0  4.1k   0% /sys/fs/cgroup
udev            511M  4.1k  511M   1% /dev
tmpfs           105M  410k  104M   1% /run
none            5.3M     0  5.3M   0% /run/lock
none            522M     0  522M   0% /run/shm
none            105M     0  105M   0% /run/user
/dev/vdb1        22G  4.7G   16G  24% /data
#

The service working well now icon smile Moving users folder and create symlink

WordPress Hack – Manual Cleanup

Hacked wordpress is pain but after get it restored you must cleanup manually a few aspects for optimum performance. To make sure you follow Google rules you can use Google webmaster tools to detect the mess.

Check Crawl Errors

Google Bot will tell error they found during scanning process.

Click Errors then check every aspects (desktop, smartphone and feature phone)

crawl error Wordpress Hack   Manual Cleanup

Clean Up

Soft 404 mean Google think its not exist but its do exist.

wordpress tags Wordpress Hack   Manual Cleanup

As you see from the picture. WordPress tags put ‘un relevant’ content for your blog.

To get rid of this tags :

1. Login to wordpress

2. Click Tags under Post section

3. Check the box and delete un related tags manually.

Mark as Fixed

Some links might respond slow then Google bot think it doesn’t exist. Check it manually by visit the link and click “mask as fixed” when you’re done.

WordPress Featured Image

“I already upload photo for my post but I see blank display on our website”. That question came from my friend who work as webmaster. He is responsible for updating the news on the office website. I promise to take a look and tell you the answer. Actually I was buying time to figure out what caused the problem.

The site has been running for more than 2 years and no significant problems during this period. That changed only version of wordpress.  I think the reason why the picture features running on the website of my friend’s office was not functioning properly is wordpress.

After look around finally I can reproduce the problem and came back with answer icon smile Wordpress Featured Image

How to get wordpress featured image work

Simple, create new post, add post title then fill the content. For featured image you must choose it manually from editor menu.

wordpress featured image Wordpress Featured Image

This method also work on image slider aka carousel (many theme use it).

I can’t see Featured Image section

Click “Screen Options” to enable it.

How to install OpenBSD in VPS using custom iso

My friend came up with question about OpenBSD. He ask me about possibility of install OpenBSD remotely and continue to manage it for different purpose. I promise to help but due to time constraint I can not visit his house and teach him. I decide to make this post for him but I hope this simple guide will also help others that might face similar problem.

I use vps service from Vultr for this guide since I can use my existing credit and also quick setup process.

Upload OpenBSD iso to VPS server

I use Australia for VPS server location so I use nearest OpenBSD mirror close to Australia (Internode amd64 OpenBSD 5.5).

Enter the link on “remote URL” section.

openbsd install vps1 How to install OpenBSD in VPS using custom iso

More

How to install NetBSD on Vultr using custom iso

Today I want to try custom iso feature that Vultr provide. This time I’ll use NetBSD since the size is small and meet Vultr standard (in their range upload size, at the moment its 5192MB max size ).

Preparation ISO file

At this time NetBSD already reach version 6.1 and I choose to download from master.

Click “My ISOs” link.

vultr netbsd1 How to install NetBSD on Vultr using custom iso

Enter the address of iso file (I use NetBSD-6.1.4-amd64.iso) and click Upload button. More

How to migrate Fresh Store Builder to New Server : Digital Ocean way

In this era competition make everything better. Specially in hosting industry. I used to stick on provider host due to :

  1. Price (cheaper is better)
  2. Stability (good uptime is great)
  3. Fast network (low latency is one of signal I see).
  4. Good support (I love friendly and fast support).

Of course rare communication with support mean the service is great.

In this post I’ll show how to move Fresh Store Builder (FSB) from one host to another host. In this case I’ll move FSB I install on Vultr to Digital Ocean. (At the moment both provider give me good impression specially Digital Ocean that I use more than 1 year but Vultr also good since they backed up by Choopa who provide good online gaming infrastructure).

Lets get start migration process.

Create Droplet on Digital Ocean

I use closest location to UK (Vultr way). This time I choose Amsterdam.

fsb do1 How to migrate Fresh Store Builder to New Server : Digital Ocean way

Ubuntu version also same 12.04 x64. More

Optimization Tips for Fresh Store Builder Owner

Last post about how to install Fresh Store Builder (FSB) under VPS using ServerPilot on Vultr lead me to a few things. One of them is optimization. Many FSB owner are non coder and non server folks.

A few things that they can do to optimize the store are :

1. Choosing closest server

If you targeting Amazon UK user then you might want to serve your UK customer using server that located in UK.

If you use Vultr server then you can use UK location.

vultr server Optimization Tips for Fresh Store Builder Owner

If you use Digital Ocean then you can choose Amsterdam location.

digitalocean server Optimization Tips for Fresh Store Builder Owner

2. Tweaking Server Setting

By default vps server configured by ServerPilot is more than enough for common task but they do provide a few ‘setting’ left for end user (vps owner).

You can check those aspects using gtmetrix page. For example hosting formula store I create yesterday. Gtmetrix score is here :

gtmetrix hostingformula store Optimization Tips for Fresh Store Builder Owner

A few notes from Yslow grade :

yslow fsb Optimization Tips for Fresh Store Builder Owner

Click the recommendation for “add expire headers” and I see :

http://platform.twitter.com/widgets.js

https://apis.google.com/js/plusone.js

http://www.google-analytics.com/ga.js

http://connect.facebook.net/en_US/all.js#xfbml=1

https://twitter.com/i/jot?l=%7B%22_category_%22%3A%22tfw_client_event%22%2C%22language%22%3A%22en%22%2C%22client_version%22%3A%221.1%3Am%3Ac%22%2C%22widget_origin%22%3A%22http%3A%2F%2Fstore.hostingformula.net%2F%22%2C%22format_version%22%3A1%2C%22triggered_on%22%3A1401866628263%2C%22event_namespace%22%3A%7B%22client%22%3A%22tfw%22%2C%22page%22%3A%22button%22%2C%22section%22%3A%22share%22%2C%22action%22%3A%22impression%22%7D%7D

http://cdn.api.twitter.com/1/urls/count.json?url=http%3A%2F%2Fstore.hostingformula.net%2F&callback=twttr.receiveCount

https://apis.google.com/js/api.js

https://oauth.googleusercontent.com/gadgets/js/core:rpc:shindig.random:shindig.sha1.js?c=2

That resource is not located in my server and that’s why I can not set the expire from server.

Fortunately all other setting already defined by FSB in .htaccess file.

So far the result is good according to Pagespeed icon smile Optimization Tips for Fresh Store Builder Owner

Easy VPS for FreshBuilder Store : Vultr Way

I got client who order service for moving his fresh store builder store. He use shared hosting that use cpanel. He don’t want to use cpanel anymore and willing to pay no more than $6/month for his vps server.

I give him two options : using digitalocean or vultr and he choose vultr.

I decide to share experience to hostingformula.net reader on how to build great vps server for freshstore builder user  with minimum hassle icon smile Easy VPS for FreshBuilder Store : Vultr Way

Create Server on Vultr

Vultr provide vps service start from $5 / month. Fresh Store Builder (FSB) user can use smallest server that Vultr  provide.

1. Login to Vultr and  create an instance

freshbuilder vps1 Easy VPS for FreshBuilder Store : Vultr Way

Click Deploy New Instance More