Difference between pages "Package:Drupal" and "Package:Layman"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
m (add base url config)
 
m
 
Line 1: Line 1:
{{Ebuild
{{Ebuild
|Summary=PHP-based open-source platform and content management system
|Summary=Tool to manage Gentoo overlays
|CatPkg=www-apps/drupal
|CatPkg=app-portage/layman
|Maintainer=
|Homepage=http://layman.sourceforge.net/
|Homepage=http://drupal.org/
}}
}}
Drupal is a powerful [[Web-server-stack]] web application that can be used to craft custom websites, for example: http://www.whitehouse.gov
Layman is an "overlay" external repository management tool.


== Install ==
=== Installation ===
{{note|drupal likes php emerged with the gmp use flag enabled}}
<console>###i## emerge layman</console>
[[make.conf]] must source laymans overlays for emerge to pull in packages from external sources.  This line needs to be below everything else in make.conf.
<console>###i## echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf</console>


<console>
=== Using Layman ===
###i## emerge drupal
Fetch, and display a list of overlays:
</console>
<console>###i## layman -L</console>


=== MySQL ===
Add an overlay to your system:
{{warning|default "changeme" passwords are insecure, change them!}}
<console>###i## layman -a <overlay name></console>


To create a database for drupal to interact with:
Delete an overlay from your system:
<console>###i## layman -d <overlay name></console>


<console>###i## mysql -u root -p
==== Masking Overlay Packages ====
mysql> ##i##CREATE DATABASE IF NOT EXISTS `drupal` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
Overlays have the power to override distro packages.  To avoid conflicts, mask everything in the overlay, and unmask the packages that are necessary to your system.
mysql> ##i##CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'changeme';
mysql> ##i##GRANT LOCK TABLES, SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `drupal`.* TO 'drupal'@'localhost' IDENTIFIED BY 'changeme';
mysql> ##i##\q
</console>
=== webapp-config ===
{{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:
{{file|name=/etc/portage/package.mask|lang=|desc=mask all packages in an overlay|body=
*/*::overlay-name
}}


<console>###i## equery l drupal</console>
{{file|name=/etc/portage/package.unmask|lang=|desc=unmask packages to be used|body=
 
cat-egory/pack-age1
then run something similar to this, making sure to replace the version number with your current drupal version.
cat-egory/pack-age2
 
}}
<console>###i## webapp-config -I -h localhost -u root -d /drupal drupal 7.31</console>
 
=== web install ===
Start your web server, and database.
 
==== nginx ====
configure your nginx similar to official documentation.  http://wiki.nginx.org/Drupal
 
point your browser @ http://localhost/drupal/install.php


==== apache ====
==== Sync ====
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>
 
point your browser @ http://localhost/drupal/install.php
 
=== 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 ===
Sync a specific overlays ebuilds:
If you suddenly find your self locked out of your drupal cms because it is in maintenence mode:
<console>###i## layman -s <overlay name></console>


http://localhost/drupal/user
Sync all overlays:
<console>###i## layman -S</console>


== Troubleshooting ==
Sync all overlays via eix:
If you are having problems logging into the admin console flush your browser cache.
<console>###i## eix-sync</console>


== Media ==
=== Troubleshooting ===
=== Overview ===
Problem:
{{#widget:YouTube|id=kaOuQxsjs3E}}
Warning: an installed db file was not found at: ['/var/lib/layman/cache***.xml']


=== Tutorials ===
Solution:
{{#widget:YouTube|playlist=PL15BE2E8313A4E809}}
<console>###i## layman -L</console>


== External Resources ==
* https://wiki.gentoo.org/wiki/Drupal
* [http://youtu.be/sfrfuCLH9sg google tech talks: implementing drupal]
* [https://www.youtube.com/channel/UCyLF5zO6ghZcOXKHRWTipvw drupalize.me youtube channel]
{{EbuildFooter}}
{{EbuildFooter}}

Revision as of 12:00, February 3, 2015

Layman

   Tip

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.

Layman is an "overlay" external repository management tool.

Installation

root # emerge layman

make.conf must source laymans overlays for emerge to pull in packages from external sources. This line needs to be below everything else in make.conf.

root # echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf

Using Layman

Fetch, and display a list of overlays:

root # layman -L

Add an overlay to your system:

root # layman -a <overlay name>

Delete an overlay from your system:

root # layman -d <overlay name>

Masking Overlay Packages

Overlays have the power to override distro packages. To avoid conflicts, mask everything in the overlay, and unmask the packages that are necessary to your system.

   /etc/portage/package.mask - mask all packages in an overlay
*/*::overlay-name
   /etc/portage/package.unmask - unmask packages to be used
cat-egory/pack-age1
cat-egory/pack-age2

Sync

Sync a specific overlays ebuilds:

root # layman -s <overlay name>

Sync all overlays:

root # layman -S

Sync all overlays via eix:

root # eix-sync

Troubleshooting

Problem: Warning: an installed db file was not found at: ['/var/lib/layman/cache***.xml']

Solution:

root # layman -L