专门网论坛

 找回密码
 立即注册

新浪微博登陆

只需一步, 快速开始

快捷登录

【蓝天科技】华为 小米 ThinkPad专门网 纪念品蜗牛家8月最新活动南京Thinkpad港行八达网海淘转运公司
DELL 母鸡兄 母鸡成色
查看: 4691|回复: 15

freeBSD ~

[复制链接] [ 33字 ]

版主 Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

帖子
28241
积分
6.5
技术分
1 分
资产值
74662 nb
联谊分
0 分
注册时间
2005-10-25
银牌荣誉勋章(注册8年以上会员)金牌荣誉勋章(注册10年以上会员)
发表于 2018-6-14 19:27:47 | 显示全部楼层 |阅读模式
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
再登陆就不报错了

入门会员 Rank: 1

帖子
1817
积分
0.6
技术分
0.1 分
资产值
5924 nb
联谊分
0 分
注册时间
2004-6-11
金牌荣誉勋章(注册10年以上会员)
发表于 2018-6-14 19:31:32 | 显示全部楼层
mark一下
回复 支持 反对

使用道具 举报

版主 Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

帖子
28241
积分
6.5
技术分
1 分
资产值
74662 nb
联谊分
0 分
注册时间
2005-10-25
银牌荣誉勋章(注册8年以上会员)金牌荣誉勋章(注册10年以上会员)
 楼主| 发表于 2018-6-14 19:34:15 | 显示全部楼层

我写这里只是为了想方便自己以后随时查找。。。谢谢回复
回复 支持 反对

使用道具 举报

初级会员 Rank: 2Rank: 2

帖子
19463
积分
2.1
技术分
0 分
资产值
16207 nb
联谊分
0 分
注册时间
2004-6-8
金牌荣誉勋章(注册10年以上会员)首批微信订阅号关注用户(限量200个)银牌荣誉勋章(注册8年以上会员)
发表于 2018-6-14 19:38:13 | 显示全部楼层
最近手动升级ssh也遇到这个问题了,百度得到一样答案,呵呵
回复 支持 反对

使用道具 举报

中级会员 Rank: 3Rank: 3Rank: 3

帖子
45784
积分
5.5
技术分
0 分
资产值
54816 nb
联谊分
0 分
注册时间
2013-1-6
月全勤勋章初代目福气勋章
发表于 2018-6-14 19:55:14 | 显示全部楼层
QUOTE:
NCpiro 发表于 2018-6-14 19:34
我写这里只是为了想方便自己以后随时查找。。。谢谢回复

不用客气,我是雷锋
回复 支持 反对

使用道具 举报

入门会员 Rank: 1

帖子
1414
积分
0.3
技术分
0 分
资产值
4460 nb
联谊分
0 分
注册时间
2007-8-12
发表于 2018-6-14 20:06:09 | 显示全部楼层
你就不怕坛子数据丢失?
回复 支持 反对

使用道具 举报

入门会员 Rank: 1

帖子
1850
积分
0.4
技术分
0 分
资产值
5655 nb
联谊分
0 分
注册时间
2009-10-10
发表于 2018-6-14 20:40:38 来自安卓客户端来自安卓客户端| 显示全部楼层
mark
回复 支持 反对

使用道具 举报

管理员 Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9

帖子
100787
积分
162.1
技术分
153 分
资产值
14000 nb
联谊分
2 分
注册时间
2001-11-20
金牌荣誉勋章(注册10年以上会员)
发表于 2018-6-14 20:46:02 | 显示全部楼层
很多Linux版本默认PermitRootLogin 都是ON的呀。
回复 支持 反对

使用道具 举报

版主 Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

帖子
28241
积分
6.5
技术分
1 分
资产值
74662 nb
联谊分
0 分
注册时间
2005-10-25
银牌荣誉勋章(注册8年以上会员)金牌荣誉勋章(注册10年以上会员)
 楼主| 发表于 2018-6-14 20:57:03 | 显示全部楼层
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:~ #
回复 支持 反对

使用道具 举报

MasterFay - Silent小枫

初级会员 Rank: 2Rank: 2

帖子
919
积分
1
技术分
0 分
资产值
15015 nb
联谊分
0 分
注册时间
2012-8-12
发表于 2018-6-14 21:01:46 | 显示全部楼层
xshell也挺好用的
回复 支持 反对

使用道具 举报

版主 Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

帖子
28241
积分
6.5
技术分
1 分
资产值
74662 nb
联谊分
0 分
注册时间
2005-10-25
银牌荣誉勋章(注册8年以上会员)金牌荣誉勋章(注册10年以上会员)
 楼主| 发表于 2018-6-14 21:14:58 | 显示全部楼层
root@FreeBSD:~ # vi /etc/rc.conf

增加这行:

postgresql_enable=yes
回复 支持 反对

使用道具 举报

版主 Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

帖子
28241
积分
6.5
技术分
1 分
资产值
74662 nb
联谊分
0 分
注册时间
2005-10-25
银牌荣誉勋章(注册8年以上会员)金牌荣誉勋章(注册10年以上会员)
 楼主| 发表于 2018-6-14 21:15:53 | 显示全部楼层
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

回复 支持 反对

使用道具 举报

版主 Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

帖子
28241
积分
6.5
技术分
1 分
资产值
74662 nb
联谊分
0 分
注册时间
2005-10-25
银牌荣誉勋章(注册8年以上会员)金牌荣誉勋章(注册10年以上会员)
 楼主| 发表于 2018-6-14 21:32:21 | 显示全部楼层
root@FreeBSD:~ # passwd postgres

设置2遍密码

root@FreeBSD:~ # reboot

回复 支持 反对

使用道具 举报

版主 Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

帖子
28241
积分
6.5
技术分
1 分
资产值
74662 nb
联谊分
0 分
注册时间
2005-10-25
银牌荣誉勋章(注册8年以上会员)金牌荣誉勋章(注册10年以上会员)
 楼主| 发表于 2018-6-21 00:27:23 | 显示全部楼层
# vi pg_hba.conf

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

host all        all          192.168.1.0/24     trust



回复 支持 反对

使用道具 举报

版主 Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

帖子
28241
积分
6.5
技术分
1 分
资产值
74662 nb
联谊分
0 分
注册时间
2005-10-25
银牌荣誉勋章(注册8年以上会员)金牌荣誉勋章(注册10年以上会员)
 楼主| 发表于 2018-6-21 00:28:51 | 显示全部楼层
#vi postgresql.conf

#修改

listen_addresses='*'
回复 支持 反对

使用道具 举报

入门会员 Rank: 1

帖子
17
积分
0
技术分
0 分
资产值
419 nb
联谊分
0 分
注册时间
2010-4-29
发表于 2019-1-8 15:12:45 | 显示全部楼层
学习学习
回复 支持 反对

使用道具 举报

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

本版积分规则

Powered by Discuz! X3.2 © 2001-2018 Comsenz Inc & 51nb.com

GMT+8, 2019-8-22 06:31 , Processed in 0.068343 second(s), 79 queries , Gzip On, OPcache On, Redis On.

手机版|小黑屋|客户端|Archiver|||专门网 ( 粤B2-20050246 )

返回顶部