I recently encountered the infinite redirect loop when I accessed my Google Groups website. I didn't know why. I tried with another PC and it was good. Also tried with Google Chrome. Then it was good. Just one PC with Firefox is not good. Upgrading Firefox to version 3.6.3 didn't resolve the problem.Finally I deleted all cookies and could connect to my Google groups website.
I referred the following website.
http://support.mozilla.com/no/forum/1/700930
System/Network Engineer, Akira Muramatsu's tech blog from Huntington Beach, CA, USA
6/19/2010
5/19/2010
How to grant select privileges to all tables in database in PostgreSQL
After a couple of research, I figured out the command that grants select privileges to all tables of the database in PostgreSQL.
select 'grant select on '||schemaname||'.'||tablename||' to username;' from pg_tables where schemana
me in ('public');
Also in the case of views it would be the following.
select 'grant select on '||schemaname||'.'||viewname||' to username;' from pg_views where schemaname
in ('public');
You'll get the list of SQL statements to grant all tables the privileges you want like following.
?column?
------------------------------------------------------------
grant select on public.table_a to username;
grant select on public.table_s to username;
grant select on public.table_d to username;
grant select on public.table_f to username;
grant select on public.table_g to username;
........
(xx rows)
Then, excute those SQL statements.
That's it.:)
I referred the following post.
http://bensbrain.blogspot.com/2004/08/postgres-grant-on-all-tables-in.html
select 'grant select on '||schemaname||'.'||tablename||' to username;' from pg_tables where schemana
me in ('public');
Also in the case of views it would be the following.
select 'grant select on '||schemaname||'.'||viewname||' to username;' from pg_views where schemaname
in ('public');
You'll get the list of SQL statements to grant all tables the privileges you want like following.
?column?
------------------------------------------------------------
grant select on public.table_a to username;
grant select on public.table_s to username;
grant select on public.table_d to username;
grant select on public.table_f to username;
grant select on public.table_g to username;
........
(xx rows)
Then, excute those SQL statements.
That's it.:)
I referred the following post.
http://bensbrain.blogspot.com/2004/08/postgres-grant-on-all-tables-in.html
3/26/2010
MySQL Commands.
This is for my notes.
Update Syntax.
mysql> UPDATE table_name SET field1 = value1, field2 = value2 WHERE Clause;
mysql> use mysql;
mysql> UPDATE user SET Host='192.168.1.%' WHERE User = 'user1';
Delete user.
Drop command is better than delete command.
mysql> drop user 'user'@'%';
mysql> delete from user where User = '' and Host = 'localhost';
Set password.
mysql> set password for root@localhost = password('abcde');
Create DB and grant/create new user with password.
create database someDB;
GRANT ALL PRIVILEGES ON someDB.* TO username@"%" IDENTIFIED BY 'password';
Select: Display results one by one.
select * from some_table \G;
Pager option
Shell>mysql --pager='less -S' -uroot -p
Output as CSV
select * from some_table into outfile "./output.csv" fields terminated by ',' enclosed by '"' lines terminated by '\r\n';
Purge binary logs
On slave machine, check the current log position
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: masterdb
Master_User: user
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysqld-bin.000037
Read_Master_Log_Pos: 170665205
Relay_Log_File: mysqld-relay-bin.000063
Relay_Log_Pos: 170665343
Relay_Master_Log_File: mysqld-bin.000037
On master machine, check the current status.
Update Syntax.
mysql> UPDATE table_name SET field1 = value1, field2 = value2 WHERE Clause;
mysql> use mysql;
mysql> UPDATE user SET Host='192.168.1.%' WHERE User = 'user1';
Delete user.
Drop command is better than delete command.
mysql> drop user 'user'@'%';
mysql> delete from user where User = '' and Host = 'localhost';
Set password.
mysql> set password for root@localhost = password('abcde');
Create DB and grant/create new user with password.
create database someDB;
GRANT ALL PRIVILEGES ON someDB.* TO username@"%" IDENTIFIED BY 'password';
Select: Display results one by one.
select * from some_table \G;
Pager option
Shell>mysql --pager='less -S' -uroot -p
Output as CSV
select * from some_table into outfile "./output.csv" fields terminated by ',' enclosed by '"' lines terminated by '\r\n';
Purge binary logs
On slave machine, check the current log position
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: masterdb
Master_User: user
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysqld-bin.000037
Read_Master_Log_Pos: 170665205
Relay_Log_File: mysqld-relay-bin.000063
Relay_Log_Pos: 170665343
Relay_Master_Log_File: mysqld-bin.000037
On master machine, check the current status.
mysql> show master status\G;
*************************** 1. row ***************************
File: mysqld-bin.000037
Position: 170680957
Binlog_Do_DB:
Binlog_Ignore_DB:
1 row in set (0.00 sec)
mysql> show master logs;
+-------------------+------------+
| Log_name | File_size |
+-------------------+------------+
| mysqld-bin.000035 | 1073743657 |
| mysqld-bin.000036 | 1073745063 |
| mysqld-bin.000037 | 171424254 |
+-------------------+------------+
3 rows in set (0.00 sec)
On master, to delete old binary logs which is prior to mysqld-bin.000037
mysql> purge master logs to mysqld-bin.000037
1/06/2010
Dell OpenManage installation by yum
Just two commands are all you need to install DellOpenManage by yum.
wget -q -O - http://linux.dell.com/repo/hardware/OMSA_6.2/bootstrap.cgi | bash
yum install srvadmin-all
It's pretty handy.:)
Reference:
http://linux.dell.com/wiki/index.php/Repository/hardware
OpenManage Commands
omconfig
http://support.dell.com/support/edocs/software/svradmin/1.9/en/stormgmt/cli.html#1093328
wget -q -O - http://linux.dell.com/repo/hardware/OMSA_6.2/bootstrap.cgi | bash
yum install srvadmin-all
It's pretty handy.:)
Reference:
http://linux.dell.com/wiki/index.php/Repository/hardware
OpenManage Commands
omconfig
http://support.dell.com/support/edocs/software/svradmin/1.9/en/stormgmt/cli.html#1093328
11/21/2009
Setting up the Chrome OS
Google Chrome OS was revealed. so I tried using it. Here is some notes to set up Chrome OS as virtual image in Windows. I downloaded the virtual image from gdgt website.
1.Go to http://gdgt.com and create your account.Email verification is required.
2.Download the virtual image of the Chrome OS from http://gdgt.com/google/chrome-os/download/
3. Download and install VMWare player.
4. Create a new virtual image in VMWare Player. I chose the Ubuntu as the OS. After finishing creating the virtual image, click the 'setting' to add the Chrome virtual disk. and delete the default hard disk image file. It's better to increase memory as 1GB or something. Then finish editing.
5. Click "Start player". and pale blue screen comes up. at the login screen. type your gmail account and password. At the time I got a problem. my login information is not recognized. Then I searched the web and found the solution. Right click at the network adapter icon on the right bottom of the VMWare Player and click "disconnect". Then again right click the network icon and click "connect". After that I could log in to the chrome.
6. The menu is really like The chrome browser, not operating system. There is no application menu nor OS menu. I don't know how to shut down the OS. just click the 'turn off' from VMWare menu? :(
7. After some research I found the way to access shell of the Chrome. Press the Ctrl + Alt + T displays shell. Typing recognition at the shell access was really slow and frequently dropped the characters. My PC's memory is 2GB and 800MB is used as Chrome OS. so I tried to run sshd to access remotely.
8. The default user at the shell is chronos and password is chronos. It took some time to figure out the default user's password. Then run /etc/init.d/ssh. Then I got an access from my terminal software. :)
fyi the Chorome OS is based on Ubuntu.
root@localhost:~# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu karmic (development branch)"
CHROMEOS_RELEASE_CODENAME=erunion
CHROMEOS_RELEASE_DESCRIPTION=999.999.32409.000656 (Developer Build - Fri Nov 20 00:07:42 UTC 2009-root)
CHROMEOS_RELEASE_NAME=Chromium OS
CHROMEOS_RELEASE_TRACK=developer-build
CHROMEOS_RELEASE_VERSION=999.999.32409.000656
GOOGLE_RELEASE=999.999.32409.000656
CHROMEOS_AUSERVER=http://erunion-desktop:8080/update
CHROMEOS_DEVSERVER=http://erunion-desktop:8080
Have fun with Chrome OS!
1.Go to http://gdgt.com and create your account.Email verification is required.
2.Download the virtual image of the Chrome OS from http://gdgt.com/google/chrome-os/download/
3. Download and install VMWare player.
4. Create a new virtual image in VMWare Player. I chose the Ubuntu as the OS. After finishing creating the virtual image, click the 'setting' to add the Chrome virtual disk. and delete the default hard disk image file. It's better to increase memory as 1GB or something. Then finish editing.
5. Click "Start player". and pale blue screen comes up. at the login screen. type your gmail account and password. At the time I got a problem. my login information is not recognized. Then I searched the web and found the solution. Right click at the network adapter icon on the right bottom of the VMWare Player and click "disconnect". Then again right click the network icon and click "connect". After that I could log in to the chrome.
6. The menu is really like The chrome browser, not operating system. There is no application menu nor OS menu. I don't know how to shut down the OS. just click the 'turn off' from VMWare menu? :(
7. After some research I found the way to access shell of the Chrome. Press the Ctrl + Alt + T displays shell. Typing recognition at the shell access was really slow and frequently dropped the characters. My PC's memory is 2GB and 800MB is used as Chrome OS. so I tried to run sshd to access remotely.
8. The default user at the shell is chronos and password is chronos. It took some time to figure out the default user's password. Then run /etc/init.d/ssh. Then I got an access from my terminal software. :)
fyi the Chorome OS is based on Ubuntu.
root@localhost:~# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu karmic (development branch)"
CHROMEOS_RELEASE_CODENAME=erunion
CHROMEOS_RELEASE_DESCRIPTION=999.999.32409.000656 (Developer Build - Fri Nov 20 00:07:42 UTC 2009-root)
CHROMEOS_RELEASE_NAME=Chromium OS
CHROMEOS_RELEASE_TRACK=developer-build
CHROMEOS_RELEASE_VERSION=999.999.32409.000656
GOOGLE_RELEASE=999.999.32409.000656
CHROMEOS_AUSERVER=http://erunion-desktop:8080/update
CHROMEOS_DEVSERVER=http://erunion-desktop:8080
Have fun with Chrome OS!
Labels:
Chrome OS,
google,
password,
ssh,
VMWare Player
10/19/2009
Redmine + PostgreSQL installation notes.
PostgreSQL install
==================
yum install postgresql postgresql-devel postgresql-server postgresql-contrib
userdel postgres
To change home directory for postgres user from /var/lib/postgres to /home/postgres
useradd postgres
passwd postgres
mkdir /usr/local/pgsql
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su postgres
initdb -D /usr/local/pgsql/data -E utf-8
su - postgres
vi .bash_profile
add the following lines and save.
###
export PATH="$PATH":/usr/local/pgsql/bin
export POSTGRES_HOME=/usr/local/pgsql
export PGLIB=$POSTGRES_HOME/lib
export PGDATA=$POSTGRES_HOME/data
export MANPATH="$MANPATH":$POSTGRES_HOME/man
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$PGLIB"
###
pg_ctl -D /usr/local/pgsql/data -l logfile start
psql -e
postgres=# CREATE DATABASE redmine;
postgres=# \c redmine;
postgres=# ALTER DATABASE "redmine_db" SET datestyle="ISO,MDY";
Redmine install
===============
Ruby
====
yum install ruby ruby-devel ruby-irb ruby-rdoc ruby-ri
Rubygems
========
wget http://rubyforge.iasi.roedu.net/files/rubygems/rubygems-1.3.4.tgz
tar xzvf rubygems-1.3.4.tgz
cd rubygems-1.3.4
ruby setup.rb
gem --version
Ruby on Rails
=============
gem install rails
useradd redmine
passwd redmine
su - redmine
wget http://rubyforge.org/frs/download.php/63583/redmine-0.8.5.tar.gz
tar xvfz redmine-0.8.5.tar.gz
cd redmine-0.8.5
/home/redmine/redmine-0.8.5/config
cp database.yml.example database.yml
vi database.yml
Edit the file like following and save.
###
production:
adapter: postgresql
database: redmine
host: localhost
username: postgres
password: anything_you_like
encoding: utf8
###
gem install postgres-pr
cd /home/redmine/redmine-0.8.5
rake db:migrate RAILS_ENV="production" &
That's it!!
==================
yum install postgresql postgresql-devel postgresql-server postgresql-contrib
userdel postgres
To change home directory for postgres user from /var/lib/postgres to /home/postgres
useradd postgres
passwd postgres
mkdir /usr/local/pgsql
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su postgres
initdb -D /usr/local/pgsql/data -E utf-8
su - postgres
vi .bash_profile
add the following lines and save.
###
export PATH="$PATH":/usr/local/pgsql/bin
export POSTGRES_HOME=/usr/local/pgsql
export PGLIB=$POSTGRES_HOME/lib
export PGDATA=$POSTGRES_HOME/data
export MANPATH="$MANPATH":$POSTGRES_HOME/man
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$PGLIB"
###
pg_ctl -D /usr/local/pgsql/data -l logfile start
psql -e
postgres=# CREATE DATABASE redmine;
postgres=# \c redmine;
postgres=# ALTER DATABASE "redmine_db" SET datestyle="ISO,MDY";
Redmine install
===============
Ruby
====
yum install ruby ruby-devel ruby-irb ruby-rdoc ruby-ri
Rubygems
========
wget http://rubyforge.iasi.roedu.net/files/rubygems/rubygems-1.3.4.tgz
tar xzvf rubygems-1.3.4.tgz
cd rubygems-1.3.4
ruby setup.rb
gem --version
Ruby on Rails
=============
gem install rails
useradd redmine
passwd redmine
su - redmine
wget http://rubyforge.org/frs/download.php/63583/redmine-0.8.5.tar.gz
tar xvfz redmine-0.8.5.tar.gz
cd redmine-0.8.5
/home/redmine/redmine-0.8.5/config
cp database.yml.example database.yml
vi database.yml
Edit the file like following and save.
###
production:
adapter: postgresql
database: redmine
host: localhost
username: postgres
password: anything_you_like
encoding: utf8
###
gem install postgres-pr
cd /home/redmine/redmine-0.8.5
rake db:migrate RAILS_ENV="production" &
That's it!!
10/12/2009
How to fix MBR problem
I have a lap top PC with Ubuntu 9.04 installed.
Today I tried to install Windows on my lap top to use as dual boot OS.
I followed the instruction written by here. When I boot with Windows XP CD and choose the partition to install Windows, I could not choose the free space. After that I reboot the laptop. then, Ubuntu couldn't boot up because Windows installation overwrote the MBR!
After the research to recover my MBR, I followed the instruction with this link and got around the issue.
http://ubuntuforums.org/showthread.php?t=224351
Windows sucks!!
To summarlize the solution, the commands I did are below.
1. Boot up with the Ubuntu live CD. In the terminal,
sudo grub
find /boot/grub/stage1
The output is like hd0,0
root (hd?,?)
# e.g. root (hd0,0)
setup (hd?)
# e.g. root (hd0)
quit
That's it!
Today I tried to install Windows on my lap top to use as dual boot OS.
I followed the instruction written by here. When I boot with Windows XP CD and choose the partition to install Windows, I could not choose the free space. After that I reboot the laptop. then, Ubuntu couldn't boot up because Windows installation overwrote the MBR!
After the research to recover my MBR, I followed the instruction with this link and got around the issue.
http://ubuntuforums.org/showthread.php?t=224351
Windows sucks!!
To summarlize the solution, the commands I did are below.
1. Boot up with the Ubuntu live CD. In the terminal,
sudo grub
find /boot/grub/stage1
The output is like hd0,0
root (hd?,?)
# e.g. root (hd0,0)
setup (hd?)
# e.g. root (hd0)
quit
That's it!
How to fix the apt-get error on Ubuntu.
I got a following error when I tried to install something using apt-get.
'E:Encountered a section with no Package: header, Eroblem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_hardy-updates_multiverse_binary-i386_Packages, E:The package lists or status file could not be parsed or opened.'
I checked the web for the solution and found this command worked for me.
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
Referral
http://ubuntuforums.org/showthread.php?t=863742
'E:Encountered a section with no Package: header, Eroblem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_hardy-updates_multiverse_binary-i386_Packages, E:The package lists or status file could not be parsed or opened.'
I checked the web for the solution and found this command worked for me.
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
Referral
http://ubuntuforums.org/showthread.php?t=863742
10/07/2009
Office 2007 replaces Outlook Express dictionary English to French!
Today I was asked that my colleague have a problem with spell check in Outlook Express.
She told me that after I installed Microsoft Office 2007 to her PC, the spell checker got weird. I checked her PC and found that the dictionary of Outlook Express changed English to French. I researched the web and found the solution.
There is a fix program. You can access from here
She told me that after I installed Microsoft Office 2007 to her PC, the spell checker got weird. I checked her PC and found that the dictionary of Outlook Express changed English to French. I researched the web and found the solution.
There is a fix program. You can access from here
11/12/2008
Barracuda SSL installation problem
I had some problem when installing SSL to Barracuda 340 load balancer.
When I installed a SSL certificate and key with Barracuda web UI.
I specified the SSl key and certificate and intermediate certificate as below.

Barracuda rejected my certificates.I didn't know why and tried it many times.but Barracuda still kept rejecting.:( I hated the red strings on that.

After desperating it,I googled related issues with Barracuda and found some article in Barracuda support website.Solution #00001327
When you have some problems with SSL installation to Barracuda load balancer,try to write the certificate and intermediate certificate into 1 file.
like following
-----BEGIN CERTIFICATE----- <---- some domain's certificate
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- <---- intermediate certificate
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBra
-----END CERTIFICATE-----
Finally I could install my certificate on the awkward Barracuda.:)

When I installed a SSL certificate and key with Barracuda web UI.
I specified the SSl key and certificate and intermediate certificate as below.

Barracuda rejected my certificates.I didn't know why and tried it many times.but Barracuda still kept rejecting.:( I hated the red strings on that.

After desperating it,I googled related issues with Barracuda and found some article in Barracuda support website.Solution #00001327
When you have some problems with SSL installation to Barracuda load balancer,try to write the certificate and intermediate certificate into 1 file.
like following
-----BEGIN CERTIFICATE----- <---- some domain's certificate
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- <---- intermediate certificate
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraBraB
BraBraBraBraBraBraBraBraBraBraBraBraBraBraBra
-----END CERTIFICATE-----
Finally I could install my certificate on the awkward Barracuda.:)

Labels:
Barracuda,
Installation,
Load Balancer,
Problem,
SSL
Subscribe to:
Posts (Atom)