Execute os procedimentos abaixo para habilitar SSL no seu servidor PostgreSQL.
- Crie um diretório para armazenar as configurações (opcional)
mkdir certificados
cd certificados| -- tested in PostgreSQL 8.4.4 | |
| DROP VIEW IF EXISTS vw_all_table_locks CASCADE; | |
| CREATE VIEW vw_all_table_locks AS | |
| SELECT | |
| pg_namespace.nspname as schemaname, | |
| pg_class.relname as tablename, | |
| pg_locks.mode as lock_type, | |
| age(now(),pg_stat_activity.query_start) AS time_running | |
| FROM pg_class | |
| JOIN pg_locks on pg_locks.relation = pg_class.oid |
| dropdb -U postgres -d lab3 |
| /var/log/pgsql/pgsql.log { | |
| missingok | |
| rotate 7 | |
| nomail | |
| sharedscripts | |
| daily | |
| dateext | |
| create 0660 root root | |
| postrotate |
| [Unit] | |
| Description=WildFly Domain Controller | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| User=jboss | |
| Group=jboss | |
| ExecStart=/opt/wildfly-8.2.0.Final/bin/domain.sh -bmanagement=0.0.0.0 |
| -- Tested on PostgreSQL 9.4 | |
| -- More details on http://www.postgresql.org/docs/9.4/static/functions-info.html | |
| -- and http://www.postgresql.org/docs/9.4/static/view-pg-tables.html | |
| -- and http://www.postgresql.org/docs/9.4/static/view-pg-roles.html | |
| SELECT | |
| schemaname, | |
| tablename, | |
| rolname, | |
| has_table_privilege(rolname, tablename, 'SELECT') as can_select, |
| SELECT | |
| 'ALTER TABLE ' || | |
| schema.nspname || '.' || class.relname | |
| || ' DROP CONSTRAINT IF EXISTS ' || | |
| cons.conname || ';' | |
| FROM pg_constraint AS cons | |
| JOIN pg_class AS class on class.oid = cons.conrelid | |
| JOIN pg_namespace AS schema on schema.oid = cons.connamespace | |
| WHERE schema.nspname = 'schema' | |
| AND class.relname = 'tabela'; |
| [Unit] | |
| Description=RHQ Storage Node | |
| After=network.target | |
| PartOf=rhq-server.service | |
| [Service] | |
| Type=forking | |
| ExecStart=/opt/rhq-server-4.13.1/bin/rhqctl start --storage |
| [Unit] | |
| Description=RHQ Server | |
| Requires=rhq-storage.service | |
| After=rhq-storage.service | |
| [Service] | |
| Type=forking | |
| PIDFile=/opt/rhq-server-4.13.1/bin/internal/rhq-server.pid |
| [Unit] | |
| Description=RHQ Agent | |
| After=network.target | |
| [Service] | |
| Type=forking | |
| PIDFile=/opt/rhq-agent/bin/rhq-agent.pid | |
| ExecStart=/opt/rhq-server-4.13.1/bin/rhqctl start --agent |