https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mooble&feedformat=atomArchWiki - User contributions [en]2024-03-29T10:55:04ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=DokuWiki&diff=244393DokuWiki2013-01-18T20:44:17Z<p>Mooble: /* Installation */</p>
<hr />
<div>[[Category:Office]]<br />
[[es:Dokuwiki]]<br />
[[zh-TW:Dokuwiki]]<br />
"DokuWiki is a standards-compliant, simple-to-use wiki which allows users to create rich documentation repositories. It provides an environment for individuals, teams and companies to create and collaborate using a simple yet powerful syntax that ensures data files remain structured and readable outside the wiki."<br />
<br />
"Unlimited page revisions allows restoration to any earlier page version, and with data stored in plain text files, no database is required. A powerful plugin architecture allows for extension and enhancement of the core system. See the features section for a full description of what DokuWiki has to offer."[http://wiki.splitbrain.org/wiki:dokuwiki]<br />
<br />
In other words, DokuWiki is a wiki written in PHP and requires no database.<br />
<br />
[http://www.dokuwiki.org/ Like to see a running example?]<br />
<br />
== Initial Notes ==<br />
DokuWiki should work on any web server which supports PHP 5.1.2 or later. As the requirements may change over time, you should consult the [http://www.dokuwiki.org/requirements requirements page] for DokuWiki for additional details.<br />
<br />
It is strongly recommend to read through the appropriate sections of [http://www.dokuwiki.org/security DokuWiki's security page] for your web server. Most popular web servers are covered but there are generic instructions as well.<br />
<br />
The package in [community] unpacks DokuWiki at {{ic|/srv/http/dokuwiki}} and changes ownership to the "http" user. This should work fine for most popular web servers as packaged for Arch.<br />
<br />
== Installation ==<br />
<br />
# Install your web server of choice (e.g. [[Apache]] or [[lighttpd]]) and configure it for [[PHP]]. As mentioned above, DokuWiki has no need for a database server so you may be able to skip those steps when setting up your web server.<br />
# Install {{Pkg|dokuwiki}} from [community] with [[pacman]].<br />
# Configure web server for dokuwiki (see section below)<br />
# With your web browser of choice, open <nowiki>http://&lt;your-server&gt;/dokuwiki/install.php</nowiki> and continue the installation from there.<br />
<br />
Alternatively, if you would like to install from tarball, you can read from http://www.dokuwiki.org/Install. Generally the procedure is the same as above. Instead of using pacman, you will need to [http://www.splitbrain.org/projects/dokuwiki download the tarball], unpack it to your server's document root (e.g. {{ic|/srv/http/dokuwiki}}), and chown to the appropriate user (e.g. "http").<br />
<br />
== Configuration ==<br />
<br />
=== Apache ===<br />
<br />
Firstly, create the file {{ic|/etc/httpd/conf/extra/dokuwiki.conf}} with the following contents:<br />
<br />
<pre><br />
Alias /dokuwiki /usr/share/webapps/dokuwiki<br />
<Directory /usr/share/webapps/dokuwiki/><br />
Options +FollowSymLinks<br />
AllowOverride All<br />
order allow,deny<br />
allow from all<br />
php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/dokuwiki/:/var/lib/dokuwiki/"<br />
</Directory><br />
</pre><br />
<br />
Include the newly created file in the Apache configuration by placing the following line at the end of {{ic|/etc/httpd/conf/httpd.conf}}:<br />
<pre><br />
Include conf/extra/dokuwiki.conf<br />
</pre><br />
<br />
Make sure the folders {{ic|/etc/webapps/dokuwiki}} and {{ic|/var/lib/dokuwiki}} are owned by user and group "http". You may relocate these directories if you like as long as you update the references in {{ic|/etc/httpd/conf/extra/dokuwiki.conf}} respectively.<br />
<br />
Afterwards restart Apache:<br />
# systemctl restart httpd.service<br />
<br />
Then finish the installation by running the ''dokuwiki/install.php'' script in your browser.<br />
<br />
=== lighttpd Specific Configuration ===<br />
<br />
Edit the {{ic|/etc/lighttpd/lighttpd.conf}} file as per the [http://www.dokuwiki.org/install:lighttpd dokuwiki instructions] (might contain updated information).<br />
<br />
Under the line:<br />
<pre> <br />
$HTTP["url"] =~ "\.pdf$" {<br />
server.range-requests = "disable"<br />
}<br />
</pre><br />
<br />
add this: <br />
<pre><br />
# subdir of dokuwiki<br />
# comprised of the subdir of the root dir where dokuwiki is installed<br />
# in this case the root dir is the basedir plus /htdocs/<br />
# Note: be careful with trailing slashes when uniting strings.<br />
# all content on this example server is served from htdocs/ up.<br />
#var.dokudir = var.basedir + "/dokuwiki"<br />
var.dokudir = server.document-root + "/dokuwiki"<br />
<br />
# make sure those are always served through fastcgi and never as static files<br />
# deny access completly to these<br />
$HTTP["url"] =~ "/\.ht" { url.access-deny = ( "" ) }<br />
$HTTP["url"] =~ "/_ht" { url.access-deny = ( "" ) }<br />
$HTTP["url"] =~ "^" + var.dokudir + "/bin/" { url.access-deny = ( "" ) }<br />
$HTTP["url"] =~ "^" + var.dokudir + "/data/" { url.access-deny = ( "" ) }<br />
$HTTP["url"] =~ "^" + var.dokudir + "/inc/" { url.access-deny = ( "" ) }<br />
$HTTP["url"] =~ "^" + var.dokudir + "/conf/" { url.access-deny = ( "" ) }<br />
</pre><br />
<br />
''These entries give some basic security to DokuWiki.'' lighttpd does not use .htaccess files like Apache. You CAN install with out this, but I would NEVER recommend it.<br />
<br />
Restart lighttp:<br />
# /etc/rc.d/lighttpd restart<br />
<br />
== Post Installation ==<br />
=== Cleaning Up ===<br />
'''After configuring the server remove the install.php file!'''<br />
# rm /srv/http/dokuwiki/install.php<br />
<br />
=== Installing Plugins ===<br />
Many community created plugins can be found [http://www.dokuwiki.org/plugins here]<br />
<br />
They can be added through the web interface (as well as updated) through the Admin menu.<br />
<br />
=== Backing Up ===<br />
It is very trivial to backup DokuWiki, since there is no database. All pages are in plain text, and require only a simple tar, or rsync. <br />
<br />
A quick breakdown of the directories of interest in the current (2008-05-05) version:<br />
/dokuwiki/data/ => All User Created Data<br />
/dokuwiki/lib/plugins/ => All User Added Plugins<br />
<br />
== Further Reading ==<br />
<br />
The [http://www.dokuwiki.org/ DokuWiki main site] has all of the information and help that you could possibly need.<br />
<br />
== See Also ==<br />
[http://wiki.gotux.net/config:dokuwiki DokuWiki HowTo Install and Upgrade]</div>Mooblehttps://wiki.archlinux.org/index.php?title=Apache_HTTP_Server&diff=244386Apache HTTP Server2013-01-18T20:27:14Z<p>Mooble: </p>
<hr />
<div>[[Category:Web Server]]<br />
[[cs:LAMP]]<br />
[[de:LAMP Installation]]<br />
[[el:LAMP]]<br />
[[es:LAMP]]<br />
[[fr:Lamp]]<br />
[[it:LAMP]]<br />
[[pl:LAMP]]<br />
[[ru:LAMP]]<br />
[[sr:LAMP]]<br />
[[tr:LAMP]]<br />
[[zh-CN:LAMP]]<br />
[[Wikipedia:LAMP (software bundle)|LAMP]] refers to a common combination of software used in many web servers: '''L'''inux, '''A'''pache, '''M'''ySQL, and '''P'''HP. This article describes how to set up the [http://httpd.apache.org Apache HTTP Server] on an Arch Linux system. It also tells you how to optionally install [[PHP]] and [[MySQL]] and integrate these in the Apache server.<br />
<br />
If you only need a web server for development and testing, [[Xampp]] might be a better and easier option.<br />
<br />
==Installation==<br />
# pacman -S apache php php-apache mysql<br />
<br />
This document assumes you will install Apache, PHP and MySQL together. If desired however, you may install Apache, PHP, and MySQL separately and simply refer to the relevant sections below.<br />
<br />
{{Note|New default user and group: Instead of group "nobody", apache now runs as user/group "http" by default. You might want to adjust your httpd.conf according to this change, though you may still run httpd as nobody.}}<br />
<br />
==Configuration==<br />
<br />
===Apache===<br />
For security reasons, as soon as Apache is started by the root user (directly or via startup scripts) it switches to the UID/GID specified in {{ic|/etc/httpd/conf/httpd.conf}}. The default is user http and it is created automatically during apache installation.<br />
<br />
* Change {{ic|httpd.conf}} and optionally {{ic|extra/httpd-default.conf}} to your liking. <br />
<br />
* [[Daemons#Starting manually|Start]] '''httpd''' (the Apache daemon).<br />
<br />
:Apache should now be running. Test by visiting http://localhost/ in a web browser. It should display a simple Apache test page. If you receive a 403 Error, comment out the following line in {{ic|/etc/httpd/conf/httpd.conf}}:<br />
Include conf/extra/httpd-userdir.conf<br />
<br />
====User dirs====<br />
* If you do not want user directories to be available on the web (e.g., {{ic|~/public_html}} on the machine is accessed as http://localhost/~user/ -Note that you can change what this points to in {{ic|/etc/httpd/conf/extra/httpd-userdir.conf}}), comment the following line in {{ic|/etc/httpd/conf/httpd.conf}} since they are activated by default:<br />
Include conf/extra/httpd-userdir.conf<br />
<br />
* You must make sure that your home directory permissions are set properly so that Apache can get there. Your home directory and {{ic|~/public_html/}} must be executable for others ("rest of the world"). This seems to be enough:<br />
$ chmod o+x ~<br />
$ chmod o+x ~/public_html<br />
<br />
* More secure way to share your home folder with apache is to add '''http user''' in group that your home folder belongs. For example, if your home folder and other sub-folders in your home folder belong to group '''piter''', all you have to do is following:<br />
<br />
$ usermod -aG piter http<br />
<br />
* Of course, you have to give ''read'' and ''execute'' permissions on {{ic|~/}}, {{ic|~/public_html}}, and all other sub-folders in {{ic|~/public_html}} to the group members (group '''piter''' in our case). Do something like following ('''modify commands for your specific case'''):<br />
<br />
$ chmod g+xr-w /home/''yourusername''<br />
$ chmod -R g+xr-w /home/''yourusername''/public_html<br />
<br />
{{Note|This way you do not have to give access to your folder to every single user in order to give access to '''http user'''. Only '''http user''' and other potential users that are in '''piter''' group will have access to your home folder.}}<br />
<br />
and restart '''httpd'''.<br />
<br />
====SSL====<br />
Create self-signed certificate (you can change key size and days of validity)<br />
# cd /etc/httpd/conf<br />
# openssl genrsa -des3 -out server.key 1024<br />
# openssl req -new -key server.key -out server.csr<br />
# cp server.key server.key.org<br />
# openssl rsa -in server.key.org -out server.key<br />
# openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt<br />
In {{ic|/etc/httpd/conf/httpd.conf}} uncomment line<br />
Include conf/extra/httpd-ssl.conf<br />
and restart '''httpd'''.<br />
<br />
====Virtual Hosts====<br />
If you want to have more than one host, make sure you have<br />
{{bc|<br />
# Virtual hosts<br />
Include conf/extra/httpd-vhosts.conf<br />
}}<br />
in {{ic|/etc/httpd/conf/httpd.conf}}.<br />
<br />
In {{ic|/etc/httpd/conf/extra/httpd-vhosts.conf}} set your virtual hosts according the example, e.g.:<br />
{{bc|<br />
NameVirtualHost *:80<br />
<br />
#this first virtualhost enables: http://127.0.0.1, or: http://localhost, <br />
#to still go to /srv/http/*index.html(otherwise it will 404_error).<br />
#the reason for this: once you tell httpd.conf to include extra/httpd-vhosts.conf, <br />
#ALL vhosts are handled in httpd-vhosts.conf(including the default one),<br />
# E.G. the default virtualhost in httpd.conf is not used and must be included here, <br />
#otherwise, only domainname1.dom & domainname2.dom will be accessible<br />
#from your web browser and NOT http://127.0.0.1, or: http://localhost, etc.<br />
#<br />
<br />
<VirtualHost *:80><br />
DocumentRoot "/srv/http"<br />
ServerAdmin root@localhost<br />
ErrorLog "/var/log/httpd/127.0.0.1-error_log"<br />
CustomLog "/var/log/httpd/127.0.0.1-access_log" common<br />
<Directory /srv/http/><br />
DirectoryIndex index.htm index.html<br />
AddHandler cgi-script .cgi .pl<br />
Options ExecCGI Indexes FollowSymLinks MultiViews +Includes<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
</VirtualHost><br />
<br />
<VirtualHost *:80><br />
ServerAdmin your@domainname1.dom<br />
DocumentRoot "/home/username/yoursites/domainname1.dom/www"<br />
ServerName domainname1.dom<br />
ServerAlias domainname1.dom<br />
<Directory /home/username/yoursites/domainname1.dom/www/><br />
DirectoryIndex index.htm index.html<br />
AddHandler cgi-script .cgi .pl<br />
Options ExecCGI Indexes FollowSymLinks MultiViews +Includes<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
</VirtualHost><br />
<br />
<VirtualHost *:80><br />
ServerAdmin your@domainname2.dom<br />
DocumentRoot "/home/username/yoursites/domainname2.dom/www"<br />
ServerName domainname2.dom<br />
ServerAlias domainname2.dom<br />
<Directory /home/username/yoursites/domainname2.dom/www/><br />
DirectoryIndex index.htm index.html<br />
AddHandler cgi-script .cgi .pl<br />
Options ExecCGI Indexes FollowSymLinks MultiViews +Includes<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
</VirtualHost><br />
}}<br />
<br />
Add your virtual host names to your {{ic|/etc/hosts}} file (NOT necessary if bind is serving these domains already, but will not hurt):<br />
{{bc|127.0.0.1 domainname1.dom <br />
127.0.0.1 domainname2.dom}}<br />
<br />
and restart '''httpd'''.<br />
<br />
If you setup your virtual hosts to be in your user directory, sometimes it interferes with Apache's 'Userdir' settings. To avoid problems disable 'Userdir' by commenting it out:<br />
{{bc|<br />
# User home directories<br />
#Include conf/extra/httpd-userdir.conf}}<br />
<br />
As said above, ensure that you have the proper permissions:<br />
# chmod 0775 /home/yourusername/<br />
<br />
If you have a huge amount of virtual hosts you easily want to dis- and enable, it's recommended to create one config file per virtualhost and store them all in one folder, eg: {{ic|/etc/httpd/conf/vhosts}}.<br />
<br />
First create the folder:<br />
# mkdir /etc/httpd/conf/vhosts<br />
<br />
Then place the single config files in them:<br />
# nano /etc/httpd/conf/vhosts/domainname1.dom<br />
# nano /etc/httpd/conf/vhosts/domainname2.dom<br />
...<br />
<br />
In the last step, "Include" the single configs in your {{ic|/etc/httpd/conf/httpd.conf}}:<br />
{{bc|#Enabled Vhosts:<br />
Include conf/vhosts/domainname1.dom<br />
#Include conf/vhosts/domainname1.dom}}<br />
<br />
You can enable and disable single virtual hosts by commenting them out or uncommenting them.<br />
<br />
====Advanced Options====<br />
These options in {{ic|/etc/httpd/conf/httpd.conf}} might be interesting for you:<br />
<br />
# Listen 80<br />
This is the port Apache will listen to. For Internet-access with router, you have to forward the port.<br />
<br />
If you setup Apache for local development you may want it to be only accessible from your computer. Then change this line to:<br />
# Listen 127.0.0.1:80<br />
<br />
This is the admin's email-address which can be found on e.g. error-pages:<br />
# ServerAdmin sample@sample.com<br />
<br />
This is the directory where you should put your web pages:<br />
# DocumentRoot "/srv/http"<br />
<br />
Change it, if you want to, but do not forget to also change the<br />
<Directory "/srv/http"><br />
to whatever you changed your DocumentRoot to, or you will likely get a 403 error (lack of privileges) when you try to access the new document root. Do not forget to change the Deny from all line, otherwise you will get 403 error too.<br />
<br />
# AllowOverride None<br />
This directive in {{ic|<Directory>}} sections causes apache to completely ignore .htaccess files. If you intend to use rewrite mod or other settings in .htaccess files, you can allow which directives declared in that file can override server configuration. For more info refer to http://httpd.apache.org/docs/current/mod/core.html#allowoverride<br />
<br />
{{Note|If you have issues with your configuration you can have apache check the configuration with:<br />
{{Ic|apachectl configtest}}}}<br />
<br />
More settings in {{ic|/etc/httpd/conf/httpd.conf}}:<br />
<br />
To turn off your server's signature:<br />
ServerSignature Off<br />
<br />
To hide server information like Apache and PHP versions:<br />
ServerTokens Prod<br />
<br />
===PHP===<br />
* [[pacman|Install]] {{pkg|php-apache}} from the [[Official repositories]].<br />
<br />
* Add these lines in {{ic|/etc/httpd/conf/httpd.conf}}:<br />
:Place this in the {{ic|LoadModule}} list anywhere after {{ic|LoadModule dir_module modules/mod_dir.so}}:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
:Place this at the end of the {{ic|Include}} list:<br />
Include conf/extra/php5_module.conf<br />
<br />
:Make sure that the following line is uncommented in the {{ic|<IfModule mime_module>}} section:<br />
TypesConfig conf/mime.types<br />
<br />
:Uncomment the following line (optional):<br />
MIMEMagicFile conf/magic<br />
<br />
* Add this line in {{ic|/etc/httpd/conf/mime.types}}:<br />
application/x-httpd-php php php5<br />
<br />
{{Note|If you do not see {{ic|libphp5.so}} in the Apache modules directory ({{ic|/etc/httpd/modules}}), you may have forgotten to install {{Pkg|php-apache}}.}}<br />
<br />
* If your {{Ic|DocumentRoot}} is not {{ic|/srv/http}}, add it to {{ic|open_basedir}} in {{ic|/etc/php/php.ini}} as such:<br />
open_basedir=/srv/http/:/home/:/tmp/:/usr/share/pear/:/path/to/documentroot<br />
<br />
* [[systemd#Using units|Restart]] '''httpd'''.<br />
<br />
* Test PHP: Create the file test.php in your Apache DocumentRoot directory (e.g. {{ic|/srv/http/}} or {{ic|~/public_html}}) and inside it put:<br />
<?php phpinfo(); ?><br />
:See if it works: http://localhost/test.php or http://localhost/~myname/test.php<br />
<br />
:If the PHP code is is not executed (you see plain text in test.php), check that you have added "Includes" to the "Options" line for your root directory in {{ic|/etc/httpd/conf/httpd.conf}}. Moreover, check that {{ic|TypesConfig conf/mime.types}} is uncommented in the <IfModule mime_module> section, you may also try adding the following to the <IfModule mime_module> in httpd.conf:<br />
AddHandler application/x-httpd-php .php<br />
<br />
====Advanced options====<br />
* It is recommended to set your timezone in {{ic|/etc/php/php.ini}} like so: ([http://www.php.net/manual/en/timezones.php list of timezones])<br />
{{bc|1=date.timezone = Europe/Berlin}}<br />
<br />
* If you want to display errors to debug your php code, change {{ic|display_errors}} to {{ic|On}} in {{ic|/etc/php/php.ini}}:<br />
display_errors=On<br />
<br />
* If you want the libGD module, install {{Pkg|php-gd}} and uncomment {{ic|1=extension=gd.so}} in {{ic|/etc/php/php.ini}}:<br />
{{Note|php-gd requires libpng, libjpeg, and freetype2}}<br />
extension=gd.so<br />
{{Note|Pay attention to which extension you uncomment, as this extension is sometimes mentioned in an explanatory comment before the actual line you want to uncomment.}}<br />
<br />
* If you want the mcrypt module, install {{Pkg|php-mcrypt}} and uncomment {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}}:<br />
extension=mcrypt.so<br />
<br />
* Remember to add a file handler for .phtml if you need it in {{ic|/etc/httpd/conf/extra/php5_module.conf}}:<br />
DirectoryIndex index.php index.phtml index.html<br />
<br />
==== Using php5 with apache2-mpm-worker and mod_fcgid ====<br />
Uncomment following in {{ic|/etc/conf.d/apache}}:<br />
HTTPD=/usr/sbin/httpd.worker<br />
Uncomment following in {{ic|/etc/httpd/conf/httpd.conf}}:<br />
Include conf/extra/httpd-mpm.conf<br />
Install mod_fcgid and php-cgi packages:<br />
# pacman -S mod_fcgid php-cgi<br />
Create {{ic|/etc/httpd/conf/extra/php5_fcgid.conf}} with following content:<br />
{{bc|1=<br />
# Required modules: fcgid_module<br />
<br />
<IfModule fcgid_module><br />
AddHandler php-fcgid .php<br />
AddType application/x-httpd-php .php<br />
Action php-fcgid /fcgid-bin/php-fcgid-wrapper<br />
ScriptAlias /fcgid-bin/ /srv/http/fcgid-bin/<br />
SocketPath /var/run/httpd/fcgidsock<br />
SharememPath /var/run/httpd/fcgid_shm<br />
# If you don't allow bigger requests many applications may fail (such as WordPress login)<br />
FcgidMaxRequestLen 536870912<br />
PHP_Fix_Pathinfo_Enable 1<br />
# Path to php.ini – defaults to /etc/phpX/cgi<br />
DefaultInitEnv PHPRC=/etc/php/<br />
# Number of PHP childs that will be launched. Leave undefined to let PHP decide.<br />
#DefaultInitEnv PHP_FCGI_CHILDREN 3<br />
# Maximum requests before a process is stopped and a new one is launched<br />
#DefaultInitEnv PHP_FCGI_MAX_REQUESTS 5000<br />
<Location /fcgid-bin/><br />
SetHandler fcgid-script<br />
Options +ExecCGI<br />
</Location><br />
</IfModule><br />
}}<br />
<br />
Create needed directory and symlink for php wrapper:<br />
# mkdir /srv/http/fcgid-bin<br />
# ln -s /usr/bin/php-cgi /srv/http/fcgid-bin/php-fcgid-wrapper<br />
<br />
Edit {{ic|/etc/httpd/conf/httpd.conf}}:<br />
#LoadModule php5_module modules/libphp5.so<br />
LoadModule fcgid_module modules/mod_fcgid.so<br />
Include conf/extra/php5_fcgid.conf<br />
Make sure {{ic|/etc/php/php.ini}} has the directive enabled:<br />
cgi.fix_pathinfo=1<br />
and [[systemd#Using_units|restart]] '''httpd'''.<br />
<br />
{{Note|1=As of Apache 2.4 (available as [https://aur.archlinux.org/packages.php?ID=60719 AUR package]) you can now use [http://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html mod_proxy_fcgi] (part of the official distribution) with PHP-FPM (and the new event MPM). See [http://wiki.apache.org/httpd/PHP-FPM configuration example]}}<br />
<br />
===MySQL===<br />
* Configure MySQL as described in [[MySQL]].<br />
<br />
* Uncomment at least one of the following lines in {{ic|/etc/php/php.ini}}:<br />
extension=pdo_mysql.so<br />
extension=mysqli.so<br />
extension=mysql.so<br />
<br />
* You can add minor privileged MySQL users for your web scripts. You might also want to edit {{ic|/etc/mysql/my.cnf}} and uncomment the {{ic|skip-networking}} line so the MySQL server is only accessible by the localhost. You have to restart MySQL for changes to take effect. <br />
<br />
* [[Systemd#Using units|Restart]] '''httpd'''.<br />
<br />
{{Tip|You may want to install a tool like [[phpMyAdmin]], [[Adminer]] or {{AUR|mysql-workbench}} to work with your databases.}}<br />
<br />
==See also==<br />
* [[MySQL]] - Article for MySQL<br />
* [[PhpMyAdmin]] - Web frontend for MySQL typically found in LAMP environments<br />
* [[Adminer]] - A full-featured database management tool which is available for MySQL, PostgreSQL, SQLite, MS SQL and Oracle<br />
* [[Xampp]] - Self contained web-server that supports PHP, Perl, and MySQL<br />
* [[mod_perl]] - Apache + Perl<br />
<br />
==External links==<br />
* http://www.apache.org/<br />
* http://www.php.net/<br />
* http://www.mysql.com/<br />
* http://www.akadia.com/services/ssh_test_certificate.html<br />
* http://wiki.apache.org/httpd/CommonMisconfigurations</div>Mooblehttps://wiki.archlinux.org/index.php?title=RVM&diff=145464RVM2011-06-10T19:03:04Z<p>Mooble: /* System-wide installation */</p>
<hr />
<div>[http://rvm.beginrescueend.com/ RVM] (Ruby Version Manager) is a command line tool which allows us to easily install, manage and work with multiple [[Ruby]] environments from interpreters to sets of gems.<br />
<br />
{{Note|These instructions bypass pacman.}}<br />
<br />
=== Installing RVM ===<br />
<br />
The install process is very easy, and is the very same for any distro, including ArchLinux. You have two choices, one system-wide, another as a user. The first is for production servers, or if your are alone on your machine. You'll need root privileges. The second is the recommended for multiple users on the same machine (like a development test box).<br />
<br />
As an observation, installing RVM with gem is not recommended anymore. This article uses the [http://rvm.beginrescueend.com/rvm/install/ recommended documentation] with minor tweaks to make work on ArchLinux.<br />
<br />
==== Pre-requisites ====<br />
<br />
$ pacman -S git curl<br />
<br />
==== System-wide installation ====<br />
<br />
First we will use the script that rvm docs recommends to install (Make sure to run this as root, otherwise it will install only for the user that runs it):<br />
<br />
$ bash < <( curl -L https://rvm.beginrescueend.com/install/rvm )<br />
<br />
'''If''' you want to check the script before:<br />
<br />
$ curl -L https://rvm.beginrescueend.com/install/rvm > rvm-install-system-wide<br />
<br />
Inspect the file here, then:<br />
<br />
$ bash < ./rvm-install-system-wide<br />
<br />
After the script process, add this to the last line of /etc/bash.bashrc<br />
<br />
$ <nowiki>[[ -s '/usr/local/lib/rvm' ]]</nowiki> && source '/usr/local/lib/rvm'<br />
<br />
Now go to post-installation procedures.<br />
<br />
==== User installation ====<br />
<br />
User-wide installation have a similar procedure to the system-wide install:<br />
<br />
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )<br />
<br />
Then add to your ~/.bash_profile or ~/.bashrc:<br />
<br />
$ <nowiki>[[ -s "$HOME/.rvm/scripts/rvm" ]]</nowiki> && source "$HOME/.rvm/scripts/rvm"<br />
<br />
==== Post installation ====<br />
<br />
After the installation, check with this command:<br />
<br />
$ type rvm | head -n1<br />
<br />
The response should be:<br />
<br />
$ rvm is a function<br />
<br />
If you receive rvm: not found, you may need to source /etc/bash.bashrc:<br />
<br />
$ . /etc/bash.bashrc<br />
<br />
Check if the rvm function is working:<br />
<br />
$ rvm notes<br />
<br />
=== Using RVM ===<br />
<br />
Here's some RVM usage examples, for general usage no more is needed.<br />
<br />
==== Installing an environment ====<br />
<br />
To install a Ruby environment, run:<br />
<br />
$ rvm install <environment/ruby version><br />
<br />
For example, to install Ruby 1.8.7 one would run the following command:<br />
<br />
$ rvm install 1.8.7<br />
<br />
This should download, configure and install Ruby 1.8.7. Make sure, you have gcc or another fitting compiler installed.<br />
<br />
==== Listing Ruby Environments ====<br />
<br />
To see all available Ruby environments, run the following command:<br />
<br />
$ rvm list<br />
<br />
This would generate a list like so:<br />
<br />
~> rvm list<br />
<br />
rvm Rubies<br />
jruby-1.5.0 [ [i386-java] ]<br />
=> ruby-1.8.7-p249 [ i386 ]<br />
ruby-1.9.2-head [ i386 ]<br />
System Ruby<br />
system [ i386 ]<br />
<br />
The ASCII arrow indicates which environment is currently enabled. In this case, it is Ruby 1.8.7. This could be confirmed by running:<br />
<br />
$ ruby --version<br />
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]<br />
<br />
==== Switching Environment ====<br />
<br />
To switch from one environment, to another simply run:<br />
<br />
$ rvm <version/environment><br />
<br />
For example to switch to Ruby 1.8.7 one would run the following command:<br />
<br />
$ rvm 1.8.7<br />
<br />
It can be confirmed by running:<br />
<br />
$ ruby --version<br />
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]<br />
<br />
==== RVM update ====<br />
<br />
Simply use:<br />
<br />
$ rvm update<br />
<br />
==== Revert the default ruby to system ruby ====<br />
<br />
$ rvm system<br />
<br />
And check if the version complies with your system installed package:<br />
<br />
$ ruby -v<br />
$ pacman -Q ruby<br />
$ which ruby<br />
<br />
"which ruby" must be pointing to /usr/bin/ruby<br />
<br />
=== Troubleshooting ===<br />
<br />
You'll need to take care with rvm installations, since ArchLinux is very well updated, and some earlier ruby's patchlevels don't like it. RVM many times don't choose the latest patchlevel version to install, and you'll need to check manually on the [http://www.ruby-lang.org/en/news/ ruby website], and force RVM to install it.<br />
<br />
==== Ruby 1.8.x won't compile with RVM ====<br />
<br />
This is a known issue on Arch Linux, and is caused by a problem with openssl. Arch uses openssl 1.0, lower patchlevels of 1.8.7 assumes 0.9. <br />
<br />
You can use newer patchlevels, like p299 '''or newer''' with:<br />
<br />
$ rvm remove 1.8.7<br />
$ rvm install 1.8.7-p299<br />
<br />
Another approach is to install local openssl via RVM:<br />
<br />
$ rvm package install openssl<br />
$ rvm remove 1.8.7<br />
$ rvm install 1.8.7 -C --with-openssl-dir=$HOME/.rvm/usr<br />
<br />
==== Ruby 1.9.x won't compile with RVM ====<br />
<br />
Like with 1.8.x, earlier patchlevels don't like the OpenSSL 1.0. Then you can use the very same solution above, by installing openssl locally on RVM.<br />
<br />
$ rvm package install openssl<br />
$ rvm remove 1.9.1<br />
$ rvm install 1.9.1 -C --with-openssl-dir=/usr/local/rvm/usr</div>Mooblehttps://wiki.archlinux.org/index.php?title=RVM&diff=145462RVM2011-06-10T18:58:15Z<p>Mooble: /* System-wide installation */ Fixing the links</p>
<hr />
<div>[http://rvm.beginrescueend.com/ RVM] (Ruby Version Manager) is a command line tool which allows us to easily install, manage and work with multiple [[Ruby]] environments from interpreters to sets of gems.<br />
<br />
{{Note|These instructions bypass pacman.}}<br />
<br />
=== Installing RVM ===<br />
<br />
The install process is very easy, and is the very same for any distro, including ArchLinux. You have two choices, one system-wide, another as a user. The first is for production servers, or if your are alone on your machine. You'll need root privileges. The second is the recommended for multiple users on the same machine (like a development test box).<br />
<br />
As an observation, installing RVM with gem is not recommended anymore. This article uses the [http://rvm.beginrescueend.com/rvm/install/ recommended documentation] with minor tweaks to make work on ArchLinux.<br />
<br />
==== Pre-requisites ====<br />
<br />
$ pacman -S git curl<br />
<br />
==== System-wide installation ====<br />
<br />
First we will use the script that rvm docs recommends to install:<br />
<br />
$ bash < <( curl -L https://rvm.beginrescueend.com/install/rvm )<br />
<br />
'''If''' you want to check the script before:<br />
<br />
$ curl -L https://rvm.beginrescueend.com/install/rvm > rvm-install-system-wide<br />
<br />
Inspect the file here, then:<br />
<br />
$ bash < ./rvm-install-system-wide<br />
<br />
After the script process, add this to the last line of /etc/bash.bashrc<br />
<br />
$ <nowiki>[[ -s '/usr/local/lib/rvm' ]]</nowiki> && source '/usr/local/lib/rvm'<br />
<br />
Now go to post-installation procedures.<br />
<br />
==== User installation ====<br />
<br />
User-wide installation have a similar procedure to the system-wide install:<br />
<br />
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )<br />
<br />
Then add to your ~/.bash_profile or ~/.bashrc:<br />
<br />
$ <nowiki>[[ -s "$HOME/.rvm/scripts/rvm" ]]</nowiki> && source "$HOME/.rvm/scripts/rvm"<br />
<br />
==== Post installation ====<br />
<br />
After the installation, check with this command:<br />
<br />
$ type rvm | head -n1<br />
<br />
The response should be:<br />
<br />
$ rvm is a function<br />
<br />
If you receive rvm: not found, you may need to source /etc/bash.bashrc:<br />
<br />
$ . /etc/bash.bashrc<br />
<br />
Check if the rvm function is working:<br />
<br />
$ rvm notes<br />
<br />
=== Using RVM ===<br />
<br />
Here's some RVM usage examples, for general usage no more is needed.<br />
<br />
==== Installing an environment ====<br />
<br />
To install a Ruby environment, run:<br />
<br />
$ rvm install <environment/ruby version><br />
<br />
For example, to install Ruby 1.8.7 one would run the following command:<br />
<br />
$ rvm install 1.8.7<br />
<br />
This should download, configure and install Ruby 1.8.7. Make sure, you have gcc or another fitting compiler installed.<br />
<br />
==== Listing Ruby Environments ====<br />
<br />
To see all available Ruby environments, run the following command:<br />
<br />
$ rvm list<br />
<br />
This would generate a list like so:<br />
<br />
~> rvm list<br />
<br />
rvm Rubies<br />
jruby-1.5.0 [ [i386-java] ]<br />
=> ruby-1.8.7-p249 [ i386 ]<br />
ruby-1.9.2-head [ i386 ]<br />
System Ruby<br />
system [ i386 ]<br />
<br />
The ASCII arrow indicates which environment is currently enabled. In this case, it is Ruby 1.8.7. This could be confirmed by running:<br />
<br />
$ ruby --version<br />
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]<br />
<br />
==== Switching Environment ====<br />
<br />
To switch from one environment, to another simply run:<br />
<br />
$ rvm <version/environment><br />
<br />
For example to switch to Ruby 1.8.7 one would run the following command:<br />
<br />
$ rvm 1.8.7<br />
<br />
It can be confirmed by running:<br />
<br />
$ ruby --version<br />
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]<br />
<br />
==== RVM update ====<br />
<br />
Simply use:<br />
<br />
$ rvm update<br />
<br />
==== Revert the default ruby to system ruby ====<br />
<br />
$ rvm system<br />
<br />
And check if the version complies with your system installed package:<br />
<br />
$ ruby -v<br />
$ pacman -Q ruby<br />
$ which ruby<br />
<br />
"which ruby" must be pointing to /usr/bin/ruby<br />
<br />
=== Troubleshooting ===<br />
<br />
You'll need to take care with rvm installations, since ArchLinux is very well updated, and some earlier ruby's patchlevels don't like it. RVM many times don't choose the latest patchlevel version to install, and you'll need to check manually on the [http://www.ruby-lang.org/en/news/ ruby website], and force RVM to install it.<br />
<br />
==== Ruby 1.8.x won't compile with RVM ====<br />
<br />
This is a known issue on Arch Linux, and is caused by a problem with openssl. Arch uses openssl 1.0, lower patchlevels of 1.8.7 assumes 0.9. <br />
<br />
You can use newer patchlevels, like p299 '''or newer''' with:<br />
<br />
$ rvm remove 1.8.7<br />
$ rvm install 1.8.7-p299<br />
<br />
Another approach is to install local openssl via RVM:<br />
<br />
$ rvm package install openssl<br />
$ rvm remove 1.8.7<br />
$ rvm install 1.8.7 -C --with-openssl-dir=$HOME/.rvm/usr<br />
<br />
==== Ruby 1.9.x won't compile with RVM ====<br />
<br />
Like with 1.8.x, earlier patchlevels don't like the OpenSSL 1.0. Then you can use the very same solution above, by installing openssl locally on RVM.<br />
<br />
$ rvm package install openssl<br />
$ rvm remove 1.9.1<br />
$ rvm install 1.9.1 -C --with-openssl-dir=/usr/local/rvm/usr</div>Mooble