Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo apt-get install postgresql
- sudo apt-get install pgadmin3
- sudo apt-get install phppgadmin
- gksudo gedit /etc/postgresql/9.1/main/postgresql.conf
- listen_addresses = 'localhost'
- gksuso gedit /etc/postgresql/9.1/main/pg_hba.conf
- local all all md5
- gksudo gedit /etc/apache2/apache2.conf
- Include /etc/phppgadmin/apache.conf
- sudo /etc/init.d/apache2 restart
- sudo /etc/init.d/postgresql restart
- <?php
- $dirname = getcwd();
- $dir = opendir($dirname);
- while($file = readdir($dir)) {
- if($file != '.' && $file != '..' && !is_dir($dirname.$file)) {
- echo '- <a href="'.$file.'">'.$file.'</a>'.'<br /><br />';
- }
- }
- closedir($dir);
- ?>
- sudo -u postgres psql template1
- ALTER USER postgres with encrypted password 'password';
- \q
- sudo -u postgres createuser -d -R -P username
- sudo -u postgres createdb -O username database_name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement