- Install HTTPD, PHP, MySQL first.
- Download phpMyAdmin
- unzip phpMyAdmin under directory /var/www/html/
- make sure your mysql server and httpd are running:
service mysqld start
andservice httpd start
- if you have not set root password for new installed MySQL, running the following command to set a password to avoid error message "fedora Login without a password is forbidden by configuration (see AllowNoPassword)":
$ mysqladmin -u root password NEWPASSWORD
- running command
system-config-services
andsystem-config-firewall
to doulbe check your httpd and mysqld is enabled and running
Saturday, February 25, 2012
install phpMyAdmin on Fedora or CentOS
Friday, February 10, 2012
Spring singleton and singleton design pattern vs Ext JS 4 singleton and JavaScript Singleton
As described in Spring document, Spring's concept of a singleton bean is different from the Singleton patter, which could be called GoF (Gang of Four) Singleton. As discussed in my post "Java Class loader and static variable and JVM memory management", the GoF Singleton implements one and only one instance of a particular class will ever be created per ClassLoader. Meanwhile, the singleton object defined in Spring framework is single/unique object managed in Spring container. So, Spring singleton needs to be carefully used in multithread environment. Normally, we should use Spring prototype instead of singleton as service that will be requested by multi threads.
Now let's look at Ext JS 4 singleton. I will say it has similar implementation as Spring singleton. That is, Ext JS 4 develops a container to hold all Ext JS 4 class/object. JavaScript's multi-task programming is not popular yet. However, how about testing this through two tab in same browser?
This discussion reveals how Ext JS 4 implements singleton. It is pretty similar as the way Spring does. In Ext JS 4, a singleton is an object instead a class. It's not the same with GoF Singleton just like Spring singleton is not same with GoF Singleton. I think this is an interesting investigation.
Thursday, February 2, 2012
reset linux password for a forgot user account
1) When boot linux with GRUB, press key "e" or move cursor up/down to see boot option editing line.
2) add "single init=/bin/bash" at the end of boot option line
3) once booting up linux, type "passwd root" to reset root password.
4) For my case, I even forgot the user name I created before. So, I go to "/home" and list sub directory there. I saw a folder called "yiyu" there. So, I know the user account I created before is "yiyu".
5) type "passwd yiyu" to reset my user account password.