特殊:Badtitle/NS100:Drupal:修订间差异
小 New page: {{From|https://help.ubuntu.com/community/Drupal}} {{Languages|php5}} === Drupal === [http://drupal.org/node/260 Drupal] is a robust Content Management System that runs on LAMP. Without... |
小无编辑摘要 |
||
第26行: | 第26行: | ||
<pre><nowiki> | <pre><nowiki> | ||
apache2 php5-mysql php5-gd libapache2-mod-php5 mysql-server | apache2 php5-mysql php5-gd libapache2-mod-php5 mysql-server | ||
</nowiki></ | </nowiki></pre> | ||
Set a mysql-root password (not the same as a root password, but a password for mysql) | Set a mysql-root password (not the same as a root password, but a password for mysql) | ||
第34行: | 第34行: | ||
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword'); | mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword'); | ||
</nowiki></ | </nowiki></pre> | ||
A successful mysql command will show: | A successful mysql command will show: | ||
第45行: | 第45行: | ||
<pre><nowiki> | <pre><nowiki> | ||
mysql> \q | mysql> \q | ||
</nowiki></ | </nowiki></pre> | ||
You should now have a functional LAMP stack and a password for the mysql root user. | You should now have a functional LAMP stack and a password for the mysql root user. | ||
第59行: | 第59行: | ||
sudo mkdir /var/www/drupal | sudo mkdir /var/www/drupal | ||
sudo mv drupal-4.7.6/* drupal-4.7.6/.htaccess /var/www/drupal | sudo mv drupal-4.7.6/* drupal-4.7.6/.htaccess /var/www/drupal | ||
</nowiki></ | </nowiki></pre> | ||
It is a good idea to create a ''files'' subdirectory in your drupal installation directory. It is not strictly neccessary, but will be used for files such as custom logos, user avatars, and other media associated with your new site. | It is a good idea to create a ''files'' subdirectory in your drupal installation directory. It is not strictly neccessary, but will be used for files such as custom logos, user avatars, and other media associated with your new site. | ||
第66行: | 第66行: | ||
sudo mkdir /var/www/drupal/files | sudo mkdir /var/www/drupal/files | ||
sudo chown www-data:www-data /var/www/drupal/files | sudo chown www-data:www-data /var/www/drupal/files | ||
</nowiki></ | </nowiki></pre> | ||
第75行: | 第75行: | ||
<pre><nowiki> | <pre><nowiki> | ||
mysqladmin -u root -p create drupal | mysqladmin -u root -p create drupal | ||
</nowiki></ | </nowiki></pre> | ||
Where ''drupal'' is the name you picked for the mysql database that Drupal will use. You can call it anything you want. | Where ''drupal'' is the name you picked for the mysql database that Drupal will use. You can call it anything you want. | ||
第83行: | 第83行: | ||
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO 'drupaluser'@'localhost' IDENTIFIED BY 'drupalpass'; | mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO 'drupaluser'@'localhost' IDENTIFIED BY 'drupalpass'; | ||
</nowiki></ | </nowiki></pre> | ||
You do not want to have Drupal use the mysql root user to access the database. The above command creates a mysql user (other than the mysql root user) with some priviledges to use the ''drupal'' database. You should pick something different than ''drupaluser'' and ''drupalpass''. If the command was successful, activate the new permissions: | You do not want to have Drupal use the mysql root user to access the database. The above command creates a mysql user (other than the mysql root user) with some priviledges to use the ''drupal'' database. You should pick something different than ''drupaluser'' and ''drupalpass''. If the command was successful, activate the new permissions: | ||
第89行: | 第89行: | ||
<pre><nowiki> | <pre><nowiki> | ||
mysql> FLUSH PRIVILEGES; | mysql> FLUSH PRIVILEGES; | ||
</nowiki></ | </nowiki></pre> | ||
Quit the mysql prompt: | Quit the mysql prompt: | ||
第95行: | 第95行: | ||
<pre><nowiki> | <pre><nowiki> | ||
mysql> \q | mysql> \q | ||
</nowiki></ | </nowiki></pre> | ||
==== Fill the database ==== | ==== Fill the database ==== | ||
第103行: | 第103行: | ||
<pre><nowiki> | <pre><nowiki> | ||
mysql -u drupaluser -p drupal < /var/www/drupal/database/database.4.1.mysql | mysql -u drupaluser -p drupal < /var/www/drupal/database/database.4.1.mysql | ||
</nowiki></ | </nowiki></pre> | ||
and enter the password at the prompt. | and enter the password at the prompt. | ||
第115行: | 第115行: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo nano /var/www/drupal/sites/default/settings.php | sudo nano /var/www/drupal/sites/default/settings.php | ||
</nowiki></ | </nowiki></pre> | ||
Add the proper user name (''drupaluser''), database name (''drupal'') and password (''drupalpass'') to the line that looks like: | Add the proper user name (''drupaluser''), database name (''drupal'') and password (''drupalpass'') to the line that looks like: | ||
第132行: | 第132行: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo /etc/init.d/apache2 restart | sudo /etc/init.d/apache2 restart | ||
</nowiki></ | </nowiki></pre> | ||
=== Try it out === | === Try it out === | ||
第160行: | 第160行: | ||
$ sudo aptitude install postgresql-8.1 | $ sudo aptitude install postgresql-8.1 | ||
$ sudo su postgres | $ sudo su postgres | ||
</nowiki></ | </nowiki></pre> | ||
Create a database and user for drupal on Postgresql | Create a database and user for drupal on Postgresql | ||
<pre><nowiki> | <pre><nowiki> | ||
$ createuser -D -A -P drupaluser | $ createuser -D -A -P drupaluser | ||
$ createdb -O drupaluser drupaldb | $ createdb -O drupaluser drupaldb | ||
</nowiki></ | </nowiki></pre> | ||
Modify the pg_hba.conf file of the postgresql DBMS | Modify the pg_hba.conf file of the postgresql DBMS | ||
<pre><nowiki> | <pre><nowiki> | ||
$ sudo nano /etc/postgresql/8.1/main/pg_hba.conf | $ sudo nano /etc/postgresql/8.1/main/pg_hba.conf | ||
</nowiki></ | </nowiki></pre> | ||
comment out this line after | comment out this line after | ||
# "local" is for Unix domain socket connections only | # "local" is for Unix domain socket connections only | ||
<pre><nowiki> | <pre><nowiki> | ||
# local all all ident sameuser | # local all all ident sameuser | ||
</nowiki></ | </nowiki></pre> | ||
Add the following lines | Add the following lines | ||
<pre><nowiki> | <pre><nowiki> | ||
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD | # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD | ||
host drupaldb drupaluser 127.0.0.1 255.255.255.255 password | host drupaldb drupaluser 127.0.0.1 255.255.255.255 password | ||
</nowiki></ | </nowiki></pre> | ||
Save the file (Ctrl + x, y) | Save the file (Ctrl + x, y) | ||
Restart the postgresql database server engine | Restart the postgresql database server engine | ||
<pre><nowiki> | <pre><nowiki> | ||
$ sudo /etc/init.d/postgresql* restart | $ sudo /etc/init.d/postgresql* restart | ||
</nowiki></ | </nowiki></pre> | ||
Check your database connection: | Check your database connection: | ||
<pre><nowiki> | <pre><nowiki> | ||
$ psql -h 127.0.0.1 -p 5432 -U drupaluser -W drupaldb | $ psql -h 127.0.0.1 -p 5432 -U drupaluser -W drupaldb | ||
Enter the password for user drupaluser: | Enter the password for user drupaluser: | ||
</nowiki></ | </nowiki></pre> | ||
==== Install Drupal ==== | ==== Install Drupal ==== | ||
第195行: | 第195行: | ||
<pre><nowiki> | <pre><nowiki> | ||
# sudo aptitude install libapache2-mod-php5 php5-imagick php5-ldap php5-pgsql php5 zlib1g-dev | # sudo aptitude install libapache2-mod-php5 php5-imagick php5-ldap php5-pgsql php5 zlib1g-dev | ||
</nowiki></ | </nowiki></pre> | ||
Download the drupal core files | Download the drupal core files | ||
<pre><nowiki> | <pre><nowiki> | ||
$ sudo wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-5.1.tar.gz | $ sudo wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-5.1.tar.gz | ||
</nowiki></ | </nowiki></pre> | ||
Unpack the tarball | Unpack the tarball | ||
<pre><nowiki> | <pre><nowiki> | ||
tar xvzf drupal-5.1.tar.gz | tar xvzf drupal-5.1.tar.gz | ||
</nowiki></ | </nowiki></pre> | ||
You can read the install file on creating postgresql database and user (already done above) | You can read the install file on creating postgresql database and user (already done above) | ||
<pre><nowiki> | <pre><nowiki> | ||
# sudo nano drupal-5.1/INSTALL.pgsql.txt | # sudo nano drupal-5.1/INSTALL.pgsql.txt | ||
</nowiki></ | </nowiki></pre> | ||
Make a folder for your drupal installation. | Make a folder for your drupal installation. | ||
<pre><nowiki> | <pre><nowiki> | ||
$ sudo mkdir /var/www/drupal | $ sudo mkdir /var/www/drupal | ||
</nowiki></ | </nowiki></pre> | ||
Move your drupal files into the drupal folder | Move your drupal files into the drupal folder | ||
<pre><nowiki> | <pre><nowiki> | ||
$ sudo mv drupal-5.1/* drupal-5.1/.htaccess /var/www/drupal | $ sudo mv drupal-5.1/* drupal-5.1/.htaccess /var/www/drupal | ||
</nowiki></ | </nowiki></pre> | ||
Create a /files storage folder for things like files, images, etc | Create a /files storage folder for things like files, images, etc | ||
<pre><nowiki> | <pre><nowiki> | ||
$ sudo mkdir /var/www/drupal/files | $ sudo mkdir /var/www/drupal/files | ||
</nowiki></ | </nowiki></pre> | ||
Make the data storage writeable | Make the data storage writeable | ||
<pre><nowiki> | <pre><nowiki> | ||
$ sudo chown -R www-data:www-data /var/www/drupal/files | $ sudo chown -R www-data:www-data /var/www/drupal/files | ||
</nowiki></ | </nowiki></pre> | ||
Edit the settings.php file so that drupal can know what user, password and database to use. | Edit the settings.php file so that drupal can know what user, password and database to use. | ||
<pre><nowiki> | <pre><nowiki> | ||
第230行: | 第230行: | ||
$db_url = 'pgsql://username:password@localhost/databasename'; | $db_url = 'pgsql://username:password@localhost/databasename'; | ||
where username == drupaluser password == drupaluserpass databasename = drupaldb | where username == drupaluser password == drupaluserpass databasename = drupaldb | ||
</nowiki></ | </nowiki></pre> | ||
Save the file (Ctrl + x, y) | Save the file (Ctrl + x, y) | ||
第241行: | 第241行: | ||
; Example lines: | ; Example lines: | ||
;extensions=pgsql.so | ;extensions=pgsql.so | ||
</nowiki></ | </nowiki></pre> | ||
Save the changes to the php.ini file (Ctrl + x, y) | Save the changes to the php.ini file (Ctrl + x, y) | ||
Restart apache | Restart apache | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo /etc/init.d/apache2 restart | sudo /etc/init.d/apache2 restart | ||
</nowiki></ | </nowiki></pre> | ||
==== Finish Installation ==== | ==== Finish Installation ==== |
2007年5月13日 (日) 12:34的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/Drupal }} |
点击翻译: |
English {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/af | • {{#if: php5|Afrikaans| [[::Drupal/af|Afrikaans]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/ar | • {{#if: php5|العربية| [[::Drupal/ar|العربية]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/az | • {{#if: php5|azərbaycanca| [[::Drupal/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/bcc | • {{#if: php5|جهلسری بلوچی| [[::Drupal/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/bg | • {{#if: php5|български| [[::Drupal/bg|български]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/br | • {{#if: php5|brezhoneg| [[::Drupal/br|brezhoneg]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/ca | • {{#if: php5|català| [[::Drupal/ca|català]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/cs | • {{#if: php5|čeština| [[::Drupal/cs|čeština]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/de | • {{#if: php5|Deutsch| [[::Drupal/de|Deutsch]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/el | • {{#if: php5|Ελληνικά| [[::Drupal/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/es | • {{#if: php5|español| [[::Drupal/es|español]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/fa | • {{#if: php5|فارسی| [[::Drupal/fa|فارسی]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/fi | • {{#if: php5|suomi| [[::Drupal/fi|suomi]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/fr | • {{#if: php5|français| [[::Drupal/fr|français]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/gu | • {{#if: php5|ગુજરાતી| [[::Drupal/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/he | • {{#if: php5|עברית| [[::Drupal/he|עברית]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/hu | • {{#if: php5|magyar| [[::Drupal/hu|magyar]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/id | • {{#if: php5|Bahasa Indonesia| [[::Drupal/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/it | • {{#if: php5|italiano| [[::Drupal/it|italiano]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/ja | • {{#if: php5|日本語| [[::Drupal/ja|日本語]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/ko | • {{#if: php5|한국어| [[::Drupal/ko|한국어]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/ksh | • {{#if: php5|Ripoarisch| [[::Drupal/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/mr | • {{#if: php5|मराठी| [[::Drupal/mr|मराठी]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/ms | • {{#if: php5|Bahasa Melayu| [[::Drupal/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/nl | • {{#if: php5|Nederlands| [[::Drupal/nl|Nederlands]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/no | • {{#if: php5|norsk| [[::Drupal/no|norsk]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/oc | • {{#if: php5|occitan| [[::Drupal/oc|occitan]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/pl | • {{#if: php5|polski| [[::Drupal/pl|polski]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/pt | • {{#if: php5|português| [[::Drupal/pt|português]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/ro | • {{#if: php5|română| [[::Drupal/ro|română]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/ru | • {{#if: php5|русский| [[::Drupal/ru|русский]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/si | • {{#if: php5|සිංහල| [[::Drupal/si|සිංහල]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/sq | • {{#if: php5|shqip| [[::Drupal/sq|shqip]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/sr | • {{#if: php5|српски / srpski| [[::Drupal/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/sv | • {{#if: php5|svenska| [[::Drupal/sv|svenska]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/th | • {{#if: php5|ไทย| [[::Drupal/th|ไทย]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/tr | • {{#if: php5|Türkçe| [[::Drupal/tr|Türkçe]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/vi | • {{#if: php5|Tiếng Việt| [[::Drupal/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/yue | • {{#if: php5|粵語| [[::Drupal/yue|粵語]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/zh | • {{#if: php5|中文| [[::Drupal/zh|中文]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/zh-hans | • {{#if: php5|中文(简体)| [[::Drupal/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Drupal}}/zh-hant | • {{#if: php5|中文(繁體)| [[::Drupal/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:php5|:Drupal|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Drupal/zh | | {{#ifexist: Drupal/zh | | {{#ifeq: {{#titleparts:Drupal|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Drupal|1|-1|}} | zh | | }}
Drupal
Drupal is a robust Content Management System that runs on LAMP. Without any of its aditional modules, it can host blogs, forums, and a variety of other content.
It has an astounding number of modules which bring added functionality to your site, including advertising, chatbox, e-commerce, various multimedia tools, instant messenger, light customer relationship management, printer friendly pages, webcam, etc...
Follow these instructions to install Drupal on Ubuntu 6.06 (Dapper Drake). You may also install the 5.1 stable branch of Drupal on Ubuntu 6.06 (Dapper Drake) without any modification.
To install Drupal-5.1 with php5 and Postgresql-8.1, follow instructions at bottom of page.
Installing
An older version of Drupal is present in the repositories, but it is no longer supported upstream. A more recent version has more modules and themes. As well, since the package is so old, the installation of the Drupal package from the repositories will replace php5 in with php4.
Also, none of the Drupal modules are packaged and present in the repositores.
Therefore, it is advisable to install the latest version from drupal.org. Currently, version 4.7.6 is available.
Install the LAMP stack
Use any method to install the LAMP stack packages.
apache2 php5-mysql php5-gd libapache2-mod-php5 mysql-server
Set a mysql-root password (not the same as a root password, but a password for mysql)
mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
A successful mysql command will show:
Query OK, 0 rows affected (0.00 sec)
Quit the mysql prompt:
mysql> \q
You should now have a functional LAMP stack and a password for the mysql root user.
Visit Apache PHP MySQL for more information on LAMP.
Get the most recent version of Drupal
wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-4.7.6.tar.gz tar xvzf drupal-4.7.6.tar.gz sudo mkdir /var/www/drupal sudo mv drupal-4.7.6/* drupal-4.7.6/.htaccess /var/www/drupal
It is a good idea to create a files subdirectory in your drupal installation directory. It is not strictly neccessary, but will be used for files such as custom logos, user avatars, and other media associated with your new site.
sudo mkdir /var/www/drupal/files sudo chown www-data:www-data /var/www/drupal/files
Drupal needs a database, user and password
You need to create a drupal database and then load the database schema into it. You can do this with PhpMyAdmin or via the command line:
mysqladmin -u root -p create drupal
Where drupal is the name you picked for the mysql database that Drupal will use. You can call it anything you want.
mysql -u root -p mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO 'drupaluser'@'localhost' IDENTIFIED BY 'drupalpass';
You do not want to have Drupal use the mysql root user to access the database. The above command creates a mysql user (other than the mysql root user) with some priviledges to use the drupal database. You should pick something different than drupaluser and drupalpass. If the command was successful, activate the new permissions:
mysql> FLUSH PRIVILEGES;
Quit the mysql prompt:
mysql> \q
Fill the database
Now, load the schema into the database. If you created a database with a different name, use that name instead of drupal.
mysql -u drupaluser -p drupal < /var/www/drupal/database/database.4.1.mysql
and enter the password at the prompt.
For more details about configuring the mysql database for Drupal, read the INSTALL.mysql.txt file in the Drupal folder.
Settings
You need to edit the settings.php file so that drupal can know what user, password and database to use.
sudo nano /var/www/drupal/sites/default/settings.php
Add the proper user name (drupaluser), database name (drupal) and password (drupalpass) to the line that looks like:
$db_url = "mysql://drupaluser:drupalpass@localhost/drupal";
PHP memory limit
You need to increase the amount of memory PHP can use to run scripts.
Edit the /etc/php5/apache2/php.ini file and increase the memory_limit value to 32 megs or another value of your choice (8 megs is not enough for Drupal)
Reload Apache2
You probably need to force-reload apache2 if you have not done so since you installed LAMP.
sudo /etc/init.d/apache2 restart
Try it out
Point your browser to localhost/drupal, create an account and login.
attachment:drupal.jpg
The first account will automatically become the main administrator account with total control.
attachment:drupal1.jpg
Please refer to the drupal installation manual for more advanced hosting features.
Drupal 5.1
You need not edit the settings.php file buy hand when using the very latest version of Drupal. The installer now uses a graphical interface for setting up your site. The only caveat is that the settings.php file must be made writeable during the process.
The installer will show you a message informing you that the file is not writeable if this is the case. It will also show you a message advising you to revert the permissions back to read-only after the changes have been saved, since keeping it writeable is a security risk.
You may still edit the settings.php file by hand, as in the traditional way of installing, if you wish.
POSTGRESQL-8.1 with PHP5 and DRUPAL5.1
These instructions should work on Ubuntu 6.06, 6.10 and other Debian derivatives.
Install Postgresql 8.1
$ sudo aptitude install postgresql-8.1 $ sudo su postgres
Create a database and user for drupal on Postgresql
$ createuser -D -A -P drupaluser $ createdb -O drupaluser drupaldb
Modify the pg_hba.conf file of the postgresql DBMS
$ sudo nano /etc/postgresql/8.1/main/pg_hba.conf
comment out this line after
- "local" is for Unix domain socket connections only
# local all all ident sameuser
Add the following lines
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD host drupaldb drupaluser 127.0.0.1 255.255.255.255 password
Save the file (Ctrl + x, y) Restart the postgresql database server engine
$ sudo /etc/init.d/postgresql* restart
Check your database connection:
$ psql -h 127.0.0.1 -p 5432 -U drupaluser -W drupaldb Enter the password for user drupaluser:
Install Drupal
Install drupal dependencies
# sudo aptitude install libapache2-mod-php5 php5-imagick php5-ldap php5-pgsql php5 zlib1g-dev
Download the drupal core files
$ sudo wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-5.1.tar.gz
Unpack the tarball
tar xvzf drupal-5.1.tar.gz
You can read the install file on creating postgresql database and user (already done above)
# sudo nano drupal-5.1/INSTALL.pgsql.txt
Make a folder for your drupal installation.
$ sudo mkdir /var/www/drupal
Move your drupal files into the drupal folder
$ sudo mv drupal-5.1/* drupal-5.1/.htaccess /var/www/drupal
Create a /files storage folder for things like files, images, etc
$ sudo mkdir /var/www/drupal/files
Make the data storage writeable
$ sudo chown -R www-data:www-data /var/www/drupal/files
Edit the settings.php file so that drupal can know what user, password and database to use.
$ sudo nano /var/www/drupal/sites/default/settings.php * Database URL format: $db_url = 'pgsql://username:password@localhost/databasename'; where username == drupaluser password == drupaluserpass databasename = drupaldb
Save the file (Ctrl + x, y)
Edit the amount of memory PHP can use to run scripts. The default 8mb is not enough for drupal, set to 32mb or more
$ sudo nano /etc/php5/apache2/php.ini file ; Resource Limits ; memory_limit = 160M You may also edit the example lines to accommodate Postgresql options ; Example lines: ;extensions=pgsql.so
Save the changes to the php.ini file (Ctrl + x, y) Restart apache
sudo /etc/init.d/apache2 restart
Finish Installation
In a browser, enter: http://localhost/drupal/install.php
Configuration
File System
Change the Download Method from public to private
Select 'save configuration'
Cron
Click on 'You can run manually'
For further configuration, please refer to:http://drupal.org/node/260