Difference between pages "Adding an Ebuild to the Wiki" and "Package:Xcache"

From Funtoo
(Difference between pages)
Jump to: navigation, search
(Pages Need Approval)
 
(Created page with "{{Ebuild |Summary=A fast and stable PHP opcode cacher |CatPkg=dev-php/xcache |Maintainer=Drobbins, |Repository=Funtoo Overlay }} == Configuring PHP FPM == As we already in...")
 
Line 1: Line 1:
This page describes how to add an official entry for an ebuild to the Funtoo Linux wiki.
+
{{Ebuild
 +
|Summary=A fast and stable PHP opcode cacher
 +
|CatPkg=dev-php/xcache
 +
|Maintainer=Drobbins,
 +
|Repository=Funtoo Overlay
 +
}}
 +
== Configuring PHP FPM ==
  
== Goal ==
+
As we already installed php with fpm support above we just need to adjust the following settings in ''/etc/php/fpm-php5.3/php-fpm.conf''. You should enable the following settings:
  
Our goal for ebuild wiki pages is ambitious -- the wiki should have complete and excellent documentation for using every ebuild in Portage. If the ebuild exists in your Funtoo Linux Portage tree, and there is no corresponding ebuild page for it, you're encouraged to use these instructions to add a page to the wiki for it.
+
<pre>
 +
user = nginx
 +
group = nginx
 +
pm.start_servers = 20
 +
</pre>
  
== What We Have So Far ==
+
The other options should all be very well documented, so make it fit your needs.
  
To see what ebuild pages we have so far, see the [[Ebuilds by CatPkg]] page to see if the "CatPkg" (category/package atom) is already on this wiki.
+
== Configuring xcache ==
  
You can also view all pages having to do with ebuilds (which also includes Package pages themselves) by going to the [[:Category:Ebuilds]] page. Package pages will be listed by their regular wiki page names, which may make them harder to find.
+
For setting xcache just edit ''/etc/php/fpm-php5.3/ext-active/xcache''
  
== The Package Namespace ==
+
<pre>
 +
zend_extension=/usr/lib64/php5.3/lib/extensions/no-debug-zts-20090626/          xcache.so                                                                 
 +
  2 xcache.admin.enable_auth="On"
 +
  3 xcache.admin.user="admin"
 +
  4 xcache.admin.pass=""
 +
  5 xcache.cacher="On"
 +
  6 xcache.size="64M"
 +
  7 xcache.count="9"
 +
  8 xcache.slots="8k"
 +
  9 xcache.ttl="0"
 +
10 xcache.gc_interval="0"
 +
11 xcache.var_size="8M"
 +
12 xcache.var_count="1"
 +
13 xcache.var_slots="8K"
 +
14 xcache.var_ttl="0"
 +
15 xcache.var_maxttl="0"
 +
16 xcache.var_gc_interval="600"
 +
17 xcache.readonly_protection="Off"
 +
18 xcache.mmap_path="/dev/zero"
 +
19 xcache.coverager="On"
 +
20 xcache.coveragedump_directory="/tmp/coverager"
 +
21 xcache.optimizer="On"
 +
</pre>
  
This wiki has a special MediaWiki [http://www.mediawiki.org/wiki/Help:Namespaces namespace] called <code>Package</code>. Pages in this namespace have a URL that is prefixed with <code>Package:</code>, such as this wiki page: [[Package:Accelerated AMD Video Drivers]], which is also a good example of a wiki page for an ebuild.
+
it might look like that for you, feel free to change the settings, and if you want to be able to log in into the admin interface set the ''xcache.admin.pass'' as a md5 encrypted password you can find it out with:
  
== An Example Ebuild Page ==
+
<pre>
 +
php -a
 +
php> echo md5(PASSWORD);
 +
</pre>
  
Let's look at an ebuild page: [[Package:Accelerated AMD Video Drivers]]. You'll notice it has a unique look that is distinct from a regular wiki page.
+
and copy the admin interface to your vhost:
  
There are several other notable things about package pages. Let's take a look at each:
+
<pre>
 +
cp /usr/share/php/xcache/admin -a /var/www/{VHOST}/htdocs/xcache-admin
 +
</pre>
  
* As covered earlier, the ebuild is in the Package namespace.
+
== Starting the service ==
* The ebuild is in the [[:Category:Ebuilds]] category.
+
* In the left-hand Tools menu, you can click <code>Browse Properties</code> on an Ebuild page to view its queryable semantic properties.
+
* There is an infobox in the upper-right corner that lists current ebuild maintainer, and the source repository to which it belongs, as well as its official CatPkg name.
+
  
'''One of the most important things to note about this Ebuild page is the name of the wiki page itself.''' Rather than being named <code>x11-drivers/ati-drivers</code>, as the ebuild is identified in the Portage tree, it has a regular English name as the wiki page name. Some ebuilds, like the [[Package:Nginx]] page, have the regular package name as the wiki page name. The general rule for naming ebuild pages is that they should be named as a regular wiki page, with a descriptive English name in the Package namespace. The Package namespace (as well as being part of the [[:Category:Ebuilds]] category) indicates that this page is about a Package (ebuild.)
+
Now start the services:
  
The rationale for this convention is to improve discoverability of these pages via search engines, and to align with wiki page conventions. The CatPkg is stored as semantic data so it is still possible to find the page using its traditional package atom.
+
<pre>
 +
/etc/init.d/php-fpm start
 +
/etc/init.d/nginx start
 +
</pre>
  
== Semantic Data ==
+
and make them default:
  
The following semantic data is stored for each Package page:
+
<pre>
 +
rc-update add php-fpm default
 +
rc-update add nginx default
 +
</pre>
  
* [[Property:CatPkg|CatPkg]] (string) - the canonical name (catpkg atom) for the package in its overlay or repository.
+
== See also ==
* [[Property:Maintainer|Maintainer]] (Page) - a link to the maintainer(s) of this package (if the user has a User page, it will link there.)
+
{{EbuildFooter}}
* [[Property:Repository|Repository]] (Page) - a link to the repository from which this ebuild is sourced. This can be an overlay or a full Portage tree.
+
* [[Property:Summary|Summary]] (Text) - a short summary, typically a sentence, that describes the functionality of the ebuild.
+
 
+
== Creating a Package Page ==
+
 
+
To add an Ebuild page to the wiki, use the widget below, which will pop up a form to guide you through the creation process. Remember the naming guidelines... If you were creating a wiki page for <code>www-servers/apache</code>, you would probably name the wiki page "Apache" or "Apache Web Server", and ''then'' enter <code>www-servers/apache</code> as the ''CatPkg'' on the form.
+
 
+
You will also be prompted for a Summary, Maintainer and a Repository. The Repository (as well as Maintainer) field will auto-complete, based on Users and Repositories defined on the wiki. If you don't know the right values for either of these, just leave them blank -- a staff member will fill them in properly for you. Our main goal is to get ''quality documentation'' online, so if you can help with that, fantastic!
+
 
+
{{#forminput:form=Ebuild|size=|default value=|button text=Add Package|autocomplete on namespace=Package|remote autocompletion|placeholder=Descriptive name|popup}}
+
 
+
== Pages Need Approval ==
+
 
+
Anyone who signs up for a Funtoo account can create and edit wiki pages, but your additions/changes may need to be approved by a moderator before they are displayed. You can still edit and improve the page in the mean time. Once your edits have been approved, your changes will be on the official page that is displayed when anyone visits it.
+
 
+
Thanks very much for your contribution to Funtoo Linux documentation!
+

Revision as of 04:49, 16 June 2014

dev-php/xcache


Current Maintainer(s):Daniel Robbins
Source Repository:Funtoo Overlay

Summary: A fast and stable PHP opcode cacher

Xcache

Configuring PHP FPM

As we already installed php with fpm support above we just need to adjust the following settings in /etc/php/fpm-php5.3/php-fpm.conf. You should enable the following settings:

user = nginx
group = nginx
pm.start_servers = 20

The other options should all be very well documented, so make it fit your needs.

Configuring xcache

For setting xcache just edit /etc/php/fpm-php5.3/ext-active/xcache

zend_extension=/usr/lib64/php5.3/lib/extensions/no-debug-zts-20090626/          xcache.so                                                                   
  2 xcache.admin.enable_auth="On"
  3 xcache.admin.user="admin"
  4 xcache.admin.pass=""
  5 xcache.cacher="On"
  6 xcache.size="64M"
  7 xcache.count="9"
  8 xcache.slots="8k"
  9 xcache.ttl="0"
 10 xcache.gc_interval="0"
 11 xcache.var_size="8M"
 12 xcache.var_count="1"
 13 xcache.var_slots="8K"
 14 xcache.var_ttl="0"
 15 xcache.var_maxttl="0"
 16 xcache.var_gc_interval="600"
 17 xcache.readonly_protection="Off"
 18 xcache.mmap_path="/dev/zero"
 19 xcache.coverager="On"
 20 xcache.coveragedump_directory="/tmp/coverager"
 21 xcache.optimizer="On"

it might look like that for you, feel free to change the settings, and if you want to be able to log in into the admin interface set the xcache.admin.pass as a md5 encrypted password you can find it out with:

php -a
php> echo md5(PASSWORD);

and copy the admin interface to your vhost:

cp /usr/share/php/xcache/admin -a /var/www/{VHOST}/htdocs/xcache-admin

Starting the service

Now start the services:

/etc/init.d/php-fpm start
/etc/init.d/nginx start

and make them default:

rc-update add php-fpm default
rc-update add nginx default

See also