PATH="$PATH":/usr/local/pgsql/bin PG=/usr/local/pgsql export PGLIB=$PG export PGDATA=$PG/data export MANPATH="$MANPATH":$PG/man export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$PGLIB" |
$ su # mkdir /usr/local/pgsql # chown postgres:users /usr/local/pgsql # exit |
$ su postgres $ tar xvfz postgresql-7.0.2.tar.gz $ cd postgresql-7.0.2/src $ ./configure --enable-multibyte=EUC_JP --enable-locale $ make $ make install $ cd ../doc $ make install $ initdb initdb: pg_encoding failed Perhaps you did not configure PostgreSQL for multibyte support or the program was not successfully installed. |
$ ../src $ make distclean $ ./configure --enable-multibyte --enable-locale $ make $ make install $ initdb initdb: pg_encoding failed Perhaps you did not configure PostgreSQL for multibyte support or the program was not successfully installed. |
$ su - postgres $ initdb initdb does not find the file '/usr/local/pgsql/local1_template1.bki.source'. This means you have a corrupted installation or identified the wrong directory with the --pglib invocation option. |
PATH="$PATH":/usr/local/pgsql/bin PG=/usr/local/pgsql export PGLIB=$PG/lib ~~~~ 追加 export PGDATA=$PG/data export MANPATH="$MANPATH":$PG/man export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$PGLIB" |
$ . .bash_profile $ initdb This database system will be initialized with username "postgres". This user will own all the data files and must also own the server process. Creating database system directory /usr/local/pgsql/data Creating database system directory /usr/local/pgsql/data/base Creating database XLOG directory /usr/local/pgsql/data/pg_xlog Creating template database in /usr/local/pgsql/data/base/template1 Creating global relations in /usr/local/pgsql/data/base Adding template1 database to pg_database Creating view pg_user. Creating view pg_rules. Creating view pg_views. Creating view pg_tables. Creating view pg_indexes. Loading pg_description. Vacuuming database. Success. You can now start the database server using: /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data or /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start |
$ pg_ctl -w start Waiting for postmaster starting up..DEBUG: Data Base System is starting up at Wed Sep 20 13:25:10 2000 DEBUG: Data Base System was shut down at Wed Sep 20 13:20:47 2000 The Data Base System is starting up .DEBUG: Data Base System is in production state at Wed Sep 20 13:25:10 2000 done. postmaster successfully started up. |
$ cd postgresql-7.0.2/src/test/regress $ make all runtest |
=============== dropping old regression database... ================= ERROR: DROP DATABASE: Database "regression" does not exist dropdb: database removal failed int8 .. failed numeric .. failed select_implicit .. failed select_having .. failed select_views .. failed rules .. failed |
$ su # mv /usr/local/pgsql /usr/local/pgsql.7.0.2 # mkdir /usr/local/pgsql # chwon postgres:users /usr/local/pgsql # exit |
$ su - postgres $ tar xvfz postgresql-7.1.3.tar.gz $ cd postgresql-7.1.3 $ gzip -dc jumbo-20010914.patch.gz | patch -p1 $ gzip -dc psqlj-7.1.2.diff.gz | patch -p1 <--- psql 日本語化パッチ $ ./configure --enable-multibyte=EUC_JP --enable-unicode-conversion --with-perl \ --with-java --with-openssl --enable-odbc --enable-syslog (snip) checking whether to build Java/JDBC tools... yes checking for ant... no checking for ant.sh... no checking for ant.bat... no configure: error: Ant is required to build Java components |
$ ./configure --enable-multibyte=EUC_JP --enable-unicode-conversion --with-perl \ --with-java --with-openssl --enable-odbc --enable-syslog $ make $ make check (snip) ====================== All 76 tests passed. ====================== (snip) $ make install $ make install-all-headers (snip) make[4]: Leaving directory `/usr/local/src/postgresql-7.1.3/src/interfaces/perl5' ***** * Skipping the installation of the Perl module for lack of permissions. * To install it, change to the directory /usr/local/src/postgresql-7.1.3/src/interfaces/perl5, * become the appropriate user, and do `make install'. ***** (snip) $ cd contrib/pgbench <--- ベンチマークツールのインストール $ make install |
$ initdb $ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start |
$ su - postgres $ pg_dump <データベース名> > <出力ファイル名> |
$ /usr/local/pgsql/bin/pg_ctl stop -D /usr/local/pgsql/data -s -m fast |
$ su # cd /usr/local # mv pgsql pgsql.old # mkdir -p pgsql/data # chown -R postgres:postgres pgsql # exit |
$ tar xvfz postgresql-7.3.2.tar.gz $ cd postgresql-7.3.2 $ ./configure --with-java --with-openssl $ make $ make check (snip) ====================== All 89 tests passed. ====================== rm regress.o make[2]: 出ます ディレクトリ `/usr/local/src/postgresql-7.3.2/src/test/regress' make[1]: 出ます ディレクトリ `/usr/local/src/postgresql-7.3.2/src/test' $ make install $ make install-all-headers $ initdb --encoding=EUC_JP --no-locale $ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start |