on i4PACE(i for Personal Archiving and Creating Environment)
actions » SearchLogin 89 articles • 30 Jul 2010

Recent articles

Tuesday, 22 Dec 2009

permalink liferay

try liferay (http://liferay.com). it's java-based CMS. MIT license.

documentation (http://www.liferay.com/web/guest/community/documentation/5_2) has a book.
follow quick installation instrustions.
hardware requirements is 1GB of RAM. the machine i'm installing has 4GB. so, it's ok.
listed as prerequisites: java 5 or later -- yes, i have. let me check... i have sun-java5-jdk installed on Ubuntu 9.10.
download liferay-portal-tomcat-6.0-5.2.3.zip at http://www.liferay.com/web/guest/downloads/portal. there are other bundles, but this one is recommended. it's got 135MB.

unzipping creates a directory liferay-portal-5.2.3. move it to /var/www/. rename it as liferay.

> cd /var/www/liferay/tomcat-6.0.18/bin
> ./startup.sh
Using CATALINA_BASE:   /var/www/liferay/tomcat-6.0.http://blogs.sun.com/koma/entry/liferay_5_218
Using CATALINA_HOME:   /var/www/liferay/tomcat-6.0.18
Using CATALINA_TMPDIR: /var/www/liferay/tomcat-6.0.18/temp
Using JRE_HOME:       /usr

voila! it automatically opened a browser here, showing "Welcome to Liferay".

gee, it's so eeeaasy!

login as an administrator bruno@7cogs.com. try to edit the front page. wysiwig editor is nice.

to change the language into Japanese, following the instructions here. Menu(uppper right of the screen) -> Add Applications -> Tools -> Language, then click an icon for Japanese. tha's it! nice :->

trying to figure out how to translate it. this page for translation. turns out the properties file is stored in portal-impl.jar at /var/www/liferay/tomcat-6.0.18/webapps/ROOT/WEB-INF/lib. see

> cd   /var/www/liferay/tomcat-6.0.18/webapps/ROOT/WEB-INF/lib
> jar tf portal-impl.jar | grep Lanuage_ja
content/Language_ja.properties
content/Language_ja.properties.native

As commented here, use jar xf and jar cf. and use > jar -xvf Languate_ja.properties.native to extract, > jar -cvf Laguate_ja.properties.native to renew the lanuage file.

in the source code liferay-portal-src-5.2.3.zip at http://sourceforge.net/projects/lportal/files, Language_ja.properties.native is in portal-impl/src/content.

References

  1. WIKI GUIDE FOR LIFERAY 5 http://www.liferay.com/web/guest/community/wiki.
  2. A thread for Japanese translation http://www.liferay.com/web/guest/community/forums/-/message_boards/message/1288425.
  3. Japanese liferay user group http://liferay-jp.sourceforge.jp/.
  4. Koma's blog -- Liferay 5.2 installation on Solaris http://blogs.sun.com/koma/entry/liferay_5_2.
  5. Using a Locale other than English (en_US) http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Cannot+set+page+names+%28using+a+locale+other+than+en+US%29;jsessionid=1ADD52BE1E8D1E2A87C2C7DC1E57DF10
  6. Comments on overriding portal.properties http://www.liferay.com/web/guest/community/forums/-/message_boards/message/220743
• Wrote Teru at 12:29 (edited 31×, last on 24 Dec 2009) | read 124× | 0 Comments

Sunday, 20 Dec 2009

permalink cmscart

found cmscart (http://www.cmscart.org).

following install.txt, at the terminal, installed mysql

> sudo apt-get install mysql-server

specifying a password for root on the way.

unzip the downloaded file. moved the file at /var/www.

> sudo chown -R www-data:www-data /var/www/cmscart104

>mysql -u root -p
mysql>create database cmscart;
mysql> use cmscart;

mysql> source /var/www/cmscart104/cmscart/sql/mysql/cmscart.sql; Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.00 sec)admin/admintemplates.php?SiteName=mars

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

mysql>\q

edit config.php

$dbuser = "root"; 
$dbpass = "********";  > 
> 
> 
> (read on...)

edit /etc/apache2/sites-available/default add

AddType application/x-httpd-php .php
		DirectoryIndex index.php

save it as cmscart

> sudo a2ensite cmscart
> sudo /etc/init.d/apache2 restart

access on browser http://localhost/admin/adminsites.php ugrrrrr... doesn't work :-#

edited admin/includes/Zip.php

//Excluded due to minimal code need
  // require_once 'PEAR.php';

  //Creates OS Constants

     if (substr(PHP_OS, 0, 3) == 'WIN') {
       //define('OS_WINDOWS', true);
       //define('OS_UNIX',    false);
       //define('PEAR_OS',    'Windows');
       OS_WINDOWS=true;
       OS_UNIX=false;
       PEAR_OS='Windows';
   } else {
       //define('OS_WINDOWS', false);
       //define('OS_UNIX',    true);
       //define('PEAR_OS',    'Unix'); // blatant assumption
	OS_WINDOWS=falst;
       OS_UNIX=true;
       PEAR_OS='Unix';

needed

> sudo apt-get install php5-mysql

too many places to admust. giving up.

• Wrote Teru at 10:07 | read 30× | 1 Comments

Wednesday, 16 Dec 2009

permalink silva

going to try silva (http://svn.infrae.com/). REAME.txt is here. will be back.

• Wrote Teru at 08:21 | read 28× | 0 Comments

Tuesday, 15 Dec 2009

permalink cyn.in

found cyn.in. started to try to install it on Ubuntu9.10.

page for downloading is http://www.cynapse.com/downloads/cynin-community-edition: community edition is here. its source code is available here. how to cyn.in build quick start is here.

oh, it's for 32bit x86, and the computer i'm using is 64bit AMD... will continue when i find a server i can work on. (note: later found it's only for pre-built iso version as pointed by Dhiraj Gupta in comment. if installed from source, cyn.in can be installed on 64bit CPU machines.)

ok. i found an 32bit x86 server (with Intel Cerelon 3GHz, 1GB RAM). downloaded cynin-ce-31-8-i386-10.iso at http://www.cynapse.com/downloads/cynin-community-edition, and burned it on a CD-R. booted the server with the CD. installing Debian and Cyn.in starts, and end in half an hour or so.

access the site from a PC on the same LAN as http://192.168.1.4/. the first page looks like this: [[image: cynin.png]]
kina cute :-) but... what is the default username and password... found at README.txt in /home/cynin/buildout that the username is admin and its password is secret. now, after logging in, the following page is shown: [[image: cynin3.png]]

it's already shown in Japanese, at least partially :-) found some words and word orders are pretty funny... perhaps automatic translation is used? quality of automatic translation of English to Japanese is still less than acceptable for general readers without re-editing/proofreading. i will be able to modify them when i find a way to translate it.

by the way, https://192.168.1.4:10000/ shows a Webmin page: [[image: cynin1.png]]
login as root leads to: [[image: cynin2.png]]

• Wrote Teru at 20:58 (edited 8×, last on 27 Dec 2009) | read 323× | 2 Comments

Thursday, 22 Oct 2009

permalink ezPublish 3

trying to make webdav to work on ezPublish by following the instructions here.

before that, need to make webdav available on apache. see here, for example.

did

> sudo a2enmod dav
> sudo a2enmod dav-fs
> sudo a2enmod dasv-lock
> sudo /etc/init.d/apache2 restart

The effort to realize webdav is suspended here for a while.

• Wrote Teru at 18:40 (edited 1×, last on 05 Nov 2009) | read 73× | 4 Comments

Tuesday, 20 Oct 2009

permalink ezPublish 2

There's an instruction to virtualize the URL by setting up Apache configuration to run ezPublish here.

Tried to follow what's written there with an example, and this page.

The section for overriding siteaccess method is skipped since it's done in the setting up wizard.

Below is the Apache configuration modified to meet my needs.

NameVirtualHost *:80
<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /var/www
	AcceptPathInfo On

	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/ >
		AddType application/x-httpd-php .php
		DirectoryIndex index.php
		Options FollowSymLinks
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

    <IfModule mod_php5.c>
        php_admin_flag safe_mode Off
        php_admin_value register_globals    0
        php_value magic_quotes_gpc  0
        php_value magic_quotes_runtime  0
        php_value allow_call_time_pass_reference 0
    </IfModule>
 
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule content/treemenu/? /index_treemenu.php [L]
        Rewriterule ^/var/storage/.* - [L]
        Rewriterule ^/var/[^/]+/storage/.* - [L]
        RewriteRule ^/var/cache/texttoimage/.* - [L]
        # RewriteRule ^/var/[^/]+/cache/public/.* - [L]
		RewriteRule ^/var/[^/]+/cache/(texttoimage|public)/.* - [L]
        Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
        Rewriterule ^/share/icons/.* - [L]
        # Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
		Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascript|flash|lib?)/.* - [L]
        Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
        RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
        RewriteRule ^/favicon\.ico - [L]
        RewriteRule ^/robots\.txt - [L]
        # Uncomment the following lines when using popup style debug.
        # RewriteRule ^/var/cache/debug\.html.* - [L]
        # RewriteRule ^/var/[^/]+/cache/debug\.html.* - [L]
	RewriteRule .* /index.php
    </IfModule>

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined
</VirtualHost>

Actually, the above assumes ezPublish was configured to run under /var/www, which is different from the config shown in the previous post here.

• Wrote Teru at 11:29 (edited 4×, last on 20 Oct 2009) | read 11719× | 16 Comments

Monday, 19 Oct 2009

permalink ezPublish

installing ezPublish (http://ez.no/jp/ezpublish). download the source athttp://ez.no/jp/download. choose eZ Publish full installation (version 4.2.0). 27.2MB. (registered at http://ez.no as a user.)

untar the downloaded file

> sudo tar zxvf ezpublish-4.2.0-full-with_ezc-gpl.tar.gz -C /var/www
> sudo chown -R www-data:www-data /var/www/ezpublish-4.2.0
> sudo mv /var/www/ezpublish-4.2.0 /var/www/ezpublish

take care of its prerequisites:

> sudo apt-get install php5 php5-gd php-cli php-pear curl
> sudo apt-get install postgresql

by synaptic package manager on ubuntu9.04. apache is already installed.

follow the instructions at here.

the first thing to do is to execute psql as a postgres user. turns out i need a password... which i haven't set up :-/ this page gives an instruction, and i did

> sudo apt-get install pgadmin3
> sudo -u postgres psql postgres

within psql,

postgres=# \password postgres

then set the password as

Enter new password: 
Enter it again:
postgres=#\q

to login as postgres,

> sudo su
> su postgres
> psql -U postgres -W

assuming to use port 5432. create a new database and a new user

postgres=# CREATE DATABASE myezdb ENCODING='utf8';
CREATE DATABASE
postgres=# CREATE USER ezuser PASSWORD '********';
CREATE ROLE

grant permission

postgres=# GRANT ALL PRIVILEGES ON DATABASE myezdb TO ezuser;
GRANT

Next the instruction says to import the "pgcrypto" module. need to install pgcrypto as

> sudo apt-get install pgsql-contrib-8.3

Now, i can import the "pgcrypto" module into the new database:

postgres=# \c myezdb
Password for user postgres: 
You are now connected to database "myezdb".
myezdb=# \i '/usr/share/postgresql/8.3/contrib/pgcrypto.sql'
SET
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
myezdb=# \q

i donno what FUNCTIONs they are... but, it's ok. better restart PostgreSQL by

> sudo /etc/init.d/postgresql-8.3 restart

Apache is already installed and running. changed the config file at /etc/apache2/sites-available/defult by adding after <Directory /var/www/>

AddType application/x-httpd-php .php
                DirectoryIndex index.html index.php

saved the file as /etc/apache2/sites-available/ezpublish. then,

> sudo a2ensite ezpublish

After killing all the apache-related jobs (check ps aux | grep apache), start apache2

> sudo /etc/init.d/apache2 start

then access the site

> firefox http://localhost/ezpublish/index.php &

got error messages

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 491520 bytes) in /var/www/ezpublish/lib/eztemplate/classes/eztemplatearrayoperator.php on line 762

Fatal error: Class declarations may not be nested in /var/www/ezpublish/lib/ezdb/classes/ezdb.php on line 106

Ugrrr... After some gooling, changed memory_limit in php.ini

> sudo vi /etc/php5/apache2/php.ini

and changed to

memory_limit = 128M

also changed

max_execution_time = 720

Restarted apache2

> sudo /etc/init.d/apache2 restart

Launched the browser

> firefox http://localhost/ezpublish/index.php &

Voila!
[[image: ezpublish.png]]

hit "Finetune" button. a 'system check' page appears giving some cautions. here, instead of editing php.ini, edit config.php-RECOMMENDED under the root directory of ezPublish as

date.timezone = "Asia/Tokyo"

and save it as config.php.

> sudo chown www-data:www-data config.php

to change the ownership of the file. hit 'next' button anyhow. ... encountered "Missing database handlers" did

> sudo apt-get install php5-pgsql

that solved the problem. got [[image: ezpublish_1.png]]
put a smtp server name s***.xrea.com i have on a rental server. hit 'next' [[image: ezpublish_2.png]]
Servername is localhost, Port 5432, Username postgres, and Password ********. hit 'next' [[image: ezpublish_3.png]]
set default to japanese and additional to english(american). hit 'next' [[image: ezpublish_4.png]]
not all the screen is shown. chose 'Website Interface' as a begining. hit 'next'. took a minute or two to get [[image: ezpublish_5.png]]
chose 'Map to Japanese'. [[image: ezpublish_6.png]]
chose 'URL'. [[image: ezpublish_7.png]]
didn't change any assuming they can be changed in admin later. [[image: ezpublish_8.png]]
changed lastname to YUI, firstname to Comio. mail-address is admin at comio.net. hit 'next'. [[image: ezpublish_9.png]]
got a messge to change to virtual host. i am actually running in virtual host mode, but maybe the apache config file need to be modified. ignore this this time, and see if it's ok. hit 'next'. [[image: ezpublish_10.png]]
this time i won't send info to ez.no. hit 'next' [[image: ezpublish_11.png]]
finished ! :-> i wonder what is 'Usermame' ... %-| hit the link 'User site'. got [[image: ezpublish_12.png]]
ok. see the demo page :-) hit 'Admin site' at the Finished page. got [[image: ezpublish_13.png]]
typed admin as username, and a password. good to see japanese there. [[image: ezpublish_14.png]]
ok, got the admin page :-D

looks like the available extension options doesn't include ez-flow for example in the admin page. need to find out if it can be added thru the admin site.

• Wrote Teru at 00:02 (edited 41×, last on 09 Nov 2009) | read 87× | 0 Comments

Thursday, 15 Oct 2009

permalink xmodmap

encountered a problem of typing ] on my laptop. this gave me a good information, but the keyboard list didn't include the one i needed. with the help of xev, i found the key i want to modify has the keycode 51. so, on terminal,

> xmodmap -e "keycode 51 = bracketright braceright"

worked. this page gave me a better expression and a way to store it. i.e., create ~/.xmodmaprc with a line

keycode 51 = bracketright braceright kana_MU kana_closingbracket

it works. :->

to do the above, i installed xkeycaps as

> sudo apt-get install xkeycaps

addendum:

keycode 51 = bracketright braceright kana_MU kana_closingbracket

caused a problem eventually somehow... changed to

keycode 51 = bracketright braceright bracketright braceright bracketright braceright

and worked better. also changed .xmodmaprc to .xmodmap

• Wrote Teru at 08:54 (edited 2×, last on 18 Oct 2009) | read 26× | 0 Comments

Thursday, 01 Oct 2009

permalink Autocompletion and snippets in emacs

Got interested in autocompletion (code-assist, code-completion) and snippets in editors. This article shows a way to incorporate such features on emacs. i'm not familiar with emacs, but will try because a demo video of yasnippets looked interesting.

Instead of following the article mentioned above, i'm going to try Ubuntu repositories.

> sudo apt-get install python-rope
> sudo apt-get install pymacs
> sudo apt-get install python-ropemacs
> sudo apt-get install python-mode
> sudo apt-get install pylint

To install yasnippet, download

> mkdir -p ~/.emacs.d/plugins
> cd ~/.emacs.d/plugins
> svn checkout http://yasnippet.googlecode.com/svn/trunk/ yasnippet_svn

Follow the instruction given at http://yasnippet.googlecode.com/svn/trunk/doc/index.html Create ~/.emacs and edit as

(add-to-list 'load-path
              "~/.emacs.d/plugins/yasnippet_svn")
(require 'yasnippet)
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/yasnippet_svn/snippets")

Launch emacs, open ~/.emacs.d/plugins/yasnippet_svn/yasnippet.el, and run in mini buffer, alt-x eval-buffer. Now i see a menu Python and YAsnippet: [[image: emacs_yasnippet.png]]

Emacs auto-complete package is found at http://code.google.com/p/auto-complete/. Download

> cd ~/.emacs.d/plugins
> hg clone https://auto-complete.googlecode.com/hg/ auto-complete_hg

Follow the instruction in auto-complete.el. (I noticed the author is Japanese. Thanks Matsuyama-san :-) ) It's verson 0.3.0 alpha.

Did

> cp -R auto-complete ~/.emacs.d/plugins/

Added to ~/.emacs

(add-to-list 'load-path
        "~/.emacs.d/plugins/auto-complete_hg")
(require 'auto-complete)
(global-auto-complete-mode t)
(define-key ac-complete-mode-map "\C-n" 'ac-next)
(define-key ac-complete-mode-map "\C-p" 'ac-previous)
 (define-key ac-complete-mode-map "\t" 'ac-complete)
 (define-key ac-complete-mode-map "\r" nil)

Auto-complete is not working >) Lookng at http://www.enigmacurry.com/2009/01/21/autocompleteel-python-code-completion-in-emacs/... may try some time later.

• Wrote Teru at 11:38 (edited 8×, last on 03 Oct 2009) | read 129× | 3 Comments

Thursday, 17 Sep 2009

permalink SSL

struggling with the procedure to make https connection available for the domain emediajp, running apache on my home server (Ubuntu9.04 server).

> sudo su
> mkdir -p /etc/ssl/private
> openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr
root@yarrow:/etc/ssl/private# sudo openssl req -
out server.key -out server.csrey 
Generating a 2048 bit RSA private key
..+++
................................................................................
.....+++
writing new private key to 'server.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Yamagata
Locality Name (eg, city) []:Yamagata-shi
Organization Name (eg, company) [Internet Widgits Pty Ltd]:YUI
Organizational Unit Name (eg, section) []:RD
Common Name (eg, YOUR name) []:*.emedia.jp
Email Address []:admin@emedia.jp

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

make sure to specify the name as *.emedia.jp for subdomains.

Access to http://www.cacert.org/, create an account, login, register email, register domain *.emedia.jp. Click Server Certificates, and paste all of the lines of server.csr in the textarea.

Set permission

> chown root:ssl-certs server.*
> chmod 400 server.key
> chmod 440 server.csr
> chmod 444 server.crt

Edit /etc/apache2/sites-available/default-ssl.

SSLCertificateFile      /etc/ssl/private/server.crt
        SSLCertificateKeyFile   /etc/ssl/private/server.key

Enable it

> a2ensite default-ssl
>/etc/init.d/apache restart

Access to https://192.168.1.81/ from a PC over LAN. Success!

• Wrote Teru at 16:28 (edited 3×, last on 17 Sep 2009) | read 33× | 1 Comments

10 shown; more articles may be found in the archives. The permalink icon is the article's permalink.
Process times: page=0.183 request=0.194 cpu=0.190