📄 environ.sgml
字号:
<Chapter Id="environ"><Title>Setting Up Your Environment</Title><Para> This section discusses how to set up your own environment so that you can use frontend applications. We assume <ProductName>Postgres</ProductName> has already been successfully installed and started; refer to the Administrator's Guideand the installation notes for how to install Postgres.</Para><Para><ProductName>Postgres</ProductName> is a client/server application. As a user,you only need access to the client portions of the installation (an exampleof a client application is the interactive monitor <Application>psql</Application>). For simplicity, we will assume that <ProductName>Postgres</ProductName> has been installed in the directory <FileName>/usr/local/pgsql</FileName>. Therefore, wherever you see the directory <FileName>/usr/local/pgsql</FileName> you should substitute the name of the directory where <ProductName>Postgres</ProductName> is actually installed. All <ProductName>Postgres</ProductName> commands are installed in the directory <FileName>/usr/local/pgsql/bin</FileName>. Therefore, you should add this directory to your shell command path. If you use a variant of the Berkeley C shell, such as <Application>csh</Application> or <Application>tcsh</Application>, you would add<ProgramListing>set path = ( /usr/local/pgsql/bin path )</ProgramListing> in the <FileName>.login</FileName> file in your home directory. If you use a variant of the Bourne shell, such as <Application>sh</Application>, <Application>ksh</Application>, or <Application>bash</Application>, then you would add<ProgramListing>$ PATH=/usr/local/pgsql/bin:$PATH$ export PATH</ProgramListing> to the <FileName>.profile</FileName> file in your home directory. From now on, we will assume that you have added the <ProductName>Postgres</ProductName> bin directory to your path. In addition, we will make frequent reference to <Quote>setting a shell variable</Quote> or <Quote>setting an environment variable</Quote> throughout this document. If you did not fully understand the last paragraph on modifying your search path, you should consult the UNIX manual pages that describe your shell before going any further.</Para><Para>If your site administrator has not set things up in thedefault way, you may have some more work to do. For example, if the database server machine is a remote machine, youwill need to set the <Acronym>PGHOST</Acronym> environment variable to the nameof the database server machine. The environment variable<Acronym>PGPORT</Acronym> may also have to be set. The bottom line is this: ifyou try to start an application program and it complainsthat it cannot connect to the <Application>postmaster</Application>, you should immediately consult your site administrator to make sure that yourenvironment is properly set up.</Para></Chapter>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -