The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Package:Drupal"
Threesixes (talk | contribs) m (fix some stuff) |
Threesixes (talk | contribs) m (more details) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
== Install == | == Install == | ||
{{note|drupal likes php emerged with the gmp use flag enabled}} | |||
<console> | <console> | ||
Line 18: | Line 19: | ||
To create a database for drupal to interact with: | To create a database for drupal to interact with: | ||
<console>###i## mysql -u root -p | <console>###i## mysql -u root -p | ||
mysql> ##i##CREATE DATABASE IF NOT EXISTS `drupal` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`; | |||
mysql> ##i##CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'changeme'; | |||
mysql> CREATE DATABASE IF NOT EXISTS `drupal` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`; | mysql> ##i##GRANT LOCK TABLES, SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `drupal`.* TO 'drupal'@'localhost' IDENTIFIED BY 'changeme'; | ||
mysql> CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'changeme'; | mysql> ##i##\q | ||
mysql> GRANT LOCK TABLES, SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `drupal`.* TO 'drupal'@'localhost' IDENTIFIED BY 'changeme'; | </console> | ||
mysql> \q | |||
</ | |||
=== webapp-config === | === webapp-config === | ||
{{note| <code>webapp-config</code> is currently broken for | {{note|1= | ||
<code>webapp-config</code> is currently broken for Drupal so you must run it yourself:}} | |||
To run <code>webapp-config</code>, you must know the version number of the webapp you're installing. To find the version number: | To run <code>webapp-config</code>, you must know the version number of the webapp you're installing. To find the version number: | ||
Line 41: | Line 40: | ||
Start your web server, and database. | Start your web server, and database. | ||
==== nginx ==== | |||
configure your nginx similar to official documentation. http://wiki.nginx.org/Drupal | |||
{{file|name=/etc/nginx/sites-available/localhost|lang=|desc=drupal rewrite rules|body= | |||
#disable private | |||
location ~ ^/sites/.*/private/ { | |||
return 403; | |||
} | |||
location /drupal { | |||
try_files $uri @rewrite; | |||
} | |||
location @rewrite { | |||
rewrite ^/([^/]*)/(.*)(/?)$ /$1/index.php?q=$2&$args; | |||
} | |||
location ~ ^/sites/.*/files/styles/ { | |||
try_files $uri @rewrite; | |||
} | |||
}} | |||
point your browser @ http://localhost/drupal/install.php | |||
==== apache ==== | |||
If you are using apache 2.4, or newer run this sed command. | If you are using apache 2.4, or newer run this sed command. | ||
<console>###i## sed -i 's\Order allow,deny\Require all granted\' /var/www/localhost/htdocs/drupal/.htaccess</console> | <console>###i## sed -i 's\Order allow,deny\Require all granted\' /var/www/localhost/htdocs/drupal/.htaccess</console> | ||
Line 46: | Line 69: | ||
point your browser @ http://localhost/drupal/install.php | point your browser @ http://localhost/drupal/install.php | ||
== Maintenance Mode Access == | === Permission Adjustments === | ||
==== Enable Theme & Module Uploads ==== | |||
{{note| if you're using nginx change to nobody:nogroup}} | |||
<console>###i## chown -R apache:apache /var/www/localhost/htdocs/drupal/sites/all/</console> | |||
* [https://www.drupal.org/project/project_theme drupal theme index] | |||
* [https://www.drupal.org/project/project_module drupal extensions] | |||
==== Adjust for Security ==== | |||
<console>###i## chmod 640 /var/www/localhost/htdocs/drupal/sites/default/settings.php</console> | |||
== Post Install == | |||
=== base url === | |||
To set your base url: | |||
{{file|name=/var/www/localhost/htdocs/drupal/sites/default/settings.php|lang=php|desc=ip address listening to external requests or domain name|body= | |||
$base_url = 'http://0.0.0.0/drupal'; // NO trailing slash! | |||
}} | |||
=== Cron === | |||
Drupal automates several tasks by cron. see official documentation to setup a cron job. | |||
https://www.drupal.org/node/23714 | |||
=== Maintenance Mode Access === | |||
If you suddenly find your self locked out of your drupal cms because it is in maintenence mode: | If you suddenly find your self locked out of your drupal cms because it is in maintenence mode: | ||
Line 53: | Line 99: | ||
== Troubleshooting == | == Troubleshooting == | ||
If you are having problems logging into the admin console flush your browser cache. | If you are having problems logging into the admin console flush your browser cache. | ||
== Media == | |||
=== Overview === | |||
{{#widget:YouTube|id=kaOuQxsjs3E}} | |||
=== Tutorials === | |||
{{#widget:YouTube|playlist=PL15BE2E8313A4E809}} | |||
== External Resources == | == External Resources == | ||
* https://wiki.gentoo.org/wiki/Drupal | * https://wiki.gentoo.org/wiki/Drupal | ||
* [http://youtu.be/ | * [http://youtu.be/sfrfuCLH9sg google tech talks: implementing drupal] | ||
* [https://www.youtube.com/channel/UCyLF5zO6ghZcOXKHRWTipvw drupalize.me youtube channel] | |||
{{EbuildFooter}} | {{EbuildFooter}} |
Latest revision as of 00:42, May 10, 2015
Drupal
We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.
Drupal is a powerful Web-server-stack web application that can be used to craft custom websites, for example: http://www.whitehouse.gov
Install
drupal likes php emerged with the gmp use flag enabled
root # emerge drupal
MySQL
default "changeme" passwords are insecure, change them!
To create a database for drupal to interact with:
root # mysql -u root -p mysql> CREATE DATABASE IF NOT EXISTS `drupal` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`; mysql> CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'changeme'; mysql> GRANT LOCK TABLES, SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `drupal`.* TO 'drupal'@'localhost' IDENTIFIED BY 'changeme'; mysql> \q
webapp-config
webapp-config
is currently broken for Drupal so you must run it yourself:
To run webapp-config
, you must know the version number of the webapp you're installing. To find the version number:
root # equery l drupal
then run something similar to this, making sure to replace the version number with your current drupal version.
root # webapp-config -I -h localhost -u root -d /drupal drupal 7.31
web install
Start your web server, and database.
nginx
configure your nginx similar to official documentation. http://wiki.nginx.org/Drupal
/etc/nginx/sites-available/localhost
- drupal rewrite rules#disable private location ~ ^/sites/.*/private/ { return 403; } location /drupal { try_files $uri @rewrite; } location @rewrite { rewrite ^/([^/]*)/(.*)(/?)$ /$1/index.php?q=$2&$args; } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; }
point your browser @ http://localhost/drupal/install.php
apache
If you are using apache 2.4, or newer run this sed command.
root # sed -i 's\Order allow,deny\Require all granted\' /var/www/localhost/htdocs/drupal/.htaccess
point your browser @ http://localhost/drupal/install.php
Permission Adjustments
Enable Theme & Module Uploads
if you're using nginx change to nobody:nogroup
root # chown -R apache:apache /var/www/localhost/htdocs/drupal/sites/all/
Adjust for Security
root # chmod 640 /var/www/localhost/htdocs/drupal/sites/default/settings.php
Post Install
base url
To set your base url:
/var/www/localhost/htdocs/drupal/sites/default/settings.php
(php source code) - ip address listening to external requests or domain name$base_url = 'http://0.0.0.0/drupal'; // NO trailing slash!
Cron
Drupal automates several tasks by cron. see official documentation to setup a cron job. https://www.drupal.org/node/23714
Maintenance Mode Access
If you suddenly find your self locked out of your drupal cms because it is in maintenence mode:
Troubleshooting
If you are having problems logging into the admin console flush your browser cache.
Media
Overview
Tutorials
External Resources
- https://wiki.gentoo.org/wiki/Drupal
- google tech talks: implementing drupal
- drupalize.me youtube channel