https://wiki.archlinux.org/api.php?action=feedcontributions&user=Xcession&feedformat=atomArchWiki - User contributions [en]2024-03-29T09:00:58ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Backlight&diff=588809Backlight2019-11-13T15:06:33Z<p>Xcession: /* Using DBus with Gnome */ Fix typo</p>
<hr />
<div>[[Category:Laptops]]<br />
[[Category:Power management]]<br />
[[ru:Backlight]]<br />
[[ja:バックライト]]<br />
Screen brightness might be tricky to control. On some machines physical hardware switches are missing and software solutions may not work well. However, it is generally possible to find a functional method for a given hardware. This article aims to summarize all possible ways to adjust the backlight.<br />
<br />
There are many ways to control brightness of a monitor, laptop or integrated panel (such as the iMac). According to [https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/397617 these] [https://lore.kernel.org/patchwork/patch/528936/#708706 discussions] and this [https://wiki.ubuntu.com/Kernel/Debugging/Backlight wiki page] the control method can be divided into these categories:<br />
<br />
* brightness is controlled by vendor-specified hotkey and there is no interface for the OS to adjust the brightness.<br />
* brightness is controlled by either the [[#ACPI|ACPI]], graphic or platform driver. In this case, backlight control is exposed to the user through {{ic|/sys/class/backlight}} which can be used by user-space [[#Backlight utilities|backlight utilities]].<br />
* brightness is controlled by writing into a graphic card register through [[#setpci|setpci]].<br />
<br />
{{Note|Since OLED screens have no backlight, brightness cannot be controlled by changing backlight power on laptops equipped with an OLED screen. In this case see, perceived screen brightness can only be adjusted via [[#Color correction|software color correction]].}}<br />
<br />
== Hardware interfaces ==<br />
<br />
=== ACPI ===<br />
<br />
The brightness of the screen backlight is adjusted by setting the power level of the backlight LEDs or cathodes. The power level can often be controlled using the ACPI kernel module for video. An interface to this module is provided via a sysfs directory at {{ic|/sys/class/backlight/}}.<br />
<br />
The name of the directory depends on the graphics card model.<br />
<br />
{{hc|$ ls /sys/class/backlight/|<br />
acpi_video0<br />
}}<br />
<br />
In this case, the backlight is managed by an ATI graphics card. In the case of an Intel card, the directory is called {{ic|intel_backlight}}. In the following examples, {{ic|acpi_video0}} is used. If you use an Intel card, simply replace {{ic|acpi_video0}} with {{ic|intel_backlight}} in the examples.<br />
<br />
The directory contains the following files and subdirectories:<br />
<br />
{{hc|$ ls /sys/class/backlight/acpi_video0/|<br />
actual_brightness brightness max_brightness subsystem/ uevent <br />
bl_power device/ power/ type<br />
}}<br />
<br />
The maximum brightness can be displayed by reading from {{ic|max_brightness}}, which is often 15.<br />
<br />
{{hc|$ cat /sys/class/backlight/acpi_video0/max_brightness|<br />
15<br />
}}<br />
<br />
The brightness can be set by writing a number to {{ic|brightness}}. Attempting to set a brightness greater than the maximum results in an error.<br />
<br />
# echo 5 > /sys/class/backlight/acpi_video0/brightness<br />
<br />
By default, only {{ic|root}} can change the brightness by this method. To allow users in the {{ic|video}} group to change the brightness, a [[udev]] rule such as the following can be used:<br />
<br />
{{hc|/etc/udev/rules.d/backlight.rules|<nowiki><br />
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"<br />
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"<br />
</nowiki>}}<br />
<br />
==== Kernel command-line options ====<br />
<br />
Sometimes ACPI does not work well due to different motherboard implementations and ACPI quirks. This results in, for instance, inaccurate brightness notifications. This includes some laptops with dual graphics (e.g., Nvidia/Radeon dedicated GPU with Intel/AMD integrated GPU). Additionally, ACPI sometimes needs to register its own {{ic|acpi_video0}} backlight even if one already exists (such as {{ic|intel_backlight}}), which can be done by adding one of the following [[kernel parameters]]:<br />
<br />
acpi_backlight=video<br />
acpi_backlight=vendor<br />
acpi_backlight=native<br />
<br />
If you find that changing the {{ic|acpi_video0}} backlight does not actually change the brightness, you may need to use {{ic|1=acpi_backlight=none}}.<br />
<br />
{{Tip|<br />
* On Nvidia Optimus laptops, the kernel parameter {{ic|nomodeset}} can interfere with the ability to adjust the backlight.<br />
* On an Asus notebooks you might also need to load the {{ic|asus-nb-wmi}} [[kernel module]].<br />
* Disabling legacy boot on Dell XPS13 breaks backlight support.<br />
}}<br />
<br />
==== Udev rule ====<br />
<br />
If the ACPI interface is available, the backlight level can be set at boot using a [[udev]] rule:<br />
<br />
{{hc|/etc/udev/rules.d/81-backlight.rules|<nowiki><br />
# Set backlight level to 8<br />
SUBSYSTEM=="backlight", ACTION=="add", KERNEL=="acpi_video0", ATTR{brightness}="8"</nowiki>}}<br />
<br />
{{Note|The systemd-backlight service restores the previous backlight brightness level at boot. To prevent conflicts for the above rules, see [[#Save and restore functionality]].}}<br />
<br />
{{Tip|To set the backlight depending on power state, see [[Power management#Using a script and an udev rule]] and use your favourite [[#Backlight utilities|backlight utility]] in the script.}}<br />
<br />
=== setpci ===<br />
<br />
In some cases (e.g. Intel Mobile 945GME [https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/397617]), it is possible to set the register of the graphic card to adjust the backlight. It means you adjust the backlight by manipulating the hardware directly, which can be risky and generally is not a good idea. Not all of the graphic cards support this method.<br />
<br />
When using this method, you need to use {{ic|lspci}} first to find out where your graphic card is.<br />
# setpci -s 00:02.0 F4.B=0<br />
<br />
=== External monitors ===<br />
<br />
[[Wikipedia:Display_Data_Channel#DDC.2FCI|DDC/CI]] (Display Data Channel Command Interface) can be used to communicate with external monitors implementing MCCS (Monitor Control Command Set) over I2C. DDC can control brightness, contrast, inputs, etc on supported monitors. Settings available via the OSD (On-Screen Display) panel can usually also be managed via DDC. The [[kernel module]] {{ic|i2c-dev}} may need to be loaded if the {{ic|/dev/i2c-*}} devices do not exist.<br />
<br />
[http://www.ddcutil.com/ ddcutil] can be used to query and set brightness settings:<br />
<br />
{{hc|# ddcutil capabilities {{!}} grep "Feature: 10"|<br />
Feature: 10 (Brightness)<br />
}}<br />
<br />
{{hc|1=# ddcutil getvcp 10|2=<br />
VCP code 0x10 (Brightness ): current value = 60, max value = 100<br />
}}<br />
<br />
# ddcutil setvcp 10 70<br />
<br />
Alternatively, one may use {{AUR|ddcci-driver-linux-dkms}} to expose external monitors in sysfs. Then, after loading the {{ic|ddcci}} [[kernel module]], one can use any [[#Backlight utilities|backlight utility]].<br />
<br />
== Switch off the backlight ==<br />
<br />
{{Merge|DPMS|Same topic.}}<br />
<br />
Switching off the backlight (for example when one locks a notebook) can be useful to conserve battery energy. Ideally the following command should work for any [[Xorg]] graphical session:<br />
<br />
xset dpms force off<br />
<br />
The backlight should switch on again on mouse movement or keyboard input. Alternately {{ic|xset s}} could be used for a similar effect.<br />
<br />
If the previous commands do not work, there is a chance that ''vbetool'' may work. Note, however, that in this case the backlight must be manually activated again. The command is as follows:<br />
<br />
$ vbetool dpms off<br />
<br />
To activate the backlight again:<br />
<br />
$ vbetool dpms on<br />
<br />
For example, this can be put to use when closing the notebook lid using [[Acpid]].<br />
<br />
== Save and restore functionality ==<br />
<br />
The [[systemd]] package includes the service {{ic|systemd-backlight@.service}}, which is enabled by default and "static". It saves the backlight brightness level at shutdown and restores it at boot. The service uses the ACPI method described in [[#ACPI]], generating services for each folder found in {{ic|/sys/class/backlight/}}. For example, if there is a folder named {{ic|acpi_video0}}, it generates a service called {{ic|systemd-backlight@backlight:acpi_video0.service}}. When using other methods of setting the backlight at boot, it is recommended to stop systemd-backlight from restoring the backlight by setting the [[kernel parameters]] parameter {{ic|1=systemd.restore_state=0}}. See {{man|8|systemd-backlight@.service}} for details.<br />
<br />
{{Note|Some laptops have multiple video cards (e.g. Optimus) and the backlight restoration fails. Try [[systemd#Using units|masking]] an instance of the service (e.g. {{ic|systemd-backlight@backlight:acpi_video1}} for {{ic|acpi_video1}}).}}<br />
<br />
The {{AUR|relight}} package provides an alternative systemd-based method of saving and restoring screen brightness.<br />
<br />
Additionally, the {{AUR|brillo}} and {{Pkg|light}} utilities support save and restore functionality. These two may be more useful if one wishes to restore the screen brightness on a per-user basis, however no systemd units are provided to accomplish this.<br />
<br />
== Backlight utilities ==<br />
<br />
The utilities in the following table can be used to control screen brightness. All of them are compatible with Wayland and do not require X. Some (like {{ic|brightnessctl}} or {{ic|light}}) add udev rules to allow members of the {{ic|video}} (or {{ic|input}}) group to modify brightness.<br />
<br />
{| class="wikitable sortable"<br />
! Package name<br />
! Controls keyboard backlights<br />
! Reacts to ambient brightness<br />
! Language<br />
! License<br />
! Notes<br />
|-<br />
| {{Pkg|acpilight}}<br />
| {{Yes}}<br />
| {{No}}<br />
| Python3<br />
| GPL-3.0-or-later<br />
| "xbacklight" compatible<br />
|-<br />
| {{AUR|brightd}}<br />
| {{No}}<br />
| {{No}}<br />
| C<br />
| GPL-2.0<br />
| Dims the screen when there is no user input for some time.<br />
|-<br />
| {{Pkg|brightnessctl}}<br />
| {{Yes}}<br />
| {{No}}<br />
| C<br />
| MIT<br />
| -<br />
|-<br />
| {{AUR|brillo}}<br />
| {{Yes}}<br />
| {{No}}<br />
| C<br />
| GPL-3.0-only<br />
| Supports smooth and relative adjustments.<br />
|-<br />
| {{AUR|calise}}<br />
| {{No}}<br />
| {{Yes}}<br />
| Python2<br />
| GPL-3.0<br />
| -<br />
|-<br />
| {{AUR|clight}}<br />
| {{Yes}}<br />
| {{Yes}}<br />
| C<br />
| GPL-3.0-or-later<br />
| Manages screen temperature ([[Xorg]] only) and smoothly dims brightness after a timeout. Turns webcam into an ambient light sensor.<br />
|-<br />
| {{AUR|enlighten-git}}<br />
| {{No}}<br />
| {{No}}<br />
| C<br />
| GPL-3.0-or-later<br />
| -<br />
|-<br />
| {{AUR|illum-git}}<br />
| {{No}}<br />
| {{No}}<br />
| C<br />
| AGPL-3.0<br />
| Reacts to key presses.<br />
|-<br />
| {{Pkg|light}}<br />
| {{Yes}}<br />
| {{No}}<br />
| C<br />
| GPL-3.0-only<br />
| -<br />
|-<br />
| {{AUR|lux}}<br />
| {{No}}<br />
| {{No}}<br />
| Shell<br />
| MIT<br />
| -<br />
|-<br />
| {{AUR|macbook-lighter}}<br />
| {{Yes}}<br />
| {{Yes}}<br />
| Bash,Perl<br />
| GPL<br />
| Macbook screen/keyboard backlight CLI and auto-adjust on ambient light.<br />
|}<br />
<br />
=== xbacklight ===<br />
<br />
Brightness can be set using the {{Pkg|xorg-xbacklight}} package.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* xbacklight only works with [[Intel]]. Other drivers (e.g. [[Radeon]]) did not add support for the RandR backlight property. <br />
* xbacklight currently does not work with the modesetting driver [https://gitlab.freedesktop.org/xorg/xserver/issues/47].<br />
}}<br />
<br />
To set brightness to 50% of maximum:<br />
<br />
$ xbacklight -set 50<br />
<br />
Increments can be used instead of absolute values, for example to increase or decrease brightness by 10%:<br />
<br />
$ xbacklight -inc 10<br />
$ xbacklight -dec 10<br />
<br />
{{Tip|These commands can be bound to keyboard keys as described in [[Keyboard shortcuts#Xorg]].}}<br />
<br />
If you get the "No outputs have backlight property" error, it is because xrandr/xbacklight does not choose the right directory in {{ic|/sys/class/backlight}}. You can specify the directory by setting the {{ic|Backlight}} option of the device section in {{ic|/etc/X11/xorg.conf.d/20-''video''.conf}}. For instance, if the name of the directory is {{ic|intel_backlight}} and using the [[Intel]] driver, the device section may be configured as follows:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-intel.conf|<br />
Section "Device"<br />
Identifier "Intel Graphics" <br />
Driver "intel"<br />
Option "Backlight" "intel_backlight"<br />
EndSection}}<br />
<br />
See {{Bug|27677}} and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 for details.<br />
<br />
If you have enabled [[Intel graphics#Fastboot|Intel Fastboot]] you might also get the {{ic|No outputs have backlight property}} error. In this case, trying the above method may cause Xorg to crash on start up. You should disable it to fix the issue. It is [https://bugs.freedesktop.org/show_bug.cgi?id=108225 known] to cause issues with brightness control.<br />
<br />
=== Using DBus with Gnome ===<br />
<br />
Brightness can also be adjusted as the gnome controls do. Changes are reflected in the gnome UI using this method.<br />
gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.freedesktop.DBus.Properties.Set org.gnome.SettingsDaemon.Power.Screen Brightness "<int32 50>"<br />
<br />
Steps in brightness for keyboard control can be implemented with this method as well.<br />
gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.StepUp<br />
gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.StepDown<br />
<br />
== Color correction ==<br />
<br />
Color correction does not change the backlight power, it just modifies the video LUT table: this means that your battery life will be unaffected by the change. Nevertheless, it could be useful when no backlight control is available (desktop PCs or laptops with OLED screens).<br />
<br />
* {{App|Clight|User daemon utility that aims to fully manage your display. It can manage the screen temperature depending on the current time of the day, just like redshift does. It tries to use {{Pkg|geoclue}} to retrieve the user position if neither latitude or longitude are set in the configuration file. It also supports fixed times for sunrise and sunset.|https://github.com/FedeDP/Clight|{{AUR|clight-git}}}}<br />
* {{App|icc-brightness|Control OLED display brightness by applying ICC color profiles.|https://github.com/udifuchs/icc-brightness}}<br />
* {{App|Monica|Monitor calibration tool. It works as frontend to xgamma to alter the gamma correction.|https://web.archive.org/web/20090815224839/http://www.pcbypaul.com/software/monica.html|{{Pkg|monica}}}}<br />
* {{App|[[Redshift]]|Color temperature adjustment tool. It adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night. This program is inspired by [[Wikipedia:f.lux|f.lux]].|http://jonls.dk/redshift/|{{Pkg|redshift}}}}<br />
* {{App|xcalib|Lightweight monitor calibration loader which can load an ICC monitor profile to be shared across desktop applications.|https://github.com/OpenICC/xcalib|{{AUR|xcalib}}}}<br />
* {{App|xgamma|Alter a monitor's gamma correction.|https://xorg.freedesktop.org/|{{Pkg|xorg-xgamma}}}}<br />
<br />
=== NVIDIA settings ===<br />
<br />
Users of [[NVIDIA|NVIDIA's proprietary drivers]] users can change display brightness via the nvidia-settings utility under "X Server Color Correction." However, note that this has absolutely nothing to do with backlight (intensity), it merely adjusts the color output. (Reducing brightness this way is a power-inefficient last resort when all other options fail; increasing brightness spoils your color output completely, in a way similar to overexposed photos.)<br />
<br />
=== Increase brightness above maximum level ===<br />
<br />
You can use [[xrandr]] to increase perceived brightness above its maximum level (the same caveats mentioned above for Nvidia apply):<br />
<br />
$ xrandr --output ''output_name'' --brightness 2<br />
<br />
This should roughly double luma in the image. It will sacrifice color quality for brightness, nevertheless it is particularly suited for situations where the ambient light is very bright (e.g. sunlight).<br />
<br />
== Troubleshooting ==<br />
<br />
=== Backlight PWM modulation frequency (Intel i915 only) ===<br />
<br />
Laptops with LED backlight are known to have screen flicker sometimes. This is because the most efficient way of controlling LED backlight brightness is by turning the LED's on and off very quickly varying the amount of time they are on. <br />
<br />
However, the frequency of the switching, so-called PWM (pulse-width modulation) frequency, may not be high enough for the eye to perceive it as a single brightness and instead see flickering. This causes some people to have symptoms such as headaches and eyestrain.<br />
<br />
If you have an Intel i915 GPU, then it may be possible to adjust PWM frequency to eliminate flicker.<br />
<br />
Period of PWM (inverse to frequency) is stored in 2 higher bytes of {{ic|0xC8254}} register (if you are using the Intel GM45 chipset use address {{ic|0x61254}} instead). To manipulate registers values install {{Pkg|intel-gpu-tools}} from the official repositories.<br />
<br />
To increase the frequency, period must be reduced. For example:<br />
<br />
{{hc|# intel_reg read 0xC8254|<br />
0xC8254 : 0x12281228|<br />
}}<br />
<br />
Then to double PWM frequency divide 2 higher bytes (4 higher hex digits) by 2 and write back resulting value, keeping lower bytes unchanged:<br />
<br />
# intel_reg write 0xC8254 0x09141228<br />
<br />
You can use online calculator to calculate desired value http://devbraindom.blogspot.com/2013/03/eliminate-led-screen-flicker-with-intel.html<br />
<br />
To set new frequency automatically, consider writing an udev rule or install {{AUR|intelpwm-udev}}.<br />
<br />
=== Inverted Brightness (Intel i915 only) ===<br />
<br />
Symptoms:<br />
* after installing {{pkg|xf86-video-intel}} systemd-backlight.service turns off the backlight during boot<br />
** possible solution: mask systemd-backlight.service<br />
* switching from X to another VT turns the backlight off<br />
* the brightness keys are inverted (i.e. turning up the brightness makes the screen darker)<br />
<br />
This problem may be solved by adding {{ic|i915.invert_brightness&#61;1}} to the list of [[kernel parameters]].<br />
<br />
=== Unable to control eDP Panel brightness (Intel i915 only) ===<br />
<br />
Embedded Display Port (eDP) v1.2 introduced a new display panel control protocol for backlight and other controls that works through the AUX channel.[https://www.vesa.org/wp-content/uploads/2010/12/DisplayPort-DevCon-Presentation-eDP-Dec-2010-v3.pdf]<br />
<br />
By default the i915 driver tries to use PWM to control backlight brightness, which might not work.<br />
<br />
To set the backlight through writes to DPCD registers using the AUX channel set {{ic|1=i915.enable_dpcd_backlight}} as [[kernel parameter]] or set in {{ic|/etc/modprobe.d/i915.conf}}:<br />
<br />
{{hc|/etc/modprobe.d/i915.conf|<nowiki><br />
options i915 enable_dpcd_backlight<br />
</nowiki>}}<br />
<br />
=== sysfs modified but no brightness change ===<br />
<br />
{{Note|This behavior and their workarounds have been confirmed on the Dell M6700 with Nvidia K5000m (BIOS version prior to A10) and Clevo P750ZM (Eurocom P5 Pro Extreme) with Nvidia 980m.}}<br />
<br />
On some systems, the brightness hotkeys on your keyboard correctly modify the values of the acpi interface in {{ic|/sys/class/backlight/acpi_video0/actual_brightness}} but the brightness of the screen is not changed. Brightness applets from [[desktop environments]] may also show changes to no effect.<br />
<br />
If you have tested the recommended kernel parameters and only {{ic|xbacklight}} works, then you may be facing an incompatibility between your BIOS and kernel driver.<br />
<br />
In this case the only solution is to wait for a fix either from the BIOS or GPU driver manufacturer.<br />
<br />
A workaround is to use the inotify kernel api to trigger {{ic|xbacklight}} each time the value of {{ic|/sys/class/backlight/acpi_video0/actual_brightness}} changes.<br />
<br />
First [[install]] {{Pkg|inotify-tools}}. Then create a script around inotify that will be launched upon each boot or through [[autostart]].<br />
<br />
{{hc|/usr/local/bin/xbacklightmon|<nowiki><br />
#!/bin/sh<br />
<br />
path=/sys/class/backlight/acpi_video0<br />
<br />
luminance() {<br />
read -r level < "$path"/actual_brightness<br />
factor=$((100 / max))<br />
printf '%d\n' "$((level * factor))"<br />
}<br />
<br />
read -r max < "$path"/max_brightness<br />
<br />
xbacklight -set "$(luminance)"<br />
<br />
inotifywait -me modify --format '' "$path"/actual_brightness | while read; do<br />
xbacklight -set "$(luminance)"<br />
done<br />
</nowiki>}}<br />
=== Backlight not working in MATE ===<br />
<br />
Make sure the {{Pkg|mate-power-manager}} package is [[install]]ed.</div>Xcessionhttps://wiki.archlinux.org/index.php?title=Apache_HTTP_Server&diff=76308Apache HTTP Server2009-09-23T16:44:52Z<p>Xcession: </p>
<hr />
<div>[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
[[Category:Web Server (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|LAMP}}<br />
{{i18n_entry|Español|LAMP (Español)}}<br />
{{i18n_entry|Italiano|LAMP (Italiano)}}<br />
{{i18n_entry|Türkçe|LAMP_(Türkçe)}}<br />
{{i18n_entry|Русский|LAMP (russian)}}<br />
{{i18n_entry|Česky|LAMP_(Česky)}}<br />
{{i18n_entry|简体中文|LAMP(简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
== Introduction ==<br />
This document describes how to set up the Apache web server on an Arch Linux system. It also tells how to optionally install PHP and MySQL and integrate these in the Apache server. This combination is commonly referred to as LAMP (Linux Apache MySQL PHP).<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 />
{{Box 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 />
=== Apache ===<br />
* Create the user http (this account may already exist):<br />
# useradd http<br />
* Add this line to {{Filename|/etc/hosts}} (If the file doesn't exist, create it.):<br />
127.0.0.1 localhost.localdomain localhost<br />
'''Note:''' If you want a different hostname, append it to the end:<br />
127.0.0.1 localhost.localdomain localhost myhostname<br />
<br />
* Edit {{Filename|/etc/[[rc.conf]]}}: If you set a hostname, the {{Codeline|HOSTNAME}} variable should be the same; otherwise, use {{Codeline|"localhost"}}:<br />
#<br />
# Networking<br />
#<br />
HOSTNAME="localhost"<br />
<br />
* Make sure the hostname appears in /etc/hosts or apache will fail to start. Alternatively, you can<br />
edit {{Filename|/etc/httpd/conf/httpd.conf}} as root and comment the following module:<br />
LoadModule unique_id_module modules/mod_unique_id.so<br />
It should now appear as:<br />
#LoadModule unique_id_module modules/mod_unique_id.so<br />
<br />
<br />
* Run the following in a terminal as root to start the HTTP server:<br />
# /etc/rc.d/httpd start<br />
<br />
* Apache should now be running. Test by visiting http://localhost/ in a web browser. It should display a simple Apache test page.<br />
<br />
* To start Apache automatically at boot, edit {{Filename|/etc/rc.conf}} as root and add the '''httpd''' daemon:<br />
DAEMONS=(... '''httpd''' ...)<br />
'''Or''' add this line to {{Filename|/etc/rc.local}}:<br />
/etc/rc.d/httpd start<br />
<br />
* If you want to use user directories (i.e. <tt>~/public_html</tt> on the machine is accessed as <tt>http://localhost/~user/</tt>) to be available on the web, uncomment the following lines in {{Filename|/etc/httpd/conf/extra/httpd-userdir.conf}}:<br />
UserDir public_html<br />
and<br />
<Directory /home/*/public_html><br />
AllowOverride FileInfo AuthConfig Limit Indexes<br />
Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI<br />
<Limit GET POST OPTIONS PROPFIND><br />
Order allow,deny<br />
Allow from all<br />
</Limit><br />
<LimitExcept GET POST OPTIONS PROPFIND><br />
Order deny,allow<br />
Deny from all<br />
</LimitExcept><br />
</Directory><br />
<br />
You must make sure that your home directory permissions are set properly so that Apache can get there. Your home directory and <tt>~/public_html/</tt> 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 />
There may be some other, more-secure ways of setting the permissions by creating a special group and allowing only Apache and you to enter there... You know how paranoid you are.<br />
<br />
==== Advanced Options====<br />
<br />
These options in {{Filename|/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 />
# ServerAdmin sample@sample.com<br />
This is the admin's email-address which can be found on error-pages e.g.<br />
<br />
# DocumentRoot "/srv/http"<br />
This is the directory where you should put your web pages. Change it, if you want to, but don't forget to change the<br />
<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.<br />
<br />
=== PHP ===<br />
PHP is practically available out of the box now.<br />
<br />
* Add these lines in {{Filename|/etc/httpd/conf/httpd.conf}}:<br />
'''NOTE:''' Place them at the end of "LoadModule" list or bottom of the file.<br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
<br />
* If your {{Codeline|DocumentRoot}} is outside of <tt>/home/</tt>, add it to {{Codeline|open_basedir}} in {{Filename|/etc/php/php.ini}} as such:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/path/to/documentroot<br />
'''NOTE''' Should not be necessary anymore (18.08.2009)<br />
Suggestion - Add your document root as follows: this is the default<br />
open_basedir = /srv/http:/home/:/tmp/:/usr/share/pear/<br />
<br />
* Restart the Apache service to make changes take effect (as root):<br />
# /etc/rc.d/httpd restart<br />
<br />
* Test PHP with a simple, but very informative script:<br />
<html><br />
<head><br />
<title>PHP Test Page</title><br />
</head><br />
<body><br />
This is Arch Linux, running PHP.<br />
<?php<br />
phpinfo();<br />
?><br />
</body><br />
</html><br />
<br />
Save this file as {{Filename|test.php}} and copy to <tt>/srv/http/</tt> or to <tt>~/public_html</tt> if you permitted such a configuration.<!-- Also, remember to make it executable ({{Codeline|chmod o+x test.php}}).--><br />
<br />
* Test PHP: http://localhost/test.php or http://localhost/~myname/test.php<br />
<br />
'''NOTE:''' If the php instruction is not executed (you see : <html>...</html>), add this to your {{Filename|/etc/httpd/conf/httpd.conf}}:<br />
AddType application/x-httpd-php .php<br />
AddType application/x-httpd-php-source .phps<br />
<br />
==== Advanced options ====<br />
* Remember to add a file handler for .phtml if you need it in {{Filename|/etc/httpd/conf/extra/php5_module.conf}}:<br />
DirectoryIndex index.php index.phtml index.html<br />
<br />
* If you want the libGD module, install php-gb package and uncomment in {{Filename|/etc/php/php.ini}}:<br />
;extension=gd.so<br />
to<br />
extension=gd.so<br />
<br />
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 />
{{Note | PHP-gd requires libpng, libjpeg, and freetype2}}<br />
* If you want to display errors to debug your php code, change this line of {{Filename|/etc/php/php.ini}}:<br />
display_errors = Off<br />
to<br />
display_errors = On<br />
<br />
* If you want the mcrypt module, install php-mcrypt package and uncomment in {{Filename|/etc/php/php.ini}}:<br />
;extension=mcrypt.so<br />
to<br />
extension=mcrypt.so<br />
<br />
=== MySQL ===<br />
* Configure MySQL as described at the [[MySQL]] wiki.<br />
<br />
* Edit {{Filename|/etc/php/php.ini}} (this is in <tt>/usr/etc</tt> on older systems) to uncomment the following line (''By removing {{Codeline|;}}''):<br />
;extension=mysql.so<br />
<br />
* Caution: Some users have reported typos on this line. Please make sure that it reads {{Codeline|;extension&#61;mysql.so}} and not {{Codeline|;extension&#61;msql.so}}.<br />
<br />
* You can add minor privileged users for your web scripts by editing the tables found in the <tt>mysql</tt> database. You have to restart MySQL for changes to take effect. Don't forget to check the {{Codeline|mysql/users}} table. If there's a second entry for root and your hostname is left with no password set, everybody from your host probably could gain full access. Perhaps see next section for these jobs.<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/mysqld start<br />
<br />
* You may also need to restart Apache. Run in terminal (as root):<br />
# /etc/rc.d/httpd restart<br />
<br />
* MySQL should now be running. Set the root password and test it by running<br />
# mysqladmin -uroot password ''password''<br />
# mysql -uroot -p''password''<br />
<br />
Type ''exit'' to exit from the CLI MySQL client<br />
<br />
* Edit {{Filename|/etc/rc.conf}} (to start MySQL at boot):<br />
DAEMONS=(... '''mysqld''' ...)<br />
'''Or''' add this line to {{Filename|rc.local}}:<br />
/etc/rc.d/mysqld start<br />
<br />
* You can get the {{Codeline|"error no. 2013: Lost Connection to mysql server during query"}} message instantly whenever you try to connect to the MySQL daemon by TCP/IP. This is the TCP wrappers system (tcpd), which uses the <tt>hosts_access(5)</tt> system to allow or disallow connections.<br />
<br />
* If you're running into this problem, be sure to add this to your {{Filename|/etc/hosts.allow}} file:<br />
# mysqld : ALL : ALLOW<br />
# mysqld-max : ALL : ALLOW<br />
# and similar for the other MySQL daemons.<br />
<br />
* Notes: The examples above are the simplest case, telling tcpd to allow connections from anywhere. You may wish to use a more-appropriate choice of permissible sources instead of ALL. Just make sure that localhost and the IP address (numeric or DNS) of the interface by which you connect are specified.<br />
<br />
* You might also need to edit {{Filename|/etc/my.cnf}} and comment out the {{Codeline|skip-networking}} line as such:<br />
skip-networking<br />
to<br />
#skip-networking<br />
<br />
== More Resources ==<br />
* [[MySQL]] - Arch wiki article for MySQL<br />
* [[Xampp]] - Self contained web-server that supports PHP, Perl, and MySQL<br />
* http://www.apache.org/<br />
* http://www.php.net/<br />
* http://www.mysql.com/</div>Xcessionhttps://wiki.archlinux.org/index.php?title=Xorg_Input_Hotplugging&diff=55930Xorg Input Hotplugging2008-12-21T16:19:54Z<p>Xcession: /* Configuration */</p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Xorg_input_hotplugging}}<br />
{{i18n_entry|Türkçe|Xorg Girdi Aygıtlarının Otomatik Tanıtılması}}<br />
{{i18n_links_end}}<br />
<br />
<br />
== Rationale ==<br />
Historically, the X server would be used on terminals, and later, on desktop computers. On those machines the X server would start once, upon when it would configure itself with regards to its rarely changing input and output peripherals: monitors, video cards, keyboards, mice, tablets, touchscreens...<br />
<br />
With the advent of mobile computing, a given computer often sees its peripherals changing, while it is running. Obviously, restarting the whole OS is not an option, so the kernel hackers accommodated for this by implementing ''device hotplugging''. Since devices are exposed to userspace as device nodes in /dev, the highly configurable udev was born in lieu of devfs (or manually maintained /dev).<br />
<br />
Still, the X server is having issues with this, as it probes devices and opens device files upon startup. If the device was absent on X startup, it will remain unknown to X. If the device file was present at X startup, and the file disappears (e.g the device is disconnected), the file handle is lost, thus the device will remain unknown, even if replugged and the same device node is recreated (which is easy to do with udev). This is also true for gpm, a mouse daemon for VTs.<br />
<br />
To overcome this issue, notably with the most widely encountered cases (that is, a laptop user with a touchpad and an external mouse), the kernel emulates a PS/2 mouse with all events coming from any mouse connected to the system. The device file is always present, and resides at /dev/input/mice (or /dev/psaux). This has a number of issues. First, being an emulated PS/2 mouse, the protocol is predefined, and has inherent limitations, overcome by various proprietary extensions, like ImPS/2 and ExplorerPS/2. What's more, events coming from all the mice have to be translated to this protocol, and thus untranslatable events are lost or misunderstood. What's more, it is impossible to have such an emulated device work in absolute coordinates since it would make no sense (as events can come from many devices). Also, relative button events (like for a wheel, where there's no press/release events) have to be a wheel axis in the PS/2 protocol, and you can't have much of them. Furthermore, all mice will have the same settings with regards to speed or button orders as set via e.g xset of xmodmap. This is an issue when you have a laser mouse which just flies across the screen when another one moves like a turtle.<br />
<br />
In the end, it doesn't matter for many users out there who just want a mouse with a wheel and three buttons. Yet there is an increasing market of keyboards, mice and other special input devices with various extra buttons. While hardcore users will argue that this is useless and that everybody should use tiling WMs and screw the mouse, it is increasingly useful to perform many common tasks with '''either''' the keyboard '''or''' the mouse, depending on what you're '''currently''' doing.<br />
<br />
The solution to enable all those extra buttons is to use the X input event driver (or evdev). Trouble is, this driver must have access to the exact event node matching your device, which resides in /dev/input/event*, and not some funky workaround device emulator sink. So evdev will work, but only if the device is plugged in at X startup, and never unplugged afterwards. <br />
<br />
Rather than writing a routine monitoring /dev or listening to kernel events, which would have the additional nasty effect of tying X hotplugging to linux, the X devs decided to leverage the power of the HAL daemon. hald essentially builds a uniform database of the current hardware available on the system (together with any information it can deduce like device type and so on), and updates it live according to kernel events, while re-sensing device files. Now, thanks to the hard work of hald and dbus devs, all that X has to do is connect to hald (this is done via dbus), monitor device (dis)appearance, and take action if the device is relevant to X.<br />
<br />
== Current XInput status upstream ==<br />
There's no other way to have '''real''' hotplugging. This is indeed what one might relate to XRandR for its display hotplugging ability, and it's called XInput. It is in the process of a huge revamp, first with this hotplug support, and next with MPX (multi-pointer X) in the near future.<br />
It is posing a number of problems, because many pieces of software (xmodmap, GTK...) are unaware of how to handle multiple devices, and them disappearing or reappearing.<br />
<br />
== Current status in Arch ==<br />
Input hotplugging is enabled in the 1.5.x series of the xorg-server package, which is now included in the extra repo.<br />
<br />
== Requirements ==<br />
To use input hotplugging, the "xf86-input-evdev" package is required. This module handles both keyboard and mouse configuration by default. Other drivers, like "xf86-input-vmmouse" and "xf86-input-synaptics", also contain hotplugging configuration files, which will cause these drivers to be used instead of evdev when your hardware supports them.<br />
Besides installing a supported driver, both dbus and hal have to be running. Add the hal daemon to the DAEMONS array in /etc/rc.conf before anything related to X.Org is started. The hal daemon will load the dbus daemon automatically.<br />
<br />
== Configuration ==<br />
Though input devices are hotplugged, especially keyboards need configuration. Currently there is no way to autoconfigure keymaps for hotplugged keyboards. The default keyboard layout has to be configured in a hal .fdi file. The keymap defaults to a standard US keyboard and is configured in "/usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi", a configuration file included in the hal package.<br />
As this file is overwritten on every hal upgrade, this file should be copied to /etc/hal/fdi/policy/. Files placed inside this directory will override the files in /usr/share. The things you want to change are "input.xkb.layout" and "input.xkb.variant". Other options are "input.xkb.rules", "input.xkb.model" and "input.xkb.options". These options resemble the options you used to put in xorg.conf.<br />
<br />
Other files worth looking at are "10-x11-input.fdi", which configures the default keyboard and mouse driver and "11-x11-synaptics.fdi", which configures your synaptics touchpad in case you have xf86-input-synaptics installed.<br />
<br />
'''Note that hal needs a restart after changing .fdi files, or it will not autodetect any changes.''' X does not require any restart for this, it will keep listening for signals from hal. Reconfiguring devices that were already added before hal was reconfigured will keep running with the old configuration. To reconfigure these devices, X needs a restart afterall, but removing and adding the devices to the system will also reconfigure them. This is not very useful for laptops with an integrated keyboard or devices that don't support hotplugging (PS/2 mice and keyboards) though.<br />
<br />
== FAQ/Troubleshooting ==<br />
<br />
===I configured my mouse and/or keyboard in xorg.conf, but X will not use it===<br />
When input hotplugging is enabled, X will purge any devices setup in xorg.conf that are using the kbd and mouse driver.<br />
<br />
===After upgrading to xorg-server 1.5.3, X appears to freeze, I can no longer press keys or move my mouse===<br />
This is related to the problem above. Install the xf86-input-evdev driver, configure hal to use the kbd/mouse drivers anyways or disable input hotplugging.<br />
Later versions of xorg-server have xf86-input-evdev as dependency.<br />
<br />
===Using the evdev driver kills my arrow keys, printscreen is triggered instead===<br />
This is a known bug when your keyboard is setup as a specific model by applications like GNOME or KDE. The most simple solution is upgrading to xf86-input-evdev 2.1.0, which ignores any model settings and forces "evdev" as keyboard model. If you don't want to upgrade for some reason, Be sure to set your keyboard model to "Evdev managed keyboard" in the keyboard preferences of your desktop.<br />
<br />
===Arrow keys don't work in Openbox===<br />
Arrow keys won't work in [[Openbox]] dialogs (like client-list-combined or client-menu), to workaround that reconfigure openbox:<br />
openbox --reconfigure<br />
<br />
It's an [http://bugzilla.icculus.org/show_bug.cgi?id=3885 upstream bug], hopefully it will be fixed soon.<br />
<br />
===When I press a key, X thinks I pressed it multiple times===<br />
Since xf86-input-evdev 2.1.0, the evdev driver no longer locks the input device. If you have other drivers configured in xorg.conf, multiple keyboard devices will get configured, which means each device will process your input at the same time, resulting in multiple keypresses.<br />
X removes devices using the kbd and mouse drivers which are configured in xorg.conf. However, this only works if the "AllowEmptyInput" option is set. This is the default setting in xorg-server-1.5.3-4, but some users have this set to False in xorg.conf. Remove the option to solve this problem.<br />
<br />
====Modifying hal configuration====<br />
Copy the file:<br />
/usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi<br />
to<br />
/etc/hal/fdi/policy/10-keymap.fdi<br />
<br />
and edit this copy there as follows (substitute NEW_LAYOUT with your layout, for instance '''fr'''):<br />
<br />
<merge key="input.xkb.layout" type="string">NEW_LAYOUT</merge><br />
<br />
You can also toggle between layouts by adding a line similar to to the following:<br />
<br />
<merge key="input.xkb.options" type="string">grp:TOGGLE</merge><br />
<br />
where TOGGLE might be menu_toggle, alt_shift_toggle, or any of the other recognized toggle switches.<br />
<br />
====Using setxkbmap====<br />
If previously something like the following snippet of the xorg.conf would deliver your keyboard layout (Option "XkbLayout" "<xkb_layout>"):<br />
<br />
Section "InputDevice"<br />
Identifier "keyboard"<br />
Driver "kbd"<br />
...<br />
Option "XkbLayout" "<xkb_layout>"<br />
EndSection<br />
<br />
Then in a terminal test the following command:<br />
<br />
setxkbmap <xkb_layout><br />
<br />
With the same layout as previously configured in the xorg.conf, and type some letters to see if it works correctly. A simple trick, instead of editing the policy file is to add a line to your $HOME/.xinitrc like this:<br />
<br />
setxkbmap <xkb_layout><br />
<br />
That is, assuming that xinit is being used to start X, it will work nice. You may need to explicitely set the keyboard model to evdev (as in the Gnome/KDE/Openbox examples) by adding:<br />
<br />
-model evdev<br />
<br />
===I don't want this crap, how do I turn it off?===<br />
To disable input hotplugging, add Option "AutoAddDevices" "False" to ServerFlags in /etc/X11/xorg.conf:<br />
<br />
Section "ServerFlags"<br />
Option "AutoAddDevices" "False"<br />
EndSection<br />
<br />
This will skip devices detected by hal and will use your keyboard/mouse configuration from xorg.conf<br />
<br />
===My mouse is jerky/uncontrollable in SDL apps/games! WTF?===<br />
This was a long time since I started a game. It seems that with evdev, DGA gets broken in SDL: mouse jumps and moves down-right all the time.<br />
<br />
To fix this you have to either set a var:<br />
<br />
export SDL_VIDEO_X11_DGAMOUSE=0<br />
<br />
which is sufficient for Neverball, or add this to your xorg.conf:<br />
<br />
Section "Module"<br />
...<br />
SubSection "extmod"<br />
Option "omit xfree86-dga" # don't initialise the DGA extension<br />
EndSubSection<br />
...<br />
EndSection<br />
<br />
which is mandatory for e.g Doom III<br />
<br />
===How can I make mouse button XYZ do FOO?===<br />
Well, currently it has to be implemented in the application (like e.g firefox next/previous) or in the WM. Configurable WM like compiz can do something with mouse buttons too. The sad thing is that this is per-button number and not per-device. <br />
There are also some interesting apps like [http://www.bedroomlan.org/~alexios/coding_evrouter.html EvRouter] but the kernel event design makes it so that events are not 'consumed' by applications reading /dev/input/event0, thus catching an event won't prevent the event to be passed to X (which will produce a ButtonXYZ event, which results in a LeftClick if not handled specially by the application). Or I missed something somewhere.<br />
<br />
===Tapping and sliding doesn't work anymore with my touchpad!===<br />
Assuming you have configured X to use the synaptics driver, you have to explicitly tell it to enable the tapping functions. It wasn't necessary before: this is a change in the synaptics driver - which is now an officially xorg supported driver - and is not directly related to input hotplugging: see [[Touchpad Synaptics]].<br />
<br />
If you choose to disable hotplugging, you need to modify xorg.conf.<br />
<br />
If on the contrary you use hotplugging, remove every eventual synaptic related configuration from your '''xorg.conf''' (usually the '''InputDevice "SynapticsTouchpad"''' line and relative '''Section "InputDevice"''' section), copy /usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi to /etc/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi and edit it. See http://bbs.archlinux.org/viewtopic.php?pid=456689#p456689 for a sample configuration that works. If this post does not work, try this one: http://bbs.archlinux.org/viewtopic.php?pid=456488#p456488 <br />
<br />
=== How can I check if I'm using the evdev driver? ===<br />
First, you can check if hal found the evdev device.<br />
On the command line, one can run something like:<br />
<br />
hal-device|grep -B 15 input.x11.driver<br />
<br />
and check your mouse and/or keyboard is listed. For example:<br />
<br />
50: udi = '/org/freedesktop/Hal/devices/usb_device_461_4d15_noserial_if0_logicaldev_input'<br />
linux.sysfs_path = '/sys/class/input/input1/event1' (string)<br />
info.subsystem = 'input' (string)<br />
info.parent = '/org/freedesktop/Hal/devices/usb_device_461_4d15_noserial_if0' (string)<br />
info.product = 'USB Optical Mouse' (string)<br />
info.category = 'input' (string)<br />
info.udi = '/org/freedesktop/Hal/devices/usb_device_461_4d15_noserial_if0_logicaldev_input' (string)<br />
info.capabilities = { 'input', 'input.mouse' } (string list)<br />
linux.hotplug_type = 2 (0x2) (int)<br />
linux.subsystem = 'input' (string)<br />
input.device = '/dev/input/event1' (string)<br />
linux.device_file = '/dev/input/event1' (string)<br />
input.product = 'USB Optical Mouse' (string)<br />
input.x11_driver = 'evdev' (string)<br />
input.originating_device = '/org/freedesktop/Hal/devices/usb_device_461_4d15_noserial_if0' (string)<br />
<br />
and you can look for config/hal in /var/log/Xorg.0.log xorg log file to look for evdev device configuration.<br />
<br />
(II) config/hal: Adding input device USB Optical Mouse<br />
(**) USB Optical Mouse: always reports core events<br />
(**) USB Optical Mouse: Device: "/dev/input/event1"<br />
(II) USB Optical Mouse: Found x and y relative axes<br />
(II) USB Optical Mouse: Found mouse buttons<br />
(II) USB Optical Mouse: Configuring as mouse<br />
(II) XINPUT: Adding extended input device "USB Optical Mouse" (type: MOUSE)</div>Xcessionhttps://wiki.archlinux.org/index.php?title=Apache_HTTP_Server&diff=53852Apache HTTP Server2008-11-19T15:38:41Z<p>Xcession: </p>
<hr />
<div>[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|LAMP}}<br />
{{i18n_entry|Español|LAMP (Español)}}<br />
{{i18n_entry|Italiano|LAMP (Italiano)}}<br />
{{i18n_entry|Türkçe|LAMP_(Türkçe)}}<br />
{{i18n_entry|Русский|LAMP (russian)}}<br />
{{i18n_entry|Česky|LAMP_(Česky)}}<br />
{{i18n_entry|简体中文|LAMP(简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
===Apache, PHP, and MySQL===<br />
<br />
This document describes how to set up the Apache web server on an Arch Linux system. It also tells how to optionally install PHP and MySQL and integrate these in the Apache server.<br />
<br />
====Install Packages====<br />
<br />
# pacman -Sy apache php mysql<br />
<br />
If you'd like, you can install Apache/PHP/MySQL separately. This document assumes you will install Apache, PHP and MySQL. But if you wish, you may only read the sections below that apply to the software you installed.<br />
{{Box 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 />
====Configure Apache====<br />
* Create the user http<br />
useradd http<br />
* Add this line to <code>/etc/hosts</code> (if the file doesn't exist, create it):<br />
127.0.0.1 localhost.localdomain localhost<br />
'''Note:''' If you want a different hostname, append it to the end:<br />
127.0.0.1 localhost.localdomain localhost myhostname<br />
<br />
* Edit <code>/etc/rc.conf</code>: If you set a hostname in Step One, the HOSTNAME variable should be the same; otherwise, use "localhost":<br />
#<br />
# Networking<br />
#<br />
HOSTNAME="localhost"<br />
<br />
* Comment one module in Apache configuration<br />
# nano /etc/httpd/conf/httpd.conf<br />
<br />
LoadModule unique_id_module modules/mod_unique_id.so<br />
to<br />
#LoadModule unique_id_module modules/mod_unique_id.so<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/httpd start<br />
<br />
* Apache should now be running. Test by visiting <code>http://localhost/</code> in a web browser. It should display a simple Apache test page.<br />
<br />
* Edit <code>/etc/rc.conf</code> (to start Apache at boot):<br />
DAEMONS=(''... some daemons ...'' httpd)<br />
'''Or''' add this line to <code>/etc/rc.local</code>:<br />
/etc/rc.d/httpd start<br />
<br />
* If you want to use user directories (i.e. <code>~/public_html</code> on the machine is accessed as <code>http://localhost/~user/</code>) to be available on the web, uncomment the following lines in <code>/etc/httpd/conf/extra/httpd-userdir.conf</code>:<br />
UserDir public_html<br />
and<br />
<Directory /home/*/public_html><br />
AllowOverride FileInfo AuthConfig Limit Indexes<br />
Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI<br />
<Limit GET POST OPTIONS PROPFIND><br />
Order allow,deny<br />
Allow from all<br />
</Limit><br />
<LimitExcept GET POST OPTIONS PROPFIND><br />
Order deny,allow<br />
Deny from all<br />
</LimitExcept><br />
</Directory><br />
<br />
You must make sure that your home directory permissions are set properly so that Apache can get there. Your home directory and <code>~/public_html/</code> 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 />
There may be some other, more-secure ways of setting the permissions by creating a special group and allowing only Apache and you to enter there... You know how paranoid you are.<br />
<br />
=====Additional options=====<br />
<br />
This options in /etc/httpd/conf/httpd.conf might be interesting for you:<br />
<br />
# Listen 80<br />
<br />
This is the port Apache will listen to. For Internet-access with router, you have to forward the port.<br />
<br />
# ServerAdmin sample@sample.com<br />
<br />
This is the admin's email-address which can be found on error-pages e.g.<br />
<br />
# DocumentRoot "/srv/http"<br />
<br />
This is the directory where you should put your web pages. Change it, if you want to, but don't forget to change the<br />
<br />
<Directory "/srv/http"><br />
<br />
to whatever you changed your DocumentRoot to.<br />
<br />
====Configure PHP====<br />
<br />
PHP is practically available out of the box now.<br />
<br />
* Add these line in <code>/etc/httpd/conf/httpd.conf</code><br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
<br />
Apache2:<br />
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so<br />
AddHandler php5-script php<br />
http://dan.drydog.com/apache2php.html<br />
<br />
* Remember to add a file handler for .phtml if you need it in /etc/httpd/conf/extra/php5_module.conf:<br />
DirectoryIndex index.php index.phtml index.html<br />
<br />
* If you want the libGD module, uncomment in <code>/etc/php/php.ini</code>:<br />
;extension=gd.so<br />
to<br />
extension=gd.so<br />
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 your <code>DocumentRoot</code> is outside of <code>/home/</code>, add it to <code>open_basedir</code> in <code>/etc/php/php.ini</code> as such:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/path/to/documentroot<br />
<br />
suggestion - Add your document root as follows:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/srv/http<br />
<br />
* Restart the Apache service to make changes take effect (as root):<br />
# /etc/rc.d/httpd restart<br />
<br />
* Test PHP with a simple, but very informative script:<br />
<html><br />
<head><br />
<title>PHP Test Page</title><br />
</head><br />
<body><br />
This is Arch Linux, running PHP.<br />
<?php<br />
phpinfo();<br />
?><br />
</body><br />
</html><br />
<br />
Save this file as <code>test.php</code> and copy to <code>/srv/http/</code> or to <code>~/public_html</code> if you permitted such a configuration.<!-- Also, remember to make it executable (<code>chmod o+x test.php</code>).--><br />
<br />
* Test PHP: http://localhost/test.php or http://localhost/~myname/test.php<br />
<br />
'''If you continue to have problems''', edit your /etc/httpd/conf/httpd.conf file with the following information<br />
<br />
* Edit your httpd.conf file<br />
nano /etc/httpd/conf/httpd.conf<br />
<br />
* Under <IfModule mime_module><br />
AddType application/x-httpd-php .php<br />
AddType application/x-httpd-php-source .phps<br />
<br />
* Restart Apache<br />
# /etc/rc.d/httpd restart<br />
<br />
Be sure to test the page again to verify it's working properly (as stated above)<br />
<br />
====Setup MySQL support====<br />
<br />
Do these steps only if you want MySQL support. Configure MySQL as described here: [[MySQL]]<br />
<br />
* Edit <code>/etc/php/php.ini</code> (this is in <code>/usr/etc</code> on older systems) to uncomment the following line (<i>By removing <code>;</code></i>):<br />
<code>;extension=mysql.so</code><br />
<br />
* You can add minor privileged users for your web scripts by editing the tables found in the <code>mysql</code> database. You have to restart MySQL for changes to take effect. Don't forget to check the <code>mysql/users</code> table. If there's a second entry for root and your hostname is left with no password set, everybody from your host probably could gain full access. Perhaps see next section for these jobs.<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/mysqld start<br />
<br />
* MySQL should now be running. Test by visiting <code>http://localhost/phpMyAdmin</code> in a web browser. It should display phpMyAdmin main page.<br />
<br />
* Edit <code>/etc/rc.conf</code> (to start MySQL at boot):<br />
DAEMONS=(''... some daemons ...'' mysqld)<br />
'''Or''' add this line to <code>rc.local</code>:<br />
/etc/rc.d/mysqld start<br />
<br />
* You can get the "<code>error no. 2013: Lost Connection to mysql server during query</code>" message instantly whenever you try to connect to the MySQL daemon by TCP/IP. This is the TCP wrappers system (tcpd), which uses the <code>hosts_access(5)</code> system to allow or disallow connections.<br />
<br />
* If you're running into this problem, be sure to add this to your /etc/hosts.allow file:<br />
<br />
# mysqld : ALL : ALLOW<br />
# mysqld-max : ALL : ALLOW<br />
# and similar for the other MySQL daemons.<br />
<br />
* Notes: The examples above are the simplest case, telling tcpd to allow connections from anywhere. You may wish to use a more-appropriate choice of permissible sources instead of ALL. Just make sure that localhost and the IP address (numeric or DNS) of the interface by which you connect are specified.<br />
<br />
* You might also need to edit <code>/etc/my.cnf</code> and comment out the <code>skip-networking</code> line as such:<br />
<br />
skip-networking<br />
<br />
to<br />
<br />
#skip-networking</div>Xcessionhttps://wiki.archlinux.org/index.php?title=Apache_HTTP_Server&diff=53851Apache HTTP Server2008-11-19T15:37:49Z<p>Xcession: </p>
<hr />
<div>===Apache, PHP, and MySQL===<br />
<br />
This document describes how to set up the Apache web server on an Arch Linux system. It also tells how to optionally install PHP and MySQL and integrate these in the Apache server.<br />
<br />
====Install Packages====<br />
<br />
# pacman -Sy apache php mysql<br />
<br />
If you'd like, you can install Apache/PHP/MySQL separately. This document assumes you will install Apache, PHP and MySQL. But if you wish, you may only read the sections below that apply to the software you installed.<br />
<br />
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 />
====Configure Apache====<br />
* Create the user http<br />
useradd http<br />
* Add this line to <code>/etc/hosts</code> (if the file doesn't exist, create it):<br />
127.0.0.1 localhost.localdomain localhost<br />
'''Note:''' If you want a different hostname, append it to the end:<br />
127.0.0.1 localhost.localdomain localhost myhostname<br />
<br />
* Edit <code>/etc/rc.conf</code>: If you set a hostname in Step One, the HOSTNAME variable should be the same; otherwise, use "localhost":<br />
#<br />
# Networking<br />
#<br />
HOSTNAME="localhost"<br />
<br />
* Comment one module in Apache configuration<br />
# nano /etc/httpd/conf/httpd.conf<br />
<br />
LoadModule unique_id_module modules/mod_unique_id.so<br />
to<br />
#LoadModule unique_id_module modules/mod_unique_id.so<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/httpd start<br />
<br />
* Apache should now be running. Test by visiting <code>http://localhost/</code> in a web browser. It should display a simple Apache test page.<br />
<br />
* Edit <code>/etc/rc.conf</code> (to start Apache at boot):<br />
DAEMONS=(''... some daemons ...'' httpd)<br />
'''Or''' add this line to <code>/etc/rc.local</code>:<br />
/etc/rc.d/httpd start<br />
<br />
* If you want to use user directories (i.e. <code>~/public_html</code> on the machine is accessed as <code>http://localhost/~user/</code>) to be available on the web, uncomment the following lines in <code>/etc/httpd/conf/extra/httpd-userdir.conf</code>:<br />
UserDir public_html<br />
and<br />
<Directory /home/*/public_html><br />
AllowOverride FileInfo AuthConfig Limit Indexes<br />
Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI<br />
<Limit GET POST OPTIONS PROPFIND><br />
Order allow,deny<br />
Allow from all<br />
</Limit><br />
<LimitExcept GET POST OPTIONS PROPFIND><br />
Order deny,allow<br />
Deny from all<br />
</LimitExcept><br />
</Directory><br />
<br />
You must make sure that your home directory permissions are set properly so that Apache can get there. Your home directory and <code>~/public_html/</code> 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 />
There may be some other, more-secure ways of setting the permissions by creating a special group and allowing only Apache and you to enter there... You know how paranoid you are.<br />
<br />
=====Additional options=====<br />
<br />
This options in /etc/httpd/conf/httpd.conf might be interesting for you:<br />
<br />
# Listen 80<br />
<br />
This is the port Apache will listen to. For Internet-access with router, you have to forward the port.<br />
<br />
# ServerAdmin sample@sample.com<br />
<br />
This is the admin's email-address which can be found on error-pages e.g.<br />
<br />
# DocumentRoot "/srv/http"<br />
<br />
This is the directory where you should put your web pages. Change it, if you want to, but don't forget to change the<br />
<br />
<Directory "/srv/http"><br />
<br />
to whatever you changed your DocumentRoot to.<br />
<br />
====Configure PHP====<br />
<br />
PHP is practically available out of the box now.<br />
<br />
* Add these line in <code>/etc/httpd/conf/httpd.conf</code><br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
<br />
Apache2:<br />
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so<br />
AddHandler php5-script php<br />
http://dan.drydog.com/apache2php.html<br />
<br />
* Remember to add a file handler for .phtml if you need it in /etc/httpd/conf/extra/php5_module.conf:<br />
DirectoryIndex index.php index.phtml index.html<br />
<br />
* If you want the libGD module, uncomment in <code>/etc/php/php.ini</code>:<br />
;extension=gd.so<br />
to<br />
extension=gd.so<br />
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 your <code>DocumentRoot</code> is outside of <code>/home/</code>, add it to <code>open_basedir</code> in <code>/etc/php/php.ini</code> as such:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/path/to/documentroot<br />
<br />
suggestion - Add your document root as follows:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/srv/http<br />
<br />
* Restart the Apache service to make changes take effect (as root):<br />
# /etc/rc.d/httpd restart<br />
<br />
* Test PHP with a simple, but very informative script:<br />
<html><br />
<head><br />
<title>PHP Test Page</title><br />
</head><br />
<body><br />
This is Arch Linux, running PHP.<br />
<?php<br />
phpinfo();<br />
?><br />
</body><br />
</html><br />
<br />
Save this file as <code>test.php</code> and copy to <code>/srv/http/</code> or to <code>~/public_html</code> if you permitted such a configuration.<!-- Also, remember to make it executable (<code>chmod o+x test.php</code>).--><br />
<br />
* Test PHP: http://localhost/test.php or http://localhost/~myname/test.php<br />
<br />
'''If you continue to have problems''', edit your /etc/httpd/conf/httpd.conf file with the following information<br />
<br />
* Edit your httpd.conf file<br />
nano /etc/httpd/conf/httpd.conf<br />
<br />
* Under <IfModule mime_module><br />
AddType application/x-httpd-php .php<br />
AddType application/x-httpd-php-source .phps<br />
<br />
* Restart Apache<br />
# /etc/rc.d/httpd restart<br />
<br />
Be sure to test the page again to verify it's working properly (as stated above)<br />
<br />
====Setup MySQL support====<br />
<br />
Do these steps only if you want MySQL support. Configure MySQL as described here: [[MySQL]]<br />
<br />
* Edit <code>/etc/php/php.ini</code> (this is in <code>/usr/etc</code> on older systems) to uncomment the following line (<i>By removing <code>;</code></i>):<br />
<code>;extension=mysql.so</code><br />
<br />
* You can add minor privileged users for your web scripts by editing the tables found in the <code>mysql</code> database. You have to restart MySQL for changes to take effect. Don't forget to check the <code>mysql/users</code> table. If there's a second entry for root and your hostname is left with no password set, everybody from your host probably could gain full access. Perhaps see next section for these jobs.<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/mysqld start<br />
<br />
* MySQL should now be running. Test by visiting <code>http://localhost/phpMyAdmin</code> in a web browser. It should display phpMyAdmin main page.<br />
<br />
* Edit <code>/etc/rc.conf</code> (to start MySQL at boot):<br />
DAEMONS=(''... some daemons ...'' mysqld)<br />
'''Or''' add this line to <code>rc.local</code>:<br />
/etc/rc.d/mysqld start<br />
<br />
* You can get the "<code>error no. 2013: Lost Connection to mysql server during query</code>" message instantly whenever you try to connect to the MySQL daemon by TCP/IP. This is the TCP wrappers system (tcpd), which uses the <code>hosts_access(5)</code> system to allow or disallow connections.<br />
<br />
* If you're running into this problem, be sure to add this to your /etc/hosts.allow file:<br />
<br />
# mysqld : ALL : ALLOW<br />
# mysqld-max : ALL : ALLOW<br />
# and similar for the other MySQL daemons.<br />
<br />
* Notes: The examples above are the simplest case, telling tcpd to allow connections from anywhere. You may wish to use a more-appropriate choice of permissible sources instead of ALL. Just make sure that localhost and the IP address (numeric or DNS) of the interface by which you connect are specified.<br />
<br />
* You might also need to edit <code>/etc/my.cnf</code> and comment out the <code>skip-networking</code> line as such:<br />
<br />
skip-networking<br />
<br />
to<br />
<br />
#skip-networking</div>Xcessionhttps://wiki.archlinux.org/index.php?title=Apache_HTTP_Server&diff=50711Apache HTTP Server2008-10-05T18:13:35Z<p>Xcession: /* Configure PHP */</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|LAMP}}<br />
{{i18n_entry|Español|LAMP (Español)}}<br />
{{i18n_entry|Italiano|LAMP (Italiano)}}<br />
{{i18n_entry|Русский|LAMP (russian)}}<br />
{{i18n_entry|Česky|LAMP_(Česky)}}<br />
{{i18n_entry|简体中文|LAMP(简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
===Apache, PHP, and MySQL===<br />
<br />
This document describes how to set up the Apache web server on an Arch Linux system. It also tells how to optionally install PHP and MySQL and integrate these in the Apache server.<br />
<br />
====Install Packages====<br />
<br />
# pacman -Sy apache php mysql<br />
<br />
If you'd like, you can install Apache/PHP/MySQL separately. This document assumes you will install Apache, PHP and MySQL. But if you wish, you may only read the sections below that apply to the software you installed.<br />
{{Box 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 />
====Configure Apache====<br />
* Create the user http<br />
useradd http<br />
* Add this line to <code>/etc/hosts</code> (if the file doesn't exist, create it):<br />
127.0.0.1 localhost.localdomain localhost<br />
'''Note:''' If you want a different hostname, append it to the end:<br />
127.0.0.1 localhost.localdomain localhost myhostname<br />
<br />
* Edit <code>/etc/rc.conf</code>: If you set a hostname in Step One, the HOSTNAME variable should be the same; otherwise, use "localhost":<br />
#<br />
# Networking<br />
#<br />
HOSTNAME="localhost"<br />
<br />
* Comment one module in Apache configuration<br />
# nano /etc/httpd/conf/httpd.conf<br />
<br />
LoadModule unique_id_module modules/mod_unique_id.so<br />
to<br />
#LoadModule unique_id_module modules/mod_unique_id.so<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/httpd start<br />
<br />
* Apache should now be running. Test by visiting <code>http://localhost/</code> in a web browser. It should display a simple Apache test page.<br />
<br />
* Edit <code>/etc/rc.conf</code> (to start Apache at boot):<br />
DAEMONS=(''... some daemons ...'' httpd)<br />
'''Or''' add this line to <code>rc.local</code>:<br />
/etc/rc.d/httpd start<br />
<br />
* If you want to use user directories (i.e. <code>~/public_html</code> on the machine is accessed as <code>http://localhost/~user/</code>) to be available on the web, uncomment the following lines in <code>/etc/httpd/conf/extra/httpd-userdir.conf</code>:<br />
UserDir public_html<br />
and<br />
<Directory /home/*/public_html><br />
AllowOverride FileInfo AuthConfig Limit Indexes<br />
Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI<br />
<Limit GET POST OPTIONS PROPFIND><br />
Order allow,deny<br />
Allow from all<br />
</Limit><br />
<LimitExcept GET POST OPTIONS PROPFIND><br />
Order deny,allow<br />
Deny from all<br />
</LimitExcept><br />
</Directory><br />
<br />
You must make sure that your home directory permissions are set properly so that Apache can get there. Your home directory and <code>~/public_html/</code> 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 />
There may be some other, more-secure ways of setting the permissions by creating a special group and allowing only Apache and you to enter there... You know how paranoid you are.<br />
<br />
=====Additional options=====<br />
<br />
This options in /etc/httpd/conf/httpd.conf might be interesting for you:<br />
<br />
# Listen 80<br />
<br />
This is the port Apache will listen to. For Internet-access with router, you have to forward the port.<br />
<br />
# ServerAdmin sample@sample.com<br />
<br />
This is the admin's email-address which can be found on error-pages e.g.<br />
<br />
# DocumentRoot "/srv/http"<br />
<br />
This is the directory where you should put your web pages. Change it, if you want to, but don't forget to change the<br />
<br />
<Directory "/srv/http"><br />
<br />
to whatever you changed your DocumentRoot to.<br />
<br />
====Configure PHP====<br />
<br />
PHP is practically available out of the box now.<br />
<br />
* Add these line in <code>/etc/httpd/conf/httpd.conf</code><br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
<br />
Apache2:<br />
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so<br />
AddHandler php5-script php<br />
http://dan.drydog.com/apache2php.html<br />
<br />
* Remember to add a file handler for .phtml if you need it in /etc/httpd/conf/extra/php5_module.conf:<br />
DirectoryIndex index.php index.phtml index.html<br />
<br />
* If you want the libGD module, uncomment in <code>/etc/php/php.ini</code>:<br />
;extension=gd.so<br />
to<br />
extension=gd.so<br />
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 your <code>DocumentRoot</code> is outside of <code>/home/</code>, add it to <code>open_basedir</code> in <code>/etc/php/php.ini</code> as such:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/path/to/documentroot<br />
<br />
suggestion - Add your document root as follows:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/srv/http<br />
<br />
* Restart the Apache service to make changes take effect (as root):<br />
# /etc/rc.d/httpd restart<br />
<br />
* Test PHP with a simple, but very informative script:<br />
<html><br />
<head><br />
<title>PHP Test Page</title><br />
</head><br />
<body><br />
This is Arch Linux, running PHP.<br />
<?php<br />
phpinfo();<br />
?><br />
</body><br />
</html><br />
<br />
Save this file as <code>test.php</code> and copy to <code>/srv/http/</code> or to <code>~/public_html</code> if you permitted such a configuration.<!-- Also, remember to make it executable (<code>chmod o+x test.php</code>).--><br />
<br />
* Test PHP: http://localhost/test.php or http://localhost/~myname/test.php<br />
<br />
'''If you continue to have problems''', edit your /etc/httpd/conf/httpd.conf file with the following information<br />
<br />
* Edit your httpd.conf file<br />
nano /etc/httpd/conf/httpd.conf<br />
<br />
* Under <IfModule mime_module><br />
AddType application/x-httpd-php .php<br />
AddType application/x-httpd-php-source .phps<br />
<br />
* Restart Apache<br />
# /etc/rc.d/httpd restart<br />
<br />
Be sure to test the page again to verify it's working properly (as stated above)<br />
<br />
====Setup MySQL support====<br />
<br />
Do these steps only if you want MySQL support. Configure MySQL as described here: [[MySQL]]<br />
<br />
* Edit <code>/etc/php/php.ini</code> (this is in <code>/usr/etc</code> on older systems) to uncomment the following line (<i>By removing <code>;</code></i>):<br />
<code>;extension=mysql.so</code><br />
<br />
* You can add minor privileged users for your web scripts by editing the tables found in the <code>mysql</code> database. You have to restart MySQL for changes to take effect. Don't forget to check the <code>mysql/users</code> table. If there's a second entry for root and your hostname is left with no password set, everybody from your host probably could gain full access. Perhaps see next section for these jobs.<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/mysqld start<br />
<br />
* MySQL should now be running. Test by visiting <code>http://localhost/phpMyAdmin</code> in a web browser. It should display phpMyAdmin main page.<br />
<br />
* Edit <code>/etc/rc.conf</code> (to start MySQL at boot):<br />
DAEMONS=(''... some daemons ...'' mysqld)<br />
'''Or''' add this line to <code>rc.local</code>:<br />
/etc/rc.d/mysqld start<br />
<br />
* You can get the "<code>error no. 2013: Lost Connection to mysql server during query</code>" message instantly whenever you try to connect to the MySQL daemon by TCP/IP. This is the TCP wrappers system (tcpd), which uses the <code>hosts_access(5)</code> system to allow or disallow connections.<br />
<br />
* If you're running into this problem, be sure to add this to your /etc/hosts.allow file:<br />
<br />
# mysqld : ALL : ALLOW<br />
# mysqld-max : ALL : ALLOW<br />
# and similar for the other MySQL daemons.<br />
<br />
* Notes: The examples above are the simplest case, telling tcpd to allow connections from anywhere. You may wish to use a more-appropriate choice of permissible sources instead of ALL. Just make sure that localhost and the IP address (numeric or DNS) of the interface by which you connect are specified.<br />
<br />
* You might also need to edit <code>/etc/my.cnf</code> and comment out the <code>skip-networking</code> line as such:<br />
<br />
skip-networking<br />
<br />
to<br />
<br />
#skip-networking</div>Xcessionhttps://wiki.archlinux.org/index.php?title=Apache_HTTP_Server&diff=50710Apache HTTP Server2008-10-05T18:12:52Z<p>Xcession: /* Configure PHP */</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|LAMP}}<br />
{{i18n_entry|Español|LAMP (Español)}}<br />
{{i18n_entry|Italiano|LAMP (Italiano)}}<br />
{{i18n_entry|Русский|LAMP (russian)}}<br />
{{i18n_entry|Česky|LAMP_(Česky)}}<br />
{{i18n_entry|简体中文|LAMP(简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
===Apache, PHP, and MySQL===<br />
<br />
This document describes how to set up the Apache web server on an Arch Linux system. It also tells how to optionally install PHP and MySQL and integrate these in the Apache server.<br />
<br />
====Install Packages====<br />
<br />
# pacman -Sy apache php mysql<br />
<br />
If you'd like, you can install Apache/PHP/MySQL separately. This document assumes you will install Apache, PHP and MySQL. But if you wish, you may only read the sections below that apply to the software you installed.<br />
{{Box 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 />
====Configure Apache====<br />
* Create the user http<br />
useradd http<br />
* Add this line to <code>/etc/hosts</code> (if the file doesn't exist, create it):<br />
127.0.0.1 localhost.localdomain localhost<br />
'''Note:''' If you want a different hostname, append it to the end:<br />
127.0.0.1 localhost.localdomain localhost myhostname<br />
<br />
* Edit <code>/etc/rc.conf</code>: If you set a hostname in Step One, the HOSTNAME variable should be the same; otherwise, use "localhost":<br />
#<br />
# Networking<br />
#<br />
HOSTNAME="localhost"<br />
<br />
* Comment one module in Apache configuration<br />
# nano /etc/httpd/conf/httpd.conf<br />
<br />
LoadModule unique_id_module modules/mod_unique_id.so<br />
to<br />
#LoadModule unique_id_module modules/mod_unique_id.so<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/httpd start<br />
<br />
* Apache should now be running. Test by visiting <code>http://localhost/</code> in a web browser. It should display a simple Apache test page.<br />
<br />
* Edit <code>/etc/rc.conf</code> (to start Apache at boot):<br />
DAEMONS=(''... some daemons ...'' httpd)<br />
'''Or''' add this line to <code>rc.local</code>:<br />
/etc/rc.d/httpd start<br />
<br />
* If you want to use user directories (i.e. <code>~/public_html</code> on the machine is accessed as <code>http://localhost/~user/</code>) to be available on the web, uncomment the following lines in <code>/etc/httpd/conf/extra/httpd-userdir.conf</code>:<br />
UserDir public_html<br />
and<br />
<Directory /home/*/public_html><br />
AllowOverride FileInfo AuthConfig Limit Indexes<br />
Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI<br />
<Limit GET POST OPTIONS PROPFIND><br />
Order allow,deny<br />
Allow from all<br />
</Limit><br />
<LimitExcept GET POST OPTIONS PROPFIND><br />
Order deny,allow<br />
Deny from all<br />
</LimitExcept><br />
</Directory><br />
<br />
You must make sure that your home directory permissions are set properly so that Apache can get there. Your home directory and <code>~/public_html/</code> 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 />
There may be some other, more-secure ways of setting the permissions by creating a special group and allowing only Apache and you to enter there... You know how paranoid you are.<br />
<br />
=====Additional options=====<br />
<br />
This options in /etc/httpd/conf/httpd.conf might be interesting for you:<br />
<br />
# Listen 80<br />
<br />
This is the port Apache will listen to. For Internet-access with router, you have to forward the port.<br />
<br />
# ServerAdmin sample@sample.com<br />
<br />
This is the admin's email-address which can be found on error-pages e.g.<br />
<br />
# DocumentRoot "/srv/http"<br />
<br />
This is the directory where you should put your web pages. Change it, if you want to, but don't forget to change the<br />
<br />
<Directory "/srv/http"><br />
<br />
to whatever you changed your DocumentRoot to.<br />
<br />
====Configure PHP====<br />
<br />
PHP is practically available out of the box now.<br />
<br />
* Add these line in <code>/etc/httpd/conf/httpd.conf</code><br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
<br />
Apache2:<br />
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so<br />
AddHandler php5-script php<br />
http://dan.drydog.com/apache2php.html<br />
<br />
* Remember to add a file handler for .phtml if you need it in /etc/httpd/conf/extra/php5_module.conf:<br />
DirectoryIndex index.php index.phtml index.html<br />
<br />
* If you want the libGD module, uncomment in <code>/etc/php/php.ini</code>:<br />
;extension=gd.so<br />
to<br />
extension=gd.so<br />
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 your <code>DocumentRoot</code> is outside of <code>/home/</code>, add it to <code>open_basedir</code> in <code>/etc/php/php.ini</code> as such:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/path/to/documentroot<br />
<br />
suggestion - Add your document root as follows:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/srv/http<br />
<br />
* Restart the Apache service to make changes take effect (as root):<br />
# /etc/rc.d/httpd restart<br />
<br />
* Test PHP with a simple, but very informative script:<br />
<html><br />
<head><br />
<title>PHP Test Page</title><br />
</head><br />
<br />
<body><br />
This is Arch Linux, running PHP.<br />
<br />
<?php<br />
phpinfo();<br />
?><br />
<br />
</body><br />
</html><br />
<br />
Save this file as <code>test.php</code> and copy to <code>/srv/http/</code> or to <code>~/public_html</code> if you permitted such a configuration.<!-- Also, remember to make it executable (<code>chmod o+x test.php</code>).--><br />
<br />
* Test PHP: http://localhost/test.php or http://localhost/~myname/test.php<br />
<br />
'''If you continue to have problems''', edit your /etc/httpd/conf/httpd.conf file with the following information<br />
<br />
* Edit your httpd.conf file<br />
nano /etc/httpd/conf/httpd.conf<br />
<br />
* Under <IfModule mime_module><br />
AddType application/x-httpd-php .php<br />
AddType application/x-httpd-php-source .phps<br />
<br />
* Restart Apache<br />
# /etc/rc.d/httpd restart<br />
<br />
Be sure to test the page again to verify it's working properly (as stated above)<br />
<br />
====Setup MySQL support====<br />
<br />
Do these steps only if you want MySQL support. Configure MySQL as described here: [[MySQL]]<br />
<br />
* Edit <code>/etc/php/php.ini</code> (this is in <code>/usr/etc</code> on older systems) to uncomment the following line (<i>By removing <code>;</code></i>):<br />
<code>;extension=mysql.so</code><br />
<br />
* You can add minor privileged users for your web scripts by editing the tables found in the <code>mysql</code> database. You have to restart MySQL for changes to take effect. Don't forget to check the <code>mysql/users</code> table. If there's a second entry for root and your hostname is left with no password set, everybody from your host probably could gain full access. Perhaps see next section for these jobs.<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/mysqld start<br />
<br />
* MySQL should now be running. Test by visiting <code>http://localhost/phpMyAdmin</code> in a web browser. It should display phpMyAdmin main page.<br />
<br />
* Edit <code>/etc/rc.conf</code> (to start MySQL at boot):<br />
DAEMONS=(''... some daemons ...'' mysqld)<br />
'''Or''' add this line to <code>rc.local</code>:<br />
/etc/rc.d/mysqld start<br />
<br />
* You can get the "<code>error no. 2013: Lost Connection to mysql server during query</code>" message instantly whenever you try to connect to the MySQL daemon by TCP/IP. This is the TCP wrappers system (tcpd), which uses the <code>hosts_access(5)</code> system to allow or disallow connections.<br />
<br />
* If you're running into this problem, be sure to add this to your /etc/hosts.allow file:<br />
<br />
# mysqld : ALL : ALLOW<br />
# mysqld-max : ALL : ALLOW<br />
# and similar for the other MySQL daemons.<br />
<br />
* Notes: The examples above are the simplest case, telling tcpd to allow connections from anywhere. You may wish to use a more-appropriate choice of permissible sources instead of ALL. Just make sure that localhost and the IP address (numeric or DNS) of the interface by which you connect are specified.<br />
<br />
* You might also need to edit <code>/etc/my.cnf</code> and comment out the <code>skip-networking</code> line as such:<br />
<br />
skip-networking<br />
<br />
to<br />
<br />
#skip-networking</div>Xcessionhttps://wiki.archlinux.org/index.php?title=Apache_HTTP_Server&diff=50709Apache HTTP Server2008-10-05T18:12:09Z<p>Xcession: /* Configure PHP */</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|LAMP}}<br />
{{i18n_entry|Español|LAMP (Español)}}<br />
{{i18n_entry|Italiano|LAMP (Italiano)}}<br />
{{i18n_entry|Русский|LAMP (russian)}}<br />
{{i18n_entry|Česky|LAMP_(Česky)}}<br />
{{i18n_entry|简体中文|LAMP(简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
===Apache, PHP, and MySQL===<br />
<br />
This document describes how to set up the Apache web server on an Arch Linux system. It also tells how to optionally install PHP and MySQL and integrate these in the Apache server.<br />
<br />
====Install Packages====<br />
<br />
# pacman -Sy apache php mysql<br />
<br />
If you'd like, you can install Apache/PHP/MySQL separately. This document assumes you will install Apache, PHP and MySQL. But if you wish, you may only read the sections below that apply to the software you installed.<br />
{{Box 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 />
====Configure Apache====<br />
* Create the user http<br />
useradd http<br />
* Add this line to <code>/etc/hosts</code> (if the file doesn't exist, create it):<br />
127.0.0.1 localhost.localdomain localhost<br />
'''Note:''' If you want a different hostname, append it to the end:<br />
127.0.0.1 localhost.localdomain localhost myhostname<br />
<br />
* Edit <code>/etc/rc.conf</code>: If you set a hostname in Step One, the HOSTNAME variable should be the same; otherwise, use "localhost":<br />
#<br />
# Networking<br />
#<br />
HOSTNAME="localhost"<br />
<br />
* Comment one module in Apache configuration<br />
# nano /etc/httpd/conf/httpd.conf<br />
<br />
LoadModule unique_id_module modules/mod_unique_id.so<br />
to<br />
#LoadModule unique_id_module modules/mod_unique_id.so<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/httpd start<br />
<br />
* Apache should now be running. Test by visiting <code>http://localhost/</code> in a web browser. It should display a simple Apache test page.<br />
<br />
* Edit <code>/etc/rc.conf</code> (to start Apache at boot):<br />
DAEMONS=(''... some daemons ...'' httpd)<br />
'''Or''' add this line to <code>rc.local</code>:<br />
/etc/rc.d/httpd start<br />
<br />
* If you want to use user directories (i.e. <code>~/public_html</code> on the machine is accessed as <code>http://localhost/~user/</code>) to be available on the web, uncomment the following lines in <code>/etc/httpd/conf/extra/httpd-userdir.conf</code>:<br />
UserDir public_html<br />
and<br />
<Directory /home/*/public_html><br />
AllowOverride FileInfo AuthConfig Limit Indexes<br />
Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI<br />
<Limit GET POST OPTIONS PROPFIND><br />
Order allow,deny<br />
Allow from all<br />
</Limit><br />
<LimitExcept GET POST OPTIONS PROPFIND><br />
Order deny,allow<br />
Deny from all<br />
</LimitExcept><br />
</Directory><br />
<br />
You must make sure that your home directory permissions are set properly so that Apache can get there. Your home directory and <code>~/public_html/</code> 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 />
There may be some other, more-secure ways of setting the permissions by creating a special group and allowing only Apache and you to enter there... You know how paranoid you are.<br />
<br />
=====Additional options=====<br />
<br />
This options in /etc/httpd/conf/httpd.conf might be interesting for you:<br />
<br />
# Listen 80<br />
<br />
This is the port Apache will listen to. For Internet-access with router, you have to forward the port.<br />
<br />
# ServerAdmin sample@sample.com<br />
<br />
This is the admin's email-address which can be found on error-pages e.g.<br />
<br />
# DocumentRoot "/srv/http"<br />
<br />
This is the directory where you should put your web pages. Change it, if you want to, but don't forget to change the<br />
<br />
<Directory "/srv/http"><br />
<br />
to whatever you changed your DocumentRoot to.<br />
<br />
====Configure PHP====<br />
<br />
PHP is practically available out of the box now.<br />
<br />
* Add these line in <code>/etc/httpd/conf/httpd.conf</code><br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
<br />
Apache2:<br />
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so<br />
AddHandler php5-script php<br />
http://dan.drydog.com/apache2php.html<br />
<br />
* Remember to add a file handler for .phtml if you need it in /etc/httpd/conf/extra/php5_module.conf:<br />
DirectoryIndex index.php index.phtml index.html<br />
<br />
* If you want the libGD module, uncomment in <code>/etc/php/php.ini</code>:<br />
;extension=gd.so<br />
to<br />
extension=gd.so<br />
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 your <code>DocumentRoot</code> is outside of <code>/home/</code>, add it to <code>open_basedir</code> in <code>/etc/php/php.ini</code> as such:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/path/to/documentroot<br />
<br />
suggestion - Add your document root as follows:<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/srv/http<br />
<br />
* Restart the Apache service to make changes take effect (as root):<br />
# /etc/rc.d/httpd restart<br />
<br />
* Test PHP with a simple, but very informative script:<br />
<html><br />
<head><br />
<title>PHP Test Page</title><br />
</head><br />
<br />
<body><br />
<p>This is Arch Linux, running PHP.</p><br />
<br />
<?php<br />
phpinfo();<br />
?><br />
<br />
</body><br />
</html><br />
<br />
Save this file as <code>test.php</code> and copy to <code>/srv/http/</code> or to <code>~/public_html</code> if you permitted such a configuration.<!-- Also, remember to make it executable (<code>chmod o+x test.php</code>).--><br />
<br />
* Test PHP: http://localhost/test.php or http://localhost/~myname/test.php<br />
<br />
'''If you continue to have problems''', edit your /etc/httpd/conf/httpd.conf file with the following information<br />
<br />
* Edit your httpd.conf file<br />
nano /etc/httpd/conf/httpd.conf<br />
<br />
* Under <IfModule mime_module><br />
AddType application/x-httpd-php .php<br />
AddType application/x-httpd-php-source .phps<br />
<br />
* Restart Apache<br />
# /etc/rc.d/httpd restart<br />
<br />
Be sure to test the page again to verify it's working properly (as stated above)<br />
<br />
====Setup MySQL support====<br />
<br />
Do these steps only if you want MySQL support. Configure MySQL as described here: [[MySQL]]<br />
<br />
* Edit <code>/etc/php/php.ini</code> (this is in <code>/usr/etc</code> on older systems) to uncomment the following line (<i>By removing <code>;</code></i>):<br />
<code>;extension=mysql.so</code><br />
<br />
* You can add minor privileged users for your web scripts by editing the tables found in the <code>mysql</code> database. You have to restart MySQL for changes to take effect. Don't forget to check the <code>mysql/users</code> table. If there's a second entry for root and your hostname is left with no password set, everybody from your host probably could gain full access. Perhaps see next section for these jobs.<br />
<br />
* Run in terminal (as root):<br />
# /etc/rc.d/mysqld start<br />
<br />
* MySQL should now be running. Test by visiting <code>http://localhost/phpMyAdmin</code> in a web browser. It should display phpMyAdmin main page.<br />
<br />
* Edit <code>/etc/rc.conf</code> (to start MySQL at boot):<br />
DAEMONS=(''... some daemons ...'' mysqld)<br />
'''Or''' add this line to <code>rc.local</code>:<br />
/etc/rc.d/mysqld start<br />
<br />
* You can get the "<code>error no. 2013: Lost Connection to mysql server during query</code>" message instantly whenever you try to connect to the MySQL daemon by TCP/IP. This is the TCP wrappers system (tcpd), which uses the <code>hosts_access(5)</code> system to allow or disallow connections.<br />
<br />
* If you're running into this problem, be sure to add this to your /etc/hosts.allow file:<br />
<br />
# mysqld : ALL : ALLOW<br />
# mysqld-max : ALL : ALLOW<br />
# and similar for the other MySQL daemons.<br />
<br />
* Notes: The examples above are the simplest case, telling tcpd to allow connections from anywhere. You may wish to use a more-appropriate choice of permissible sources instead of ALL. Just make sure that localhost and the IP address (numeric or DNS) of the interface by which you connect are specified.<br />
<br />
* You might also need to edit <code>/etc/my.cnf</code> and comment out the <code>skip-networking</code> line as such:<br />
<br />
skip-networking<br />
<br />
to<br />
<br />
#skip-networking</div>Xcessionhttps://wiki.archlinux.org/index.php?title=Arch_Linux_(%E0%B9%84%E0%B8%97%E0%B8%A2)&diff=47339Arch Linux (ไทย)2008-08-08T13:31:17Z<p>Xcession: /* อะไรคือ Arch Linux? */</p>
<hr />
<div>[[Category:About Arch (ไทย)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Deutsch|ArchLinux (Deutsch)}}<br />
{{i18n_entry|English|ArchLinux}}<br />
{{i18n_entry|Español|ArchLinux (Español)}}<br />
{{i18n_entry|Finnish|ArchLinux (Suomi)}}<br />
{{i18n_entry|Français|ArchLinux (Français)}}<br />
{{i18n_entry|Polski|ArchLinux (Polski)}}<br />
{{i18n_entry|Português do Brasil|ArchLinux_(Portugues_do_Brasil)}}<br />
{{i18n_entry|繁體中文|ArchLinux (繁體中文)}}<br />
{{i18n_entry|简体中文|ArchLinux (简体中文)}}<br />
{{i18n_entry|Русский|ArchLinux (Русский)}}<br />
{{i18n_entry|Slovensky|ArchLinux_(Slovensky)}}<br />
{{i18n_entry|Česky|ArchLinux_(Česky)}}<br />
{{i18n_entry|עברית|ArchLinux (עברית)}}<br />
{{i18n_entry|ไทย|ArchLinux (ไทย)}}<br />
{{i18n_links_end}}<br />
<br />
== อะไรคือ Arch Linux? ==<br />
Arch Linux คือ Linux distribution ที่ได้รับการปรับแต่งให้เหมาะสมสำหรับ platform i686/x86-64 และยังได้รับการออกแบบมาให้สามารถเข้าใจได้ทั้งผู้ใช้ Linux ระดับทั่วไปและระดับสูง<br />
<br />
== ข้อดีของ Arch Linux ==<br />
Arch เร็ว, เล็ก, ปรับแต่งได้และเรียบง่าย และที่สำคัญที่สุดคือ ข้อดีเหล่านี้เป็นความจริง Arch ได้ถูกปรับแต่งมาสำหรับ Platform i686 ISA ดังนั้นมันสามารถทำงานได้มากกว่า เมื่อเทียบต่อกัน CPU Cycle <br />
Arch มีขนาดเล็ก เมื่อเทียบกับ Redhat และ Distribution อื่นๆ และการออกแบบที่เรียบง่ายทำให้คุณสามารถปรับแต่ง Arch ให้เข้ากับ ระบบที่คุณต้องการใช้งานได้<br />
<br />
== ระบบจัดการ Package ที่โดดเด่น ==<br />
Arch มีระบบจัดการ Binary Package ที่ง่ายต่อการใช้งาน มีชื่อเรียกว่า Pacman ซึ่งคุณสามารถปรับปรุงระบบทั้งหมดของคุณได้ ด้วยคำสั่งเพียงคำสั่งเดียว นอกจากนี้ Arch ยังใช้ระบบการ Build Package ที่มีความใกล้เคียงกับ ports ของ *BSD ซึ่งระบบนี้มีชื่อว่า ABS - Arch Build System ทำให้คุณสามารถสร้าง Package ขึ้นมาได้อย่างง่ายดาย พร้อมทั้งสามารถ Synchronize ตัว Package ได้ด้วยคำสั่งเพียงคำสั่งเดียว ที่น่าประทับใจคือ คุณสามารถ Rebuild ระบบใหม่ของคุณได้ ด้วยคำสั่งเพียงคำสั่งเดียว<br />
ทุกสิ่งทุกอย่างสามารถทำได้อย่างง่ายดายและไม่ซับซ้อน<br />
<br />
== เลือกแต่สิ่งที่ดีที่สุด ==<br />
Arch Linux มีเป้าหมายที่จะพัฒนาและคงไว้ ซึ่งเวอร์ชันล่าสุดและเสถียร (Stable) ของซอฟท์แวร์ต่างๆ ขณะนี้เรามีชุดของ Core Package จำนวนหนึ่ง พร้อมทั้ง Package เพิ่มเติม (Extra) ที่สร้างจากผู้ใช้และผู้พัฒนา<br />
<br />
== ความเรียบง่ายคือสิ่งที่เราต้องการ ==<br />
เป้าหมายของ Arch คือเล็กและเรียบง่าย ผู้สร้าง Arch ได้ตัดส่วนต่างๆ (ที่ไม่มีประโยชน์) ของ Linux ออกไป เช่น /usr/doc และหน้า info โดยจากประสบการ์ของผู้สร้างพบว่าข้อมูลเหล่านั้นไม่ค่อยถูกใช้งาน และสามารถหาได้จาก Internet ในกรณีที่ต้องการ นอกจากนี้ยังสามารถเรียกดูได้จาก Man<br />
<br />
== เครื่องมือที่ทันสมัย ==<br />
Arch Linux ยังมีเป้าหมายที่จะใช้เครื่องมือใหม่ๆ เช่นระบบไฟล์ Ext3 หรือ ReiserFS และการสนับสนุน udev โดยตั้งแต่ Arch Linux 0.7 (Wombat) เป็นต้นไปจะมาพร้อมกับ Linux kernel 2.6 และยังสามารถทำงานได้กับระบบไฟล์ XFS และ JFS<br />
<br />
== ข้อมูลเพิ่มเติม ==<br />
เว็บเพจของ Arch อยู่ที่ http://www.archlinux.org/ ซึ่งคุณสามารถเข้าไปยังส่วนของกระดานตอบคำถาม คู่มือการใช้งานอย่างเป็นทางการ และเรื่องอื่นๆ ที่เี่กี่ยวของกับ Arch<br />
<br />
คุณสามารถอ่าน [[The Arch Way]] ได้ หากต้องการข้อมูลมากกว่านี้</div>Xcessionhttps://wiki.archlinux.org/index.php?title=Arch_Linux_(%E0%B9%84%E0%B8%97%E0%B8%A2)&diff=47338Arch Linux (ไทย)2008-08-08T13:29:34Z<p>Xcession: /* อะไรคือ Arch Linux? */</p>
<hr />
<div>[[Category:About Arch (ไทย)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Deutsch|ArchLinux (Deutsch)}}<br />
{{i18n_entry|English|ArchLinux}}<br />
{{i18n_entry|Español|ArchLinux (Español)}}<br />
{{i18n_entry|Finnish|ArchLinux (Suomi)}}<br />
{{i18n_entry|Français|ArchLinux (Français)}}<br />
{{i18n_entry|Polski|ArchLinux (Polski)}}<br />
{{i18n_entry|Português do Brasil|ArchLinux_(Portugues_do_Brasil)}}<br />
{{i18n_entry|繁體中文|ArchLinux (繁體中文)}}<br />
{{i18n_entry|简体中文|ArchLinux (简体中文)}}<br />
{{i18n_entry|Русский|ArchLinux (Русский)}}<br />
{{i18n_entry|Slovensky|ArchLinux_(Slovensky)}}<br />
{{i18n_entry|Česky|ArchLinux_(Česky)}}<br />
{{i18n_entry|עברית|ArchLinux (עברית)}}<br />
{{i18n_entry|ไทย|ArchLinux (ไทย)}}<br />
{{i18n_links_end}}<br />
<br />
== อะไรคือ Arch Linux? ==<br />
Arch Linux คือ Linux distribution ที่ได้รับการปรับแต่งให้เหมาะสมสำหรับ platform i686/x86-64 และยังได้รับการออกแบบมาให้สามารถเข้าใจได้ทั้งผู้ใช้ Linux ระดับทั่วไปและระดับสูง<br />
<br />
โดย Arch Linux มีพื้นฐานมาจากแนวคิดของ CRUX ซึ่งพัฒนาโดย Per Lidén<br />
<br />
== ข้อดีของ Arch Linux ==<br />
Arch เร็ว, เล็ก, ปรับแต่งได้และเรียบง่าย และที่สำคัญที่สุดคือ ข้อดีเหล่านี้เป็นความจริง Arch ได้ถูกปรับแต่งมาสำหรับ Platform i686 ISA ดังนั้นมันสามารถทำงานได้มากกว่า เมื่อเทียบต่อกัน CPU Cycle <br />
Arch มีขนาดเล็ก เมื่อเทียบกับ Redhat และ Distribution อื่นๆ และการออกแบบที่เรียบง่ายทำให้คุณสามารถปรับแต่ง Arch ให้เข้ากับ ระบบที่คุณต้องการใช้งานได้<br />
<br />
== ระบบจัดการ Package ที่โดดเด่น ==<br />
Arch มีระบบจัดการ Binary Package ที่ง่ายต่อการใช้งาน มีชื่อเรียกว่า Pacman ซึ่งคุณสามารถปรับปรุงระบบทั้งหมดของคุณได้ ด้วยคำสั่งเพียงคำสั่งเดียว นอกจากนี้ Arch ยังใช้ระบบการ Build Package ที่มีความใกล้เคียงกับ ports ของ *BSD ซึ่งระบบนี้มีชื่อว่า ABS - Arch Build System ทำให้คุณสามารถสร้าง Package ขึ้นมาได้อย่างง่ายดาย พร้อมทั้งสามารถ Synchronize ตัว Package ได้ด้วยคำสั่งเพียงคำสั่งเดียว ที่น่าประทับใจคือ คุณสามารถ Rebuild ระบบใหม่ของคุณได้ ด้วยคำสั่งเพียงคำสั่งเดียว<br />
ทุกสิ่งทุกอย่างสามารถทำได้อย่างง่ายดายและไม่ซับซ้อน<br />
<br />
== เลือกแต่สิ่งที่ดีที่สุด ==<br />
Arch Linux มีเป้าหมายที่จะพัฒนาและคงไว้ ซึ่งเวอร์ชันล่าสุดและเสถียร (Stable) ของซอฟท์แวร์ต่างๆ ขณะนี้เรามีชุดของ Core Package จำนวนหนึ่ง พร้อมทั้ง Package เพิ่มเติม (Extra) ที่สร้างจากผู้ใช้และผู้พัฒนา<br />
<br />
== ความเรียบง่ายคือสิ่งที่เราต้องการ ==<br />
เป้าหมายของ Arch คือเล็กและเรียบง่าย ผู้สร้าง Arch ได้ตัดส่วนต่างๆ (ที่ไม่มีประโยชน์) ของ Linux ออกไป เช่น /usr/doc และหน้า info โดยจากประสบการ์ของผู้สร้างพบว่าข้อมูลเหล่านั้นไม่ค่อยถูกใช้งาน และสามารถหาได้จาก Internet ในกรณีที่ต้องการ นอกจากนี้ยังสามารถเรียกดูได้จาก Man<br />
<br />
== เครื่องมือที่ทันสมัย ==<br />
Arch Linux ยังมีเป้าหมายที่จะใช้เครื่องมือใหม่ๆ เช่นระบบไฟล์ Ext3 หรือ ReiserFS และการสนับสนุน udev โดยตั้งแต่ Arch Linux 0.7 (Wombat) เป็นต้นไปจะมาพร้อมกับ Linux kernel 2.6 และยังสามารถทำงานได้กับระบบไฟล์ XFS และ JFS<br />
<br />
== ข้อมูลเพิ่มเติม ==<br />
เว็บเพจของ Arch อยู่ที่ http://www.archlinux.org/ ซึ่งคุณสามารถเข้าไปยังส่วนของกระดานตอบคำถาม คู่มือการใช้งานอย่างเป็นทางการ และเรื่องอื่นๆ ที่เี่กี่ยวของกับ Arch<br />
<br />
คุณสามารถอ่าน [[The Arch Way]] ได้ หากต้องการข้อมูลมากกว่านี้</div>Xcession