UPDATE: This guide to set up a PEAR channel server has been deprecated by this howto, written by Greg Beaver. Anyway, the following text might still give you a few good hints.
Another little tutorial in my little series on PEAR 1.4, which has been released gracefully a couple of hours ago in it's first alpha versions. This time, I will give you some hints on setting up your own PEAR channel server.
Btw. you can discover and use my onw little test channel (as long as I'm online at home), using (PEAR 1.4 presumed):
pear channel-discover pear.schlitt.info pear install -f schlitt/Services_Trackback
A working PEAR 1.4 installation presumed.
Precodinditions for the installation of PEAR_Server are the following:
PHP 5.0.3 (or later).
PEAR 1.4.0a2 (or later) installed.
Access to a MySQL database.
A full qualified domain name to run the server in a dedicated environment.
Basic info's on how to install PHP5 can be found here. MySQL and a domain name (such as pear.schlitt.info) seem to be common preconditions and need no further introduction. The dependency to a domain name will be dropped in future.
Warning: What follows is the handling of software which is rated "alpha" quality. NEVER use this in a production environment. Everything you do from this point on is at your own risk.
To get an actual version of PEAR use go-pear.org (if you have no running PEAR installation, yet) and type
pear clear-cache pear upgrade PEAR
If you have problems installing this version, it maybe you have set another preferred_state than "alpha" (of course, this is nothing wrong!). To self this problem simple us
pear upgrade -f PEAR
which allows you to install the package even if it's not available in your preferred state. Finishing this, you've upgraded to PEAR 1.4. Easy, wasn't that? ;)
Next thing todo is discovering Gregs channel, which is located at pear.chiaraquartet.net, because the PEAR_Server package is not officially released, yet:
pear channel-discover pear.chiaraquartet.net
The channel.xml for this channel is automatically downloaded and the channel is registered locally. Some more info is provided by pear list-channels and pear channel-info chiara. As one can see here, the channel also publicated it's shortcut (chiara) to our PEAR installer.
Now we will go on installing the PEAR_Server package, which should work like a charme when typing
pear install -f --alldeps PEAR_Server
if that does not work (I experienced problems with the channel and channel name resolutions in an older version), try one of the following:
pear install -f --alldeps chiara/PEAR_Server pear install -f --alldeps pear.chiaraquartet.net/PEAR_Server
Finishing installation, the installer will tell us, that the package PEAR_Server has some post-install script to run. This should be done now, if all preconditions are fulfilled (meaning a virgin MySQL database, proper credentials for that and a virgin htdocs root):
pear run-scripts PEAR_Server
You will be asked several questions about your database, the htdocs, the details of your channel and you as the intial administrator. If everything works correct, the PEAR installer should create necessary tables and entries inside the database (4 tables and some entries for the user and the channel) and create the directory structure of your channel server below the htdocs directory you provided. Your channel should also be registered in your PEAR installer immediatelly.
Some adjustments have to be done to the current installation. First of all, the creation of an index.htm is recommended in the htdocs folder, to avoid people browsing the directory. Next is to rename the file frontend.php (created by the installer) to any other name to avoid people accessing your admin interface.
The admin interface brings us to the next steps. Open the website http:://your.channel.domain/your_frontend_filename.php in a webbrowser, you should get a login form. Provide your user credentials, chosen during the installation and enter the administration of your PEAR server.
What we have to do first is register a new package. Enter the necessary info about your package (especially the correct name) and submit the form. After that we need edit the recently created package again. Doing this a new link appears beside the package details form named "Manage Package Maintainers". Here we should add ourself as the lead maintainer of the package, so we can upload releases.
So, what we need now is a package release to upload. The release package must fulfill the following preconditions:
Having a package2.xml (so being build by PEAR 1.4).
Your channel configured in the package2.xml.
I provided information on how to deal with package2.xml in my last article. Simply replace the pear.php.net inside the <channel /> tag with the URI of your channel. Having build that package correctly, you might upload it through the webinterface of your server.
Congratulations, you have recently set up your own PEAR channel, which provides the first release. :)
Testing your own channel is very easy, simply try to install the package you recently added to the channel using:
pear install Your_Package_Name
Please note, that package names currently seem to be casesensitive (in some cases). If the shown syntax does not work, please try using one of the following:
pear install your_channel_alias/Your_Package_Name pear install your_channel_URI/Your_Package_Name
One of those commaned should work, if it doesn't something might be wrong with your server or client installation.
If you experience any difficulties while processing the above shown steps, please first try debugging a little bit yourself using the verbose option of the PEAR installer. Next steps for getting help should be a) emailing pear-general and/or b) asking for help in #pear on Efnet. If you're sure to have found a bug, please file a bug report at pear.php.net.
Note that unless you
$ pear config-set default_channel chiara
you will always need to prefix a package name with the channel as in chiara/PEAR_Server.
If it works without this, that's a bug :)
Also, don't forget to channel-discover your own channel before you attempt to administer in the frontend.
Another neat trick is the auto_discover configuration variable. If you set it to 1 as in:
$ pear config-set auto_discover 1
then this will work
$ pear install pear.chiaraquartet.net/PEAR_Server
without the need of channel-discover.
However, this is disabled by default, and I would only enable it on a private local installation for security reasons.
Greg
I have posted an up-to-date tutorial on setting up a channel server on my blog at http://greg.chiaraquartet.net/archives/123-Setting-up-your-own-PEAR-channel-the-official-way.html
This supersedes all the information here.
Cheers,
Greg
Fields with bold names are mandatory.
Services_Trackback - let your site get tracked back.
Today I called for votes in the PEAR proposal system for my new package Services_Trackback. If you are reading this and don't know, what a trackback is, please read the MT introduction into trackbacks or the technical specs.
The idea to Services_Trackbac
eZ publish Enterprise Components
eZ systems recently announced the development of eZ publish Enterprise Components, a high quality framework for development of large scale web applications. The Components will be extracted from eZ publish during migration to the new version 4.0 (which al
Mettre en place son channel PEAR
original par Tobias Schlitt
Par exemple Vous pouvez "découvrir" et utiliser son propre petit channel de test:
pear channel-discover pear.schlitt.info
pear install -f schlitt/Services_Trackback
Une installation PEAR 1.4 presumée fonctionnelle.
Conditions préliminaires
Les conditions préliminaire pour l'installation de PEAR_Server sont:
PHP 5.0.3 (ou plus récent).
PEAR 1.4.0a2 (ou plus récent) installé.
Un accès a une base MySQL.
Un nom de domaine valide pour faire tourner le serveur dans un environement dédié.
Les infos de base pour installer PHP5 sont ici
MySQL le nom de domaine (tel que pear.schlitt.info) semblent des conditions préliminaires comunes et ne nécéssitent pas d'autre introduction
La dépendance à un nom de domaine devraient être supprimée dans le futur.
Précautions
Avertissement: Ce qui suit est la manipulation du logiciel qui est considéré en "alpha".
N'employez jamais ceci dans un environnement de production.
Tout ce que que vous faites est à partir de ce moment là à votre propre risque.
Récuperer PEAR 1.4
Pour récuperer la version actuelle de PEAR utilisez go-pear.org (si vous n'avez pas encore de PEAR installé) ensuite passez les commandes
pear clear-cache
pear upgrade PEAR
Si vous rencontrez un quelconque problème en installant cette version, c'est que peut-être vous avez setté un autre preferred_state que "alpha" (ce qui n'aurait rien d'anormal!).
Pour résoudre ce problème lancez la commande
pear upgrade -f PEAR
Ce qui vous permet d'installer le paquet même si il n'est pas disponible dans votre preferred_state.
Une fois fini, vous avez upgradé PEAR à 1.4.
Facile, ce n'était pas?
Découvrir un channel
"discover" est la commande pear pour ajouter un channel
L'étape suivante est de "découvrir" le channel de Greg, qui se trouve ...
New PEARs for the community
On September 20th Greg Beaver (for a longer time now the main man behind the PEAR Installer) announced the stable release of the new PEAR Installer Version 1.4.0. Yesterday Gerg updated the release to an even more advanced version 1.4.1 which solves some
Everything about Xdebug
So apparently the latest version of php|arch (still waiting for my september and october issues in the mail) talks about Xdebug, a great debugger for PHP. I’ve used it extensively for the past 2 years and I love it. It’s always nice to see...
Latest News
Latest News