- 浏览: 59842 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
ipconfig1:
能不能具体说一下,我在initComponent生成cm还是会 ...
关于Ext可编辑网格第二次不可编辑的问题 -
ipconfig1:
呵呵。谢谢啊,最近也遇到这个问题了。
关于Ext可编辑网格第二次不可编辑的问题 -
xfei6868:
最近也在做这方面,很想知道详细过程,请问能否给详细解释。呵呵! ...
Juddi的配置 -
nforce_com:
...
关于ascii码的转换问题 -
jiaofei3385140:
大哥,我真的要哭了,我按着你的方法看了好几天,终于看好了,准备 ...
硬盘安装ubuntu9.04过程详解
CentOS下安装postgresql
<ul>
<li>安装</li>
</ul>
<div style="background-color: #eeeeee; font-size: 13px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"># yum install postgresql postgresql-libs postgresql-server</span>
<div style="background-color: #eeeeee; font-size: 13px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%;">
<span style="color: #000000;">[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> service postgresql status</span><span style="color: #008000;"><br></span><span style="color: #000000;">postmaster </span><span style="color: #0000FF;">is</span><span style="color: #000000;"> stopped<br>
[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> service postgresql start</span><span style="color: #008000;"><br></span><span style="color: #000000;">Initializing database: [ OK ]<br>
Starting postgresql service: [ OK ]</span>
</div>
<span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"><br><br></span>
</div>
<ul>
<li>
设为开机启动</li>
</ul>
<br><div style="background-color: #eeeeee; font-size: 13px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: #000000;">[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> chkconfig postgresql on</span><span style="color: #008000;"><br></span><span style="color: #000000;">[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> chkconfig --list postgresql</span><span style="color: #008000;"><br></span><span style="color: #000000;">postgresql 0:off </span><span style="color: #000000;">1</span><span style="color: #000000;">:off </span><span style="color: #000000;">2</span><span style="color: #000000;">:on </span><span style="color: #000000;">3</span><span style="color: #000000;">:on </span><span style="color: #000000;">4</span><span style="color: #000000;">:on </span><span style="color: #000000;">5</span><span style="color: #000000;">:on </span><span style="color: #000000;">6</span><span style="color: #000000;">:off</span>
</div>
<ul>
<li>配置参数</li>
</ul>
<br><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: #000000;">[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> vim /var/lib/pgsql/data/pg_hba.conf</span><span style="color: #008000;"><br>
#</span><span style="color: #008000;"> "local" is for Unix domain socket connections only</span><span style="color: #008000;"><br>
#</span><span style="color: #008000;">local all all ident sameuser</span><span style="color: #008000;"><br></span><span style="color: #000000;">local all all trust<br></span><span style="color: #008000;">#</span><span style="color: #008000;"> IPv4 local connections:</span><span style="color: #008000;"><br>
#</span><span style="color: #008000;">host all all 127.0.0.1/32 ident sameuser</span><span style="color: #008000;"><br></span><span style="color: #000000;">host all all </span><span style="color: #000000;">127.0</span><span style="color: #000000;">.</span><span style="color: #000000;">0.1</span><span style="color: #000000;">/</span><span style="color: #000000;">32</span><span style="color: #000000;"> md5<br>
host</span> all all 192.168.28.3<strong><span style="color: red;">/32</span></strong> md5 #必须有后面那个,那个是掩码,否则总报pg_hba.conf语法错<br><span style="color: #000000;">
[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> su - postgres</span><span style="color: #008000;"><br></span><span style="color: #000000;">-</span><span style="color: #000000;">bash</span><span style="color: #000000;">-</span><span style="color: #000000;">3.2</span><span style="color: #000000;">$ pg_ctl reload<br>
postmaster signaled<br>
[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> vim /var/lib/pgsql/data/postgresql.conf </span><span style="color: #008000;"><br></span><span style="color: #000000;">listen_addresses </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">'</span><span style="color: #800000;">*</span><span style="color: #800000;">'</span><span style="color: #000000;"><br>
[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> su - postgres</span><span style="color: #008000;"><br></span><span style="color: #000000;">-</span><span style="color: #000000;">bash</span><span style="color: #000000;">-</span><span style="color: #000000;">3.2</span><span style="color: #000000;">$ pg_ctl reload<br>
postmaster signaled</span>
</div>
<ul>
<li>
常用命令</li>
</ul>
<br><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: #008000;">#</span><span style="color: #008000;"> psql -l 列出所有数据库 # psql</span><span style="color: #008000;"><br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \l 列出所有数据库<br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \c cake 连接到cake数据库<br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \dt 列出所有tables<br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \d shift 查看shift表结构<br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \di 列出所有indexes<br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \d shift_pkey 列出所有index: shift_pkey</span>
</div>
<ul><li>
测试java代码</li></ul>
<br><div style="background-color: #eeeeee; font-size: 13px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080;"> 1</span> <span style="color: #0000FF;">import</span><span style="color: #000000;"> java.sql.Connection;<br></span><span style="color: #008080;"> 2</span> <span style="color: #000000;"></span><span style="color: #0000FF;">import</span><span style="color: #000000;"> java.sql.DriverManager;<br></span><span style="color: #008080;"> 3</span> <span style="color: #000000;"></span><span style="color: #0000FF;">import</span><span style="color: #000000;"> java.sql.ResultSet;<br></span><span style="color: #008080;"> 4</span> <span style="color: #000000;"></span><span style="color: #0000FF;">import</span><span style="color: #000000;"> java.sql.Statement;<br></span><span style="color: #008080;"> 5</span> <span style="color: #000000;"><br></span><span style="color: #008080;"> 6</span> <span style="color: #000000;"></span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> PostgresqlTest {<br></span><span style="color: #008080;"> 7</span> <span style="color: #000000;"><br></span><span style="color: #008080;"> 8</span> <span style="color: #000000;"> </span><span style="color: #008000;">/**</span><span style="color: #008000;"><br></span><span style="color: #008080;"> 9</span> <span style="color: #008000;"> * </span><span style="color: #808080;">@param</span><span style="color: #008000;"> args<br></span><span style="color: #008080;">10</span> <span style="color: #008000;"> </span><span style="color: #008000;">*/</span><span style="color: #000000;"><br></span><span style="color: #008080;">11</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> main(String[] args) {<br></span><span style="color: #008080;">12</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">try</span><span style="color: #000000;"> {<br></span><span style="color: #008080;">13</span> <span style="color: #000000;"> Class.forName(</span><span style="color: #000000;">"</span><span style="color: #000000;">org.postgresql.Driver</span><span style="color: #000000;">"</span><span style="color: #000000;">).newInstance();<br></span><span style="color: #008080;">14</span> <span style="color: #000000;"> String connectUrl </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">jdbc:postgresql://192.168.250.231:5432/poem</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br></span><span style="color: #008080;">15</span> <span style="color: #000000;"> Connection conn </span><span style="color: #000000;">=</span><span style="color: #000000;"> DriverManager.getConnection(connectUrl,<br></span><span style="color: #008080;">16</span> <span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">poem</span><span style="color: #000000;">"</span><span style="color: #000000;">, </span><span style="color: #000000;">"</span><span style="color: #000000;">poem</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br></span><span style="color: #008080;">17</span> <span style="color: #000000;"> Statement st </span><span style="color: #000000;">=</span><span style="color: #000000;"> conn.createStatement();<br></span><span style="color: #008080;">18</span> <span style="color: #000000;"> String sql </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">select 1;</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br></span><span style="color: #008080;">19</span> <span style="color: #000000;"> ResultSet rs </span><span style="color: #000000;">=</span><span style="color: #000000;"> st.executeQuery(sql);<br></span><span style="color: #008080;">20</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">while</span><span style="color: #000000;"> (rs.next()) {<br></span><span style="color: #008080;">21</span> <span style="color: #000000;"> System.out.println(rs.getInt(</span><span style="color: #000000;">1</span><span style="color: #000000;">));<br></span><span style="color: #008080;">22</span> <span style="color: #000000;"> }<br></span><span style="color: #008080;">23</span> <span style="color: #000000;"> rs.close();<br></span><span style="color: #008080;">24</span> <span style="color: #000000;"> st.close();<br></span><span style="color: #008080;">25</span> <span style="color: #000000;"> conn.close();<br></span><span style="color: #008080;">26</span> <span style="color: #000000;"> } </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Exception e) {<br></span><span style="color: #008080;">27</span> <span style="color: #000000;"> e.printStackTrace();<br></span><span style="color: #008080;">28</span> <span style="color: #000000;"> }<br></span><span style="color: #008080;">29</span> <span style="color: #000000;"> }<br></span><span style="color: #008080;">30</span> <span style="color: #000000;"><br></span><span style="color: #008080;">31</span> <span style="color: #000000;">}<br></span><span style="color: #008080;">32</span> <span style="color: #000000;"></span>
</div>
<li>安装</li>
</ul>
<div style="background-color: #eeeeee; font-size: 13px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"># yum install postgresql postgresql-libs postgresql-server</span>
<div style="background-color: #eeeeee; font-size: 13px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%;">
<span style="color: #000000;">[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> service postgresql status</span><span style="color: #008000;"><br></span><span style="color: #000000;">postmaster </span><span style="color: #0000FF;">is</span><span style="color: #000000;"> stopped<br>
[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> service postgresql start</span><span style="color: #008000;"><br></span><span style="color: #000000;">Initializing database: [ OK ]<br>
Starting postgresql service: [ OK ]</span>
</div>
<span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"></span><span style="color: #000000;"><br><br></span>
</div>
<ul>
<li>
设为开机启动</li>
</ul>
<br><div style="background-color: #eeeeee; font-size: 13px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: #000000;">[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> chkconfig postgresql on</span><span style="color: #008000;"><br></span><span style="color: #000000;">[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> chkconfig --list postgresql</span><span style="color: #008000;"><br></span><span style="color: #000000;">postgresql 0:off </span><span style="color: #000000;">1</span><span style="color: #000000;">:off </span><span style="color: #000000;">2</span><span style="color: #000000;">:on </span><span style="color: #000000;">3</span><span style="color: #000000;">:on </span><span style="color: #000000;">4</span><span style="color: #000000;">:on </span><span style="color: #000000;">5</span><span style="color: #000000;">:on </span><span style="color: #000000;">6</span><span style="color: #000000;">:off</span>
</div>
<ul>
<li>配置参数</li>
</ul>
<br><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: #000000;">[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> vim /var/lib/pgsql/data/pg_hba.conf</span><span style="color: #008000;"><br>
#</span><span style="color: #008000;"> "local" is for Unix domain socket connections only</span><span style="color: #008000;"><br>
#</span><span style="color: #008000;">local all all ident sameuser</span><span style="color: #008000;"><br></span><span style="color: #000000;">local all all trust<br></span><span style="color: #008000;">#</span><span style="color: #008000;"> IPv4 local connections:</span><span style="color: #008000;"><br>
#</span><span style="color: #008000;">host all all 127.0.0.1/32 ident sameuser</span><span style="color: #008000;"><br></span><span style="color: #000000;">host all all </span><span style="color: #000000;">127.0</span><span style="color: #000000;">.</span><span style="color: #000000;">0.1</span><span style="color: #000000;">/</span><span style="color: #000000;">32</span><span style="color: #000000;"> md5<br>
host</span> all all 192.168.28.3<strong><span style="color: red;">/32</span></strong> md5 #必须有后面那个,那个是掩码,否则总报pg_hba.conf语法错<br><span style="color: #000000;">
[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> su - postgres</span><span style="color: #008000;"><br></span><span style="color: #000000;">-</span><span style="color: #000000;">bash</span><span style="color: #000000;">-</span><span style="color: #000000;">3.2</span><span style="color: #000000;">$ pg_ctl reload<br>
postmaster signaled<br>
[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> vim /var/lib/pgsql/data/postgresql.conf </span><span style="color: #008000;"><br></span><span style="color: #000000;">listen_addresses </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">'</span><span style="color: #800000;">*</span><span style="color: #800000;">'</span><span style="color: #000000;"><br>
[root@dev </span><span style="color: #000000;">~</span><span style="color: #000000;">]</span><span style="color: #008000;">#</span><span style="color: #008000;"> su - postgres</span><span style="color: #008000;"><br></span><span style="color: #000000;">-</span><span style="color: #000000;">bash</span><span style="color: #000000;">-</span><span style="color: #000000;">3.2</span><span style="color: #000000;">$ pg_ctl reload<br>
postmaster signaled</span>
</div>
<ul>
<li>
常用命令</li>
</ul>
<br><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: #008000;">#</span><span style="color: #008000;"> psql -l 列出所有数据库 # psql</span><span style="color: #008000;"><br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \l 列出所有数据库<br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \c cake 连接到cake数据库<br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \dt 列出所有tables<br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \d shift 查看shift表结构<br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \di 列出所有indexes<br></span><span style="color: #000000;">=></span><span style="color: #000000;"> \d shift_pkey 列出所有index: shift_pkey</span>
</div>
<ul><li>
测试java代码</li></ul>
<br><div style="background-color: #eeeeee; font-size: 13px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080;"> 1</span> <span style="color: #0000FF;">import</span><span style="color: #000000;"> java.sql.Connection;<br></span><span style="color: #008080;"> 2</span> <span style="color: #000000;"></span><span style="color: #0000FF;">import</span><span style="color: #000000;"> java.sql.DriverManager;<br></span><span style="color: #008080;"> 3</span> <span style="color: #000000;"></span><span style="color: #0000FF;">import</span><span style="color: #000000;"> java.sql.ResultSet;<br></span><span style="color: #008080;"> 4</span> <span style="color: #000000;"></span><span style="color: #0000FF;">import</span><span style="color: #000000;"> java.sql.Statement;<br></span><span style="color: #008080;"> 5</span> <span style="color: #000000;"><br></span><span style="color: #008080;"> 6</span> <span style="color: #000000;"></span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> PostgresqlTest {<br></span><span style="color: #008080;"> 7</span> <span style="color: #000000;"><br></span><span style="color: #008080;"> 8</span> <span style="color: #000000;"> </span><span style="color: #008000;">/**</span><span style="color: #008000;"><br></span><span style="color: #008080;"> 9</span> <span style="color: #008000;"> * </span><span style="color: #808080;">@param</span><span style="color: #008000;"> args<br></span><span style="color: #008080;">10</span> <span style="color: #008000;"> </span><span style="color: #008000;">*/</span><span style="color: #000000;"><br></span><span style="color: #008080;">11</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> main(String[] args) {<br></span><span style="color: #008080;">12</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">try</span><span style="color: #000000;"> {<br></span><span style="color: #008080;">13</span> <span style="color: #000000;"> Class.forName(</span><span style="color: #000000;">"</span><span style="color: #000000;">org.postgresql.Driver</span><span style="color: #000000;">"</span><span style="color: #000000;">).newInstance();<br></span><span style="color: #008080;">14</span> <span style="color: #000000;"> String connectUrl </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">jdbc:postgresql://192.168.250.231:5432/poem</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br></span><span style="color: #008080;">15</span> <span style="color: #000000;"> Connection conn </span><span style="color: #000000;">=</span><span style="color: #000000;"> DriverManager.getConnection(connectUrl,<br></span><span style="color: #008080;">16</span> <span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">poem</span><span style="color: #000000;">"</span><span style="color: #000000;">, </span><span style="color: #000000;">"</span><span style="color: #000000;">poem</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br></span><span style="color: #008080;">17</span> <span style="color: #000000;"> Statement st </span><span style="color: #000000;">=</span><span style="color: #000000;"> conn.createStatement();<br></span><span style="color: #008080;">18</span> <span style="color: #000000;"> String sql </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">select 1;</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br></span><span style="color: #008080;">19</span> <span style="color: #000000;"> ResultSet rs </span><span style="color: #000000;">=</span><span style="color: #000000;"> st.executeQuery(sql);<br></span><span style="color: #008080;">20</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">while</span><span style="color: #000000;"> (rs.next()) {<br></span><span style="color: #008080;">21</span> <span style="color: #000000;"> System.out.println(rs.getInt(</span><span style="color: #000000;">1</span><span style="color: #000000;">));<br></span><span style="color: #008080;">22</span> <span style="color: #000000;"> }<br></span><span style="color: #008080;">23</span> <span style="color: #000000;"> rs.close();<br></span><span style="color: #008080;">24</span> <span style="color: #000000;"> st.close();<br></span><span style="color: #008080;">25</span> <span style="color: #000000;"> conn.close();<br></span><span style="color: #008080;">26</span> <span style="color: #000000;"> } </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Exception e) {<br></span><span style="color: #008080;">27</span> <span style="color: #000000;"> e.printStackTrace();<br></span><span style="color: #008080;">28</span> <span style="color: #000000;"> }<br></span><span style="color: #008080;">29</span> <span style="color: #000000;"> }<br></span><span style="color: #008080;">30</span> <span style="color: #000000;"><br></span><span style="color: #008080;">31</span> <span style="color: #000000;">}<br></span><span style="color: #008080;">32</span> <span style="color: #000000;"></span>
</div>
相关推荐
在Linux系统,特别是CentOS 7环境中安装PostgreSQL数据库时,常常需要先安装一系列依赖包以确保数据库能够正常运行。本篇文章将详细讲解在CentOS 7上安装PostgreSQL 12.5版本时,其关键依赖包RPM(Red Hat Package ...
### CentOS安装PostgreSQL数据库 #### 一、PostgreSQL简介 PostgreSQL是一款强大的开源对象关系型数据库管理系统(ORDBMS),其历史可以追溯到加州大学伯克利分校计算机系开发的POSTGRES项目。随着时间的发展,该...
初始化数据库是PostgreSQL安装过程中必不可少的一步,可以通过执行以下命令完成: ```bash sudo /usr/pgsql-15/bin/postgresql-15-setup initdb ``` 初始化完成后,将会创建数据库目录并设置默认权限。 ##### 3.4...
在Linux CentOS7系统中安装PostgreSQL 12数据库是一个常见的任务,特别是在没有互联网连接或网络环境受限的情况下,离线安装包成为了唯一的选择。本指南将详细介绍如何使用离线安装包在CentOS7上安装PostgreSQL 12。...
教会小白快速在centos7系统下postgresql11离线安装成功
本文详细介绍了如何在CentOS7环境中离线安装PostgreSQL及其配套PostGIS插件的方法。提供了完整的离线仓库配置步骤,并演示不同版本之间的兼容性和具体的安装命令流程。 适合人群:从事地理信息系统(GIS)工作的...
①添加【postgres】用户,数据库安装在postgres用户目录【/home/postgres/disk_d/applications/service/postgresql】路径下, ②给新用户授权 ③解压数据库文件 ④安装数据库依赖包 ⑤编译数据库 ⑥安装数据库 ⑦...
CentOS 6.8 安装 PostgreSQL 11 数据库详解 作为一名 IT 行业大师,我将从给定的文件中生成相关的知识点,以下是 Centos 6.8 安装 PostgreSQL 11 数据库的详细解释: 一、环境说明 在本文中,我们将使用 CentOS ...
可利用里面文件离线在linux(centos)操作系统中顺利安装部署,本资源可在半小时内完成各种配置,简单方便,并通过了几台服务器环境测试。 基于pg库进行地理空间数据存储的开源数据库技术方案,只有正确安装改库...
本教程将详细介绍如何在CentOS系统上离线编译安装PostgreSQL 14和PostGIS 3.2,这两个是用于地理空间数据库管理的重要组件。 PostgreSQL是一个强大的开源关系型数据库管理系统,它支持复杂查询、事务处理和多种数据...
CentOS 一键安装PostgreSQL10.2 shell脚本,脚本中已表明可更改版本的位置
在本文中,我们将详细探讨如何在CentOS 7系统上安装PostgreSQL 11,这是一个高度先进的开源关系型数据库管理系统。PostgreSQL以其强大的功能和对SQL标准的广泛支持而闻名,它提供了复杂查询、外键、触发器、视图、...
在本文中,我们将深入探讨如何在CentOS 6平台上安装和配置PostgreSQL数据库,并了解如何在Windows环境下使用数据库管理工具pgAdmin访问这个数据库。PostgreSQL是一个开源的关系型数据库管理系统(RDBMS),它以其...
本文详细介绍了如何在Ubuntu 12.04环境下进行PostgreSQL 9.1数据库的分布式部署,包括了系统软件的安装、数据库配置以及Pgpool的安装配置等关键步骤。通过这些步骤,读者可以顺利完成一个分布式数据库系统的搭建。...
libzstd-1.5.5-1.el7.x86_64.rpm libicu-50.2-4.el7_7.x86_64.rpm postgresql15-15.3-1PGDG.rhel7.x86_64.rpm postgresql15-libs-15.3-1PGDG.rhel7....CentOS7 下 PostgreSQL15 离线安装 及 libzstd ,libicu 依赖包;
史上最详细,可操作性最强postgresql安装文档,yum安装指定数据库安装位置,介绍安装步骤的操作原理,适合举一反三刨根问底的同学。
支持小白快速成功在线安装linux版本的postgresql11,过程简单易懂