https://wiki.archlinux.org/api.php?action=feedcontributions&user=The+Nerd&feedformat=atomArchWiki - User contributions [en]2024-03-29T05:16:45ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Drupal&diff=19206Drupal2006-12-21T19:09:25Z<p>The Nerd: </p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
[[Category:WebServer]]<br />
<br />
<br />
===Drupal===<br />
<br />
This document describes how to set up Drupal (5.0-rc1) with Apache, MySQL or PostgreSQL, PHP, and Postfix! This document assumes that you have some sort of LAMP(Apache, MySQL, PHP) or LAPP(Apache, PostgreSQL, PHP) server already setup.<br />
<br><br />
===Installing GD===<br />
----<br />
Drupal likes to have the GD image library installed so lets take care of that first.<br />
#Install the package<br><pre> pacman -Sy gd</pre><br />
#Open the file '''<code>/etc/php.ini</code>''' with your editor of choice<pre>eg. nano /etc/php.ini</pre><br />
#Find the line that starts with, ";extension=gd.so" and change it to, "extension=gd.so". (Just remove the preceding ";"). If this line is not present, add it. This line may be in the "Dynamic Extensions" section of the file, or toward the very end of the file.<br />
#Restart the Apache web server<pre>/etc/rc.d/httpd restart</pre><br />
<br />
<br />
===Install Postfix===<br />
----<br />
Postfix is necessary for sending e-mails from drupal. These are useful for account varification, password recovery, etc.<br />
#Install Postfix<pre> pacman -Sy postfix </pre><br />
#Configure Postfix as needed <pre> nano /etc/postfix/main.cf </pre> All that you should have to do is change the hostnames under "Internet Host and Domain Names" <pre> hostname = hostname1 </pre><pre> hostname = hostname2</pre><br />
#Send a test e-mail to yourself <pre> mail myusername@localhost </pre> (Enter a subject, some words in the body, then press ctrl+d to exit and send the letter) Wait 10 seconds, and then type <code> mail </code> to check your mail. If you've gotten it, excellent.<br />
#Make sure Port 25 is fowarded if you have a router so that mails can be sent to the internet at large<br />
<br />
===Configure Postfix===<br />
----<br />
#Open the file '''<code>/etc/php.ini</code>''' with your editor of choice<pre>eg. nano /etc/php.ini</pre><br />
#Find the line that starts with, '''<code>;sendmail_path="" </code>''' and change it to, '''<code> sendmail_path="/usr/sbin/sendmail -t -i" </code>'''<br />
#Restart the Apache web server<pre>/etc/rc.d/httpd restart</pre><br />
<br />
===Install and Setup Drupal===<br />
----<br />
As of the latest 5.0 release, Drupal has a new install system. <br />
<br />
#Download the latest package from http://drupal.org and extract it.<br />
#Move the folders to your '''<code> /home/httpd/html/ </code>''' folder.<br />
#Open a web browser, and navigate to "localhost"<br />
#Follow the instructions on the pages, and drupal should set iself up and bring you to the login!<br />
<br />
===Extras===<br />
Drupal asks you to run cron jobs hourly. While I haven't looked into them to see what they do, it is possible to run the job manually via the administrator panel. If you feel so inclined, copy the proper script from the "scripts" folder into "/etc/cron.hourly" and make it executable.</div>The Nerdhttps://wiki.archlinux.org/index.php?title=Drupal&diff=19205Drupal2006-12-21T19:02:38Z<p>The Nerd: </p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
[[Category:WebServer]]<br />
<br />
<br />
===Drupal===<br />
<br />
This document describes how to set up Drupal (5.0-rc1) with Apache, MySQL or PostgreSQL, PHP, and Postfix! This document assumes that you have some sort of LAMP(Apache, MySQL, PHP) or LAPP(Apache, PostgreSQL, PHP) server already setup.<br />
<br><br />
===Installing GD===<br />
----<br />
Drupal likes to have the GD image library installed so lets take care of that first.<br />
#Install the package<br><pre> pacman -Sy gd</pre><br />
#Open the file '''<code>/etc/php.ini</code>''' with your editor of choice<pre>eg. nano /etc/php.ini</pre><br />
#Find the line that starts with, ";extension=gd.so" and change it to, "extension=gd.so". (Just remove the preceding ";"). If this line is not present, add it. This line may be in the "Dynamic Extensions" section of the file, or toward the very end of the file.<br />
#Restart the Apache web server<pre>/etc/rc.d/httpd restart</pre><br />
<br />
<br />
===Install Postfix===<br />
----<br />
Postfix is necessary for sending e-mails from drupal. These are useful for account varification, password recovery, etc.<br />
#Install Postfix<pre> pacman -Sy postfix </pre><br />
#Configure Postfix as needed <pre> nano /etc/postfix/main.cf </pre> All that you should have to do is change the hostnames under "Internet Host and Domain Names" <pre> hostname = hostname1 </pre><pre> hostname = hostname2</pre><br />
#Send a test e-mail to yourself <pre> mail myusername@localhost </pre> (Enter a subject, some words in the body, then press ctrl+d to exit and send the letter) Wait 10 seconds, and then type <code> mail </code> to check your mail. If you've gotten it, excellent.<br />
#Make sure Port 25 is fowarded if you have a router so that mails can be sent to the internet at large<br />
<br />
===Configure Postfix===<br />
----<br />
#Open the file '''<code>/etc/php.ini</code>''' with your editor of choice<pre>eg. nano /etc/php.ini</pre><br />
#Find the line that starts with, '''<code>;sendmail_path="" </code>''' and change it to, '''<code> sendmail_path="/usr/sbin/sendmail -t -i" </code>'''<br />
#Restart the Apache web server<pre>/etc/rc.d/httpd restart</pre></div>The Nerdhttps://wiki.archlinux.org/index.php?title=PostgreSQL&diff=19204PostgreSQL2006-12-21T18:31:43Z<p>The Nerd: /* Creating Your First Database! */</p>
<hr />
<div>[[Category:WebServer]]<br />
<br />
This document describes how to set up PostgreSQL and integrate it with PHP and Apache. It also describes how to configure PostgreSQL to be accessible from a remote client. PHP and Apache are assumed to be already be set up. If you need help setting up either of those two, see the [[LAMP]] page and follow all of the sections except the one related to MySQL.<br />
<br />
===Installing PostgreSQL===<br />
----<br />
#Install the package<br><pre> pacman -Sy postgresql</pre><br />
#Make sure that locales are generated and properly set! '''Note: This is likely not required for newer installs but should be noted for those installing from older cd's.''' <pre> sudo nano /etc/locale.gen </pre> <pre> sudo locale-gen </pre><br />
#Setup and start the PostgreSQL server (the first time that this is run it will create the data directory and users needed to run the server. As such you will see a lot of output. <pre>/etc/rc.d/postgresql start</pre><br />
#Add postgresql to the list of daemons that start on system startup in the /etc/rc.conf file<br><br><br />
<br />
===Configure PostgreSQL to be accessible from remote===<br />
----<br />
The PostgreSQL database server configuration file is <code>postgresql.conf</code>. This file is located in the data directory of the server, typically <code>/var/lib/postgres/data</code>.<br />
#As root user edit the file<br><pre># vi /var/lib/postgres/postgresql.conf</pre><br />
#In the connections and authentications section uncomment or edit the <code>listen_addresses</code> line to your needs<br><pre>listen_addresses = '*'</pre>and take a careful look at the other lines.<br />
#Hereafter insert the following line in the host-based authentication file <code>/var/lib/postgres/pg_hba.conf</code>. This file controls which hosts are allowed to connect, '''so be careful'''.<br><pre># IPv4 local connections:</pre><pre>host all all your_desired_ip_address/32 trust</pre>whereas <code>your_desired_ip_address</code> is the ip address of the client.<br />
#After this you should restart the postmaster for the changes to take effect with<br><pre>/etc/rc.d/postgresql restart</pre><br />
#Please consider that the port 5432 should be open, so take a look at the following files<br><code>/etc/services</code><br><code>/etc/hosts</code><br><code>/etc/hosts.allow</code><br />
#For troubleshooting take a look in the server log file<br><pre>tail /var/log/postgresql.log</pre><br />
<br><br />
===Configure PostgreSQL to Work With PHP===<br />
----<br />
#Open the file '''<code>/etc/php.ini</code>''' with your editor of choice<pre>eg. nano /etc/php.ini</pre><br />
#Find the line that starts with, ";extension=pgsql.so" and change it to, "extension=pgsql.so". (Just remove the preceding ";"). If this line is not present, add it. This line may be in the "Dynamic Extensions" section of the file, or toward the very end of the file.<br />
#Restart the Apache web server<pre>/etc/rc.d/httpd restart</pre><br />
<br />
===Creating Your First Database!===<br />
----<br />
#Become the postgres user (This user was created when "/etc/rc.d/postgres start" was run)<pre> su - postgres </pre><br />
#Add a new database user<pre> createuser -DRSP username </pre><br />
#Create a new database over which that user has read/write privlages<pre> createdb -O username databasename </pre><br />
#That's It! Your database has been created.<br />
<br />
===Installing phpPgAdmin (optional)===<br />
----<br />
[http://phppgadmin.sourceforge.net phpPgAdmin] is a web-based administration tool for PostgreSQL. It can be installed two ways.<br />
<br />
====Option A: install via the AUR package (preferred)====<br />
phpPgAdmin is now [http://aur.archlinux.org/packages.php?do_Details=1&ID=921&O=0&L=0&C=0&K=phppgadmin&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd in the AUR]! <br />
<br />
See [http://wiki.archlinux.org/index.php/New_AUR_user_guidelines#How_to_use_the_AUR these intsructions] to learn how to use packages from the AUR.<br />
<br />
====Option B: install vai a manual install (the old way)====<br />
#Download the latest .bz2 file from [http://phppgadmin.sourceforge.net/?page=download here] into the root of your server directory <pre>wget -P /home/httpd/html<nowiki> http://voxel.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-3.5.4.tar.bz2</nowiki></pre><br />
#Extract the file into the new directory<pre>tar -C /home/httpd/html/ -jxvf /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Remove the tar file<pre>rm /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Change the name of the directory created in the previous step to include the version number (this will help in the future when upgrading)<pre>mv /home/httpd/html/phpPgAdmin /home/httpd/html/phpPgAdmin-3.5.4/</pre><br />
#Create a link to that directory (for ease of linking and upgrading)<pre>ln -s /home/httpd/html/phpPgAdmin-3.5.4/ /home/httpd/html/phpPgAdmin</pre><br />
#Copy the included generic config file<pre>cp /home/httpd/html/phpPgAdmin/conf/config.inc.php-dist /home/httpd/html/phpPgAdmin/conf/config.inc.php</pre><br />
<br />
<br />
The config file is located at '''/home/httpd/html/phpPgAdmin/conf/config.inc.php'''. No changes should be required. Check [http://phppgadmin.sourceforge.net/?page=faq this page] for any other setup questions that you might have.<br />
<br />
===Upgrading Postgresql (optional and dangerous)===<br />
----<br />
#First thing: these instructions could cause data loss. '''Use at your own risk'''. They work for me, but things change and nothing is guaranteed.<br />
#I would highly suggest adding the line<br><pre>IgnorePkg = postgresql</pre>to /etc/pacman.conf. This will make sure that you don't accidentally upgrade the database to an incompatable version. If you did an accidental upgrade you might not be able to access any of your data. Always check the Postgresql home page (http://www.postgresql.org/) to be sure of what steps are required for each upgrade. For a bit about why this is the case see [http://www.postgresql.org/docs/faqs.FAQ.html#item3.6 this].<br />
#How to dump all of your data, upgrade PostgreSQL, and then restore all of your data (this may not be necessary for every upgrade, see #2 above)<br />
##Become the '''root''' user<pre>su</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to one that the '''postgres''' user can write to<pre>eg. cd ~/data/</pre><br />
##Dump the current contents of the database<pre>pg_dumpall > pgs_db.out</pre>Unless you have a [http://www.postgresql.org/docs/8.1/static/libpq-pgpass.html .pgpass] file setup, you will be required to enter your password a few times (the number of times is roughly equal to the number of databases that you have + 2).<br />
##Log out of the '''postgres''' user and return to '''superuser'''<pre>exit</pre><br />
##Stop the PostgreSQL server<pre>/etc/rc.d/postresql stop</pre><br />
##Move Postgresql's data directory<pre>mv /var/lib/postgres /var/lib/postgres_old</pre><br />
##Upgrade postgresql<pre>pacman -Sy postgresql</pre><br />
##Start the PostgreSQL server (this will create all needed files and directories)<pre>/etc/rc.d/postgresql start</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to the directory that you dumped the data out to (in step 4 above)<pre>eg. cd /var/lib/postgres_old/data/</pre><br />
##Restore the database<pre>psql -e template1 -f pgs_db.out</pre></div>The Nerdhttps://wiki.archlinux.org/index.php?title=PostgreSQL&diff=19203PostgreSQL2006-12-21T18:29:20Z<p>The Nerd: /* Creating Your First Database! */</p>
<hr />
<div>[[Category:WebServer]]<br />
<br />
This document describes how to set up PostgreSQL and integrate it with PHP and Apache. It also describes how to configure PostgreSQL to be accessible from a remote client. PHP and Apache are assumed to be already be set up. If you need help setting up either of those two, see the [[LAMP]] page and follow all of the sections except the one related to MySQL.<br />
<br />
===Installing PostgreSQL===<br />
----<br />
#Install the package<br><pre> pacman -Sy postgresql</pre><br />
#Make sure that locales are generated and properly set! '''Note: This is likely not required for newer installs but should be noted for those installing from older cd's.''' <pre> sudo nano /etc/locale.gen </pre> <pre> sudo locale-gen </pre><br />
#Setup and start the PostgreSQL server (the first time that this is run it will create the data directory and users needed to run the server. As such you will see a lot of output. <pre>/etc/rc.d/postgresql start</pre><br />
#Add postgresql to the list of daemons that start on system startup in the /etc/rc.conf file<br><br><br />
<br />
===Configure PostgreSQL to be accessible from remote===<br />
----<br />
The PostgreSQL database server configuration file is <code>postgresql.conf</code>. This file is located in the data directory of the server, typically <code>/var/lib/postgres/data</code>.<br />
#As root user edit the file<br><pre># vi /var/lib/postgres/postgresql.conf</pre><br />
#In the connections and authentications section uncomment or edit the <code>listen_addresses</code> line to your needs<br><pre>listen_addresses = '*'</pre>and take a careful look at the other lines.<br />
#Hereafter insert the following line in the host-based authentication file <code>/var/lib/postgres/pg_hba.conf</code>. This file controls which hosts are allowed to connect, '''so be careful'''.<br><pre># IPv4 local connections:</pre><pre>host all all your_desired_ip_address/32 trust</pre>whereas <code>your_desired_ip_address</code> is the ip address of the client.<br />
#After this you should restart the postmaster for the changes to take effect with<br><pre>/etc/rc.d/postgresql restart</pre><br />
#Please consider that the port 5432 should be open, so take a look at the following files<br><code>/etc/services</code><br><code>/etc/hosts</code><br><code>/etc/hosts.allow</code><br />
#For troubleshooting take a look in the server log file<br><pre>tail /var/log/postgresql.log</pre><br />
<br><br />
===Configure PostgreSQL to Work With PHP===<br />
----<br />
#Open the file '''<code>/etc/php.ini</code>''' with your editor of choice<pre>eg. nano /etc/php.ini</pre><br />
#Find the line that starts with, ";extension=pgsql.so" and change it to, "extension=pgsql.so". (Just remove the preceding ";"). If this line is not present, add it. This line may be in the "Dynamic Extensions" section of the file, or toward the very end of the file.<br />
#Restart the Apache web server<pre>/etc/rc.d/httpd restart</pre><br />
<br />
===Creating Your First Database!===<br />
----<br />
#Become the postgres user (This user was created when "/etc/rc.d/postgres start" was run)<br />
<pre> su - postgres </pre><br />
#Add a new database user<br />
<pre> createuser -DRSP username </pre><br />
#Create a new database over which that user has read/write privlages<br />
<pre> createdb -O username databasename </pre><br />
#That's It! Your database has been created.<br />
<br />
===Installing phpPgAdmin (optional)===<br />
----<br />
[http://phppgadmin.sourceforge.net phpPgAdmin] is a web-based administration tool for PostgreSQL. It can be installed two ways.<br />
<br />
====Option A: install via the AUR package (preferred)====<br />
phpPgAdmin is now [http://aur.archlinux.org/packages.php?do_Details=1&ID=921&O=0&L=0&C=0&K=phppgadmin&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd in the AUR]! <br />
<br />
See [http://wiki.archlinux.org/index.php/New_AUR_user_guidelines#How_to_use_the_AUR these intsructions] to learn how to use packages from the AUR.<br />
<br />
====Option B: install vai a manual install (the old way)====<br />
#Download the latest .bz2 file from [http://phppgadmin.sourceforge.net/?page=download here] into the root of your server directory <pre>wget -P /home/httpd/html<nowiki> http://voxel.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-3.5.4.tar.bz2</nowiki></pre><br />
#Extract the file into the new directory<pre>tar -C /home/httpd/html/ -jxvf /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Remove the tar file<pre>rm /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Change the name of the directory created in the previous step to include the version number (this will help in the future when upgrading)<pre>mv /home/httpd/html/phpPgAdmin /home/httpd/html/phpPgAdmin-3.5.4/</pre><br />
#Create a link to that directory (for ease of linking and upgrading)<pre>ln -s /home/httpd/html/phpPgAdmin-3.5.4/ /home/httpd/html/phpPgAdmin</pre><br />
#Copy the included generic config file<pre>cp /home/httpd/html/phpPgAdmin/conf/config.inc.php-dist /home/httpd/html/phpPgAdmin/conf/config.inc.php</pre><br />
<br />
<br />
The config file is located at '''/home/httpd/html/phpPgAdmin/conf/config.inc.php'''. No changes should be required. Check [http://phppgadmin.sourceforge.net/?page=faq this page] for any other setup questions that you might have.<br />
<br />
===Upgrading Postgresql (optional and dangerous)===<br />
----<br />
#First thing: these instructions could cause data loss. '''Use at your own risk'''. They work for me, but things change and nothing is guaranteed.<br />
#I would highly suggest adding the line<br><pre>IgnorePkg = postgresql</pre>to /etc/pacman.conf. This will make sure that you don't accidentally upgrade the database to an incompatable version. If you did an accidental upgrade you might not be able to access any of your data. Always check the Postgresql home page (http://www.postgresql.org/) to be sure of what steps are required for each upgrade. For a bit about why this is the case see [http://www.postgresql.org/docs/faqs.FAQ.html#item3.6 this].<br />
#How to dump all of your data, upgrade PostgreSQL, and then restore all of your data (this may not be necessary for every upgrade, see #2 above)<br />
##Become the '''root''' user<pre>su</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to one that the '''postgres''' user can write to<pre>eg. cd ~/data/</pre><br />
##Dump the current contents of the database<pre>pg_dumpall > pgs_db.out</pre>Unless you have a [http://www.postgresql.org/docs/8.1/static/libpq-pgpass.html .pgpass] file setup, you will be required to enter your password a few times (the number of times is roughly equal to the number of databases that you have + 2).<br />
##Log out of the '''postgres''' user and return to '''superuser'''<pre>exit</pre><br />
##Stop the PostgreSQL server<pre>/etc/rc.d/postresql stop</pre><br />
##Move Postgresql's data directory<pre>mv /var/lib/postgres /var/lib/postgres_old</pre><br />
##Upgrade postgresql<pre>pacman -Sy postgresql</pre><br />
##Start the PostgreSQL server (this will create all needed files and directories)<pre>/etc/rc.d/postgresql start</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to the directory that you dumped the data out to (in step 4 above)<pre>eg. cd /var/lib/postgres_old/data/</pre><br />
##Restore the database<pre>psql -e template1 -f pgs_db.out</pre></div>The Nerdhttps://wiki.archlinux.org/index.php?title=PostgreSQL&diff=19202PostgreSQL2006-12-21T18:28:50Z<p>The Nerd: /* Creating Your First Database! */</p>
<hr />
<div>[[Category:WebServer]]<br />
<br />
This document describes how to set up PostgreSQL and integrate it with PHP and Apache. It also describes how to configure PostgreSQL to be accessible from a remote client. PHP and Apache are assumed to be already be set up. If you need help setting up either of those two, see the [[LAMP]] page and follow all of the sections except the one related to MySQL.<br />
<br />
===Installing PostgreSQL===<br />
----<br />
#Install the package<br><pre> pacman -Sy postgresql</pre><br />
#Make sure that locales are generated and properly set! '''Note: This is likely not required for newer installs but should be noted for those installing from older cd's.''' <pre> sudo nano /etc/locale.gen </pre> <pre> sudo locale-gen </pre><br />
#Setup and start the PostgreSQL server (the first time that this is run it will create the data directory and users needed to run the server. As such you will see a lot of output. <pre>/etc/rc.d/postgresql start</pre><br />
#Add postgresql to the list of daemons that start on system startup in the /etc/rc.conf file<br><br><br />
<br />
===Configure PostgreSQL to be accessible from remote===<br />
----<br />
The PostgreSQL database server configuration file is <code>postgresql.conf</code>. This file is located in the data directory of the server, typically <code>/var/lib/postgres/data</code>.<br />
#As root user edit the file<br><pre># vi /var/lib/postgres/postgresql.conf</pre><br />
#In the connections and authentications section uncomment or edit the <code>listen_addresses</code> line to your needs<br><pre>listen_addresses = '*'</pre>and take a careful look at the other lines.<br />
#Hereafter insert the following line in the host-based authentication file <code>/var/lib/postgres/pg_hba.conf</code>. This file controls which hosts are allowed to connect, '''so be careful'''.<br><pre># IPv4 local connections:</pre><pre>host all all your_desired_ip_address/32 trust</pre>whereas <code>your_desired_ip_address</code> is the ip address of the client.<br />
#After this you should restart the postmaster for the changes to take effect with<br><pre>/etc/rc.d/postgresql restart</pre><br />
#Please consider that the port 5432 should be open, so take a look at the following files<br><code>/etc/services</code><br><code>/etc/hosts</code><br><code>/etc/hosts.allow</code><br />
#For troubleshooting take a look in the server log file<br><pre>tail /var/log/postgresql.log</pre><br />
<br><br />
===Configure PostgreSQL to Work With PHP===<br />
----<br />
#Open the file '''<code>/etc/php.ini</code>''' with your editor of choice<pre>eg. nano /etc/php.ini</pre><br />
#Find the line that starts with, ";extension=pgsql.so" and change it to, "extension=pgsql.so". (Just remove the preceding ";"). If this line is not present, add it. This line may be in the "Dynamic Extensions" section of the file, or toward the very end of the file.<br />
#Restart the Apache web server<pre>/etc/rc.d/httpd restart</pre><br />
<br />
===Creating Your First Database!===<br />
#Become the postgres user (This user was created when "/etc/rc.d/postgres start" was run)<br />
<pre> su - postgres </pre><br />
#Add a new database user<br />
<pre> createuser -DRSP username </pre><br />
#Create a new database over which that user has read/write privlages<br />
<pre> createdb -O username databasename </pre><br />
#That's It! Your database has been created.<br />
<br />
===Installing phpPgAdmin (optional)===<br />
----<br />
[http://phppgadmin.sourceforge.net phpPgAdmin] is a web-based administration tool for PostgreSQL. It can be installed two ways.<br />
<br />
====Option A: install via the AUR package (preferred)====<br />
phpPgAdmin is now [http://aur.archlinux.org/packages.php?do_Details=1&ID=921&O=0&L=0&C=0&K=phppgadmin&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd in the AUR]! <br />
<br />
See [http://wiki.archlinux.org/index.php/New_AUR_user_guidelines#How_to_use_the_AUR these intsructions] to learn how to use packages from the AUR.<br />
<br />
====Option B: install vai a manual install (the old way)====<br />
#Download the latest .bz2 file from [http://phppgadmin.sourceforge.net/?page=download here] into the root of your server directory <pre>wget -P /home/httpd/html<nowiki> http://voxel.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-3.5.4.tar.bz2</nowiki></pre><br />
#Extract the file into the new directory<pre>tar -C /home/httpd/html/ -jxvf /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Remove the tar file<pre>rm /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Change the name of the directory created in the previous step to include the version number (this will help in the future when upgrading)<pre>mv /home/httpd/html/phpPgAdmin /home/httpd/html/phpPgAdmin-3.5.4/</pre><br />
#Create a link to that directory (for ease of linking and upgrading)<pre>ln -s /home/httpd/html/phpPgAdmin-3.5.4/ /home/httpd/html/phpPgAdmin</pre><br />
#Copy the included generic config file<pre>cp /home/httpd/html/phpPgAdmin/conf/config.inc.php-dist /home/httpd/html/phpPgAdmin/conf/config.inc.php</pre><br />
<br />
<br />
The config file is located at '''/home/httpd/html/phpPgAdmin/conf/config.inc.php'''. No changes should be required. Check [http://phppgadmin.sourceforge.net/?page=faq this page] for any other setup questions that you might have.<br />
<br />
===Upgrading Postgresql (optional and dangerous)===<br />
----<br />
#First thing: these instructions could cause data loss. '''Use at your own risk'''. They work for me, but things change and nothing is guaranteed.<br />
#I would highly suggest adding the line<br><pre>IgnorePkg = postgresql</pre>to /etc/pacman.conf. This will make sure that you don't accidentally upgrade the database to an incompatable version. If you did an accidental upgrade you might not be able to access any of your data. Always check the Postgresql home page (http://www.postgresql.org/) to be sure of what steps are required for each upgrade. For a bit about why this is the case see [http://www.postgresql.org/docs/faqs.FAQ.html#item3.6 this].<br />
#How to dump all of your data, upgrade PostgreSQL, and then restore all of your data (this may not be necessary for every upgrade, see #2 above)<br />
##Become the '''root''' user<pre>su</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to one that the '''postgres''' user can write to<pre>eg. cd ~/data/</pre><br />
##Dump the current contents of the database<pre>pg_dumpall > pgs_db.out</pre>Unless you have a [http://www.postgresql.org/docs/8.1/static/libpq-pgpass.html .pgpass] file setup, you will be required to enter your password a few times (the number of times is roughly equal to the number of databases that you have + 2).<br />
##Log out of the '''postgres''' user and return to '''superuser'''<pre>exit</pre><br />
##Stop the PostgreSQL server<pre>/etc/rc.d/postresql stop</pre><br />
##Move Postgresql's data directory<pre>mv /var/lib/postgres /var/lib/postgres_old</pre><br />
##Upgrade postgresql<pre>pacman -Sy postgresql</pre><br />
##Start the PostgreSQL server (this will create all needed files and directories)<pre>/etc/rc.d/postgresql start</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to the directory that you dumped the data out to (in step 4 above)<pre>eg. cd /var/lib/postgres_old/data/</pre><br />
##Restore the database<pre>psql -e template1 -f pgs_db.out</pre></div>The Nerdhttps://wiki.archlinux.org/index.php?title=PostgreSQL&diff=19201PostgreSQL2006-12-21T18:25:32Z<p>The Nerd: </p>
<hr />
<div>[[Category:WebServer]]<br />
<br />
This document describes how to set up PostgreSQL and integrate it with PHP and Apache. It also describes how to configure PostgreSQL to be accessible from a remote client. PHP and Apache are assumed to be already be set up. If you need help setting up either of those two, see the [[LAMP]] page and follow all of the sections except the one related to MySQL.<br />
<br />
===Installing PostgreSQL===<br />
----<br />
#Install the package<br><pre> pacman -Sy postgresql</pre><br />
#Make sure that locales are generated and properly set! '''Note: This is likely not required for newer installs but should be noted for those installing from older cd's.''' <pre> sudo nano /etc/locale.gen </pre> <pre> sudo locale-gen </pre><br />
#Setup and start the PostgreSQL server (the first time that this is run it will create the data directory and users needed to run the server. As such you will see a lot of output. <pre>/etc/rc.d/postgresql start</pre><br />
#Add postgresql to the list of daemons that start on system startup in the /etc/rc.conf file<br><br><br />
<br />
===Configure PostgreSQL to be accessible from remote===<br />
----<br />
The PostgreSQL database server configuration file is <code>postgresql.conf</code>. This file is located in the data directory of the server, typically <code>/var/lib/postgres/data</code>.<br />
#As root user edit the file<br><pre># vi /var/lib/postgres/postgresql.conf</pre><br />
#In the connections and authentications section uncomment or edit the <code>listen_addresses</code> line to your needs<br><pre>listen_addresses = '*'</pre>and take a careful look at the other lines.<br />
#Hereafter insert the following line in the host-based authentication file <code>/var/lib/postgres/pg_hba.conf</code>. This file controls which hosts are allowed to connect, '''so be careful'''.<br><pre># IPv4 local connections:</pre><pre>host all all your_desired_ip_address/32 trust</pre>whereas <code>your_desired_ip_address</code> is the ip address of the client.<br />
#After this you should restart the postmaster for the changes to take effect with<br><pre>/etc/rc.d/postgresql restart</pre><br />
#Please consider that the port 5432 should be open, so take a look at the following files<br><code>/etc/services</code><br><code>/etc/hosts</code><br><code>/etc/hosts.allow</code><br />
#For troubleshooting take a look in the server log file<br><pre>tail /var/log/postgresql.log</pre><br />
<br><br />
===Configure PostgreSQL to Work With PHP===<br />
----<br />
#Open the file '''<code>/etc/php.ini</code>''' with your editor of choice<pre>eg. nano /etc/php.ini</pre><br />
#Find the line that starts with, ";extension=pgsql.so" and change it to, "extension=pgsql.so". (Just remove the preceding ";"). If this line is not present, add it. This line may be in the "Dynamic Extensions" section of the file, or toward the very end of the file.<br />
#Restart the Apache web server<pre>/etc/rc.d/httpd restart</pre><br />
<br />
===Creating Your First Database!===<br />
#Become the postgres user (This user was created when "/etc/rc.d/postgres start" was run)<br />
<pre> "su - postgres" </pre><br />
<br />
===Installing phpPgAdmin (optional)===<br />
----<br />
[http://phppgadmin.sourceforge.net phpPgAdmin] is a web-based administration tool for PostgreSQL. It can be installed two ways.<br />
<br />
====Option A: install via the AUR package (preferred)====<br />
phpPgAdmin is now [http://aur.archlinux.org/packages.php?do_Details=1&ID=921&O=0&L=0&C=0&K=phppgadmin&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd in the AUR]! <br />
<br />
See [http://wiki.archlinux.org/index.php/New_AUR_user_guidelines#How_to_use_the_AUR these intsructions] to learn how to use packages from the AUR.<br />
<br />
====Option B: install vai a manual install (the old way)====<br />
#Download the latest .bz2 file from [http://phppgadmin.sourceforge.net/?page=download here] into the root of your server directory <pre>wget -P /home/httpd/html<nowiki> http://voxel.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-3.5.4.tar.bz2</nowiki></pre><br />
#Extract the file into the new directory<pre>tar -C /home/httpd/html/ -jxvf /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Remove the tar file<pre>rm /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Change the name of the directory created in the previous step to include the version number (this will help in the future when upgrading)<pre>mv /home/httpd/html/phpPgAdmin /home/httpd/html/phpPgAdmin-3.5.4/</pre><br />
#Create a link to that directory (for ease of linking and upgrading)<pre>ln -s /home/httpd/html/phpPgAdmin-3.5.4/ /home/httpd/html/phpPgAdmin</pre><br />
#Copy the included generic config file<pre>cp /home/httpd/html/phpPgAdmin/conf/config.inc.php-dist /home/httpd/html/phpPgAdmin/conf/config.inc.php</pre><br />
<br />
<br />
The config file is located at '''/home/httpd/html/phpPgAdmin/conf/config.inc.php'''. No changes should be required. Check [http://phppgadmin.sourceforge.net/?page=faq this page] for any other setup questions that you might have.<br />
<br />
===Upgrading Postgresql (optional and dangerous)===<br />
----<br />
#First thing: these instructions could cause data loss. '''Use at your own risk'''. They work for me, but things change and nothing is guaranteed.<br />
#I would highly suggest adding the line<br><pre>IgnorePkg = postgresql</pre>to /etc/pacman.conf. This will make sure that you don't accidentally upgrade the database to an incompatable version. If you did an accidental upgrade you might not be able to access any of your data. Always check the Postgresql home page (http://www.postgresql.org/) to be sure of what steps are required for each upgrade. For a bit about why this is the case see [http://www.postgresql.org/docs/faqs.FAQ.html#item3.6 this].<br />
#How to dump all of your data, upgrade PostgreSQL, and then restore all of your data (this may not be necessary for every upgrade, see #2 above)<br />
##Become the '''root''' user<pre>su</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to one that the '''postgres''' user can write to<pre>eg. cd ~/data/</pre><br />
##Dump the current contents of the database<pre>pg_dumpall > pgs_db.out</pre>Unless you have a [http://www.postgresql.org/docs/8.1/static/libpq-pgpass.html .pgpass] file setup, you will be required to enter your password a few times (the number of times is roughly equal to the number of databases that you have + 2).<br />
##Log out of the '''postgres''' user and return to '''superuser'''<pre>exit</pre><br />
##Stop the PostgreSQL server<pre>/etc/rc.d/postresql stop</pre><br />
##Move Postgresql's data directory<pre>mv /var/lib/postgres /var/lib/postgres_old</pre><br />
##Upgrade postgresql<pre>pacman -Sy postgresql</pre><br />
##Start the PostgreSQL server (this will create all needed files and directories)<pre>/etc/rc.d/postgresql start</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to the directory that you dumped the data out to (in step 4 above)<pre>eg. cd /var/lib/postgres_old/data/</pre><br />
##Restore the database<pre>psql -e template1 -f pgs_db.out</pre></div>The Nerdhttps://wiki.archlinux.org/index.php?title=PostgreSQL&diff=19200PostgreSQL2006-12-21T18:21:58Z<p>The Nerd: /* Configure PostgreSQL to Work With PHP */</p>
<hr />
<div>[[Category:WebServer]]<br />
<br />
This document describes how to set up PostgreSQL and integrate it with PHP and Apache. It also describes how to configure PostgreSQL to be accessible from a remote client. PHP and Apache are assumed to be already be set up. If you need help setting up either of those two, see the [[LAMP]] page and follow all of the sections except the one related to MySQL.<br />
<br />
===Installing PostgreSQL===<br />
----<br />
#Install the package<br><pre> pacman -Sy postgresql</pre><br />
#Make sure that locales are generated and properly set! '''Note: This is likely not required for newer installs but should be noted for those installing from older cd's.''' <pre> sudo nano /etc/locale.gen </pre> <pre> sudo locale-gen </pre><br />
#Setup and start the PostgreSQL server (the first time that this is run it will create the data directory and users needed to run the server. As such you will see a lot of output. <pre>/etc/rc.d/postgresql start</pre><br />
#Add postgresql to the list of daemons that start on system startup in the /etc/rc.conf file<br><br><br />
<br />
===Configure PostgreSQL to be accessible from remote===<br />
----<br />
The PostgreSQL database server configuration file is <code>postgresql.conf</code>. This file is located in the data directory of the server, typically <code>/var/lib/postgres/data</code>.<br />
#As root user edit the file<br><pre># vi /var/lib/postgres/postgresql.conf</pre><br />
#In the connections and authentications section uncomment or edit the <code>listen_addresses</code> line to your needs<br><pre>listen_addresses = '*'</pre>and take a careful look at the other lines.<br />
#Hereafter insert the following line in the host-based authentication file <code>/var/lib/postgres/pg_hba.conf</code>. This file controls which hosts are allowed to connect, '''so be careful'''.<br><pre># IPv4 local connections:</pre><pre>host all all your_desired_ip_address/32 trust</pre>whereas <code>your_desired_ip_address</code> is the ip address of the client.<br />
#After this you should restart the postmaster for the changes to take effect with<br><pre>/etc/rc.d/postgresql restart</pre><br />
#Please consider that the port 5432 should be open, so take a look at the following files<br><code>/etc/services</code><br><code>/etc/hosts</code><br><code>/etc/hosts.allow</code><br />
#For troubleshooting take a look in the server log file<br><pre>tail /var/log/postgresql.log</pre><br />
<br><br />
===Configure PostgreSQL to Work With PHP===<br />
----<br />
#Open the file '''<code>/etc/php.ini</code>''' with your editor of choice<pre>eg. nano /etc/php.ini</pre><br />
#Find the line that starts with, ";extension=pgsql.so" and change it to, "extension=pgsql.so". (Just remove the preceding ";"). If this line is not present, add it. This line may be in the "Dynamic Extensions" section of the file, or toward the very end of the file.<br />
#Restart the Apache web server<pre>/etc/rc.d/httpd restart</pre><br />
<br />
===Installing phpPgAdmin (optional)===<br />
----<br />
[http://phppgadmin.sourceforge.net phpPgAdmin] is a web-based administration tool for PostgreSQL. It can be installed two ways.<br />
<br />
====Option A: install via the AUR package (preferred)====<br />
phpPgAdmin is now [http://aur.archlinux.org/packages.php?do_Details=1&ID=921&O=0&L=0&C=0&K=phppgadmin&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd in the AUR]! <br />
<br />
See [http://wiki.archlinux.org/index.php/New_AUR_user_guidelines#How_to_use_the_AUR these intsructions] to learn how to use packages from the AUR.<br />
<br />
====Option B: install vai a manual install (the old way)====<br />
#Download the latest .bz2 file from [http://phppgadmin.sourceforge.net/?page=download here] into the root of your server directory <pre>wget -P /home/httpd/html<nowiki> http://voxel.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-3.5.4.tar.bz2</nowiki></pre><br />
#Extract the file into the new directory<pre>tar -C /home/httpd/html/ -jxvf /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Remove the tar file<pre>rm /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Change the name of the directory created in the previous step to include the version number (this will help in the future when upgrading)<pre>mv /home/httpd/html/phpPgAdmin /home/httpd/html/phpPgAdmin-3.5.4/</pre><br />
#Create a link to that directory (for ease of linking and upgrading)<pre>ln -s /home/httpd/html/phpPgAdmin-3.5.4/ /home/httpd/html/phpPgAdmin</pre><br />
#Copy the included generic config file<pre>cp /home/httpd/html/phpPgAdmin/conf/config.inc.php-dist /home/httpd/html/phpPgAdmin/conf/config.inc.php</pre><br />
<br />
<br />
The config file is located at '''/home/httpd/html/phpPgAdmin/conf/config.inc.php'''. No changes should be required. Check [http://phppgadmin.sourceforge.net/?page=faq this page] for any other setup questions that you might have.<br />
<br />
===Upgrading Postgresql (optional and dangerous)===<br />
----<br />
#First thing: these instructions could cause data loss. '''Use at your own risk'''. They work for me, but things change and nothing is guaranteed.<br />
#I would highly suggest adding the line<br><pre>IgnorePkg = postgresql</pre>to /etc/pacman.conf. This will make sure that you don't accidentally upgrade the database to an incompatable version. If you did an accidental upgrade you might not be able to access any of your data. Always check the Postgresql home page (http://www.postgresql.org/) to be sure of what steps are required for each upgrade. For a bit about why this is the case see [http://www.postgresql.org/docs/faqs.FAQ.html#item3.6 this].<br />
#How to dump all of your data, upgrade PostgreSQL, and then restore all of your data (this may not be necessary for every upgrade, see #2 above)<br />
##Become the '''root''' user<pre>su</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to one that the '''postgres''' user can write to<pre>eg. cd ~/data/</pre><br />
##Dump the current contents of the database<pre>pg_dumpall > pgs_db.out</pre>Unless you have a [http://www.postgresql.org/docs/8.1/static/libpq-pgpass.html .pgpass] file setup, you will be required to enter your password a few times (the number of times is roughly equal to the number of databases that you have + 2).<br />
##Log out of the '''postgres''' user and return to '''superuser'''<pre>exit</pre><br />
##Stop the PostgreSQL server<pre>/etc/rc.d/postresql stop</pre><br />
##Move Postgresql's data directory<pre>mv /var/lib/postgres /var/lib/postgres_old</pre><br />
##Upgrade postgresql<pre>pacman -Sy postgresql</pre><br />
##Start the PostgreSQL server (this will create all needed files and directories)<pre>/etc/rc.d/postgresql start</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to the directory that you dumped the data out to (in step 4 above)<pre>eg. cd /var/lib/postgres_old/data/</pre><br />
##Restore the database<pre>psql -e template1 -f pgs_db.out</pre></div>The Nerdhttps://wiki.archlinux.org/index.php?title=PostgreSQL&diff=19199PostgreSQL2006-12-21T18:19:45Z<p>The Nerd: /* Installing PostgreSQL */</p>
<hr />
<div>[[Category:WebServer]]<br />
<br />
This document describes how to set up PostgreSQL and integrate it with PHP and Apache. It also describes how to configure PostgreSQL to be accessible from a remote client. PHP and Apache are assumed to be already be set up. If you need help setting up either of those two, see the [[LAMP]] page and follow all of the sections except the one related to MySQL.<br />
<br />
===Installing PostgreSQL===<br />
----<br />
#Install the package<br><pre> pacman -Sy postgresql</pre><br />
#Make sure that locales are generated and properly set! '''Note: This is likely not required for newer installs but should be noted for those installing from older cd's.''' <pre> sudo nano /etc/locale.gen </pre> <pre> sudo locale-gen </pre><br />
#Setup and start the PostgreSQL server (the first time that this is run it will create the data directory and users needed to run the server. As such you will see a lot of output. <pre>/etc/rc.d/postgresql start</pre><br />
#Add postgresql to the list of daemons that start on system startup in the /etc/rc.conf file<br><br><br />
<br />
===Configure PostgreSQL to be accessible from remote===<br />
----<br />
The PostgreSQL database server configuration file is <code>postgresql.conf</code>. This file is located in the data directory of the server, typically <code>/var/lib/postgres/data</code>.<br />
#As root user edit the file<br><pre># vi /var/lib/postgres/postgresql.conf</pre><br />
#In the connections and authentications section uncomment or edit the <code>listen_addresses</code> line to your needs<br><pre>listen_addresses = '*'</pre>and take a careful look at the other lines.<br />
#Hereafter insert the following line in the host-based authentication file <code>/var/lib/postgres/pg_hba.conf</code>. This file controls which hosts are allowed to connect, '''so be careful'''.<br><pre># IPv4 local connections:</pre><pre>host all all your_desired_ip_address/32 trust</pre>whereas <code>your_desired_ip_address</code> is the ip address of the client.<br />
#After this you should restart the postmaster for the changes to take effect with<br><pre>/etc/rc.d/postgresql restart</pre><br />
#Please consider that the port 5432 should be open, so take a look at the following files<br><code>/etc/services</code><br><code>/etc/hosts</code><br><code>/etc/hosts.allow</code><br />
#For troubleshooting take a look in the server log file<br><pre>tail /var/log/postgresql.log</pre><br />
<br><br />
===Configure PostgreSQL to Work With PHP===<br />
----<br />
#Open the file '''<code>/etc/php.ini</code>''' with your editor of choice<pre>eg. nano /etc/php.ini</pre><br />
#Find the line that starts with, "extensions_dir" or ";extensions_dir", and change it to read <code>'''extensions_dir = "/usr/lib/php/extensions/no-debug-non-zts-20041030"'''</code>. This line is in the "Paths and Directories" section of the file. Also, you will have to manually check that directory as it seems to change with each release of the package. (You should be able to find the directory with the command "locate pgsql.so". If you get more than one directory, use the one that has "php" in it.)<br />
#Find the line that starts with, ";extension=pgsql.so" and change it to, "extension=pgsql.so". (Just remove the preceding ";"). If this line is not present, add it. This line may be in the "Dynamic Extensions" section of the file, or toward the very end of the file.<br />
#Restart the Apache web server<pre>/etc/rc.d/httpd restart</pre><br />
<br />
===Installing phpPgAdmin (optional)===<br />
----<br />
[http://phppgadmin.sourceforge.net phpPgAdmin] is a web-based administration tool for PostgreSQL. It can be installed two ways.<br />
<br />
====Option A: install via the AUR package (preferred)====<br />
phpPgAdmin is now [http://aur.archlinux.org/packages.php?do_Details=1&ID=921&O=0&L=0&C=0&K=phppgadmin&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd in the AUR]! <br />
<br />
See [http://wiki.archlinux.org/index.php/New_AUR_user_guidelines#How_to_use_the_AUR these intsructions] to learn how to use packages from the AUR.<br />
<br />
====Option B: install vai a manual install (the old way)====<br />
#Download the latest .bz2 file from [http://phppgadmin.sourceforge.net/?page=download here] into the root of your server directory <pre>wget -P /home/httpd/html<nowiki> http://voxel.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-3.5.4.tar.bz2</nowiki></pre><br />
#Extract the file into the new directory<pre>tar -C /home/httpd/html/ -jxvf /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Remove the tar file<pre>rm /home/httpd/html/phpPgAdmin-3.5.4.tar.bz2</pre><br />
#Change the name of the directory created in the previous step to include the version number (this will help in the future when upgrading)<pre>mv /home/httpd/html/phpPgAdmin /home/httpd/html/phpPgAdmin-3.5.4/</pre><br />
#Create a link to that directory (for ease of linking and upgrading)<pre>ln -s /home/httpd/html/phpPgAdmin-3.5.4/ /home/httpd/html/phpPgAdmin</pre><br />
#Copy the included generic config file<pre>cp /home/httpd/html/phpPgAdmin/conf/config.inc.php-dist /home/httpd/html/phpPgAdmin/conf/config.inc.php</pre><br />
<br />
<br />
The config file is located at '''/home/httpd/html/phpPgAdmin/conf/config.inc.php'''. No changes should be required. Check [http://phppgadmin.sourceforge.net/?page=faq this page] for any other setup questions that you might have.<br />
<br />
===Upgrading Postgresql (optional and dangerous)===<br />
----<br />
#First thing: these instructions could cause data loss. '''Use at your own risk'''. They work for me, but things change and nothing is guaranteed.<br />
#I would highly suggest adding the line<br><pre>IgnorePkg = postgresql</pre>to /etc/pacman.conf. This will make sure that you don't accidentally upgrade the database to an incompatable version. If you did an accidental upgrade you might not be able to access any of your data. Always check the Postgresql home page (http://www.postgresql.org/) to be sure of what steps are required for each upgrade. For a bit about why this is the case see [http://www.postgresql.org/docs/faqs.FAQ.html#item3.6 this].<br />
#How to dump all of your data, upgrade PostgreSQL, and then restore all of your data (this may not be necessary for every upgrade, see #2 above)<br />
##Become the '''root''' user<pre>su</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to one that the '''postgres''' user can write to<pre>eg. cd ~/data/</pre><br />
##Dump the current contents of the database<pre>pg_dumpall > pgs_db.out</pre>Unless you have a [http://www.postgresql.org/docs/8.1/static/libpq-pgpass.html .pgpass] file setup, you will be required to enter your password a few times (the number of times is roughly equal to the number of databases that you have + 2).<br />
##Log out of the '''postgres''' user and return to '''superuser'''<pre>exit</pre><br />
##Stop the PostgreSQL server<pre>/etc/rc.d/postresql stop</pre><br />
##Move Postgresql's data directory<pre>mv /var/lib/postgres /var/lib/postgres_old</pre><br />
##Upgrade postgresql<pre>pacman -Sy postgresql</pre><br />
##Start the PostgreSQL server (this will create all needed files and directories)<pre>/etc/rc.d/postgresql start</pre><br />
##Become the '''postgres''' user<pre>su postgres</pre><br />
##Change the current directory to the directory that you dumped the data out to (in step 4 above)<pre>eg. cd /var/lib/postgres_old/data/</pre><br />
##Restore the database<pre>psql -e template1 -f pgs_db.out</pre></div>The Nerdhttps://wiki.archlinux.org/index.php?title=Hamachi&diff=14908Hamachi2006-08-27T21:49:12Z<p>The Nerd: /* GUI */</p>
<hr />
<div>=Hamachi=<br />
<br />
==What is it?==<br />
<br />
With Hamachi you can organize two or more computers with an Internet connection into their own virtual network for direct secure communication.<br />
<br />
Hamachi is fast, secure and simple. It is also free. <br />
<br />
==READ! - External Links==<br />
<br /><br />
'''Hamachi public networks for popular Games : [http://www.hamachi.cz www.hamachi.cz]'''<br />
<br /><br />
English translate : '''[http://www.eng.hamachi.cz www.eng.hamachi.cz]'''<br />
<br /><br />
Individual help : '''[http://www.forum.hamachi.cz www.Forum.hamachi.cz]'''<br />
<br />
==Initial Configuration==<br />
<br />
<br />
To run Hamachi you need /dev/net/tun. <br />
<br />
This is created by the tun module. As root run,<br />
<pre><br />
modprobe tun<br />
</pre><br />
<br />
Or you can manually create /dev/net/tun by running...<br />
<pre><br />
mkdir /dev/net<br />
mknod /dev/net/tun c 10 200<br />
</pre><br />
<br />
Also, make sure to add the "tun" modules to rc.conf so that /dev/net/tun is created next time your computer turns on.<br />
<br />
<pre><br />
MODULES=(... ... ... ... ... tun ... ... ...)<br />
</pre><br />
<br />
==Download And Install Hamachi==<br />
Hamachi is avaiable in the AUR!<br />
<br />
[http://aur.archlinux.org/packages.php?do_Details=1&ID=3709&O=0&L=0&C=0&K=hamachi&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR Page]<br />
<br />
Download the package, untar it, and run...<br />
<br />
<pre><br />
makepkg<br />
</pre><br />
<br />
in the hamachi directory that is created.<br />
<br />
<br />
Then add the package with...<br />
<br />
<pre><br />
pacman -A hamachi-(package version)<br />
</pre><br />
<br />
<br />
Now as root run...<br />
<pre><br />
tuncfg<br />
</pre><br />
<br />
<br />
Finally, run hamachi-init<br />
<pre><br />
hamachi-init<br />
</pre><br />
<br />
<br />
----<br />
<br />
<br />
Or you can get it manually.<br />
<br />
Head to [http://hamachi.cc hamachi.cc] and download their linux client.<br />
<br />
Untar it <br />
<pre><br />
tar zxvf hamachi-x.x.x-x.tar.gz<br />
</pre><br />
<br />
Compile:<br />
<pre><br />
cd hamachi-x.x.x-x<br />
make install<br />
</pre><br />
<br />
And run tunecfg<br />
<pre><br />
cd tuncfg<br />
./tuncfg<br />
</pre><br />
<br />
Run hamachi-init<br />
<pre><br />
hamachi-init<br />
</pre><br />
And thats the installation.<br />
<br />
==Running Hamachi==<br />
Start up the (matt) daemon<br />
<pre><br />
hamachi start<br />
</pre><br />
Now you have a whole bunch of commands at your disposal. These are in no particular order, and are fairly self explanitory. <br />
<br />
<pre><br />
hamachi set-nick bob<br />
hamachi login<br />
hamachi create my-net secretpassword<br />
hamachi go-online my-net<br />
hamachi list<br />
hamachi go-offline my-net<br />
</pre><br />
<br />
To get a list of all the commands just run:<br />
<pre><br />
hamachi ?<br />
</pre><br />
<br />
==GUI==<br />
I found this link on the forums at hamachii. Its a GTK2+ GUI frontend. Not bad if your into that sort of thing. <br />
<br />
[http://purebasic.myftp.org/?filename=files/3/projects/hamachi/v.0.7.2/gHamachi_gtk2.tar.gz Hamachi GUI]</div>The Nerdhttps://wiki.archlinux.org/index.php?title=Hamachi&diff=14907Hamachi2006-08-27T21:48:06Z<p>The Nerd: /* Download And Install Hamachi */</p>
<hr />
<div>=Hamachi=<br />
<br />
==What is it?==<br />
<br />
With Hamachi you can organize two or more computers with an Internet connection into their own virtual network for direct secure communication.<br />
<br />
Hamachi is fast, secure and simple. It is also free. <br />
<br />
==READ! - External Links==<br />
<br /><br />
'''Hamachi public networks for popular Games : [http://www.hamachi.cz www.hamachi.cz]'''<br />
<br /><br />
English translate : '''[http://www.eng.hamachi.cz www.eng.hamachi.cz]'''<br />
<br /><br />
Individual help : '''[http://www.forum.hamachi.cz www.Forum.hamachi.cz]'''<br />
<br />
==Initial Configuration==<br />
<br />
<br />
To run Hamachi you need /dev/net/tun. <br />
<br />
This is created by the tun module. As root run,<br />
<pre><br />
modprobe tun<br />
</pre><br />
<br />
Or you can manually create /dev/net/tun by running...<br />
<pre><br />
mkdir /dev/net<br />
mknod /dev/net/tun c 10 200<br />
</pre><br />
<br />
Also, make sure to add the "tun" modules to rc.conf so that /dev/net/tun is created next time your computer turns on.<br />
<br />
<pre><br />
MODULES=(... ... ... ... ... tun ... ... ...)<br />
</pre><br />
<br />
==Download And Install Hamachi==<br />
Hamachi is avaiable in the AUR!<br />
<br />
[http://aur.archlinux.org/packages.php?do_Details=1&ID=3709&O=0&L=0&C=0&K=hamachi&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR Page]<br />
<br />
Download the package, untar it, and run...<br />
<br />
<pre><br />
makepkg<br />
</pre><br />
<br />
in the hamachi directory that is created.<br />
<br />
<br />
Then add the package with...<br />
<br />
<pre><br />
pacman -A hamachi-(package version)<br />
</pre><br />
<br />
<br />
Now as root run...<br />
<pre><br />
tuncfg<br />
</pre><br />
<br />
<br />
Finally, run hamachi-init<br />
<pre><br />
hamachi-init<br />
</pre><br />
<br />
<br />
----<br />
<br />
<br />
Or you can get it manually.<br />
<br />
Head to [http://hamachi.cc hamachi.cc] and download their linux client.<br />
<br />
Untar it <br />
<pre><br />
tar zxvf hamachi-x.x.x-x.tar.gz<br />
</pre><br />
<br />
Compile:<br />
<pre><br />
cd hamachi-x.x.x-x<br />
make install<br />
</pre><br />
<br />
And run tunecfg<br />
<pre><br />
cd tuncfg<br />
./tuncfg<br />
</pre><br />
<br />
Run hamachi-init<br />
<pre><br />
hamachi-init<br />
</pre><br />
And thats the installation.<br />
<br />
==Running Hamachi==<br />
Start up the (matt) daemon<br />
<pre><br />
hamachi start<br />
</pre><br />
Now you have a whole bunch of commands at your disposal. These are in no particular order, and are fairly self explanitory. <br />
<br />
<pre><br />
hamachi set-nick bob<br />
hamachi login<br />
hamachi create my-net secretpassword<br />
hamachi go-online my-net<br />
hamachi list<br />
hamachi go-offline my-net<br />
</pre><br />
<br />
To get a list of all the commands just run:<br />
<pre><br />
hamachi ?<br />
</pre><br />
<br />
==GUI==<br />
I found this link on the forums at hamachii. Its a GTK2+ GUI frontend. Not bad if your into that sort of thing. <br />
<br />
[http://purebasic.myftp.org/?filename=files/3/projects/hamachi/v.07/hamachi-client_gtk2.tar.gz Hamachi GUI]</div>The Nerdhttps://wiki.archlinux.org/index.php?title=Hamachi&diff=14906Hamachi2006-08-27T21:47:40Z<p>The Nerd: /* Download And Install Hamachi */</p>
<hr />
<div>=Hamachi=<br />
<br />
==What is it?==<br />
<br />
With Hamachi you can organize two or more computers with an Internet connection into their own virtual network for direct secure communication.<br />
<br />
Hamachi is fast, secure and simple. It is also free. <br />
<br />
==READ! - External Links==<br />
<br /><br />
'''Hamachi public networks for popular Games : [http://www.hamachi.cz www.hamachi.cz]'''<br />
<br /><br />
English translate : '''[http://www.eng.hamachi.cz www.eng.hamachi.cz]'''<br />
<br /><br />
Individual help : '''[http://www.forum.hamachi.cz www.Forum.hamachi.cz]'''<br />
<br />
==Initial Configuration==<br />
<br />
<br />
To run Hamachi you need /dev/net/tun. <br />
<br />
This is created by the tun module. As root run,<br />
<pre><br />
modprobe tun<br />
</pre><br />
<br />
Or you can manually create /dev/net/tun by running...<br />
<pre><br />
mkdir /dev/net<br />
mknod /dev/net/tun c 10 200<br />
</pre><br />
<br />
Also, make sure to add the "tun" modules to rc.conf so that /dev/net/tun is created next time your computer turns on.<br />
<br />
<pre><br />
MODULES=(... ... ... ... ... tun ... ... ...)<br />
</pre><br />
<br />
==Download And Install Hamachi==<br />
Hamachi is avaiable in the AUR!<br />
<br />
[http://aur.archlinux.org/packages.php?do_Details=1&ID=3709&O=0&L=0&C=0&K=hamachi&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR Page]<br />
<br />
Download the package, untar it, and run...<br />
<br />
<pre><br />
makepkg<br />
</pre><br />
<br />
in the hamachi directory that is created.<br />
<br />
Then add the package with...<br />
<br />
<pre><br />
pacman -A hamachi-(package version)<br />
</pre><br />
<br />
Now as root run...<br />
<pre><br />
tuncfg<br />
</pre><br />
<br />
Finally, run hamachi-init<br />
<pre><br />
hamachi-init<br />
</pre><br />
<br />
<br />
----<br />
<br />
<br />
Or you can get it manually.<br />
<br />
Head to [http://hamachi.cc hamachi.cc] and download their linux client.<br />
<br />
Untar it <br />
<pre><br />
tar zxvf hamachi-x.x.x-x.tar.gz<br />
</pre><br />
<br />
Compile:<br />
<pre><br />
cd hamachi-x.x.x-x<br />
make install<br />
</pre><br />
<br />
And run tunecfg<br />
<pre><br />
cd tuncfg<br />
./tuncfg<br />
</pre><br />
<br />
Run hamachi-init<br />
<pre><br />
hamachi-init<br />
</pre><br />
And thats the installation.<br />
<br />
==Running Hamachi==<br />
Start up the (matt) daemon<br />
<pre><br />
hamachi start<br />
</pre><br />
Now you have a whole bunch of commands at your disposal. These are in no particular order, and are fairly self explanitory. <br />
<br />
<pre><br />
hamachi set-nick bob<br />
hamachi login<br />
hamachi create my-net secretpassword<br />
hamachi go-online my-net<br />
hamachi list<br />
hamachi go-offline my-net<br />
</pre><br />
<br />
To get a list of all the commands just run:<br />
<pre><br />
hamachi ?<br />
</pre><br />
<br />
==GUI==<br />
I found this link on the forums at hamachii. Its a GTK2+ GUI frontend. Not bad if your into that sort of thing. <br />
<br />
[http://purebasic.myftp.org/?filename=files/3/projects/hamachi/v.07/hamachi-client_gtk2.tar.gz Hamachi GUI]</div>The Nerdhttps://wiki.archlinux.org/index.php?title=Hamachi&diff=14905Hamachi2006-08-27T21:47:26Z<p>The Nerd: /* Download And Install Hamachi */</p>
<hr />
<div>=Hamachi=<br />
<br />
==What is it?==<br />
<br />
With Hamachi you can organize two or more computers with an Internet connection into their own virtual network for direct secure communication.<br />
<br />
Hamachi is fast, secure and simple. It is also free. <br />
<br />
==READ! - External Links==<br />
<br /><br />
'''Hamachi public networks for popular Games : [http://www.hamachi.cz www.hamachi.cz]'''<br />
<br /><br />
English translate : '''[http://www.eng.hamachi.cz www.eng.hamachi.cz]'''<br />
<br /><br />
Individual help : '''[http://www.forum.hamachi.cz www.Forum.hamachi.cz]'''<br />
<br />
==Initial Configuration==<br />
<br />
<br />
To run Hamachi you need /dev/net/tun. <br />
<br />
This is created by the tun module. As root run,<br />
<pre><br />
modprobe tun<br />
</pre><br />
<br />
Or you can manually create /dev/net/tun by running...<br />
<pre><br />
mkdir /dev/net<br />
mknod /dev/net/tun c 10 200<br />
</pre><br />
<br />
Also, make sure to add the "tun" modules to rc.conf so that /dev/net/tun is created next time your computer turns on.<br />
<br />
<pre><br />
MODULES=(... ... ... ... ... tun ... ... ...)<br />
</pre><br />
<br />
==Download And Install Hamachi==<br />
Hamachi is avaiable in the AUR!<br />
<br />
[http://aur.archlinux.org/packages.php?do_Details=1&ID=3709&O=0&L=0&C=0&K=hamachi&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR Page]<br />
<br />
Download the package, untar it, and run...<br />
<br />
<pre><br />
makepkg<br />
</pre><br />
<br />
in the hamachi directory that is created.<br />
<br />
Then add the package with...<br />
<br />
<pre><br />
pacman -A hamachi-(package version)<br />
</pre><br />
<br />
Now as root run...<br />
<pre><br />
tuncfg<br />
</pre><br />
<br />
Finally, run hamachi-init<br />
<pre><br />
hamachi-init<br />
</pre><br />
<br />
----<br />
<br />
<br />
Or you can get it manually.<br />
<br />
Head to [http://hamachi.cc hamachi.cc] and download their linux client.<br />
<br />
Untar it <br />
<pre><br />
tar zxvf hamachi-x.x.x-x.tar.gz<br />
</pre><br />
<br />
Compile:<br />
<pre><br />
cd hamachi-x.x.x-x<br />
make install<br />
</pre><br />
<br />
And run tunecfg<br />
<pre><br />
cd tuncfg<br />
./tuncfg<br />
</pre><br />
<br />
Run hamachi-init<br />
<pre><br />
hamachi-init<br />
</pre><br />
And thats the installation.<br />
<br />
==Running Hamachi==<br />
Start up the (matt) daemon<br />
<pre><br />
hamachi start<br />
</pre><br />
Now you have a whole bunch of commands at your disposal. These are in no particular order, and are fairly self explanitory. <br />
<br />
<pre><br />
hamachi set-nick bob<br />
hamachi login<br />
hamachi create my-net secretpassword<br />
hamachi go-online my-net<br />
hamachi list<br />
hamachi go-offline my-net<br />
</pre><br />
<br />
To get a list of all the commands just run:<br />
<pre><br />
hamachi ?<br />
</pre><br />
<br />
==GUI==<br />
I found this link on the forums at hamachii. Its a GTK2+ GUI frontend. Not bad if your into that sort of thing. <br />
<br />
[http://purebasic.myftp.org/?filename=files/3/projects/hamachi/v.07/hamachi-client_gtk2.tar.gz Hamachi GUI]</div>The Nerdhttps://wiki.archlinux.org/index.php?title=Hamachi&diff=14904Hamachi2006-08-27T21:45:10Z<p>The Nerd: /* Download And Install Hamachi */</p>
<hr />
<div>=Hamachi=<br />
<br />
==What is it?==<br />
<br />
With Hamachi you can organize two or more computers with an Internet connection into their own virtual network for direct secure communication.<br />
<br />
Hamachi is fast, secure and simple. It is also free. <br />
<br />
==READ! - External Links==<br />
<br /><br />
'''Hamachi public networks for popular Games : [http://www.hamachi.cz www.hamachi.cz]'''<br />
<br /><br />
English translate : '''[http://www.eng.hamachi.cz www.eng.hamachi.cz]'''<br />
<br /><br />
Individual help : '''[http://www.forum.hamachi.cz www.Forum.hamachi.cz]'''<br />
<br />
==Initial Configuration==<br />
<br />
<br />
To run Hamachi you need /dev/net/tun. <br />
<br />
This is created by the tun module. As root run,<br />
<pre><br />
modprobe tun<br />
</pre><br />
<br />
Or you can manually create /dev/net/tun by running...<br />
<pre><br />
mkdir /dev/net<br />
mknod /dev/net/tun c 10 200<br />
</pre><br />
<br />
Also, make sure to add the "tun" modules to rc.conf so that /dev/net/tun is created next time your computer turns on.<br />
<br />
<pre><br />
MODULES=(... ... ... ... ... tun ... ... ...)<br />
</pre><br />
<br />
==Download And Install Hamachi==<br />
Hamachi is avaiable in the AUR!<br />
<br />
<br />
[http://aur.archlinux.org/packages.php?do_Details=1&ID=3709&O=0&L=0&C=0&K=hamachi&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR Page]<br />
<br />
Download the package, untar it, and run...<br />
<br />
<pre><br />
makepkg<br />
</pre><br />
<br />
in the hamachi directory that is created.<br />
<br />
Then add the package with...<br />
<br />
<pre><br />
pacman -A hamachi-(package version)<br />
</pre><br />
<br />
<br />
----<br />
<br />
<br />
Or you can get it manually.<br />
<br />
Head to [http://hamachi.cc hamachi.cc] and download their linux client.<br />
<br />
Untar it <br />
<pre><br />
tar zxvf hamachi-x.x.x-x.tar.gz<br />
</pre><br />
<br />
Compile:<br />
<pre><br />
cd hamachi-x.x.x-x<br />
make install<br />
</pre><br />
<br />
And run tunecfg<br />
<pre><br />
cd tuncfg<br />
./tuncfg<br />
</pre><br />
<br />
Run hamachi-init<br />
<pre><br />
hamachi-init<br />
</pre><br />
And thats the installation.<br />
<br />
==Running Hamachi==<br />
Start up the (matt) daemon<br />
<pre><br />
hamachi start<br />
</pre><br />
Now you have a whole bunch of commands at your disposal. These are in no particular order, and are fairly self explanitory. <br />
<br />
<pre><br />
hamachi set-nick bob<br />
hamachi login<br />
hamachi create my-net secretpassword<br />
hamachi go-online my-net<br />
hamachi list<br />
hamachi go-offline my-net<br />
</pre><br />
<br />
To get a list of all the commands just run:<br />
<pre><br />
hamachi ?<br />
</pre><br />
<br />
==GUI==<br />
I found this link on the forums at hamachii. Its a GTK2+ GUI frontend. Not bad if your into that sort of thing. <br />
<br />
[http://purebasic.myftp.org/?filename=files/3/projects/hamachi/v.07/hamachi-client_gtk2.tar.gz Hamachi GUI]</div>The Nerdhttps://wiki.archlinux.org/index.php?title=Hamachi&diff=14903Hamachi2006-08-27T21:39:59Z<p>The Nerd: /* Initial Configuration */</p>
<hr />
<div>=Hamachi=<br />
<br />
==What is it?==<br />
<br />
With Hamachi you can organize two or more computers with an Internet connection into their own virtual network for direct secure communication.<br />
<br />
Hamachi is fast, secure and simple. It is also free. <br />
<br />
==READ! - External Links==<br />
<br /><br />
'''Hamachi public networks for popular Games : [http://www.hamachi.cz www.hamachi.cz]'''<br />
<br /><br />
English translate : '''[http://www.eng.hamachi.cz www.eng.hamachi.cz]'''<br />
<br /><br />
Individual help : '''[http://www.forum.hamachi.cz www.Forum.hamachi.cz]'''<br />
<br />
==Initial Configuration==<br />
<br />
<br />
To run Hamachi you need /dev/net/tun. <br />
<br />
This is created by the tun module. As root run,<br />
<pre><br />
modprobe tun<br />
</pre><br />
<br />
Or you can manually create /dev/net/tun by running...<br />
<pre><br />
mkdir /dev/net<br />
mknod /dev/net/tun c 10 200<br />
</pre><br />
<br />
Also, make sure to add the "tun" modules to rc.conf so that /dev/net/tun is created next time your computer turns on.<br />
<br />
<pre><br />
MODULES=(... ... ... ... ... tun ... ... ...)<br />
</pre><br />
<br />
==Download And Install Hamachi==<br />
Head to [http://hamachi.cc hamachi.cc] and download their linux client (Package coming soon?)<br />
<br />
Untar it <br />
<pre><br />
tar zxvf hamachi-x.x.x-x.tar.gz<br />
</pre><br />
<br />
Compile:<br />
<pre><br />
cd hamachi-x.x.x-x<br />
make install<br />
</pre><br />
<br />
And run tunecfg<br />
<pre><br />
cd tuncfg<br />
./tuncfg<br />
</pre><br />
<br />
Run hamachi-init<br />
<pre><br />
hamachi-init<br />
</pre><br />
And thats the installation.<br />
<br />
==Running Hamachi==<br />
Start up the (matt) daemon<br />
<pre><br />
hamachi start<br />
</pre><br />
Now you have a whole bunch of commands at your disposal. These are in no particular order, and are fairly self explanitory. <br />
<br />
<pre><br />
hamachi set-nick bob<br />
hamachi login<br />
hamachi create my-net secretpassword<br />
hamachi go-online my-net<br />
hamachi list<br />
hamachi go-offline my-net<br />
</pre><br />
<br />
To get a list of all the commands just run:<br />
<pre><br />
hamachi ?<br />
</pre><br />
<br />
==GUI==<br />
I found this link on the forums at hamachii. Its a GTK2+ GUI frontend. Not bad if your into that sort of thing. <br />
<br />
[http://purebasic.myftp.org/?filename=files/3/projects/hamachi/v.07/hamachi-client_gtk2.tar.gz Hamachi GUI]</div>The Nerd