Latest posts

Browse topics

How to Upgrade from Ubuntu 12.04 to 14.04 LTS

In this article I will provide simple instructions on how to upgrade Ubuntu 12.04 to 14.04. 

In fact I didn't wanted to push for a server upgrade for a while, but decided to do it now, and not to wait when things will break completely. In fact I was working on a Drupal 8 site development and wanted to have it on more recent version of server, and so I opted to upgrade whole server. Following tutorial is inspired from How to Upgrade to Ubuntu 14.04 LTS

Backups

I highly suggest you to take a snapshot of your current server, before pushing for your upgrade. I have Linode backups enabled and before proceeding further I took a snapshot. It was pretty fast less than 5 minutes to generate a backup for all of mine server.

Stopping services

It's recommended that you stop as many services as possible before upgrading to Ubuntu 14.04 LTS. This includes web server daemons (Apache and nginx), database servers (PostgreSQL and MySQL), and any other non-critical services. 

sudo service nginx stop

I opted to stop nginx

Upgrade your Linode to Ubuntu 14.04 LTS by entering the following command:

sudo do-release-upgrade -d

Follow the on-screen instructions to complete the installation process.

Because Linode offers internal package mirrors for Ubuntu, you may see this message:


No valid mirror found

While scanning your repository information no mirror entry for the upgrade was found.

This can happen if you run an internal mirror or if the mirror information is out of date.

Do you want to rewrite your 'sources.list' file anyway?

If you choose 'Yes' here it will update all 'precise' to 'trusty' entries. If you select 'No' the upgrade will cancel.

Continue [yN]

Type y and return to continue.

The upgrade will cause your Linode to reboot. After it does so, verify that it’s running Ubuntu 14.04 LTS by entering the following command:
cat /etc/lsb-release

​You should see output that resembles the following:


DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=14.04

DISTRIB_CODENAME=trusty

DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"

Your Linode is now running Ubuntu 14.04 LTS.

How To Enable PHP Curl Ngnix (Good for Social share counters)

Today I was eager to install and enable really cool Drupal module for my blog - Social Share Counter, this module looked simple - all I had to do, just download, enable and a little bit tweak around.

From module creator (s)

This module gives the share counts for only Facebook,Twitter and more which has some excellent features in more elegant manner. If you have a website, then you definitely need this module.

Unfortunately, after I successfully installed and enabled this module I noticed that share count is not increasing for my articles (I had one article - with more than 5,000 shares and likes today, it felt lame seeing fat zero, while my default Facebook plugin showed it correctly)

I noticed from recent log messages following notice:

Notice: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in _social_share_counter_parse() (line 254 of /srv/www/reinisfischer.com/public_html/sites/all/modules/social_share_counter/social_share_counter.module).

And I got it - most probably I didn't install php5-curl when did setup last time this server, see complete guide on how to setup LEMP Server Ubuntu 12.04 for serving Drupal on Nginx

Now, the fix is really easy - open your SSH terminal (putty, for example), login and:


sudo apt-get install php5-curl
sudo service nginx restart

if you are on Apache use following command to restart Apache2

​
sudo service apache2 restart

Nginx users will need to perform one more line of code, restart PHP-FPM

/etc/init.d/php5-fpm restart

That's it! Few simple lines of code and php curl is enabled. 

Speaking about me and those social counters, ahh... thus I was able to enable them and got some counters actually working after enabled php-curl, they never showed anything close to real count. I'm not sure foremost, but I guess service providers like Facebook and Twitter are shutting down (depreciated) their API's and ... I will stick with the default Facebook like and share button for now. See: Facebook share button for Drupal views

Used resources:

How to Upgrade PHP 5.3 to 5.5.9 on Ubuntu 12.04 to Support Drupal 8

That day finally have come and I've officially started a new project on my first Drupal 8 website. While my first attempts were about two years ago, but due to the lack of time and will to explore new things and configure new servers I proceeded just tonight (after a conversation with a long time customer we agreed to make a re-branded website and I was allowed to "experiment" with a Drupal 8 site)

I took me some time to get it running as I wasn't prepared for the Drupal 8 requirements, and one of them, is to run on at least PHP 5.5.

I have two linodes configured - one for this blog only and second for all the other websites. Both boxes are configured on Ubuntu 12.04, which is shipped with the php 5.3 version, and of course Nginx. They run smooth for Drupal 7, but speaking for Drupal 8 it took me about an hour to get things right. I got too many 502 bad gateway and 500 internal errors, while I found this great article: Upgrading PHP to 5.4 on Ubuntu 12.04 LTS to support Drupal 8.

The idea is to keep Ubuntu 12.04 (for a while), but upgrade php version only

Optional: The add-apt-repository command is not necessarily installed in 12.04, in which case you get "add-apt-repository: command not found". to fix this:

sudo apt-get install python-software-properties

for PHP 5.5.x run:

sudo add-apt-repository ppa:ondrej/php5

​And then update your packages:

sudo apt-get update

sudo apt-get upgrade

Update the packages, but not update the Ubuntu release

sudo apt-get dist-upgrade

​Again, 502 bad gateway problems

After this upgrade I got all my other Drupal 7 sites 502 bad gateway notice, to fix this I had to edit /etc/php5/fpm/pool.d/www.conf and change /var/run/php5-fpm.sock back to 127.0.0.1:9000 (see my default Drupal + Nginx server block config. I had to follow another great tutorial on how to Fix “502 Bad Gateway” error on NGINX server after upgrading PHP

Of course you may never forget to restart the NGINX and PHP5-FPM services! You would be surprised how many people forget this step. It is necessary to do this so that the updated configuration files are loaded.

sudo service php5-fpm restart

sudo service nginx restart

Hopefully this article/draft helped you solve issue similar I got tonight. Check out other server config tutorials or see some cool tips on Drupal development.

The Swan Lake park in Yerevan

The Swan lake park in Yerevan is a popular recreation area in the heart of Yerevan, located next to the Opera house in a 5 minute walking distance from main Republic Square.

The Swan Lake park usually hosts various open air art exhibitions. - Ice-skate with many locals at the Swan Lake (next to the Opera House) during winter months.

The huge guitar and piano at the entrance of the Swan park

The huge guitar and piano at the entrance of the Swan park

I visited Swan park in the middle of March, it was still grey all around, but the green decors made it much better.

Sculpture

Sculpture

Sorry - can't tell more about it - probably very famous Armenian composer? Leave a comment if you have more information.

Swan Lake park

Swan Lake park

No water yet. I presume that during Summer months, this place just rocks. Of course I believe there are water during season. 

Advertisement and benches

Advertisement and benches

Postcards from Yerevan (Spring)

Back at the March 2016, we made a short, but very remarkable trip to Armenia and of course its capital Yerevan. In today's Piece of Life series - a day from Spring in the city of Yerevan.

Republic Square in Yerevan

Republic Square in Yerevan

Read more detailed article about the Republic Square of Yerevan.

View towards mount Ararat

View towards mount Ararat

Architecture in Yerevan city center

Architecture in Yerevan city center

Sculpture in Yerevan's park

Sculpture in Yerevan's park

Advertisement in Yerevan

Advertisement in Yerevan

Panoramic view of Yerevan

Panoramic view of Yerevan

In the background - Yerevan's brandy factory - Ararat, more on that in some of the future articles