Oi, sou novo em linux e estou usando o Kubuntu 7.04 feisty, instalei o postgresql 8.2.4 através dos comandos:
#./configure --without-readline
#make
#sudo make install
depois segui as instruções do arquivo install:
#adduser postgres
#mkdir /usr/local/pgsql/data
#chown postgres /usr/local/pgsql/data
#su - postgres
#/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
#/usr/local/pgsql/bin/postgres -D #/usr/local/pgsql/data >logfile 2>&1 &
#/usr/local/pgsql/bin/createdb test
#/usr/local/pgsql/bin/psql test
blz, funcionou, instalei um programa chamado linuxstok por um script que encontrei na net, configurei de acordo com as instruções do site.
#sudo su
#su
#su postgres
#postgres@linuxstok:~$ /usr/local/pgsql/bin/createdb linuxstok
#postgres@linuxstok:~$ /usr/local/pgsql/bin/psql -d linuxstok -f /usr/local/linuxstok/DBDriver/cria.pgsql
#postgres@linuxstok:~$ /usr/local/pgsql/bin/psql linuxstok -c "CREATE USER maria WITH PASSWORD '123456';"
#postgres@linuxstok:~$ /usr/local/pgsql/bin/psql -q -t -A -n -d linuxstok -c "SELECT 'GRANT ALL ON '||tablename||' TO maria;' FROM pg_tables;" | psql linuxstok
#postgres@linuxstok:~$ /usr/local/pgsql/bin/psql -q -t -A -n -d linuxstok -c "SELECT 'GRANT ALL ON '||relname||' TO maria;' FROM pg_class WHERE relkind='S';" | psql linuxstok
a parte:
#~$ /usr/local/pgsql/bin/
de todas as linhas eu tive que incluir pq o comando não estava executando e tive que alterar as duas ultimas linhas retirando o final depois das aspas e antes do pipe " | psql linuxstok" senão não executava. Alterei os arquivos:
#~$: /usr/local/pgsql/data/pg_hba.conf
e acrescentei a linha:
#host linuxstok maria 192.168.1.9/24 md5
no
#~$: /usr/local/pgsql/data/postgresql.conf
mudei a linha:
#listen_addresses = 'localhost'
para
listen_addresses = '*'
e não consegui reiniciar o programa conforme solicitado, segui em frente e apaguei as informações anteriores com:
#~$: rm /usr/local/linuxstok/DBDriver/.config.db
agora tenho dois problemas que não estou conseguindo resolver, o primeiro e que mesmo tendo mudado as permissões do banco de dados linuxstok qdo tento abrir o programa aparece a msg "permissão negada" para todas as tabelas, o segundo e que depois que reiniciei a máquina qdo tento entrar no programa aparece a msg "Nao foi possivel conectar ao servidor PostgreSQL". Tentei inicializar o postgresql com os comandos:
#su - postgres
#Password
#postgres@linuxstok:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
retorna:
#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 pt_BR.UTF-8.
#The default database encoding has accordingly been set to UTF8.
#initdb: directory "/usr/local/pgsql/data" exists but is not empty
#If you want to create a new database system, either remove or empty
the directory "/usr/local/pgsql/data" or run initdb
with an argument other than "/usr/local/pgsql/data".
#/usr/local/pgsql/bin/postgres -D
ja tentei alguns comandos que encontrei na net, mas até agora não consegui nada.
~$: /etc/init.d/postgresql start
~$: /etc/init.d/pgql start
já deixo meus agradecimentos a todos, principalmente aos que podem me ajudar.
Gentoo binário em 2026: UEFI, LUKS, Btrfs e Systemd
Trabalhando Nativamente com Logs no Linux
Jogando Daikatana (Steam) com Patch 1.3 via Luxtorpeda no Linux
LazyDocker – Interface de Usuário em Tempo Real para o Docker
Instalando fontes via script no Nautilus Scripts no Gnome do Debian 13
Substituindo o NetworkManager pelo iwd (e iwgtk)
Instalar Linux em notebook Sony Vaio VPCEG13EB (2)
GLPI Não atualiza Inventario (0)









