找回密码
 注册
快捷导航
查看: 11746|回复: 15

freeBSD ~

[复制链接] |自动提醒
阅读字号:

3万

回帖

283

积分

11万

资产值

至尊会员III Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2005-10-25
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)月全勤勋章
发表于 2018-6-14 19:27:47| 字数 220| - 中国–重庆–重庆 鹏博士宽带 | 显示全部楼层 |阅读模式
putty下用root登陆freebsd出现Using keyboard-interactive authentication的解决

终端中运行vi /etc/ssh/sshd_config
把里面的
#PermitRootLogin no
#PasswordAuthentication no
改为
PermitRootLogin yes
PasswordAuthentication yes
保存后重启ssh
/etc/rc.d/sshd restart
再登陆就不报错了
坏朋朋 -------- 大龄男青年,无车无房无存款。

2425

回帖

37

积分

8052

资产值

钻石会员 Rank: 3Rank: 3Rank: 3

注册时间
2004-6-11
银牌荣誉勋章(注册10年以上会员)
发表于 2018-6-14 19:31:32| 字数 6| - 中国–江苏–南京 电信 | 显示全部楼层
mark一下
T450S /1.6T+128G/20G/WWAN
回复 支持 反对

使用道具 举报

3万

回帖

283

积分

11万

资产值

至尊会员III Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2005-10-25
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)月全勤勋章
 楼主| 发表于 2018-6-14 19:34:15| 字数 69| - 中国–重庆–重庆 鹏博士宽带 | 显示全部楼层

我写这里只是为了想方便自己以后随时查找。。。谢谢回复
坏朋朋 -------- 大龄男青年,无车无房无存款。
回复 支持 反对

使用道具 举报

3万

回帖

310

积分

6万

资产值

至尊会员III Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2004-6-8
金牌荣誉勋章(注册20年以上会员)银牌荣誉勋章(注册10年以上会员)铜牌荣誉勋章(注册8年以上会员)月全勤勋章年全勤勋章2022年全勤勋章2024
发表于 2018-6-14 19:38:13| 字数 29| - 中国–北京–北京 鹏博士 | 显示全部楼层
最近手动升级ssh也遇到这个问题了,百度得到一样答案,呵呵
回复 支持 反对

使用道具 举报

4万

回帖

336

积分

5万

资产值

至尊会员III Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2013-1-6
月全勤勋章
发表于 2018-6-14 19:55:14| 字数 64| - 中国–广东–广州–越秀区 电信 | 显示全部楼层
QUOTE:
NCpiro 发表于 2018-6-14 19:34
我写这里只是为了想方便自己以后随时查找。。。谢谢回复

不用客气,我是雷锋
x200s/x201s/T430s FHD/T450s FHD/x1c2018 FHD
尔曹身与名俱灭,不废江河万古流
回复 支持 反对

使用道具 举报

1404

回帖

16

积分

4491

资产值

白金会员 Rank: 3Rank: 3Rank: 3

注册时间
2007-8-12
发表于 2018-6-14 20:06:09| 字数 11| - 中国–江苏–常州 电信 | 显示全部楼层
你就不怕坛子数据丢失?
回复 支持 反对

使用道具 举报

2521

回帖

46

积分

1万

资产值

钻石会员 Rank: 3Rank: 3Rank: 3

注册时间
2009-10-10
银牌荣誉勋章(注册10年以上会员)铜牌荣誉勋章(注册8年以上会员)
发表于 2018-6-14 20:40:38| 字数 4| - 中国–江苏–苏州 移动 | 显示全部楼层
mark
ThinkPad X61T、X330 、W520 、X301、X201/S、W541
Apple ME874
HP 8770W dc2/4k
回复 支持 反对

使用道具 举报

9万

回帖

1054

积分

1万

资产值

管理员 Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8

注册时间
2001-11-20
金牌荣誉勋章(注册20年以上会员)银牌荣誉勋章(注册10年以上会员)铜牌荣誉勋章(注册8年以上会员)月全勤勋章年全勤勋章2022年全勤勋章2023年全勤勋章2024
发表于 2018-6-14 20:46:02| 字数 33| - 中国–广东–深圳 电信 | 显示全部楼层
很多Linux版本默认PermitRootLogin 都是ON的呀。
人生满希望
T700: i7-1195G7, 64GB RAM, 1T M.2+2T HDD, 15in UXGA(1600x1200) LED    |   X62s: i7-5600u, 32GB RAM, 128GB mSATA, 12.1in SXGA+ AFFS LCD
X2100: i7-10710u, 32GB RAM, 512GB M.2, 13in WQXGA LCD(3000x2000)      |   T70: Xeon(R)E3-1505L, 32GB RAM, 512GB M2+ 2TB HDDx2(Raid1)
回复 支持 反对

使用道具 举报

3万

回帖

283

积分

11万

资产值

至尊会员III Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2005-10-25
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)月全勤勋章
 楼主| 发表于 2018-6-14 20:57:03| 字数 22,254| - 中国–重庆–重庆 鹏博士宽带 | 显示全部楼层
root@FreeBSD:~ # pkg search postgresql

exim-postgresql-4.90.1         High performance MTA for Unix systems on the Internet
libgda5-postgresql-5.2.4       Provides postgresql access for the libgda5 library
opensmtpd-extras-table-postgresql-201606230001_2 PostgreSQL table support for OpenSMTPD
p5-PostgreSQL-PLPerl-Call-1.006_1 Simple interface for calling SQL functions from PostgreSQL PL/Perl
p5-PostgreSQL-PLPerl-Trace-1.001_1 Simple way to trace execution of Perl statements in PL/Perl
p5-Test-postgresql-0.09_1      Perl extension of postgresql runner for tests
pgtcl-postgresql10-2.1.1       TCL extension for accessing a PostgreSQL server (PGTCL-NG)
pgtcl-postgresql93-2.1.1       TCL extension for accessing a PostgreSQL server (PGTCL-NG)
pgtcl-postgresql94-2.1.1       TCL extension for accessing a PostgreSQL server (PGTCL-NG)
pgtcl-postgresql95-2.1.1       TCL extension for accessing a PostgreSQL server (PGTCL-NG)
pgtcl-postgresql96-2.1.1       TCL extension for accessing a PostgreSQL server (PGTCL-NG)
postgresql-jdbc-9.2.1004       The Java JDBC implementation for PostgreSQL
postgresql-libpgeasy-3.0.4_1   Easy-to-use C interface to PostgreSQL
postgresql-libpqxx-6.1.0       New C++ interface for PostgreSQL
postgresql-libpqxx3-3.1.1_2    New C++ interface for PostgreSQL
postgresql-libpqxx4-4.0.1_1    New C++ interface for PostgreSQL
postgresql-odbc-10.01.0000     PostgreSQL ODBC driver
postgresql-plproxy-2.8         PL/Proxy - database partitioning system
postgresql-plruby-0.5.7_2      PL/Ruby procedural language for the PostgreSQL database system
postgresql-relay-1.3.2_1       Multiplex multiple PostgreSQL databases to one relay
postgresql-repmgr-4.0.1        PostgreSQL replication manager
postgresql10-client-10.3       PostgreSQL database (client)
postgresql10-contrib-10.3      The contrib utilities from the PostgreSQL distribution
postgresql10-docs-10.3         The PostgreSQL documentation set
postgresql10-plperl-10.3       Write SQL functions for PostgreSQL using Perl5
postgresql10-plpython-10.3     Module for using Python to write SQL functions
postgresql10-pltcl-10.3        Module for using Tcl to write SQL functions
postgresql10-server-10.3_1     PostgreSQL is the most advanced open-source database available anywhere
postgresql93-client-9.3.22     PostgreSQL database (client)
postgresql93-contrib-9.3.22    The contrib utilities from the PostgreSQL distribution
postgresql93-docs-9.3.22       The PostgreSQL documentation set
postgresql93-plperl-9.3.22     Write SQL functions for PostgreSQL using Perl5
postgresql93-plpython-9.3.22   Module for using Python to write SQL functions
postgresql93-pltcl-9.3.22      Module for using Tcl to write SQL functions
postgresql93-server-9.3.22     PostgreSQL is the most advanced open-source database available anywhere
postgresql94-client-9.4.17     PostgreSQL database (client)
postgresql94-contrib-9.4.17    The contrib utilities from the PostgreSQL distribution
postgresql94-docs-9.4.17       The PostgreSQL documentation set
postgresql94-plperl-9.4.17     Write SQL functions for PostgreSQL using Perl5
postgresql94-plpython-9.4.17   Module for using Python to write SQL functions
postgresql94-pltcl-9.4.17      Module for using Tcl to write SQL functions
postgresql94-server-9.4.17     PostgreSQL is the most advanced open-source database available anywhere
postgresql95-client-9.5.12     PostgreSQL database (client)
postgresql95-contrib-9.5.12    The contrib utilities from the PostgreSQL distribution
postgresql95-cstore_fdw-1.6.0  Columnar store for analytics with PostgreSQL
postgresql95-docs-9.5.12       The PostgreSQL documentation set
postgresql95-mysql_fdw-2.2.0   PostgreSQL foreign data wrapper for MySQL
postgresql95-orafce-3.4.0      Oracle's compatibility functions and packages for PostgreSQL
postgresql95-pg_dirtyread-1.2  Read dead but unvacuumed tuples from a PostgreSQL relation
postgresql95-pg_repack-1.4.2   Reorganize tables in PostgreSQL databases with minimal locks
postgresql95-plperl-9.5.12     Write SQL functions for PostgreSQL using Perl5
postgresql95-plpgsql_check-1.2.0_1 PostgreSQL extension to check PL/pgSQL code
postgresql95-plpython-9.5.12   Module for using Python to write SQL functions
postgresql95-pltcl-9.5.12      Module for using Tcl to write SQL functions
postgresql95-plv8js-1.4.8_2    PL/v8js procedural language for PostgreSQL database
postgresql95-server-9.5.12     PostgreSQL is the most advanced open-source database available anywhere
postgresql95-tds_fdw-1.0.8     PostgreSQL foreign data wrapper to connect to TDS databases
postgresql95-zhparser-0.2.0    PostgreSQL extension for full-text search of Chinese
postgresql96-client-9.6.8      PostgreSQL database (client)
postgresql96-contrib-9.6.8     The contrib utilities from the PostgreSQL distribution
postgresql96-docs-9.6.8        The PostgreSQL documentation set
postgresql96-plperl-9.6.8      Write SQL functions for PostgreSQL using Perl5
postgresql96-plpython-9.6.8    Module for using Python to write SQL functions
postgresql96-pltcl-9.6.8       Module for using Tcl to write SQL functions
postgresql96-server-9.6.8_1    PostgreSQL is the most advanced open-source database available anywhere
py36-postgresql-1.1.0_3        Python 3 compatible PostgreSQL database driver and tools

root@FreeBSD:~ # pkg install postgresql10-server-10.3_1
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 8 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        postgresql10-server: 10.3_1
        libxml2: 2.9.7
        icu: 61.1,1
        gettext-runtime: 0.19.8.1_1
        indexinfo: 0.3.1
        postgresql10-client: 10.3
        perl5: 5.26.2
        readline: 7.0.3_1

Number of packages to be installed: 8

The process will require 137 MiB more space.
31 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/8] Fetching postgresql10-server-10.3_1.txz: 100%    4 MiB  33.3kB/s    02:09
[2/8] Fetching libxml2-2.9.7.txz: 100%  820 KiB  30.0kB/s    00:28
[3/8] Fetching icu-61.1,1.txz: 100%    9 MiB  22.5kB/s    07:18
[4/8] Fetching gettext-runtime-0.19.8.1_1.txz: 100%  149 KiB  76.3kB/s    00:02
[5/8] Fetching indexinfo-0.3.1.txz: 100%    6 KiB   5.7kB/s    00:01
[6/8] Fetching postgresql10-client-10.3.txz: 100%    2 MiB  24.2kB/s    01:48
[7/8] Fetching perl5-5.26.2.txz: 100%   14 MiB  22.9kB/s    10:30
[8/8] Fetching readline-7.0.3_1.txz: 100%  335 KiB  21.5kB/s    00:16
Checking integrity... done (0 conflicting)
[1/8] Installing indexinfo-0.3.1...
[1/8] Extracting indexinfo-0.3.1: 100%
[2/8] Installing gettext-runtime-0.19.8.1_1...
[2/8] Extracting gettext-runtime-0.19.8.1_1: 100%
[3/8] Installing perl5-5.26.2...
[3/8] Extracting perl5-5.26.2: 100%
[4/8] Installing readline-7.0.3_1...
[4/8] Extracting readline-7.0.3_1: 100%
[5/8] Installing libxml2-2.9.7...
[5/8] Extracting libxml2-2.9.7: 100%
[6/8] Installing icu-61.1,1...
[6/8] Extracting icu-61.1,1: 100%
[7/8] Installing postgresql10-client-10.3...
[7/8] Extracting postgresql10-client-10.3: 100%
[8/8] Installing postgresql10-server-10.3_1...
===> Creating groups.
Creating group 'postgres' with gid '770'.
===> Creating users
Creating user 'postgres' with uid '770'.

  =========== BACKUP YOUR DATA! =============
  As always, backup your data before
  upgrading. If the upgrade leads to a higher
  minor revision (e.g. 8.3.x -> 8.4), a dump
  and restore of all databases is
  required. This is *NOT* done by the port!
  ===========================================
[8/8] Extracting postgresql10-server-10.3_1: 100%
Message from perl5-5.26.2:

The /usr/bin/perl symlink has been removed starting with Perl 5.20.
For shebangs, you should either use:

#!/usr/local/bin/perl

or

#!/usr/bin/env perl

The first one will only work if you have a /usr/local/bin/perl,
the second will work as long as perl is in PATH.
Message from postgresql10-client-10.3:

The PostgreSQL port has a collection of "side orders":

postgresql-docs
  For all of the html documentation

p5-Pg
  A perl5 API for client access to PostgreSQL databases.

postgresql-tcltk
  If you want tcl/tk client support.

postgresql-jdbc
  For Java JDBC support.

postgresql-odbc
  For client access from unix applications using ODBC as access
  method. Not needed to access unix PostgreSQL servers from Win32
  using ODBC. See below.

ruby-postgres, py-psycopg2
  For client access to PostgreSQL databases using the ruby & python
  languages.

postgresql-plperl, postgresql-pltcl & postgresql-plruby
  For using perl5, tcl & ruby as procedural languages.

postgresql-contrib
  Lots of contributed utilities, postgresql functions and
  datatypes. There you find pg_standby, pgcrypto and many other cool
  things.

etc...
Message from postgresql10-server-10.3_1:

For procedural languages and postgresql functions, please note that
you might have to update them when updating the server.

If you have many tables and many clients running, consider raising
kern.maxfiles using sysctl(8), or reconfigure your kernel
appropriately.

The port is set up to use autovacuum for new databases, but you might
also want to vacuum and perhaps backup your database regularly. There
is a periodic script, /usr/local/etc/periodic/daily/502.pgsql, that
you may find useful. You can use it to backup and perform vacuum on all
databases nightly. Per default, it performs `vacuum analyze'. See the
script for instructions. For autovacuum settings, please review
~pgsql/data/postgresql.conf.

If you plan to access your PostgreSQL server using ODBC, please
consider running the SQL script /usr/local/share/postgresql/odbc.sql
to get the functions required for ODBC compliance.

Please note that if you use the rc script,
/usr/local/etc/rc.d/postgresql, to initialize the database, unicode
(UTF-8) will be used to store character data by default.  Set
postgresql_initdb_flags or use login.conf settings described below to
alter this behaviour. See the start rc script for more info.

To set limits, environment stuff like locale and collation and other
things, you can set up a class in /etc/login.conf before initializing
the database. Add something similar to this to /etc/login.conf:
---
postgres:\
        :lang=en_US.UTF-8:\
        :setenv=LC_COLLATE=C:\
        :tc=default:
---
and run `cap_mkdb /etc/login.conf'.
Then add 'postgresql_class="postgres"' to /etc/rc.conf.

======================================================================

To initialize the database, run

  /usr/local/etc/rc.d/postgresql initdb

You can then start PostgreSQL by running:

  /usr/local/etc/rc.d/postgresql start

For postmaster settings, see ~pgsql/data/postgresql.conf

NB. FreeBSD's PostgreSQL port logs to syslog by default
    See ~pgsql/data/postgresql.conf for more info

NB. If you're not using a checksumming filesystem like ZFS, you might
    wish to enable data checksumming. It can only be enabled during
    the initdb phase, by adding the "--data-checksums" flag to
    the postgres_initdb_flags rcvar.  Check the initdb(1) manpage
    for more info and make sure you understand the performance
    implications.

======================================================================

To run PostgreSQL at startup, add
'postgresql_enable="YES"' to /etc/rc.conf
root@FreeBSD:~ # root@FreeBSD:~ # pkg install postgresql10-server-10.3_1
The following 8 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        postgresql10-server: 10.3_1
        libxml2: 2.9.7
        icu: 61.1,1
        gettext-runtime: 0.19.8.1_1
        indexinfo: 0.3.1
        postgresql10-client: 10.3
        perl5: 5.26.2
        readline: 7.0.3_1
root@FreeBSD:~: Command not found.

Number of packages to be installed: 8

The process will require 137 MiB more space.
31 MiB to be downloaded.

root@FreeBSD:~ # Proceed with this action? [y/N]: y
Updating FreeBSD repository catalogue...
[1/8] Fetching postgresql10-server-10.3_1.txz: 100%    4 MiB  33.3kB/s    02:09
[2/8] Fetching libxml2-2.9.7.txz: 100%  820 KiB  30.0kB/s    00:28
[3/8] Fetching icu-61.1,1.txz: 100%    9 MiB  22.5kB/s    07:18
[4/8] Fetching gettext-runtime-0.19.8.1_1.txz: 100%  149 KiB  76.3kB/s    00:02
[5/8] Fetching indexinfo-0.3.1.txz: 100%    6 KiB   5.7kB/s    00:01
[6/8] Fetching postgresql10-client-10.3.txz: 100%    2 MiB  24.2kB/s    01:48
[7/8] Fetching perl5-5.26.2.txz: 100%   14 MiB  22.9kB/s    10:30
[8/8] Fetching readline-7.0.3_1.txz: 100%  335 KiB  21.5kB/s    00:16
Checking integrity... done (0 conflicting)
[1/8] Installing indexinfo-0.3.1...
[1/8] Extracting indexinfo-0.3.1: 100%
[2/8] Installing gettext-runtime-0.19.8.1_1...
[2/8] Extracting gettext-runtime-0.19.8.1_1: 100%
[3/8] Installing perl5-5.26.2...
[3/8] Extracting perl5-5.26.2: 100%
[4/8] Installing readline-7.0.3_1...
[4/8] Extracting readline-7.0.3_1: 100%
[5/8] Installing libxml2-2.9.7...
[5/8] Extracting libxml2-2.9.7: 100%
[6/8] Installing icu-61.1,1...
[6/8] Extracting icu-61.1,1: 100%
[7/8] Installing postgresql10-client-10.3...
[7/8] Extracting postgresql10-client-10.3: 100%
[8/8] Installing postgresql10-server-10.3_1...
===> Creating groups.
Updating: Command not found.
Creating group 'postgres' with gid '770'.
===> Creating users
Creating user 'postgres' with uid '770'.

  =========== BACKUP YOUR DATA! =============
  As always, backup your data before
  upgrading. If the upgrade leads to a higher
root@FreeBSD:~ # FreeBSD repository is up to date.
  minor revision (e.g. 8.3.x -> 8.4), a dump
  and restore of all databases is
  required. This is *NOT* done by the port!
  ===========================================
[8/8] Extracting postgresql10-server-10.3_1: 100%
Message from perl5-5.26.2:

The /usr/bin/perl symlink has been removed starting with Perl 5.20.
For shebangs, you should either use:

#!/usr/local/bin/perl

or

#!/usr/bin/env perl

The first one will only work if you have a /usr/local/bin/perl,
the second will work as long as perl is in PATH.
FreeBSD: Command not found.
root@FreeBSD:~ # All repositories are up to date.
All: Command not found.
root@FreeBSD:~ # The following 8 package(s) will be affected (of 0 checked):
Badly placed (.
root@FreeBSD:~ #
root@FreeBSD:~ # New packages to be INSTALLED:
Message from postgresql10-client-10.3:

The PostgreSQL port has a collection of "side orders":

postgresql-docs
  For all of the html documentation

p5-Pg
  A perl5 API for client access to PostgreSQL databases.

postgresql-tcltk
  If you want tcl/tk client support.

postgresql-jdbc
  For Java JDBC support.

postgresql-odbc
  For client access from unix applications using ODBC as access
  method. Not needed to access unix PostgreSQL servers from Win32
  using ODBC. See below.

ruby-postgres, py-psycopg2
  For client access to PostgreSQL databases using the ruby & python
  languages.

postgresql-plperl, postgresql-pltcl & postgresql-plruby
  For using perl5, tcl & ruby as procedural languages.
New: Command not found.

postgresql-contrib
  Lots of contributed utilities, postgresql functions and
  datatypes. There you find pg_standby, pgcrypto and many other cool
  things.

etc...
Message from postgresql10-server-10.3_1:

For procedural languages and postgresql functions, please note that
you might have to update them when updating the server.

If you have many tables and many clients running, consider raising
kern.maxfiles using sysctl(8), or reconfigure your kernel
root@FreeBSD:~ #         postgresql10-server: 10.3_1
postgresql10-server:: Too many arguments.
root@FreeBSD:~ #         libxml2: 2.9.7
libxml2:: Too many arguments.
root@FreeBSD:~ # appropriately.

        icu: 61.1,1
icu:: Too many arguments.
The port is set up to use autovacuum for new databases, but you might
also want to vacuum and perhaps backup your database regularly. There
is a periodic script, /usr/local/etc/periodic/daily/502.pgsql, that
root@FreeBSD:~ # you may find useful. You can use it to backup and perform vacuum on all
databases nightly. Per default, it performs `vacuum analyze'. See the
script for instructions. For autovacuum settings, please review
~pgsql/data/postgresql.conf.

If you plan to access your PostgreSQL server using ODBC, please
        gettext-runtime: 0.19.8.1_1
gettext-runtime:: Too many arguments.
root@FreeBSD:~ #         indexinfo: 0.3.1
indexinfo:: Too many arguments.
root@FreeBSD:~ #         postgresql10-client: 10.3
postgresql10-client:: Too many arguments.
root@FreeBSD:~ #         perl5: 5.26.2
perl5:: Too many arguments.
root@FreeBSD:~ #         readline: 7.0.3_1
readline:: Too many arguments.
root@FreeBSD:~ #
root@FreeBSD:~ # Number of packages to be installed: 8
consider running the SQL script /usr/local/share/postgresql/odbc.sql
to get the functions required for ODBC compliance.

Please note that if you use the rc script,
/usr/local/etc/rc.d/postgresql, to initialize the database, unicode
(UTF-8) will be used to store character data by default.  Set
postgresql_initdb_flags or use login.conf settings described below to
alter this behaviour. See the start rc script for more info.

To set limits, environment stuff like locale and collation and other
things, you can set up a class in /etc/login.conf before initializing
the database. Add something similar to this to /etc/login.conf:
---
postgres:\
        :lang=en_US.UTF-8:\
        :setenv=LC_COLLATE=C:\
        :tc=default:
Number: Command not found.
---
root@FreeBSD:~ #
root@FreeBSD:~ # The process will require 137 MiB more space.
and run `cap_mkdb /etc/login.conf'.
Then add 'postgresql_class="postgres"' to /etc/rc.conf.

======================================================================
The: Command not found.

To initialize the database, run

  /usr/local/etc/rc.d/postgresql initdb
root@FreeBSD:~ # 31 MiB to be downloaded.

You can then start PostgreSQL by running:

  /usr/local/etc/rc.d/postgresql start

For postmaster settings, see ~pgsql/data/postgresql.conf

NB. FreeBSD's PostgreSQL port logs to syslog by default
    See ~pgsql/data/postgresql.conf for more info

NB. If you're not using a checksumming filesystem like ZFS, you might
    wish to enable data checksumming. It can only be enabled during
    the initdb phase, by adding the "--data-checksums" flag to
    the postgres_initdb_flags rcvar.  Check the initdb(1) manpage
31: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # Proceed with this action? [y/N]: y
Proceed: No match.
root@FreeBSD:~ # [1/8] Fetching postgresql10-server-10.3_1.txz: 100%    4 MiB  33.3kB/s    02:09
[1/8]: No match.
root@FreeBSD:~ #     for more info and make sure you understand the performance
    implications.

======================================================================

To run PostgreSQL at startup, add
'postgresql_enable="YES"' to /etc/rc.conf
[2/8] Fetching libxml2-2.9.7.txz: 100%  820 KiB  30.0kB/s    00:28
[2/8]: No match.
root@FreeBSD:~ # [3/8] Fetching icu-61.1,1.txz: 100%    9 MiB  22.5kB/s    07:18
[3/8]: No match.
root@FreeBSD:~ # [4/8] Fetching gettext-runtime-0.19.8.1_1.txz: 100%  149 KiB  76.3kB/s    00:02
[4/8]: No match.
root@FreeBSD:~ # [5/8] Fetching indexinfo-0.3.1.txz: 100%    6 KiB   5.7kB/s    00:01
[5/8]: No match.
root@FreeBSD:~ # [6/8] Fetching postgresql10-client-10.3.txz: 100%    2 MiB  24.2kB/s    01:48
[6/8]: No match.
root@FreeBSD:~ # [7/8] Fetching perl5-5.26.2.txz: 100%   14 MiB  22.9kB/s    10:30
[7/8]: No match.
root@FreeBSD:~ # [8/8] Fetching readline-7.0.3_1.txz: 100%  335 KiB  21.5kB/s    00:16
[8/8]: No match.
root@FreeBSD:~ # Checking integrity... done (0 conflicting)
Badly placed ()'s.
root@FreeBSD:~ # [1/8] Installing indexinfo-0.3.1...
[1/8]: No match.
root@FreeBSD:~ # [1/8] Extracting indexinfo-0.3.1: 100%
[1/8]: No match.
root@FreeBSD:~ # [2/8] Installing gettext-runtime-0.19.8.1_1...
[2/8]: No match.
root@FreeBSD:~ # [2/8] Extracting gettext-runtime-0.19.8.1_1: 100%
[2/8]: No match.
root@FreeBSD:~ # [3/8] Installing perl5-5.26.2...
[3/8]: No match.
root@FreeBSD:~ # [3/8] Extracting perl5-5.26.2: 100%
[3/8]: No match.
root@FreeBSD:~ # [4/8] Installing readline-7.0.3_1...
[4/8]: No match.
root@FreeBSD:~ # [4/8] Extracting readline-7.0.3_1: 100%
[4/8]: No match.
root@FreeBSD:~ # [5/8] Installing libxml2-2.9.7...
[5/8]: No match.
root@FreeBSD:~ # [5/8] Extracting libxml2-2.9.7: 100%
[5/8]: No match.
root@FreeBSD:~ # [6/8] Installing icu-61.1,1...
[6/8]: No match.
root@FreeBSD:~ # [6/8] Extracting icu-61.1,1: 100%
[6/8]: No match.
root@FreeBSD:~ # [7/8] Installing postgresql10-client-10.3...
[7/8]: No match.
root@FreeBSD:~ # [7/8] Extracting postgresql10-client-10.3: 100%
[7/8]: No match.
root@FreeBSD:~ # [8/8] Installing postgresql10-server-10.3_1...
[8/8]: No match.
root@FreeBSD:~ # ===> Creating groups.
===: Command not found.
root@FreeBSD:~ # Creating group 'postgres' with gid '770'.
Creating: Command not found.
root@FreeBSD:~ # ===> Creating users
===: Command not found.
root@FreeBSD:~ # Creating user 'postgres' with uid '770'.
Creating: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ #   =========== BACKUP YOUR DATA! =============
===========: Command not found.
root@FreeBSD:~ #   As always, backup your data before
As: Command not found.
root@FreeBSD:~ #   upgrading. If the upgrade leads to a higher
upgrading.: Command not found.
root@FreeBSD:~ #   minor revision (e.g. 8.3.x -> 8.4), a dump
Badly placed ()'s.
root@FreeBSD:~ #   and restore of all databases is
and: Command not found.
root@FreeBSD:~ #   required. This is *NOT* done by the port!
required.: No match.
root@FreeBSD:~ #   ===========================================
===========================================: Command not found.
root@FreeBSD:~ # [8/8] Extracting postgresql10-server-10.3_1: 100%
[8/8]: No match.
root@FreeBSD:~ # Message from perl5-5.26.2:
Message: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # The /usr/bin/perl symlink has been removed starting with Perl 5.20.
The: Command not found.
root@FreeBSD:~ # For shebangs, you should either use:
For: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # #!/usr/local/bin/perl
/usr/local/bin/perl: Event not found.
root@FreeBSD:~ #
root@FreeBSD:~ # or
or: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # #!/usr/bin/env perl
/usr/bin/env: Event not found.
root@FreeBSD:~ #
root@FreeBSD:~ # The first one will only work if you have a /usr/local/bin/perl,
The: Command not found.
root@FreeBSD:~ # the second will work as long as perl is in PATH.
the: Command not found.
root@FreeBSD:~ # Message from postgresql10-client-10.3:
Message: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # The PostgreSQL port has a collection of "side orders":
The: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # postgresql-docs
postgresql-docs: Command not found.
root@FreeBSD:~ #   For all of the html documentation
For: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # p5-Pg
p5-Pg: Command not found.
root@FreeBSD:~ #   A perl5 API for client access to PostgreSQL databases.
A: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # postgresql-tcltk
postgresql-tcltk: Command not found.
root@FreeBSD:~ #   If you want tcl/tk client support.
If: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # postgresql-jdbc
postgresql-jdbc: Command not found.
root@FreeBSD:~ #   For Java JDBC support.
For: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # postgresql-odbc
postgresql-odbc: Command not found.
root@FreeBSD:~ #   For client access from unix applications using ODBC as access
For: Command not found.
root@FreeBSD:~ #   method. Not needed to access unix PostgreSQL servers from Win32
method.: Command not found.
root@FreeBSD:~ #   using ODBC. See below.
using: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # ruby-postgres, py-psycopg2
ruby-postgres,: Command not found.
root@FreeBSD:~ #   For client access to PostgreSQL databases using the ruby & python
[1] 900
For: Command not found.
python: Command not found.
[1]  + Exit 1                        For client access to PostgreSQL databases using the ruby
root@FreeBSD:~ #   languages.
languages.: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # postgresql-plperl, postgresql-pltcl & postgresql-plruby
[1] 903
postgresql-plperl,: Command not found.
postgresql-plruby: Command not found.
[1]  + Exit 1                        postgresql-plperl, postgresql-pltcl
root@FreeBSD:~ #   For using perl5, tcl & ruby as procedural languages.
[1] 905
For: Command not found.
ruby: Command not found.
[1]  + Exit 1                        For using perl5, tcl
root@FreeBSD:~ #
root@FreeBSD:~ # postgresql-contrib
postgresql-contrib: Command not found.
root@FreeBSD:~ #   Lots of contributed utilities, postgresql functions and
Lots: Command not found.
root@FreeBSD:~ #   datatypes. There you find pg_standby, pgcrypto and many other cool
datatypes.: Command not found.
root@FreeBSD:~ #   things.
things.: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # etc...
etc...: Command not found.
root@FreeBSD:~ # Message from postgresql10-server-10.3_1:
Message: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # For procedural languages and postgresql functions, please note that
For: Command not found.
root@FreeBSD:~ # you might have to update them when updating the server.
you: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # If you have many tables and many clients running, consider raising
If: Command not found.
root@FreeBSD:~ # kern.maxfiles using sysctl(8), or reconfigure your kernel
Badly placed ()'s.
root@FreeBSD:~ # appropriately.
appropriately.: Command not found.
root@FreeBSD:~ #
root@FreeBSD:~ # The port is set up to use autovacuum for new databases, but you might
The: Command not found.
root@FreeBSD:~ # also want to vacuum and perhaps backup your database regularly. There
also: Command not found.
root@FreeBSD:~ # is a periodic script, /usr/local/etc/periodic/daily/502.pgsql, that
is: Command not found.
root@FreeBSD:~ # you may find useful. You can use it to backup and perform vacuum on all
you: Command not found.
root@FreeBSD:~ # databases nightly. Per default, it performs `vacuum analyze'. See the
Unmatched '`'.
root@FreeBSD:~ # script for instructions. For autovacuum settings, please review
Script started, output file is for
script: instructions.: No such file or directory

Script done, output file is for
root@FreeBSD:~ #
坏朋朋 -------- 大龄男青年,无车无房无存款。
回复 支持 反对

使用道具 举报

897

回帖

50

积分

1万

资产值

钻石会员 Rank: 3Rank: 3Rank: 3

注册时间
2012-8-12
发表于 2018-6-14 21:01:46| 字数 11| - 中国–北京–北京 联通 | 显示全部楼层
xshell也挺好用的
T410 I5-560M 8G 双显 高分
T430 I7-3632QM 独显2G
回复 支持 反对

使用道具 举报

3万

回帖

283

积分

11万

资产值

至尊会员III Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2005-10-25
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)月全勤勋章
 楼主| 发表于 2018-6-14 21:14:58| 字数 55| - 中国–重庆–重庆 鹏博士宽带 | 显示全部楼层
root@FreeBSD:~ # vi /etc/rc.conf

增加这行:

postgresql_enable=yes
坏朋朋 -------- 大龄男青年,无车无房无存款。
回复 支持 反对

使用道具 举报

3万

回帖

283

积分

11万

资产值

至尊会员III Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2005-10-25
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)月全勤勋章
 楼主| 发表于 2018-6-14 21:15:53| 字数 913| - 中国–重庆–重庆 鹏博士宽带 | 显示全部楼层
root@FreeBSD:~ # /usr/local/etc/rc.d/postgresql initdb

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /var/db/postgres/data10 ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
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:

    /usr/local/bin/pg_ctl -D /var/db/postgres/data10 -l logfile start

坏朋朋 -------- 大龄男青年,无车无房无存款。
回复 支持 反对

使用道具 举报

3万

回帖

283

积分

11万

资产值

至尊会员III Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2005-10-25
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)月全勤勋章
 楼主| 发表于 2018-6-14 21:32:21| 字数 56| - 中国–重庆–重庆 鹏博士宽带 | 显示全部楼层
root@FreeBSD:~ # passwd postgres

设置2遍密码

root@FreeBSD:~ # reboot

坏朋朋 -------- 大龄男青年,无车无房无存款。
回复 支持 反对

使用道具 举报

3万

回帖

283

积分

11万

资产值

至尊会员III Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2005-10-25
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)月全勤勋章
 楼主| 发表于 2018-6-21 00:27:23| 字数 64| - 中国–重庆–重庆 鹏博士宽带 | 显示全部楼层
# vi pg_hba.conf

#增加一行,内网测试数据库对安全性要求不高

host all        all          192.168.1.0/24     trust



坏朋朋 -------- 大龄男青年,无车无房无存款。
回复 支持 反对

使用道具 举报

3万

回帖

283

积分

11万

资产值

至尊会员III Rank: 4Rank: 4Rank: 4Rank: 4

注册时间
2005-10-25
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)月全勤勋章
 楼主| 发表于 2018-6-21 00:28:51| 字数 41| - 中国–重庆–重庆 鹏博士宽带 | 显示全部楼层
#vi postgresql.conf

#修改

listen_addresses='*'
坏朋朋 -------- 大龄男青年,无车无房无存款。
回复 支持 反对

使用道具 举报

25

回帖

1

积分

578

资产值

初级会员 Rank: 1

注册时间
2010-4-29
发表于 2019-1-8 15:12:45| 字数 4| - 中国–云南–昆明 电信 | 显示全部楼层
学习学习
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Powered by Discuz! X3.5 © 2001-2023 Comsenz Inc

GMT+8, 2025-1-16 13:11 , Processed in 0.161979 second(s), 48 queries , Gzip On, OPcache On.

手机版|小黑屋|安卓客户端|iOS客户端|Archiver|备用网址1|备用网址2|在线留言|专门网

返回顶部