In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. Software requirements
Windows 7 flagship sp1 X64
ActivePerl-5.22.3.2204-MSWin32-x64-401627.exe
Diffutils-2.8.7-1.exe, which is used for regression testing after compilation, and needs to manually add the bin path to PATH
Visual studio ultimate 2013,VS2013_RTM_ULT_CHS.iso
Visual assist, code formatting tool
Postgresql-9.6.2.tar.gz,pg source code
Second, install IDE tools
1. Install Perl
Download ActivePerl-5.22.3.2204-MSWin32-x64-401627.exe and double-click to install
Click "next" and select "accept Agreement"
Click "next" to install type "Type"
Installation options "Add Perl to the PATH environment variable", "create Perl file extension association"
Click next, click install, click finish
Add the bin directory "C:\ Perl64\ bin" and configure it to the system environment variable PATH.
two。 Install diff tools for Windows platform and use regression testing
Download the diffutils-2.8.7-1.exe installation package and double-click to install
Click "next", select "accept Agreement", default configuration, click "next",..., click "install", click "finish"
Configure the bin directory "C:\ Program Files (x86)\ GnuWin32\ bin" of the software installation into the system environment variable PATH.
3. Install visual studio ultimate 2013
Download VS2013_RTM_ULT_CHS.iso, unzip it to the VS2013_RTM_ULT_CHS directory, and unzip it to enter this directory.
Double-click "vs_ultimate.exe" to install, prompting IE 8 to be incompatible with recommended IE 10, and click "continue"
Select agree to license, and click next
Select the installation feature, select only "Microsoft basic classes for C++", and click "install"
After the installation is successful, click "start", the program interface is loaded, help-> register the product, enter the product serial number
4. Install visual assist
Double-click "VA_X_Setup2001.exe", select only "Microsoft visual studio 2013 RC", and click "install"
Click OK to install successfully
5. Get the postgresql source code
Extract postgresql-9.6.2.tar.gz to the root directory of F disk.
6. Compile and install the database
Start-> all programs-> visual studio 2013-> visual studio tools
Double-click VS2013 x64 Native tools Command prompt in the directory to open the visual studio 2013 command line window
Go to the "F:\ postgresql-9.6.2\ src\ tools\ msvc" directory
1) compile the database
Execute perl build.pl DEBUG (DEBUG, which represents debug mode, if not non-debug mode)
2) regression test
Perl vcregress.pl check
.
Test event_trigger... Ok
Test stats... Ok
= shutting down postmaster =
= removing temporary instance =
=
All 167 tests passed.
=
3) install the database
F:\ postgresql-9.6.2\ src\ tools\ msvc > perl install.pl f:\ pg962
Installing version 9.6 for debug in f:\ pg962
Copying build output files...
....
Copying config files.
Copying Import libraries...
Copying contrib data files...
....
....
Copying Public headers.
Copying Libpq headers..
Copying Libpq internal headers..
Copying Internal headers...
Copying Server headers....
Copying Grammar header.
..
Copying PL/pgSQL header.
63 files were copied
1 file was copied
78 files were copied.
33 files were copied.
Nine files were copied.
1 file was copied
Copied 48 files.
Six files were copied.
Copied 2 files
Seven files were copied.
Copied 13 files
1 file was copied
Copied 19 files.
Copied 25 files.
Copied 21 files.
41 files were copied.
Copied 2 files
Copied 10 files
Five files were copied.
Copied 14 files.
Seven files were copied.
34 files were copied.
Copied 50 files
Six files were copied.
Seven files were copied.
77 files were copied.
Copying ECPG headers.
Copying ECPG informix headers...
Copying timezone names.
Copying timezone sets...
Copying BKI files...
Copying SQL files..
Copying Information schema data.
Generating conversion proc script...
Generating timezone files...
Generating tsearch script.
Copying Stopword files.
Copying Dictionaries sample files.
Copying PL Extension files...
Installation complete.
F:\ postgresql-9.6.2\ src\ tools\ msvc >
4) initialize the database
F:\ postgresql-9.6.2\ src\ tools\ msvc > cd / d f:\ pg962\ bin
F:\ pg962\ bin > initdb.exe-D.. / data
The files belonging to this database system will be owned by user "Administrator
".
This user must also own the server process.
The database cluster will be initialized with locale "Chinese (Simplified) _ Peopl
E's Republic of China.936 ".
Encoding "GBK" implied by locale is not allowed as a server-side encoding.
The default database encoding will be set to "UTF8" instead.
Initdb: could not find suitable text search configuration for locale "Chinese (S
Implified) _ People's Republic of China.936 "
The default text search configuration will be set to "simple".
Data page checksums are disabled.
Creating directory.. / data... Ok
Creating subdirectories... Ok
Selecting default max_connections... 100
Selecting default shared_buffers... 128MB
Selecting dynamic shared memory implementation... Windows
Creating configuration files... Ok
Running bootstrap script... Ok
Performing post-bootstrap initialization... Ok
Syncing data to disk... Ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option-A, or
-- auth-local and-- auth-host, the next time you run initdb.
Success. You can now start the database server using:
"pg_ctl"-D ".. / data"-l logfile start
F:\ pg962\ bin >
5) start the database
F:\ pg962\ bin > pg_ctl.exe-D ".. / data"-l logfile start
Server starting
The pg database has been compiled, installed and running, and can be used normally.
Execute select version (); check the next version
F:\ pg962\ bin > psql postgres
Psql (9.6.2)
Type "help" for help.
Postgres=#\ du
List of roles
Role name | Attributes | Me
Mber of
-+-
-
Administrator | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
Postgres=# select version ()
Version
PostgreSQL 9.6.2, compiled by Visual C++ build 1800, 64-bit
(1 row)
Postgres=#
Answer the question:
After loading it, run perl build.pl and report the following error: Unable to determine Visual Studio version: The nmake version could not be determined. At src/tools/msvc/Mkvcbuild.pm line 86. This is caused by the fact that the vs version can not be properly recognized in the perl script. This problem has a long history. I don't know why pg doesn't fix it. It's easy to fix it. Open the VSObjectFactory.pm file in the msvc directory. Change the line if ($output = ~ / (\ d +)\. (\ d +)\.\ d + (\.\ d +)? $/ m) in the DetermineVisualStudioVersion function at the bottom of the file to if ($output = ~ / (\ d +)\. (\ d +)\.\ d + (\.\ d +). * $/ m). Just change it to. *.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.