After a day, I finally let PostgreSQL run in my computer, although it is still unstable, but it is possible to use, talk less, let me talk about my configuration process: 1. The latest PostgreSQL for Windows version, I use 7.31 (***, how is this fungal of the devil? Down to Japan Imperialism !!!), start the default installation. I don't know why this bird player can't choose the installation path, maybe I didn't find it? However, I have installed more than twenty times before and after, I didn't find it. If the prawn found it, please tell me, ^ o ^. The installation is complete, the system will prompt you to restart your computer. 2. After restarting, enter the command line mode, pay attention, not the command line mode of Windows, but the COMMAND shell of PostgreSQL, you can find it yourself, if you can't find it, you will die, huh. 3. After entering the Command shell, you will find that your computer has become Unix, huh, don't be afraid, just a simulated UNIX, because PostgreSQL is based on UNIX and Linux, if you want to run under Windows Call Cygwin's virtual UNIX environment, but you can rest assured that this thing has been installed in your system as you have installed PostgreSQL, and the Command shell you use is. 4. First ls, LS is DIR in DOS. Of course, the DIR here is also useful, I just put it now (telling the truth, I will not, if I will use the Windows platform Do you install this thing?) If you find there is no Data directory, this shows that your postgreSQL does not have the default database, because my system has installed N times before and after, I don't know when to install when it is installed. Oh, this rule will summarize itself. If there is no Data directory, then you have to install the database, don't worry, this directory doesn't have to build it yourself, run the initdb -d / data to see, the system prompts a lot of OK, it is built, but occasionally There is an error, I think this is because of the operating system, after all, this thing is not specially developed for Windows, and there is such a problem. 5. The database is over, what should we do next? Staplened, of course, started. However, the service of PostgreSQL is installed in the system in the system I have never started, the error message that prompts is not started. Just telling you that there is an internal error, but I don't know any internal error. Let me ask the administrator.
***, I am administrator, this computer is mine, I will ask who, BILL? So after the N times I tried, I made a bad goddess. Every time I installed PostgreSQL, I immediately turned away. The specific practice is that Serviceremove.bat is, let it see the ghost, I would rather each time. Start the server manually, look comfort, have a sense of accomplishment! ! ! It's a bit far away, no need to throw my persimmon! ! ! PG_CTL -D / DATA -L Logfile Start launching system, exciting moments are coming! Postmaster SuccessFully Started. The startup is successful, huh, huh, you will look at the official. If your startup is not successful, you will find the reason. Anyway, my startup is successful. Don't throw my persimmons again! ! ! 6. Run a PSQL quickly and see if you can connect to the database. could not connect to server: Connection refused Is the server running on host server.joe.com and accepting TCP / IP connections on port 5432 and accepting connections on Unix socket '/tmp/.s.PGSQL.5432' Congratulations,?? It has a big step towards success. First stop the server: pg_ctl stop. Then open your / data directory, find the postgreSql.conf file, turn the tcpip_socket = true max_connections = 32 super = 5432 ## before ##, then change the first (TCPIP_Socket) True, deployment, don't remember to save the market! ! ! Start the service again: pg_ctl -d / data -l logfile start, then PSQL, see Welcome to PSQL 7.3.1, The PostgreSQL Interactive Terminal. Success, now you can do remote management, quickly install a pgadminii, you can freely Manage your database. I almost forgot that postgreSQL is the same as the administrator name of the current installation database as your database administrator, but it is necessary to cry, must pay attention to it, say it is basically it. At the end, if you already have a Data directory in the system after the postgreSQL is installed, you can skip the command of initdb. Good luck. If you have any questions, you will continue to discuss. . . . Copyright © http://www.ibeyond.org, reprint, please refer to the famous source and keep copyright information.