Created
June 28, 2012 16:39
-
-
Save posulliv/3012400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) install drupal & apache | |
wget http://ftp.drupal.org/files/projects/drupal-7.12.tar.gz | |
tar zxvf drupal-7.12.tar.gz | |
sudo apt-get install apache2 php5-pgsql php5-gd libapache2-mod-php5 php-apc | |
sudo mkdir /var/www/drupal | |
sudo mv drupal-7.12/* drupal-7.12/.htaccess /var/www/drupal | |
sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php | |
sudo chown www-data:www-data /var/www/drupal/sites/default/settings.php | |
sudo mkdir /var/www/drupal/sites/default/files | |
sudo chown www-data:www-data /var/www/drupal/sites/default/files/ | |
sudo service apache2 restart | |
2) install postgresql 9.1 | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:pitti/postgresql | |
sudo apt-get update | |
sudo apt-get install postgresql-9.1 libpq-dev postgresql-contrib-9.1 | |
# pgbench is in non-standard location | |
export PATH=$PATH:/usr/lib/postgresql/9.1/bin | |
3) configure postgresql for drupal | |
sudo sysctl -w kernel.shmall=4194304 | |
sudo sysctl -w kernel.shmmax=17179869184 | |
sudo su postgres | |
createuser -D -A -P drupal | |
createdb --encoding=UTF8 -O drupal drupal | |
exit | |
sudo vim /etc/postgresql/9.1/main/pg_hba.conf | |
3.1) add entry | |
host drupal drupal 127.0.0.1/32 password | |
sudo service postgresql restart | |
The contents of my postgresql.conf file for the PostgreSQL instance is: | |
data_directory = '/var/lib/postgresql/9.1/main' | |
hba_file = '/etc/postgresql/9.1/main/pg_hba.conf' | |
ident_file = '/etc/postgresql/9.1/main/pg_ident.conf' | |
external_pid_file = '/var/run/postgresql/9.1-main.pid' | |
port = 5432 | |
max_connections = 100 | |
unix_socket_directory = '/var/run/postgresql' | |
ssl = true | |
shared_buffers = 3GB | |
work_mem = 4MB | |
logging_collector = on | |
log_directory = 'pg_log' | |
log_line_prefix = '%t ' | |
log_statement = 'none' | |
datestyle = 'iso, mdy' | |
lc_messages = 'en_US.UTF-8' | |
lc_monetary = 'en_US.UTF-8' | |
lc_numeric = 'en_US.UTF-8' | |
lc_time = 'en_US.UTF-8' | |
default_text_search_config = 'pg_catalog.english' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment