Friday, January 24. 2014
Blog System Updated
During the previous months the blog has been under maintenance, better said, it has been migrated to a recent version of the s9y software. The blog was receiving a lot of spam and I wanted to update it to a recent version in order to have more tools to control it. (I do not know if you have realized that, but the comments have been disabled during the last two or three months.) Besides the blog is hosted in my previous company and managed by some of my ex-colleagues, so the process has been quite slow.
A new debian box was installed to contain the new blog system by the nologin team. During my Christmas vacation I decided to perform the migration process from the old machine to the new one. Finally the blog system is upgraded to a recent s9y version. As usual I am going to document here the complete process just in case I need it to do it again.
The new machine needs the packages to run PHP and all the dependencies for the s9y blog software. The packages were installed in the debian box:
apt-get install libapache2-mod-php5 apt-get install mysql apt-get install php5-mysql apt-get install php5-gd apt-get install imagemagick
A new site for the blog is created in the web server just defining the minimum data which was copied from the previous configuration (the site's name, the document root and where the logs for the site are placed):
cat /etc/apache2/sites-available/<site-name> <VirtualHost
* :80> ServerName <site-name> DocumentRoot "<site-doc-root>" ErrorLog "/var/log/apache2/<site-name>/error.log" CustomLog "/var/log/apache2/<site-name>/access.log" Combined </VirtualHost>The default site is disabled and the new one is enabled. Some modules are also enabled for the correct behavior of the system.
a2dissite default a2ensite <site-name> a2dismod autoindex a2enmod rewrite
Following s9y recommendations the PHP is configured to support greater files. In the configuration /etc/php5/apache2/php.ini the following two properties are modified:
post_max_size = XXM upload_max_filesize = XXM
The database of the current version is backed up from the MySQL database:
mysqldump --databases <s9y_database> > /tmp/s9y_database.sql
And then restored in the new database of the new host (the file was placed in the user home directory):
mysql -u root -p < ~/s9y_database.sql
Finally the database connection user is created using same name and password of the previous installation with full privileges in the migrated database.
create user '<s9y_user>'@'localhost' identified by '<s9y_password>'; grant all privileges on <s9y_database>.
* to '<s9y_user>'@'localhost';Once the database information is in place the complete document root is copied from the old system to the new one. In the previous machine the document directory of the site is archived:
cd <site-doc-root> tar jcvf /tmp/serendipity.tar.bz2
* The archived file is moved to the new system and exploded:
mkdir <site-doc-root> cd <site-doc-root> tar jxvf ~/serendipity.tar.bz2
At this moment the new system is identical to the old one (but with an updated debian box and related packages -PHP, MySQL,...-). The apache can be started and the blog is presented with the same old version.
Now it is the time to upgrade the blog. The new version of s9y is downloaded and placed in the new system. The upgrade process consists in replacing the s9y files with the new ones, in case of my blog:
tar xzvf serendipity-X.X.X.tar.gz cd serendipity cp -r
* <site-doc-root>/rickyepoderi/Now take care of the owners and the permissions of the files (check with the previous system that owners and permissions are correct).
The apache web server is started and the blog is accessed, a upgrade page is shown (the system detects that the software has been upgraded and presents a special page). The page asks to auto-update the system for finishing the process, just clicking the Yes, please do so button the migration is completed.
In my case, the last two points are repeated as many times as blogs are installed in the original web server.
And that is all, my blog is now updated to a recent s9y version. In order to avoid all the spam I was receiving, I decided to change default captchas for the google recaptcha using the specific s9y plugin and disable all the trackbacks. I hope that the blog could now work with comments normally. Apologies for the long time spent doing this process and thanks to my ex-colleagues for their work and time. Finally the blog system is in a good shape.
On the road again!
Tuesday, September 13. 2011
Adding Sharing Buttons to the Entries
The other day I read some recommendations about how you can improve your blog impact (I am sorry but I cannot find the link again and besides I think it was in Spanish). One of the main advice was adding the typical sharing buttons to your blog entries (you know, the buttons to share via digg, reddit, facebook like or tweet this, I am sure you have seen these buttons dozens of times). I am not a fun of social networks (no twitter, my facebook account was requested to be closed,...), I usually read some bookmark pages (digg, slashdot or Spanish menéame) but always anonymously, and the number of visits to the blog is merely a matter of pride. So, although it really does not matter very much, I am completely agree with that advice, anything that let you spread your entries it is clearly a good idea.
So from now on when you enter to see a single entry some links to share it will appear just after the post information and before trackbacks and comments. I have just added an AddThis toolbar after reading this blog entry. I tested nothing, as I said I have no account in any of these sites, so if you detect any problem sharing or bookmarking an entry please comment below.
Thank you all!
Tuesday, August 23. 2011
Videos Are About to Change (Second Time Lucky)
Long time ago the way videos are presented in this blog were about to change. I was going to replace my useful flash flowplayer with the new HTML5 video tag. I changed my mind because video were not supported in any stable IE and there was some warfare about the supported codecs in the rest of the browsers.
At the same time I published that entry google made public the WEBM video+audio format, they created a webm project and since then the new codec has been quickly adopted by browsers. Only IE and Safari do not support WEBM by default, but this time google solved the issue announcing plugins for both OS integrated browsers (they are in a very early stage). Microsoft IE9 was released to the public in march of this year, with a lot of the new HTML5 features (included video and audio support). Iceweasel testing package was upgraded to 5.0 last week in Debian (the browser was still at 3.5 version before). Therefore all my requisites to trigger HTML5 solutions are accomplished and there is no reason to not change my videos.
From now on the videos are going to be presented using the video tag and only in WEBM format. Just like this:
<video src="out.webm" autobuffer controls> <img src="error.png" alt="Error!" /> Your browser does not support the video tag. See this <a href="/rickyepoderi/index.php?/archives/41-...">entry</a> for more information about how to see the videos in this blog. You can <a href="out.webm">download the file</a> instead. </video>
And this is my last video in the new format just as an example (video used in Backing Up Data Into an Encrypted External Disk entry):
So maybe you have reached this post because you cannot see my videos. At this moment browser status about video and WEBM is the following:
- Firefox: Firefox supports both video and WEBM since 4.0 version.
- Chrome: Both are supported since 6.0.
- Opera: Video supported since 10.50, WEBM since 10.60.
- IE: IE9 supports video tag but WEBM is not a valid format out of the box. You need to install a plugin offered by the webm project. Remember that IE9 cannot be installed in Windows XP.
- Safari: Video is supported since 3.1 but again WEBM needs an external codec. Here there are two options, the plugin from google and perian, an open source QuickTime component that adds native support for many popular video formats (it supports webm since 1.2.3). Some friends who have tested both solutions recommend the perian option (it seems perian is very common in the Mac world and google plugin gives some problems right now, sorry but I am not a mac guy).
- Others: If you are using any other browser you are a geek, so I hope that you know what you are doing and how to see an HTML5 video with WEBM format.
As a summary, in most cases if you cannot see the videos you only need to upgrade your browser to the last version. Besides if you are using Windows integrated IE9 or Mac OS integrated Safari you need to manually install a WEBM codec plugin (see previous links). Finally if you are using IE8 (or previous) in a Windows XP box I strongly advise you to change your browser for another one (please do not get stuck).
HTML5 is here! At least for my videos.
PS: Thanks to Luis who made some changes in the blog system installation to make this work (adding webm mimetype and IE9 compatibility meta tag). Thanks also to Jaime, Mariano, Nacho, Ramón and Victor (both) who tested the options in Mac OS / Safari.
Comments