Friday, October 19, 2012

How to reset password in VirtualBox Ubuntu 12.04

I forgot my Ubuntu 12.04 user password and I need quick fix. Google gave me nice solution http://www.psychocats.net/ubuntu/resetpassword . Problem was that I had Virtualbox based installation.
It came out that to fix it in Virtualbox environment these additional steps must be executed
  1. get focus to new Virtualbox window with mouse during startup  
  2. hold down SHIFT key to get into GRUB menu.

Sunday, October 7, 2012

How to change Wordpress language to Estonian in Synology DS112+

There is Estonian translation file and documentation in http://www.kakupesa.net/wordpress/v3/

To apply translation to wordpress you must apply these steps
# ssh -l root 192.168.1.68
# cd /volume1/web/wordpress (wordpress root directory)
# wget http://www.kakupesa.net/wordpress/v3/wordpress-et-3.4.tar.gz (get latest version)
# tar -zxvf wordpress-et-3.4.tar.gz (unzip to wordpress root dir)
# vi wp-config.php and change define('WPLANG', 'et'); (change lanuage definition)
# browser: http://192.168.1.68/wordpress

And Estonian translation must be in place!

How to install ipkg to Synology DS112+


There are some really good articles (1, 2) in internet about this issue, but actually it came out, that to get it work I had to mix several of them.

After several attempts I get it work in this way
  1. You must know your CPU model to download right package (if its not DS112+). You can find useful information from these articles (1, 2);

    # ssh -l root 192.168.1.68
    # mkdir /volume/temp
    # cd /volume/temp
    # wget http://wizjos.endofinternet.net/synology/archief/syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh
    # chmod +x syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh
    # sh syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh
    # vi /root/.profile and put # before PATH ...
    # browser: reboot DS112+ from Synology Diskstation Main menu
  2. Trick is that PATH must have /opt/bin to find ipkg package and without commenting out PATH variable in /root/.profile it will overwrite /etc/profile PATH variable.

How to move Wordpress database from ISP to Synology DS112+.


I had Wordpress application installed to ISP server and I want to move it to my own DS112+ server. I had Wordpress 3.3 at ISP and Wordpress 3.4 at my own server. Because its my private blog, I dont have any comments, so task was even easier.

After studing database structure and data in both databases it came out that there is only one table wp_posts with important data for me. So moving data from one wordpress server to another consisted from following steps:
  1. In DS112+ delete example data from wp_posts and wp_comments
  2. In ISP server export wp_posts to external file with phpmyadmin
  3. In DS112+ import same file to wordpress database (wordpressblog) with phpmyadmin 
There is one issue to keep in mind: wp_posts has reference to wp_users, so you must have wp_users with same id-s in both databases.

I need additionally configure layout and additional plugins with Wordpress dashboard, but its really simple and straightforward task.

How to install WordPress 3.4 on Synology DS112+ server

First I try to install package from Package Center and it almost work, but afterward I changed my MySql root password (which is empty during package install) and then I was in trouble. Afterward I find article, that describes how easy is to install wordpress latest version from command line.

Because I had mysql stuff already in place, my installation was even easier. I assume that you have
1) ssh access to synology server
2) mysql and phpmyadmin installed


# ssh root@192.168.1.68 (root password is same as admin password)
# cd /volume1/web
# mv wordpress wordpress_old (move old version to another location)
# wget http://wordpress.org/latest.zip
# unzip wordpress-3.4.2.zip


# cd /volume1/web/wordpress
# mv wp-config-sample.php wp-config.php (main wordpress configuration file)

# vi wp-config.php
 DB_NAME: wordpressblog (input the name of your wordpress database)
 DB_USER: user_wordpress (input the username of the wordpress database)
 DB_PASSWORD: 12345678 (input the password of the db username)
 DB_HOST: localhost
 DB_CHARSET: utf8

# phpMyAdmin: drop all tables in wordpressblog database
# browser: http://192.168.1.68/wordpress/wp-admin/install.php

# and install wordpress

# cd /volume1/web
# chown -R nobody:nobody wordpress (just for security reasons)


And voila!, it works!