After searching, i found that there are no information about how to update a open VZ VPS. It is worth to write it down for other people's reference.
Why do i need to update VPS? Because i need to compile code in VPS. With the prepackaged VPS template, it does not include glibc-devel, gcc etc development tools.
I have CentOS 4.4 CDs in hand. So, following is what i did.
My first VPS ID is 101.
At the very begining, i tried: root$vzyum 101 update. It just failed. I think it could be due to the slow internet connection or the yum repository is not available....
So, i man yum and find that it could be update or install local packages. So i did the following: (cd current directory to the CD mounted directory)
$vzyum 101 update glibc-common-2.3.4-2.25.i386.rpm
$vzyum 101 install gcc
It works.
Saturday, March 31, 2007
Friday, March 30, 2007
cd ripper
Cdparanoia is a Compact Disc Digital Audio (CDDA) extraction tool, commonly known on the net as a 'ripper'. The application is built on top of the Paranoia library, which is doing the real work (the Paranoia source is included in the cdparanoia source distribution). Like the original cdda2wav, cdparanoia package reads audio from the CDROM directly as data, with no analog step between, and writes the data to a file or pipe in WAV, AIFC or raw 16 bit linear PCM.
It only works on Linux.
It only works on Linux.
Wednesday, March 28, 2007
connect openoffice to postgresql database
OpenOffice is useful to view remote database server.
First, create a database role to only view the remote database:
(1)#create role peter login;
(2)#alter role peter with password '12345';
(3)#grant select on table tablename to peter;
(4)modify pg_hba.conf file so that it includes line: (this line must be positioned so that it is the first to match for the connection request).
host dbname peter2 192.168.1.0/24 password
(5)reload the configuration
(6)test with psql -U peter -h hostip -W dbname
Second, OpenOffice configuration:
(1)Make sure Java (http://java.sun.com) is installed in the computer
(2)Download & Install OpenOffice 2.x.
(3)Download jdbc driver for PostgreSQL. (http://jdbc.postgresql.org)
(4)Run OpenOffice. Navigate to: Tools-->Options-->Java. Select Java and set the CLASSPATH so that the CLASSPATH include the downloaded JDBC driver file. And ok.
(5)Navigate: File-->New-->Database. Select :Connecting to an existing database by JDBC. And use jdbc:postgresql://databasehostip:5432/databasename as databaseURL and org.postgresql.Driver as JDBC driver class. And then type your database username and select "Password required".
That is all.
First, create a database role to only view the remote database:
(1)#create role peter login;
(2)#alter role peter with password '12345';
(3)#grant select on table tablename to peter;
(4)modify pg_hba.conf file so that it includes line: (this line must be positioned so that it is the first to match for the connection request).
host dbname peter2 192.168.1.0/24 password
(5)reload the configuration
(6)test with psql -U peter -h hostip -W dbname
Second, OpenOffice configuration:
(1)Make sure Java (http://java.sun.com) is installed in the computer
(2)Download & Install OpenOffice 2.x.
(3)Download jdbc driver for PostgreSQL. (http://jdbc.postgresql.org)
(4)Run OpenOffice. Navigate to: Tools-->Options-->Java. Select Java and set the CLASSPATH so that the CLASSPATH include the downloaded JDBC driver file. And ok.
(5)Navigate: File-->New-->Database. Select :Connecting to an existing database by JDBC. And use jdbc:postgresql://databasehostip:5432/databasename as databaseURL and org.postgresql.Driver as JDBC driver class. And then type your database username and select "Password required".
That is all.
Subscribe to:
Posts (Atom)