/l3/users/YOUR-L3BACKEND-USER/SET-YOUR-FIRSTLAB-NAME-HERE/root :1 |
|
#cat > config <<<EOF
|
#cat > config <<EOF
> [pgqadm] > job_name = merkator > db = merkator=P > > # how often to run maintenance [seconds] > maint_delay = 600 > > # how often to check for activity [seconds] > loop_delay = 0.1 > logfile = ~/log/%(job_name)s.log > pidfile = ~/pid/%(job_name)s.pid > EOF |
#londiste config install
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set Traceback (most recent call last): File "/usr/bin/londiste", line 133, in <module> script = Londiste(sys.argv[1:]) File "/usr/bin/londiste", line 56, in __init__ skytools.DBScript.__init__(self, 'londiste', args) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 293, in __init__ self.cf = self.load_config() File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 309, in load_config return Config(self.service_name, conf_file) File "/usr/lib/pymodules/python2.6/skytools/config.py", line 42, in __init__ self.cf.read(filename) File "/usr/lib/python2.6/ConfigParser.py", line 286, in read self._read(fp, filename) File "/usr/lib/python2.6/ConfigParser.py", line 482, in _read raise MissingSectionHeaderError(fpname, lineno, line) ConfigParser.MissingSectionHeaderError: File contains no section headers. file: config, line: 1 ' [pgqadm]\n' |
#londiste config install
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set Traceback (most recent call last): File "/usr/bin/londiste", line 133, in <module> script = Londiste(sys.argv[1:]) File "/usr/bin/londiste", line 56, in __init__ skytools.DBScript.__init__(self, 'londiste', args) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 293, in __init__ self.cf = self.load_config() File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 309, in load_config return Config(self.service_name, conf_file) File "/usr/lib/pymodules/python2.6/skytools/config.py", line 44, in __init__ raise Exception("Wrong config file, no section '%s'"%main_section) Exception: Wrong config file, no section 'londiste' |
#londiste config install
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set Traceback (most recent call last): File "/usr/bin/londiste", line 133, in <module> script = Londiste(sys.argv[1:]) File "/usr/bin/londiste", line 56, in __init__ skytools.DBScript.__init__(self, 'londiste', args) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 297, in __init__ self.log = _init_log(self.job_name, self.service_name, self.cf, self.log_level) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 151, in _init_log logfile, 'a', size, num) File "/usr/lib/python2.6/logging/handlers.py", line 112, in __init__ BaseRotatingHandler.__init__(self, filename, mode, encoding, delay) File "/usr/lib/python2.6/logging/handlers.py", line 64, in __init__ logging.FileHandler.__init__(self, filename, mode, encoding, delay) File "/usr/lib/python2.6/logging/__init__.py", line 827, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python2.6/logging/__init__.py", line 846, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 2] No such file or directory: '/root/log/merkator.log' |
#mkdir merkator
|
#londiste config install
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set Traceback (most recent call last): File "/usr/bin/londiste", line 133, in <module> script = Londiste(sys.argv[1:]) File "/usr/bin/londiste", line 56, in __init__ skytools.DBScript.__init__(self, 'londiste', args) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 297, in __init__ self.log = _init_log(self.job_name, self.service_name, self.cf, self.log_level) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 151, in _init_log logfile, 'a', size, num) File "/usr/lib/python2.6/logging/handlers.py", line 112, in __init__ BaseRotatingHandler.__init__(self, filename, mode, encoding, delay) File "/usr/lib/python2.6/logging/handlers.py", line 64, in __init__ logging.FileHandler.__init__(self, filename, mode, encoding, delay) File "/usr/lib/python2.6/logging/__init__.py", line 827, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python2.6/logging/__init__.py", line 846, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 2] No such file or directory: '/root/log/merkator.log' |
#londiste config install
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set Unknown command 'install', use --help for help |
#londiste config --help
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set Usage: londiste [options] INI CMD [subcmd args] commands: replay replay events to subscriber provider install installs modules, creates queue provider add TBL ... add table to queue provider remove TBL ... remove table from queue provider tables show all tables on provider provider add-seq SEQ ... add sequence to provider ... -r, --reload reload config (send SIGHUP) -s, --stop stop program safely (send SIGINT) -k, --kill kill program immidiately (send SIGTERM) expert options: --all add: include all possible tables --force add: ignore table differences, repair: ignore lag --expect-sync add: no copy needed --skip-truncate add: keep old data --rewind replay: sync queue pos with subscriber --reset replay: forget queue pos on subscriber |
#londiste config provider install
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set Traceback (most recent call last): File "/usr/bin/londiste", line 133, in <module> script = Londiste(sys.argv[1:]) File "/usr/bin/londiste", line 68, in __init__ script = ProviderSetup(args) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 56, in __init__ self.pgq_queue_name = self.cf.get("pgq_queue_name") File "/usr/lib/pymodules/python2.6/skytools/config.py", line 57, in get raise Exception("Config value not set: " + key) Exception: Config value not set: pgq_queue_name |
#londiste config provider install
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set Traceback (most recent call last): File "/usr/bin/londiste", line 134, in <module> script.start() File "/usr/bin/londiste", line 97, in start self.script.start() File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 372, in start run_single_process(self, self.go_daemon, self.pidfile) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 96, in run_single_process ... src_db = self.get_database('provider_db') File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 440, in get_database return dbc.get_connection(autocommit, isolation_level) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 202, in get_connection self.conn = connect_database(self.loc) File "/usr/lib/pymodules/python2.6/skytools/psycopgwrapper.py", line 96, in connect_database return _pgconnect(connstr) File "/usr/lib/pymodules/python2.6/skytools/psycopgwrapper.py", line 74, in _pgconnect return _CompatConnection(cstr) psycopg2.OperationalError: invalid connection option "merkator" |
#mkdir /etc/skytools
|
#cat > /etc/skytools/ticker.ini <<EOF
> [pgqadm] > job_name = merkator-ticker > db = dbname=merkator > maint_delay = 600 > loop_delay = 0.1 > logfile = /var/log/skytools/%(job_name)s.log > pidfile = /var/run/skytools/%(job_name)s.pid > EOF |
#p
Display all 102 possibilities? (y or n) pager pcp_detach_node perl5.10.1 pg_dumpall pg_updatedicts pivot_root podselect ps pwdx python pam-auth-update pcp_node_count perlbug pgfouine pg_upgradecluster pkill popd psed pwunconv python2.6 pam_getenv pcp_node_info perldoc pgfouine_vacuum php pl2pm poweroff psql py3_compilefiles pyversions pam_tally pcp_proc_count perlivp pg_lsclusters php5 plipconfig pr pstruct pycentral pam_tally2 pcp_proc_info perlthanks pg_md5 pic pmap preconv ptar pyclean partx pcp_stop_pgpool pg pgpool pico pod2html prename ptardiff pycompile passwd pcp_systemdb_info pgbouncer pgqadm piconv pod2latex print ptx py_compilefiles paste pcretest pg_createcluster pgrep pidof pod2man printenv pushd pydoc pathchk pdb pg_ctlcluster pg_restore ping pod2text printerbanner pwck pydoc2.6 pcimodules pdb2.6 pg_dropcluster pgsnap ping6 pod2usage printf pwconv pygettext pcp_attach_node perl pg_dump pgtune pinky podchecker prove pwd pygettext2.6 |
#pgqadm /etc/skytools/ticker.ini install
Traceback (most recent call last): File "/usr/bin/pgqadm", line 195, in <module> script.start() File "/usr/bin/pgqadm", line 78, in start skytools.DBScript.start(self) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 372, in start run_single_process(self, self.go_daemon, self.pidfile) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 92, in run_single_process _write_pidfile(pidfile) File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 73, in _write_pidfile f = open(pidfile, 'w') IOError: [Errno 2] No such file or directory: '/var/run/skytools/merkator-ticker.pid.admin' |
#mkdir /var/run/skytools
|
#pgqadm /etc/skytools/ticker.ini ticker -d
|
#tail /var/log/skytools/merkator-ticker.log
2010-08-06 20:50:49,950 29953 INFO plpgsql is installed 2010-08-06 20:50:49,970 29953 INFO txid_current_snapshot is installed 2010-08-06 20:50:49,971 29953 INFO Installing pgq 2010-08-06 20:50:50,000 29953 INFO Reading from /usr/share/skytools/pgq.sql 2010-08-06 20:50:56,729 29972 INFO {maint_duration: 0.110743999481} |
#londiste /etc/skytools/londiste.ini provider install
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set 2010-08-06 21:06:38,000 30836 INFO plpgsql is installed 2010-08-06 21:06:38,035 30836 INFO txid_current_snapshot is installed 2010-08-06 21:06:38,036 30836 INFO pgq is installed 2010-08-06 21:06:38,036 30836 INFO londiste is installed |
#londiste /etc/skytools/londiste.ini provider add --all
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set 2010-08-06 21:07:39,389 30879 INFO Adding public.rosterusers Traceback (most recent call last): File "/usr/bin/londiste", line 134, in <module> script.start() File "/usr/bin/londiste", line 97, in start self.script.start() File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 372, in start run_single_process(self, self.go_daemon, self.pidfile) ... File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 247, in provider_add_tables self.provider_add_table(tbl) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 271, in provider_add_table self.exec_provider(q, [self.pgq_queue_name, tbl]) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 303, in exec_provider src_curs.execute(sql, args) File "/usr/lib/python2.6/dist-packages/psycopg2/extras.py", line 118, in execute return _cursor.execute(self, query, vars) psycopg2.InternalError: need key column CONTEXT: PL/pgSQL function "provider_add_table" line 2 at RETURN |
#londiste /etc/skytools/londiste.ini subscriber add --all
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set 2010-08-06 21:08:11,746 30904 ERROR Table public.rostergroups not attached to queue 2010-08-06 21:08:11,747 30904 ERROR Table public.spool not attached to queue 2010-08-06 21:08:11,747 30904 ERROR Table public.users not attached to queue 2010-08-06 21:08:11,747 30904 ERROR Table public.pubsub_node_option not attached to queue 2010-08-06 21:08:11,747 30904 ERROR Table public.pubsub_node_owner not attached to queue 2010-08-06 21:08:11,748 30904 ERROR Table public.vcard_search not attached to queue 2010-08-06 21:08:11,748 30904 ERROR Table public.rosterusers not attached to queue 2010-08-06 21:08:11,748 30904 ERROR Table public.privacy_default_list not attached to queue 2010-08-06 21:08:11,748 30904 ERROR Table public.pubsub_item not attached to queue 2010-08-06 21:08:11,748 30904 ERROR Table public.privacy_list_data not attached to queue 2010-08-06 21:08:11,748 30904 ERROR Table public.last not attached to queue 2010-08-06 21:08:11,749 30904 ERROR Table public.pubsub_node not attached to queue 2010-08-06 21:08:11,749 30904 ERROR Table public.pubsub_subscription_opt not attached to queue 2010-08-06 21:08:11,749 30904 ERROR Table public.privacy_list not attached to queue 2010-08-06 21:08:11,749 30904 ERROR Table public.roster_version not attached to queue 2010-08-06 21:08:11,749 30904 ERROR Table public.private_storage not attached to queue 2010-08-06 21:08:11,749 30904 ERROR Table public.pubsub_state not attached to queue 2010-08-06 21:08:11,750 30904 ERROR Table public.vcard not attached to queue |
#londiste /etc/skytools/londiste.ini provider add --all
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set 2010-08-06 21:08:29,099 30933 INFO Adding public.rosterusers Traceback (most recent call last): File "/usr/bin/londiste", line 134, in <module> script.start() File "/usr/bin/londiste", line 97, in start self.script.start() File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 372, in start run_single_process(self, self.go_daemon, self.pidfile) ... File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 247, in provider_add_tables self.provider_add_table(tbl) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 271, in provider_add_table self.exec_provider(q, [self.pgq_queue_name, tbl]) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 303, in exec_provider src_curs.execute(sql, args) File "/usr/lib/python2.6/dist-packages/psycopg2/extras.py", line 118, in execute return _cursor.execute(self, query, vars) psycopg2.InternalError: need key column CONTEXT: PL/pgSQL function "provider_add_table" line 2 at RETURN |
#londiste /etc/skytools/londiste.ini provider add --all
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set 2010-08-06 21:09:44,184 30975 INFO Adding public.rosterusers Traceback (most recent call last): File "/usr/bin/londiste", line 134, in <module> script.start() File "/usr/bin/londiste", line 97, in start self.script.start() File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 372, in start run_single_process(self, self.go_daemon, self.pidfile) ... File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 247, in provider_add_tables self.provider_add_table(tbl) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 271, in provider_add_table self.exec_provider(q, [self.pgq_queue_name, tbl]) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 303, in exec_provider src_curs.execute(sql, args) File "/usr/lib/python2.6/dist-packages/psycopg2/extras.py", line 118, in execute return _cursor.execute(self, query, vars) psycopg2.InternalError: need key column CONTEXT: PL/pgSQL function "provider_add_table" line 2 at RETURN |
#londiste /etc/skytools/londiste.ini provider add --all -v
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set 2010-08-06 21:12:36,368 31032 INFO Adding public.rosterusers 2010-08-06 21:12:36,368 31032 DEBUG SET LOCAL statement_timeout = 10000 Traceback (most recent call last): File "/usr/bin/londiste", line 134, in <module> script.start() File "/usr/bin/londiste", line 97, in start self.script.start() File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 372, in start ... File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 247, in provider_add_tables self.provider_add_table(tbl) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 271, in provider_add_table self.exec_provider(q, [self.pgq_queue_name, tbl]) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 303, in exec_provider src_curs.execute(sql, args) File "/usr/lib/python2.6/dist-packages/psycopg2/extras.py", line 118, in execute return _cursor.execute(self, query, vars) psycopg2.InternalError: need key column CONTEXT: PL/pgSQL function "provider_add_table" line 2 at RETURN |
#londiste /etc/skytools/londiste.ini provider add --all -v^C
|
#londiste /etc/skytools/londiste.ini provider add --all -v
/usr/lib/pymodules/python2.6/londiste/setup.py:11: DeprecationWarning: the sets module is deprecated from sets import Set as set 2010-08-09 13:36:00,722 31294 INFO Adding public.rosterusers 2010-08-09 13:36:00,742 31294 DEBUG SET LOCAL statement_timeout = 10000 Traceback (most recent call last): File "/usr/bin/londiste", line 134, in <module> script.start() File "/usr/bin/londiste", line 97, in start self.script.start() File "/usr/lib/pymodules/python2.6/skytools/scripting.py", line 372, in start ... File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 247, in provider_add_tables self.provider_add_table(tbl) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 271, in provider_add_table self.exec_provider(q, [self.pgq_queue_name, tbl]) File "/usr/lib/pymodules/python2.6/londiste/setup.py", line 303, in exec_provider src_curs.execute(sql, args) File "/usr/lib/python2.6/dist-packages/psycopg2/extras.py", line 118, in execute return _cursor.execute(self, query, vars) psycopg2.InternalError: need key column CONTEXT: PL/pgSQL function "provider_add_table" line 2 at RETURN |
#w
13:36:29 up 3 days, 22:20, 0 users, load average: 0,00, 0,00, 0,00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT |
#w
13:36:37 up 3 days, 22:20, 0 users, load average: 0,00, 0,00, 0,00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT |
#ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 8348 136 ? Ss Aug05 0:03 init [2] root 3825 0.0 0.0 49164 88 ? Ss Aug05 0:00 /usr/sbin/sshd root 16623 0.0 0.1 111492 756 ? Sl Aug05 0:00 /usr/sbin/rsyslogd -c4 103 16680 0.0 0.0 23256 32 ? Ss Aug05 0:00 /usr/bin/dbus-daemon --system root 16681 0.0 0.0 20900 240 ? Ss Aug05 0:00 /usr/sbin/cron postgres 16726 0.0 0.0 61996 60 ? S Aug05 0:00 /usr/sbin/pgpool -n postgres 16727 0.0 0.0 3848 52 ? S Aug05 0:00 logger -t pgpool -p local0.info postgres 16736 0.0 0.0 61996 36 ? S Aug05 0:00 pgpool: wait for connection request postgres 16737 0.0 0.0 61996 36 ? S Aug05 0:00 pgpool: wait for connection request ... postgres 29629 0.0 0.2 208456 1060 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(42416) idle postgres 29630 0.0 0.2 208456 1092 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(35751) idle postgres 29631 0.0 0.2 208456 1048 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(47059) idle postgres 29632 0.0 0.2 208456 1148 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(58256) idle postgres 29633 0.0 0.2 208456 1100 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(59403) idle postgres 29634 0.0 0.2 208456 1104 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(37417) idle postgres 29635 0.0 0.2 208456 1100 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(41655) idle postgres 29636 0.0 0.2 208456 1112 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(48746) idle postgres 29637 0.0 0.2 208456 1116 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(47751) idle root 31388 0.0 0.2 121092 1172 pts/23 R+ 13:36 0:00 ps aux |
#psql
psql: FATAL: database "root" does not exist |
#psql merkator
psql (8.4.4) Type "help" for help. merkator=# \q |
#w
16:28:52 up 5 days, 1:13, 0 users, load average: 0,00, 0,00, 0,00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT |
#cd /
|
#cd /root/
|
#wget http://bucardo.org/downloads/Bucardo-4.4.0.tar.gz
--2010-08-10 16:52:38-- http://bucardo.org/downloads/Bucardo-4.4.0.tar.gz Распознаётся bucardo.org... 208.75.87.224 Устанавливается соединение с bucardo.org|208.75.87.224|:80... соединение установлено. Запрос HTTP послан, ожидается ответ... 200 OK Длина: 181048 (177K) [application/x-gzip] Saving to: «Bucardo-4.4.0.tar.gz» 100%[===========================================================================================================================================================>] 181 048 97,4K/s в 1,8s 2010-08-10 16:52:41 (97,4 KB/s) - «Bucardo-4.4.0.tar.gz» saved [181048/181048] |
#ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 8348 184 ? Ss Aug05 0:03 init [2] root 3825 0.0 0.0 49164 64 ? Ss Aug05 0:00 /usr/sbin/sshd root 16623 0.0 0.1 111492 684 ? Sl Aug05 0:00 /usr/sbin/rsyslogd -c4 103 16680 0.0 0.0 23256 32 ? Ss Aug05 0:00 /usr/bin/dbus-daemon --system root 16681 0.0 0.0 20900 236 ? Ss Aug05 0:00 /usr/sbin/cron postgres 16726 0.0 0.0 61996 52 ? S Aug05 0:00 /usr/sbin/pgpool -n postgres 16727 0.0 0.0 3848 44 ? S Aug05 0:00 logger -t pgpool -p local0.info postgres 16736 0.0 0.0 61996 32 ? S Aug05 0:00 pgpool: wait for connection request postgres 16737 0.0 0.0 61996 32 ? S Aug05 0:00 pgpool: wait for connection request ... postgres 29628 0.0 0.0 208456 392 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(41087) idle postgres 29629 0.0 0.0 208456 388 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(42416) idle postgres 29630 0.0 0.0 208456 392 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(35751) idle postgres 29631 0.0 0.0 208456 392 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(47059) idle postgres 29632 0.0 0.0 208456 388 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(58256) idle postgres 29633 0.0 0.0 208456 396 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(59403) idle postgres 29634 0.0 0.0 208456 392 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(37417) idle postgres 29635 0.0 0.0 208456 388 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(41655) idle postgres 29636 0.0 0.0 208456 392 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(48746) idle postgres 29637 0.0 0.0 208456 388 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(47751) idle |
#rm -rf Bucardo-4.4.0.tar.gz.1
|
#tar xf Bucardo-4.4.0.tar.gz
|
#cd Bucardo-4.4.0/
|
#ls
bucardo_ctl Bucardo.pm bucardo.schema INSTALL Makefile.PL MANIFEST.SKIP README scripts t UPGRADE bucardo_ctl.html Bucardo.pm.html Changes LICENSE MANIFEST META.yml README.dev SIGNATURE TODO |
#cat INSTALL
Installation instructions for Bucardo. For a possibly more up to date and complete version, please visit: http://bucardo.org/wiki/Bucardo/Installation Before installing, please make sure you have the latest version. Please visit: http://bucardo.org/wiki/Bucardo/downloads It is recommended that you create a 'bucardo' user on your system that will be responsible for running Bucardo. Install Bucardo like any other Perl module: perl Makefile.PL ... recommended that you reroute your bucardo syslog traffic to another file. This can be done by adding this line to your /etc/syslog.conf file: local1.* -/var/log/bucardo.log Of course, if "local1" is already being used for something else, you will need to change it - see the "syslog_facility" entry in the bucardo_config table. Once this is done, make sure you restart your syslog daemon so it rereads the new configuration file. Please see the documentation at http://bucardo.org for information on how to start using Bucardo once it is installed. |
#cpan DBIx::Safe
CPAN is the world-wide archive of perl resources. It consists of about 300 sites that all replicate the same contents around the globe. Many countries have at least one CPAN site already. The resources found on CPAN are easily accessible with the CPAN.pm module. If you want to use CPAN.pm, lots of things have to be configured. Fortunately, most of them can be determined automatically. If you prefer the automatic configuration, answer 'yes' below. If you prefer to enter a dialog instead, you can answer 'no' to this question and I'll let you configure in small steps one thing after the other. (Note: you can revisit this dialog anytime later by typing 'o ... http://www.perl.org/CPAN/modules/02packages.details.txt.gz Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz' Database was generated on Tue, 10 Aug 2010 12:29:13 GMT ............................................................................DONE Fetching with LWP: http://www.perl.org/CPAN/modules/03modlist.data.gz Going to read '/root/.cpan/sources/modules/03modlist.data.gz' ............................................................................DONE Going to write /root/.cpan/Metadata DBIx::Safe is up to date (1.2.5). |
#cat INSTALL
Installation instructions for Bucardo. For a possibly more up to date and complete version, please visit: http://bucardo.org/wiki/Bucardo/Installation Before installing, please make sure you have the latest version. Please visit: http://bucardo.org/wiki/Bucardo/downloads It is recommended that you create a 'bucardo' user on your system that will be responsible for running Bucardo. Install Bucardo like any other Perl module: perl Makefile.PL ... recommended that you reroute your bucardo syslog traffic to another file. This can be done by adding this line to your /etc/syslog.conf file: local1.* -/var/log/bucardo.log Of course, if "local1" is already being used for something else, you will need to change it - see the "syslog_facility" entry in the bucardo_config table. Once this is done, make sure you restart your syslog daemon so it rereads the new configuration file. Please see the documentation at http://bucardo.org for information on how to start using Bucardo once it is installed. |
#perl Makefile.PL
Checking if your kit is complete... Looks good Writing Makefile for Bucardo |
#make
cp bucardo.schema blib/share/bucardo.schema cp Bucardo.pm blib/lib/Bucardo.pm cp bucardo_ctl blib/script/bucardo_ctl /usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/bucardo_ctl Manifying blib/man1/bucardo_ctl.1pm Manifying blib/man3/Bucardo.3pm |
#make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01-basic.t ................... Can't exec "initdb": Нет такого файла или каталога at t/BucardoTesting.pm line 83. Use of uninitialized value $pgversion in pattern match (m//) at t/BucardoTesting.pm line 85. Use of uninitialized value $localver in concatenation (.) or string at t/BucardoTesting.pm line 117. Use of uninitialized value $localver in concatenation (.) or string at t/BucardoTesting.pm line 117. Use of uninitialized value $localver in concatenation (.) or string at t/BucardoTesting.pm line 117. Use of uninitialized value $localver in concatenation (.) or string at t/BucardoTesting.pm line 117. Use of uninitialized value $localver in concatenation (.) or string at t/BucardoTesting.pm line 117. Use of uninitialized value $localver in concatenation (.) or string at t/BucardoTesting.pm line 117. Use of uninitialized value $localver in concatenation (.) or string at t/BucardoTesting.pm line 117. ... Non-zero exit status: 2 t/14-truncate.t (Wstat: 0 Tests: 0 Failed: 0) Parse errors: No plan found in TAP output t/15-star.t (Wstat: 512 Tests: 2 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 34 tests but ran 2. Files=22, Tests=28, 9 wallclock secs ( 0.09 usr 0.04 sys + 5.52 cusr 0.78 csys = 6.43 CPU) Result: FAIL Failed 18/22 test programs. 2/28 subtests failed. make: *** [test_dynamic] Ошибка 255 |
#init
blib/ Bucardo.pm Changes LICENSE MANIFEST .perlcriticrc README.dev t/ bucardo_ctl Bucardo.pm.html .gitignore Makefile MANIFEST.SKIP pm_to_blib scripts/ TODO bucardo_ctl.html bucardo.schema INSTALL Makefile.PL META.yml README SIGNATURE UPGRADE |
#init
blib/ Bucardo.pm Changes LICENSE MANIFEST .perlcriticrc README.dev t/ bucardo_ctl Bucardo.pm.html .gitignore Makefile MANIFEST.SKIP pm_to_blib scripts/ TODO bucardo_ctl.html bucardo.schema INSTALL Makefile.PL META.yml README SIGNATURE UPGRADE |
#init ^C
|
#ps ax
PID TTY STAT TIME COMMAND 1 ? Ss 0:03 init [2] 3825 ? Ss 0:00 /usr/sbin/sshd 16623 ? Sl 0:00 /usr/sbin/rsyslogd -c4 16680 ? Ss 0:00 /usr/bin/dbus-daemon --system 16681 ? Ss 0:00 /usr/sbin/cron 16726 ? S 0:00 /usr/sbin/pgpool -n 16727 ? S 0:00 logger -t pgpool -p local0.info 16736 ? S 0:00 pgpool: wait for connection request 16737 ? S 0:00 pgpool: wait for connection request ... 29628 ? Ss 0:00 postgres: merkator merkator 192.168.2.210(41087) idle 29629 ? Ss 0:00 postgres: merkator merkator 192.168.2.210(42416) idle 29630 ? Ss 0:00 postgres: merkator merkator 192.168.2.210(35751) idle 29631 ? Ss 0:00 postgres: merkator merkator 192.168.2.210(47059) idle 29632 ? Ss 0:00 postgres: merkator merkator 192.168.2.210(58256) idle 29633 ? Ss 0:00 postgres: merkator merkator 192.168.2.210(59403) idle 29634 ? Ss 0:00 postgres: merkator merkator 192.168.2.210(37417) idle 29635 ? Ss 0:00 postgres: merkator merkator 192.168.2.210(41655) idle 29636 ? Ss 0:00 postgres: merkator merkator 192.168.2.210(48746) idle 29637 ? Ss 0:00 postgres: merkator merkator 192.168.2.210(47751) idle |
#make install
Installing /usr/local/share/perl/5.10.1/Bucardo.pm Installing /usr/local/man/man1/bucardo_ctl.1pm Installing /usr/local/man/man3/Bucardo.3pm Installing /usr/local/bin/bucardo_ctl Installing /usr/local/share/bucardo/bucardo.schema Appending installation info to /usr/local/lib/perl/5.10.1/perllocal.pod |
#bucardo_ctl
Usage: bucardo_ctl args install ** Install the Bucardo database start <reason> ** Force any existing sync(s) to quit, then starts Bucardo stop <reason> ** Tell all Bucardo processes to stop permanently list <type> [name] ** View information about dbs, dbgroups, herds, syncs, tables, or sequences add <type> <name> ** Add a db, dbgroup, herd, sync, table, or sequence remove <type> <name> ** Remove a db, dbgroup, herd, sync, table, or sequence For detailed help on the above, prefix with a help like this: bucardo_ctl help add db kick <syncname(s)> [timeout] ... validate syncname[s] ** Validate a sync upgrade ** Upgrade Bucardo to the current version message ** Write a message to the Bucardo logs config [set|show] ** View or set configuration parameters reload_config ** Force a running Bucardo to reload the bucardo_config table For more details, try 'man bucardo_ctl' |
#bucardo_ctl config show
DBI connect('dbname=bucardo;host=localhost;port=5432','bucardo',...) failed: FATAL: database "bucardo" does not exist at /usr/local/bin/bucardo_ctl line 194 |
#vim /usr/local/bin/bucardo_ctl
|
#bucardo_ctl install
This will install the bucardo database into an existing Postgres cluster. Postgres must have been compiled with Perl support, and you must connect as a superuser We will create a new superuser named 'bucardo', and make it the owner of a new database named 'bucardo' Current connection settings: 1. Host: localhost 2. Port: 5432 3. User: postgres 4. Database: postgres ... 5. PID directory: /var/run/bucardo Enter a number to change it, P to proceed, or Q to quit: p -->Sorry, that is not a valid PID directory Current connection settings: 1. Host: localhost 2. Port: 5432 3. User: postgres 4. Database: postgres 5. PID directory: /var/run/bucardo Enter a number to change it, P to proceed, or Q to quit: ^C |
#mkdie /var/run/bucardo
bash: mkdie: команда не найдена |
#mkdir /var/run/bucardo
|
#bucardo_ctl install
This will install the bucardo database into an existing Postgres cluster. Postgres must have been compiled with Perl support, and you must connect as a superuser We will create a new superuser named 'bucardo', and make it the owner of a new database named 'bucardo' Current connection settings: 1. Host: localhost 2. Port: 5432 3. User: postgres 4. Database: postgres ... Postgres version is: 8.4 Attempting to create and populate the bucardo database and schema Database creation is complete Connecting to database 'bucardo' as user 'bucardo' Updated configuration setting "piddir" Installation is now complete. If you see any unexpected errors above, please report them to bucardo-general@bucardo.org You should probably check over the configuration variables next, by running: bucardo_ctl show all Change any setting by using: bucardo_ctl set foo=bar |
#bucardo_ctl show all
audit_pid = 0 autosync_ddl = newcol bucardo_current_version = 4.4.0 bucardo_version = 4.4.0 ctl_checkabortedkids_time = 30 ctl_checkonkids_time = 10 ctl_createkid_time = 0.5 ctl_nothingfound_sleep = 0.2 ctl_pingtime = 600 default_email_from = nobody@example.com ... piddir = /var/run/bucardo reason_file = bucardo.restart.reason.log stats_script_url = http://www.bucardo.org/ stopfile = fullstopbucardo syslog_facility = LOG_LOCAL1 tcp_keepalives_count = 0 tcp_keepalives_idle = 0 tcp_keepalives_interval = 0 upsert_attempts = 3 warning_file = bucardo.warning.log |
#bucardo_ctl
blib/ Bucardo.pm Changes LICENSE MANIFEST .perlcriticrc README.dev t/ bucardo_ctl Bucardo.pm.html .gitignore Makefile MANIFEST.SKIP pm_to_blib scripts/ TODO bucardo_ctl.html bucardo.schema INSTALL Makefile.PL META.yml README SIGNATURE UPGRADE |
#bucardo_ctl
Usage: bucardo_ctl args install ** Install the Bucardo database start <reason> ** Force any existing sync(s) to quit, then starts Bucardo stop <reason> ** Tell all Bucardo processes to stop permanently list <type> [name] ** View information about dbs, dbgroups, herds, syncs, tables, or sequences add <type> <name> ** Add a db, dbgroup, herd, sync, table, or sequence remove <type> <name> ** Remove a db, dbgroup, herd, sync, table, or sequence For detailed help on the above, prefix with a help like this: bucardo_ctl help add db kick <syncname(s)> [timeout] ... validate syncname[s] ** Validate a sync upgrade ** Upgrade Bucardo to the current version message ** Write a message to the Bucardo logs config [set|show] ** View or set configuration parameters reload_config ** Force a running Bucardo to reload the bucardo_config table For more details, try 'man bucardo_ctl' |
#bucardo_ctl add db merkator
Added database "merkator" |
#bucardo_ctl add all tables
DBI connect('dbname=merkator;port=5432','bucardo',...) failed: FATAL: Ident authentication failed for user "bucardo" at /usr/local/bin/bucardo_ctl line 5215 |
#bucardo_ctl show all
audit_pid = 0 autosync_ddl = newcol bucardo_current_version = 4.4.0 bucardo_version = 4.4.0 ctl_checkabortedkids_time = 30 ctl_checkonkids_time = 10 ctl_createkid_time = 0.5 ctl_nothingfound_sleep = 0.2 ctl_pingtime = 600 default_email_from = nobody@example.com ... piddir = /var/run/bucardo reason_file = bucardo.restart.reason.log stats_script_url = http://www.bucardo.org/ stopfile = fullstopbucardo syslog_facility = LOG_LOCAL1 tcp_keepalives_count = 0 tcp_keepalives_idle = 0 tcp_keepalives_interval = 0 upsert_attempts = 3 warning_file = bucardo.warning.log |
#bucardo_ctl show
Usage: bucardo_ctl show <all|setting1> [settting2 ...] |
#bucardo_ctl show ^C
|
#psql
psql: FATAL: database "root" does not exist |
#psql postgres
psql (8.4.4) Type "help" for help. postgres=# show user; ERROR: syntax error at or near "user" СТРОКА 1:show user; ^ postgres=# show users; ERROR: unrecognized configuration parameter "users" postgres=# show user bucardo; ERROR: syntax error at or near "user" ... pg_constraint pg_inherits pg_proc pg_stat_database pg_stat_sys_indexes pg_trigger postgres=# select * from pg_user; usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig ----------+----------+-------------+----------+-----------+----------+----------+----------------------- postgres | 10 | t | t | t | ******** | | root | 16384 | t | t | t | ******** | | merkator | 16386 | t | f | f | ******** | | bucardo | 17000 | f | t | t | ******** | | {search_path=bucardo} (4 rows) postgres=# \q |
#cat /usr/
bin/ games/ include/ lib/ lib64/ local/ sbin/ share/ src/ |
#cat /usr/local/etc/b
cat: /usr/local/etc/b: Нет такого файла или каталога |
#bucardo_ctl add all tables
DBI connect('dbname=merkator;port=5432','bucardo',...) failed: FATAL: Ident authentication failed for user "bucardo" at /usr/local/bin/bucardo_ctl line 5215 |
#bucardo_ctl add all tables
DBI connect('dbname=merkator;port=5432','bucardo',...) failed: FATAL: Ident authentication failed for user "bucardo" at /usr/local/bin/bucardo_ctl line 5215 |
#whois 78.40.184.10
bash: whois: команда не найдена |
#w
17:32:32 up 5 days, 2:16, 0 users, load average: 0,00, 0,00, 0,00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT |
#ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 8348 180 ? Ss Aug05 0:03 init [2] root 3825 0.0 0.0 49164 64 ? Ss Aug05 0:00 /usr/sbin/sshd root 16623 0.0 0.1 111492 712 ? Sl Aug05 0:00 /usr/sbin/rsyslogd -c4 103 16680 0.0 0.0 23256 32 ? Ss Aug05 0:00 /usr/bin/dbus-daemon --system root 16681 0.0 0.0 20900 236 ? Ss Aug05 0:00 /usr/sbin/cron postgres 16726 0.0 0.0 61996 52 ? S Aug05 0:00 /usr/sbin/pgpool -n postgres 16727 0.0 0.0 3848 44 ? S Aug05 0:00 logger -t pgpool -p local0.info postgres 16736 0.0 0.0 61996 32 ? S Aug05 0:00 pgpool: wait for connection request postgres 16737 0.0 0.0 61996 32 ? S Aug05 0:00 pgpool: wait for connection request ... postgres 29628 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(41087) idle postgres 29629 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(42416) idle postgres 29630 0.0 0.2 208456 964 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(35751) idle postgres 29631 0.0 0.2 208456 948 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(47059) idle postgres 29632 0.0 0.2 208456 952 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(58256) idle postgres 29633 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(59403) idle postgres 29634 0.0 0.2 208456 948 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(37417) idle postgres 29635 0.0 0.2 208456 948 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(41655) idle postgres 29636 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(48746) idle postgres 29637 0.0 0.2 208456 956 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(47751) idle |
#ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 8348 180 ? Ss Aug05 0:03 init [2] root 3825 0.0 0.0 49164 64 ? Ss Aug05 0:00 /usr/sbin/sshd root 16623 0.0 0.1 111492 712 ? Sl Aug05 0:00 /usr/sbin/rsyslogd -c4 103 16680 0.0 0.0 23256 32 ? Ss Aug05 0:00 /usr/bin/dbus-daemon --system root 16681 0.0 0.0 20900 236 ? Ss Aug05 0:00 /usr/sbin/cron postgres 16726 0.0 0.0 61996 52 ? S Aug05 0:00 /usr/sbin/pgpool -n postgres 16727 0.0 0.0 3848 44 ? S Aug05 0:00 logger -t pgpool -p local0.info postgres 16736 0.0 0.0 61996 32 ? S Aug05 0:00 pgpool: wait for connection request postgres 16737 0.0 0.0 61996 32 ? S Aug05 0:00 pgpool: wait for connection request ... postgres 29628 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(41087) idle postgres 29629 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(42416) idle postgres 29630 0.0 0.2 208456 964 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(35751) idle postgres 29631 0.0 0.2 208456 948 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(47059) idle postgres 29632 0.0 0.2 208456 952 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(58256) idle postgres 29633 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(59403) idle postgres 29634 0.0 0.2 208456 948 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(37417) idle postgres 29635 0.0 0.2 208456 948 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(41655) idle postgres 29636 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(48746) idle postgres 29637 0.0 0.2 208456 956 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(47751) idle |
#ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 8348 180 ? Ss Aug05 0:03 init [2] root 3825 0.0 0.0 49164 64 ? Ss Aug05 0:00 /usr/sbin/sshd root 16623 0.0 0.1 111492 712 ? Sl Aug05 0:00 /usr/sbin/rsyslogd -c4 103 16680 0.0 0.0 23256 32 ? Ss Aug05 0:00 /usr/bin/dbus-daemon --system root 16681 0.0 0.0 20900 236 ? Ss Aug05 0:00 /usr/sbin/cron postgres 16726 0.0 0.0 61996 52 ? S Aug05 0:00 /usr/sbin/pgpool -n postgres 16727 0.0 0.0 3848 44 ? S Aug05 0:00 logger -t pgpool -p local0.info postgres 16736 0.0 0.0 61996 32 ? S Aug05 0:00 pgpool: wait for connection request postgres 16737 0.0 0.0 61996 32 ? S Aug05 0:00 pgpool: wait for connection request ... postgres 29628 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(41087) idle postgres 29629 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(42416) idle postgres 29630 0.0 0.2 208456 964 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(35751) idle postgres 29631 0.0 0.2 208456 948 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(47059) idle postgres 29632 0.0 0.2 208456 952 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(58256) idle postgres 29633 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(59403) idle postgres 29634 0.0 0.2 208456 948 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(37417) idle postgres 29635 0.0 0.2 208456 948 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(41655) idle postgres 29636 0.0 0.2 208456 960 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(48746) idle postgres 29637 0.0 0.2 208456 956 ? Ss Aug06 0:00 postgres: merkator merkator 192.168.2.210(47751) idle |
#bucardo_ctl add all tables
DBI connect('dbname=merkator;port=5432','bucardo',...) failed: FATAL: Ident authentication failed for user "bucardo" at /usr/local/bin/bucardo_ctl line 5215 |
#cat /etc/postgresql
postgresql/ postgresql-common/ |
#cat /etc/postgresql/8.4/main/p
pg_ctl.conf pg_hba.conf pg_ident.conf postgresql.conf |
#cat /etc/postgresql/8.4/main/pg_hba.conf
# PostgreSQL Client Authentication Configuration File # =================================================== # # Refer to the "Client Authentication" section in the # PostgreSQL documentation for a complete description # of this file. A short synopsis follows. # # This file controls: which hosts are allowed to connect, how clients # are authenticated, which PostgreSQL user names they can use, which # databases they can access. Records take one of these forms: ... local all postgres ident local all root ident # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all ident # IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 192.168.2.0/24 trust # IPv6 local connections: host all all ::1/128 md5 |
#:x
Restarting PostgreSQL 8.4 database server: main. |
#strace bucardo_ctl add all tables
bash: strace: команда не найдена |
#strace bucardo_ctl add all tables^C
|
#apt-get install strace
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Следующие пакеты устанавливались автоматически и больше не требуются: libatk1.0-0 libgtk2.0-common libxfixes3 libxcb-atom1 hicolor-icon-theme libxcomposite1 libwxbase2.8-0 xfonts-encodings libxxf86dga1 libatk1.0-data x11-utils libdrm-radeon1 libdbus-1-3 odbcinst1debian2 libxxf86vm1 xterm libgl1-mesa-dri libsctp1 libgl1-mesa-glx lksctp-tools libcairo2 tk odbcinst xfonts-utils libthai-data unixodbc libdatrie1 fontconfig libavahi-common-data libxfont1 dbus xbitmaps libpango1.0-common libdrm2 libpixman-1-0 libxaw7 libcups2 libxinerama1 libwxgtk2.8-0 libxft2 libice6 libthai0 libdrm-intel1 libxmu6 libxrender1 tcl libfont-freetype-perl x-ttcidfont-conf tcl8.4 libtiff4 libfontenc1 libjasper1 libxtst6 libutempter0 tk8.4 libavahi-client3 x11-common libpango1.0-0 libsm6 libxdamage1 libxcb-render0 libgtk2.0-bin libglu1-mesa libxi6 libxcursor1 libxt6 libxv1 defoma libavahi-common3 libxcb-render-util0 libxrandr2 libgtk2.0-0 Для их удаления используйте 'apt-get autoremove'. НОВЫЕ пакеты, которые будут установлены: strace обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 3 пакетов не обновлено. Необходимо скачать 0B/140kB архивов. После данной операции, объём занятого дискового пространства возрастёт на 406kB. Выбор ранее не выбранного пакета strace. (Чтение базы данных ... на данный момент установлено 26096 файлов и каталогов.) Распаковывается пакет strace (из файла .../strace_4.5.20-2_amd64.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет strace (4.5.20-2) ... |
#vim /usr/local/bin/bucardo_ctl
--- /tmp/l3-saved-26940.8715.16374 2010-08-10 17:47:12.150670104 +0400 +++ /usr/local/bin/bucardo_ctl 2010-08-10 17:47:35.434663034 +0400 @@ -5212,7 +5212,7 @@ $SQL = qq{SELECT bucardo.db_getconn('$opt->{name}')}; my $conn = $dbh->selectall_arrayref($SQL)->[0][0]; my ($dsn,$user,$pass) = split /\n/ => $conn; - $dbh2 = DBI->connect_cached($dsn, $user, $pass, {AutoCommit=>0,RaiseError=>1,PrintError=>0}); + $dbh2 = DBI->connect_cached($dsn, $user, $pass, {AutoCommit=>0,RaiseError=>1,PrintError=>1}); } return $dbh2; |
#vim /usr/local/bin/bucardo_ctl
--- /tmp/l3-saved-26940.17087.11578 2010-08-10 17:47:43.086664729 +0400 +++ /usr/local/bin/bucardo_ctl 2010-08-10 17:48:06.350665309 +0400 @@ -5212,7 +5212,8 @@ $SQL = qq{SELECT bucardo.db_getconn('$opt->{name}')}; my $conn = $dbh->selectall_arrayref($SQL)->[0][0]; my ($dsn,$user,$pass) = split /\n/ => $conn; - $dbh2 = DBI->connect_cached($dsn, $user, $pass, {AutoCommit=>0,RaiseError=>1,PrintError=>1}); + print $dsn,$user,$pass; + $dbh2 = DBI->connect_cached($dsn, $user, $pass, {AutoCommit=>0,RaiseError=>1,PrintError=>0}); } return $dbh2; |
#bucardo_ctl add all tables
dbi:Pg:dbname=merkator;port=5432bucardoDBI connect('dbname=merkator;port=5432','bucardo',...) failed: FATAL: Ident authentication failed for user "bucardo" at /usr/local/bin/bucardo_ctl line 5216 |
#vim /usr/local/bin/bucardo_ctl
--- /tmp/l3-saved-26940.31242.10861 2010-08-10 17:48:32.278666506 +0400 +++ /usr/local/bin/bucardo_ctl 2010-08-10 17:49:20.806667756 +0400 @@ -5212,7 +5212,9 @@ $SQL = qq{SELECT bucardo.db_getconn('$opt->{name}')}; my $conn = $dbh->selectall_arrayref($SQL)->[0][0]; my ($dsn,$user,$pass) = split /\n/ => $conn; - print $dsn,$user,$pass; + print 'DSN: ',$dsn,"\n"; + print 'User: ',$user,"\n"; + print "Password: ',$pass,"\n"; $dbh2 = DBI->connect_cached($dsn, $user, $pass, {AutoCommit=>0,RaiseError=>1,PrintError=>0}); } |
#bucardo_ctl add all tables
Backslash found where operator expected at /usr/local/bin/bucardo_ctl line 5217, near ""Password: ',$pass,"\" (Missing operator before \?) String found where operator expected at /usr/local/bin/bucardo_ctl line 5230, near "my $setusage = "" (Might be a runaway multi-line "" string starting on line 5217) (Missing semicolon on previous line?) Bareword found where operator expected at /usr/local/bin/bucardo_ctl line 5230, near "$progname set" (Missing operator before set?) Backslash found where operator expected at /usr/local/bin/bucardo_ctl line 5230, near "]\" (Missing operator before \?) String found where operator expected at /usr/local/bin/bucardo_ctl line 5234, near "die "" (Might be a runaway multi-line "" string starting on line 5230) (Missing semicolon on previous line?) Bareword found where operator expected at /usr/local/bin/bucardo_ctl line 5234, near "$progname show" (Missing operator before show?) Backslash found where operator expected at /usr/local/bin/bucardo_ctl line 5234, near "]\" (Missing operator before \?) String found where operator expected at /usr/local/bin/bucardo_ctl line 5250, near "printf "" (Might be a runaway multi-line "" string starting on line 5234) (Missing semicolon on previous line?) syntax error at /usr/local/bin/bucardo_ctl line 5217, near ""Password: ',$pass,"\" BEGIN not safe after errors--compilation aborted at /usr/local/bin/bucardo_ctl line 5250. |
#vim /usr/local/bin/bucardo_ctl
--- /tmp/l3-saved-26940.25330.4423 2010-08-10 17:49:26.446664524 +0400 +++ /usr/local/bin/bucardo_ctl 2010-08-10 17:49:36.481668514 +0400 @@ -5214,7 +5214,7 @@ my ($dsn,$user,$pass) = split /\n/ => $conn; print 'DSN: ',$dsn,"\n"; print 'User: ',$user,"\n"; - print "Password: ',$pass,"\n"; + print 'Password: ',$pass,"\n"; $dbh2 = DBI->connect_cached($dsn, $user, $pass, {AutoCommit=>0,RaiseError=>1,PrintError=>0}); } |
#sub config {
DSN: dbi:Pg:dbname=merkator;port=5432 User: bucardo Password: DBI connect('dbname=merkator;port=5432','bucardo',...) failed: FATAL: Ident authentication failed for user "bucardo" at /usr/local/bin/bucardo_ctl line 5218 |
#vim /usr/local/bin/bucardo_ctl
--- /tmp/l3-saved-26940.28217.28807 2010-08-10 17:49:44.542663379 +0400 +++ /usr/local/bin/bucardo_ctl 2010-08-10 17:50:08.230663124 +0400 @@ -5212,9 +5212,7 @@ $SQL = qq{SELECT bucardo.db_getconn('$opt->{name}')}; my $conn = $dbh->selectall_arrayref($SQL)->[0][0]; my ($dsn,$user,$pass) = split /\n/ => $conn; - print 'DSN: ',$dsn,"\n"; - print 'User: ',$user,"\n"; - print 'Password: ',$pass,"\n"; + print 'DSN: ',$conn,"\n"; $dbh2 = DBI->connect_cached($dsn, $user, $pass, {AutoCommit=>0,RaiseError=>1,PrintError=>0}); } |
#vim /usr/local/bin/bucardo_ctl
--- /tmp/l3-saved-26940.25299.10430 2010-08-10 17:50:15.378664320 +0400 +++ /usr/local/bin/bucardo_ctl 2010-08-10 17:50:31.061675368 +0400 @@ -5212,7 +5212,7 @@ $SQL = qq{SELECT bucardo.db_getconn('$opt->{name}')}; my $conn = $dbh->selectall_arrayref($SQL)->[0][0]; my ($dsn,$user,$pass) = split /\n/ => $conn; - print 'DSN: ',$conn,"\n"; + print 'Connection setting ',$conn,"\n"; $dbh2 = DBI->connect_cached($dsn, $user, $pass, {AutoCommit=>0,RaiseError=>1,PrintError=>0}); } |
#bucardo_ctl add all tables
Connection setting dbi:Pg:dbname=merkator;port=5432 bucardo t DBI connect('dbname=merkator;port=5432','bucardo',...) failed: FATAL: Ident authentication failed for user "bucardo" at /usr/local/bin/bucardo_ctl line 5216 |
#vim /usr/local/bin/bucardo_ctl
|
#ENV{PATH} and $progname =~ m{(.+)/(.+)}) {
Connection setting dbi:Pg:dbname=merkator;port=5432 bucardo t DBI connect('dbname=merkator;port=5432','bucardo',...) failed: FATAL: Ident authentication failed for user "bucardo" at /usr/local/bin/bucardo_ctl line 5216 |
#bucardo_ctl
Usage: bucardo_ctl args install ** Install the Bucardo database start <reason> ** Force any existing sync(s) to quit, then starts Bucardo stop <reason> ** Tell all Bucardo processes to stop permanently list <type> [name] ** View information about dbs, dbgroups, herds, syncs, tables, or sequences add <type> <name> ** Add a db, dbgroup, herd, sync, table, or sequence remove <type> <name> ** Remove a db, dbgroup, herd, sync, table, or sequence For detailed help on the above, prefix with a help like this: bucardo_ctl help add db kick <syncname(s)> [timeout] ... validate syncname[s] ** Validate a sync upgrade ** Upgrade Bucardo to the current version message ** Write a message to the Bucardo logs config [set|show] ** View or set configuration parameters reload_config ** Force a running Bucardo to reload the bucardo_config table For more details, try 'man bucardo_ctl' |
#bucardo_ctl reload_config
Forcing Bucardo to reload the bucardo_config table |
> [pgqadm] > job_name = merkator-ticker > db = dbname=merkator > maint_delay = 600 > loop_delay = 0.1 > logfile = /var/log/skytools/%(job_name)s.log > pidfile = /var/run/skytools/%(job_name)s.pid > EOF
# PostgreSQL Client Authentication Configuration File # =================================================== # # Refer to the "Client Authentication" section in the # PostgreSQL documentation for a complete description # of this file. A short synopsis follows. # # This file controls: which hosts are allowed to connect, how clients # are authenticated, which PostgreSQL user names they can use, which # databases they can access. Records take one of these forms: # # local DATABASE USER METHOD [OPTIONS] # host DATABASE USER CIDR-ADDRESS METHOD [OPTIONS] # hostssl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS] # hostnossl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS] # # (The uppercase items must be replaced by actual values.) # # The first field is the connection type: "local" is a Unix-domain socket, # "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an # SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket. # # DATABASE can be "all", "sameuser", "samerole", a database name, or # a comma-separated list thereof. # # USER can be "all", a user name, a group name prefixed with "+", or # a comma-separated list thereof. In both the DATABASE and USER fields # you can also write a file name prefixed with "@" to include names from # a separate file. # # CIDR-ADDRESS specifies the set of hosts the record matches. # It is made up of an IP address and a CIDR mask that is an integer # (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies # the number of significant bits in the mask. Alternatively, you can write # an IP address and netmask in separate columns to specify the set of hosts. # # METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", "krb5", # "ident", "pam", "ldap" or "cert". Note that "password" sends passwords # in clear text; "md5" is preferred since it sends encrypted passwords. # # OPTIONS are a set of options for the authentication in the format # NAME=VALUE. The available options depend on the different authentication # methods - refer to the "Client Authentication" section in the documentation # for a list of which options are available for which authentication methods. # # Database and user names containing spaces, commas, quotes and other special # characters must be quoted. Quoting one of the keywords "all", "sameuser" or # "samerole" makes the name lose its special character, and just match a # database or username with that name. # # This file is read on server startup and when the postmaster receives # a SIGHUP signal. If you edit the file on a running system, you have # to SIGHUP the postmaster for the changes to take effect. You can use # "pg_ctl reload" to do that. # Put your actual configuration here # ---------------------------------- # # If you want to allow non-local connections, you need to add more # "host" records. In that case you will also need to make PostgreSQL listen # on a non-local interface via the listen_addresses configuration parameter, # or via the -i or -h command line switches. # # DO NOT DISABLE! # If you change this first entry you will need to make sure that the # database # super user can access the database using some other method. # Noninteractive # access to all databases is required during automatic maintenance # (custom daily cronjobs, replication, and similar tasks). # # Database administrative login by UNIX sockets local all postgres ident local all root ident # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all ident # IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 192.168.2.0/24 trust # IPv6 local connections: host all all ::1/128 md5
bin/ games/ include/ lib/ lib64/ local/ sbin/ share/ src/
Installation instructions for Bucardo. For a possibly more up to date and complete version, please visit: http://bucardo.org/wiki/Bucardo/Installation Before installing, please make sure you have the latest version. Please visit: http://bucardo.org/wiki/Bucardo/downloads It is recommended that you create a 'bucardo' user on your system that will be responsible for running Bucardo. Install Bucardo like any other Perl module: perl Makefile.PL make make test make install The last step must be done as root. You may be able to do this by running: sudo make install Note that 'make test' is a rather long and involved process. However, because Bucardo is fairly complex, testing is highly recommended before installing. Once the above has been run, you will need to create a Bucardo database. This can be done by running: bucardo_ctl install There should be no errors: if there are, please report them to bucardo-general@bucardo.org or ask on IRC for help. IRC: #bucardo irc.freenode.net Bucardo by default logs to syslog, and does so very verbosely. It is recommended that you reroute your bucardo syslog traffic to another file. This can be done by adding this line to your /etc/syslog.conf file: local1.* -/var/log/bucardo.log Of course, if "local1" is already being used for something else, you will need to change it - see the "syslog_facility" entry in the bucardo_config table. Once this is done, make sure you restart your syslog daemon so it rereads the new configuration file. Please see the documentation at http://bucardo.org for information on how to start using Bucardo once it is installed.
Время первой команды журнала | 18:13:25 2010- 8- 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:52:37 2010- 8-10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 34.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.88 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.58 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008