https://wiki.archlinux.org/api.php?action=feedcontributions&user=Deemytch&feedformat=atomArchWiki - User contributions [en]2024-03-28T23:52:18ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=BIND&diff=555782BIND2018-11-18T18:20:26Z<p>Deemytch: http://blog.techscrawl.com/2009/01/13/enabling-dnssec-on-bind/ is gone to the sky</p>
<hr />
<div>[[Category:Domain Name System]]<br />
[[de:BIND]]<br />
[[es:BIND]]<br />
[[fr:BIND]]<br />
[[ja:BIND]]<br />
[[zh-hans:BIND]]<br />
{{Related articles start}}<br />
{{Related|DNSCrypt}}<br />
{{Related|dnsmasq}}<br />
{{Related|Pdnsd}}<br />
{{Related|Unbound}}<br />
{{Related|PowerDNS}}<br />
{{Related articles end}}<br />
{{Style|Numerous style and content issues.}}<br />
[https://www.isc.org/downloads/bind/ BIND] (or named) is the most widely used Domain Name System (DNS) server.<br />
<br />
{{Note|The organization developing BIND is serving security notices to paying customers up to four days before Linux distributions or the general public.[https://kb.isc.org/article/AA-00861/0/ISC-Software-Defect-and-Security-Vulnerability-Disclosure-Policy.html]}}<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|bind}} package.<br />
<br />
[[Start/enable]] the {{ic|named.service}} systemd unit.<br />
<br />
To use the DNS server locally, use the {{ic|127.0.0.1}} nameserver, see [[Domain name resolution]].<br />
This will however require you to [[#Allow recursion]].<br />
<br />
== Configuration ==<br />
<br />
BIND is configured in {{ic|/etc/named.conf}}. The available options are documented in {{man|5|named.conf}}.<br />
<br />
[[Reload]] the {{ic|named.service}} unit to apply configuration changes.<br />
<br />
===Restrict access to localhost===<br />
<br />
BIND by defaults listens on all interfaces and IP addresses.<br />
<br />
To only allow connections from localhost add the following line to the options section in {{ic|/etc/named.conf}}:<br />
listen-on { 127.0.0.1; };<br />
<br />
=== Set up DNS forwarding ===<br />
<br />
To make BIND forward DNS queries to another DNS server add the forwarders clause to the options section.<br />
<br />
Example to make BIND forward to the Google DNS servers:<br />
<br />
forwarders { 8.8.8.8; 8.8.4.4; };<br />
<br />
== A configuration template for running a domain ==<br />
<br />
This is a simple tutorial in howto setup a simple home network DNS-server with bind. In our example we use "domain.tld" as our domain.<br />
<br />
For a more elaborate example see [http://www.howtoforge.com/two_in_one_dns_bind9_views Two-in-one DNS server with BIND9].<br />
<br />
Another guide at [http://www.brennan.id.au/08-Domain_Name_System_BIND.html#yourdomain Linux Home Server HOWTO - Domain name system (BIND): Adding your domain] will show you how to set up internal network name resolution in no time; short, on-point and very informative.<br />
<br />
=== Creating a zonefile ===<br />
<br />
Create {{ic|/var/named/domain.tld.zone}}.<br />
<br />
$TTL 7200<br />
; domain.tld<br />
@ IN SOA ns01.domain.tld. postmaster.domain.tld. (<br />
2007011601 ; Serial<br />
28800 ; Refresh<br />
1800 ; Retry<br />
604800 ; Expire - 1 week<br />
86400 ) ; Minimum<br />
IN NS ns01<br />
IN NS ns02<br />
ns01 IN A 0.0.0.0<br />
ns02 IN A 0.0.0.0<br />
localhost IN A 127.0.0.1<br />
@ IN MX 10 mail<br />
imap IN CNAME mail<br />
smtp IN CNAME mail<br />
@ IN A 0.0.0.0<br />
www IN A 0.0.0.0<br />
mail IN A 0.0.0.0<br />
@ IN TXT "v=spf1 mx"<br />
<br />
$TTL defines the default time-to-live in seconds for all record types. In this example it is 2 hours.<br />
<br />
'''Serial must be incremented manually before restarting named every time you change a resource record for the zone.''' If you forget to do it slaves will not re-transfer the zone: they only do it if the serial is greater than that of the last time they transferred the zone.<br />
<br />
=== Configuring master server ===<br />
<br />
Add your zone to {{ic|/etc/named.conf}}:<br />
zone "domain.tld" IN {<br />
type master;<br />
file "domain.tld.zone";<br />
allow-update { none; };<br />
notify no;<br />
};<br />
<br />
[[Reload]] the {{ic|named.service}} unit to apply the configuration change.<br />
<br />
== Allow recursion ==<br />
<br />
If you are running your own DNS server, you might as well use it for all DNS lookups. This will require the ability to do ''recursive'' lookups. In order to prevent [https://www.us-cert.gov/ncas/alerts/TA13-088A DNS Amplification Attacks], recursion is turned off by default for most resolvers. The default Arch {{ic|/etc/named.conf}} file allows for recursion only on the loopback interface:<br />
<br />
allow-recursion { 127.0.0.1; };<br />
<br />
{{Accuracy|LAN networking isn't recursive.}}<br />
<br />
If you want to provide name service for your local network; e.g. 192.168.0.0/24, you must add the appropriate range of IP addresses to {{ic|/etc/named.conf}}:<br />
<br />
allow-recursion { 192.168.0.0/24; 127.0.0.1; };<br />
<br />
== Configuring BIND to serve DNSSEC signed zones ==<br />
<br />
{{Expansion|This is just a list of links.}}<br />
<br />
* http://www.dnssec.net/practical-documents<br />
** http://www.cymru.com/Documents/secure-bind-template.html '''(configuration template!)'''<br />
** http://www.bind9.net/manuals<br />
** http://www.bind9.net/BIND-FAQ<br />
* Or use an external mechanisms such as OpenDNSSEC (fully-automatic key rollover)<br />
<br />
== Automatically listen on new interfaces ==<br />
<br />
By default bind scan for new interfaces and stop listening on interfaces which no longer exist every hours. You can tune this value by adding :<br />
interface-interval <rescan-timeout-in-minutes>;<br />
parameter into {{ic|named.conf}} options section. Max value is 28 days. (40320 min) <br><br />
You can disable this feature by setting its value to 0.<br />
<br />
Then restart the service.<br />
<br />
== Running BIND in a chrooted environment ==<br />
<br />
Running in a [[chroot]] environment is not required but improves security.<br />
<br />
=== Creating the Jail House ===<br />
In order to do this, we first need to create a place to keep the jail, we shall use {{ic|/srv/named}}, and then put the required files into the jail.<br />
<br />
mkdir -p /srv/named/{dev,etc,usr/lib/engines,var/{run,log,named}}<br />
# Copy over required system files<br />
cp -av /etc/{localtime,named.conf} /srv/named/etc/<br />
cp -av /usr/lib/engines-1.1/* /srv/named/usr/lib/engines/<br />
cp -av /var/named/* /srv/named/var/named/.<br />
# Set up required dev nodes<br />
mknod /srv/named/dev/null c 1 3<br />
mknod /srv/named/dev/random c 1 8<br />
# Set Ownership of the files<br />
chown -R named:named /srv/named<br />
<br />
This should create the required file system for the jail.<br />
<br />
=== Service File ===<br />
<br />
Next we need to create the new service file which will allow force bind into the chroot<br />
<br />
cp -av /usr/lib/systemd/system/named.service /etc/systemd/system/named-chroot.service<br />
<br />
we need to edit how the service calls bind.<br />
<br />
{{hc|/etc/systemd/system/named-chroot.service|<nowiki><br />
ExecStart=/usr/bin/named -4 -f -u named -t "/srv/named"<br />
</nowiki>}}<br />
<br />
Now, restart the systemd service.<br />
<br />
== See also ==<br />
* [https://www.isc.org/downloads/bind/doc/ BIND 9 Administrator Reference Manual]<br />
* [http://www.reedmedia.net/books/bind-dns/ BIND 9 DNS Administration Reference Book]<br />
* [http://shop.oreilly.com/product/9780596100575.do DNS and BIND by Cricket Liu and Paul Albitz]<br />
* [http://www.netwidget.net/books/apress/dns/intro.html Pro DNS and BIND]<br />
* [http://www.isc.org/ Internet Systems Consortium, Inc. (ISC)]<br />
* [http://www.menandmice.com/knowledgehub/dnsglossary DNS Glossary]<br />
* [https://lists.archlinux.org/pipermail/arch-dev-public/2013-March/024588.html Archived mailing list discussion on BIND's future]</div>Deemytchhttps://wiki.archlinux.org/index.php?title=Fan_speed_control_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=419110Fan speed control (Русский)2016-02-05T12:26:17Z<p>Deemytch: /* fancontrol */</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Power management (Русский)]]<br />
[[en:Fan speed control]]<br />
[[it:Fan speed control]]<br />
[[ja:ファンスピード制御]]<br />
{{Unmaintained (Русский)}}<br />
Контролировать скорость (и шум!) вашего кулера легко!<br />
<br />
{{Warning (Русский)|Вы можете повредить ваше оборудование. Вентилятор на процессоре необходим для его охлаждения, а в процессе выполнения этого howto он будет выключен на пару секунд. Если вам не хочется этого делать - не делайте!}}<br />
<br />
=== lm-sensors ===<br />
<br />
Первым делом, вам необходимо установить и настроить '''lm-sensors'''. Подробнее об этом вы можете узнать из соответствующей [[Lm_sensors (Русский)|статьи]].<br />
<br />
После того как вы установите {{Pkg|lm_sensors}}, изучите вывод программы {{Ic|sensors}}.<br />
<br />
<pre>$ sensors<br />
w83627hf-isa-0290<br />
Adapter: ISA adapter<br />
VCore 1: +1.14 V (min = +0.00 V, max = +4.08 V) <br />
VCore 2: +2.67 V (min = +0.00 V, max = +4.08 V) <br />
+3.3V: +3.39 V (min = +2.82 V, max = +3.79 V) <br />
+5V: +5.19 V (min = +3.47 V, max = +0.40 V) ALARM <br />
+12V: +12.40 V (min = +12.95 V, max = +7.96 V) ALARM <br />
-12V: -7.01 V (min = +1.78 V, max = -10.63 V) ALARM <br />
-5V: -3.84 V (min = -7.66 V, max = +2.29 V) <br />
V5SB: +5.75 V (min = +0.08 V, max = +0.54 V) ALARM <br />
VBat: +3.10 V (min = +0.54 V, max = +0.13 V) ALARM <br />
fan1: 2428 RPM (min = 0 RPM, div = 4) <br />
fan2: 0 RPM (min = 1630 RPM, div = 4) ALARM <br />
fan3: 2191 RPM (min = 6367 RPM, div = 4) ALARM <br />
temp1: +38°C (high = +20°C, hyst = +68°C) sensor = thermistor <br />
temp2: +39.5°C (high = +65°C, hyst = +60°C) sensor = diode <br />
temp3: +38.0°C (high = +65°C, hyst = +60°C) sensor = thermistor (beep)<br />
vid: +0.000 V (VRM Version 2.4)<br />
alarms: <br />
beep_enable:<br />
Sound alarm enabled''<br />
</pre><br />
<br />
Если в вашем выводе sensors отсутствует RPM (обороты в минуту) для процессорного кулера (CPU fan) и вы уверены что он работает, вам необходимо увеличить делитель кулера (fan divisor). Если скорость вашего кулера отображается и она больше нуля, пропустите следующий шаг.<br />
<br />
'''Увеличение fan_div:'''<br />
<br />
{{out of date (Русский)}}<br />
<br />
Первая строка в выводе sensors - это имя чипсета вашей материнской платы, которое используется для чтения скоростей/темпов/напряжений. Сначала сделаем резервную копию:<br />
# cp /etc/sensors.conf /etc/sensors.conf_original<br />
<br />
Отредактируйте файл {{ic|/etc/sensors.conf}}<br />
# nano /etc/sensors.conf<br />
<br />
Найдите ваш чипсет. Их названия очень похожи друг на друга, так что убедитесь что вы редактируете правильный. Добавьте строку fanX_div 4 в начале конфигурации вашего чипсета. Замените X на количество ваших процессорных кулеров, у меня это 2. Вы должны сами найти это число для своего компьютера, но скорее всего это 1, 2 или 3.<br />
<br />
Сохраните и выполните:<br />
# sensors -s<br />
<br />
это загрузит новые значения переменных из sensors.conf.<br />
Запустите sensors снова и проверьте RPM теперь. Если его нет, то увеличте делитель до 8, 16 или 32.<br />
<br />
Можете не опасаясь игнорировать всё, кроме fanX_div. Я бы посоветовал вам оставить все остальные значения по умолчанию.<br />
<br />
=== pwmconfig ===<br />
<br />
После того как lm-sensors правильно сконфигурированы запустите pwmconfig и настройте скорость работы ваших вентиляторов:<br />
pwmconfig<br />
<br />
Следуйте инструкциям в pwmconfig для установки базовых скоростей.<br />
<br />
Опции конфигурации по умолчанию должны создать новый файл, {{ic|/etc/fancontrol}}.<br />
<br />
Для настройки всех скоростей следуйте инструкциям в pwmconfig.<br />
<br />
==== Тонкая настройка ====<br />
<br />
{{Warning (Русский)|Некоторые из приведённых ниже шагов описывают тонкую настройку кулеров. Прежде чем что-то выполнять убедитесь что ваш процессор не очень сильно нагружен и у вас есть пространство для маневров. Если в какой-то момент настройки вы заметите что температура процессора катастрофически растёт выполните {{Ic|echo "255" > /sys/class/hwmon/hwmon0/device/pwm1}} чтобы раскрутить кулер как можно сильнее пока ситуация не нормализуется и процессор не охладится. Вообще, вы должны знать что вы делаете, прежде чем вы допустите глупость в конфигурационном файле.}}<br />
<br />
Если вы хотите больше контроля, вам возможно надо редактировать сгенерированный файл конфигурации чтобы добиться желаемого результата. Вот пример конфигурационного файла:<br />
INTERVAL=10<br />
FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp1_input<br />
FCFANS= hwmon0/device/pwm1=hwmon0/device/fan1_input<br />
MINTEMP=hwmon0/device/pwm1=20<br />
MAXTEMP=hwmon0/device/pwm1=55<br />
MINSTART=hwmon0/device/pwm1=150<br />
MINSTOP=hwmon0/device/pwm1=105<br />
<br />
* <strong>INTERVAL</strong>: как часто демон должен опрашивать датчики температуры процессора и корректировать скорость вращения кулера. Интервал задаётся в секундах.<br />
<br />
Оставшаяся часть конфигурационного файла разделена на (как минимум) два значения на каждую опцию конфигурации. Каждая опция сначала указывает на PWM-устройство в которое будет производиться запись при смене скорости кулера. Второе "поле" &mdash; это непосредственно значение, которое надо записать. Это позволяет вам наблюдать и контролировать несколько вентиляторов и датчиков температуры (если ваш компьютер это поддерживает).<br />
<br />
* <strong>FCTEMPS</strong>: устройство ввода температуры процессора. Предыдущий пример указывает на {{ic|/sys/class/hwmon/hwmon0/device/temp1_input}}.<br />
<br />
* <strong>FCFANS</strong>: устройство ввода текущей скорости кулера. Пример: {{ic|/sys/class/hwmon/hwmon0/device/fan1_input}}<br />
<br />
* <strong>MINTEMP</strong>: температура (&deg;C) при которой нужно ''ВЫКЛЮЧАТЬ'' кулер на процессоре. Эффективные процессоры не нуждаются в охлаждении во время простоя. Устанавливая этот параметр, вы должны быть ''уверены'' в том, что эта температура безопасна. Установка этого параметра в 0 не рекомендуется, используйте более корректное (для данного оборудования) значение.<br />
<br />
* <strong>MAXTEMP</strong>: температура (&deg;C) при которой кулер надо включать на ''МАКСИМАЛЬНУЮ'' скорость. Этот параметр надо выставлять задавать примерно на 10-20 &deg;C ниже ''критической температуры''/''температуры выключения'' для вашего процессора. Установка этого параметра ближе к MINTEMP приведёт к повышению средней скорости вращения кулера.<br />
<br />
* <strong>MINSTOP</strong>: значение PWM при котором останавливается кулер. Все кулеры немного отличаются друг от друга. Вы можете записывать при помощи {{Ic|echo}} различные значения (от 0 до 255) в {{ic|/sys/class/hwmon/hwmon0/device/pwm1}} и наблюдать за кулером. Когда какое-то значение приведёт к его остановке, используйте это значение.<br />
<br />
* <strong>MINSTART</strong>: значение PWM при котором кулер запускается вновь. Зачастую это значение превышающее MINSTOP, т.к. большее напряжение необходимо кулеру для преодоления инерции.<br />
<br />
=== fancontrol ===<br />
<br />
Попробуйте запустить fancontrol:<br />
/usr/bin/fancontrol<br />
<br />
После запуска этой программы вы возможно услышите как ваш кулер замедляется.<br />
Если это работает, то можно добавить "fancontrol" в автозапуск<br />
systemctl enable fancontrol<br />
либо к массиву DAEMONS в {{ic|/etc/[[rc.conf]]}} если вы используете init, чтобы это происходило при старте системы.<br />
<br />
<br />
''Большая часть материала для этого howto взята с [[http://ubuntuforums.org/ Ubuntu forums]] и [[http://ubuntuguide.org/ Ubuntu guide]].''</div>Deemytchhttps://wiki.archlinux.org/index.php?title=Fan_speed_control_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=419109Fan speed control (Русский)2016-02-05T12:25:52Z<p>Deemytch: /* fancontrol */</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Power management (Русский)]]<br />
[[en:Fan speed control]]<br />
[[it:Fan speed control]]<br />
[[ja:ファンスピード制御]]<br />
{{Unmaintained (Русский)}}<br />
Контролировать скорость (и шум!) вашего кулера легко!<br />
<br />
{{Warning (Русский)|Вы можете повредить ваше оборудование. Вентилятор на процессоре необходим для его охлаждения, а в процессе выполнения этого howto он будет выключен на пару секунд. Если вам не хочется этого делать - не делайте!}}<br />
<br />
=== lm-sensors ===<br />
<br />
Первым делом, вам необходимо установить и настроить '''lm-sensors'''. Подробнее об этом вы можете узнать из соответствующей [[Lm_sensors (Русский)|статьи]].<br />
<br />
После того как вы установите {{Pkg|lm_sensors}}, изучите вывод программы {{Ic|sensors}}.<br />
<br />
<pre>$ sensors<br />
w83627hf-isa-0290<br />
Adapter: ISA adapter<br />
VCore 1: +1.14 V (min = +0.00 V, max = +4.08 V) <br />
VCore 2: +2.67 V (min = +0.00 V, max = +4.08 V) <br />
+3.3V: +3.39 V (min = +2.82 V, max = +3.79 V) <br />
+5V: +5.19 V (min = +3.47 V, max = +0.40 V) ALARM <br />
+12V: +12.40 V (min = +12.95 V, max = +7.96 V) ALARM <br />
-12V: -7.01 V (min = +1.78 V, max = -10.63 V) ALARM <br />
-5V: -3.84 V (min = -7.66 V, max = +2.29 V) <br />
V5SB: +5.75 V (min = +0.08 V, max = +0.54 V) ALARM <br />
VBat: +3.10 V (min = +0.54 V, max = +0.13 V) ALARM <br />
fan1: 2428 RPM (min = 0 RPM, div = 4) <br />
fan2: 0 RPM (min = 1630 RPM, div = 4) ALARM <br />
fan3: 2191 RPM (min = 6367 RPM, div = 4) ALARM <br />
temp1: +38°C (high = +20°C, hyst = +68°C) sensor = thermistor <br />
temp2: +39.5°C (high = +65°C, hyst = +60°C) sensor = diode <br />
temp3: +38.0°C (high = +65°C, hyst = +60°C) sensor = thermistor (beep)<br />
vid: +0.000 V (VRM Version 2.4)<br />
alarms: <br />
beep_enable:<br />
Sound alarm enabled''<br />
</pre><br />
<br />
Если в вашем выводе sensors отсутствует RPM (обороты в минуту) для процессорного кулера (CPU fan) и вы уверены что он работает, вам необходимо увеличить делитель кулера (fan divisor). Если скорость вашего кулера отображается и она больше нуля, пропустите следующий шаг.<br />
<br />
'''Увеличение fan_div:'''<br />
<br />
{{out of date (Русский)}}<br />
<br />
Первая строка в выводе sensors - это имя чипсета вашей материнской платы, которое используется для чтения скоростей/темпов/напряжений. Сначала сделаем резервную копию:<br />
# cp /etc/sensors.conf /etc/sensors.conf_original<br />
<br />
Отредактируйте файл {{ic|/etc/sensors.conf}}<br />
# nano /etc/sensors.conf<br />
<br />
Найдите ваш чипсет. Их названия очень похожи друг на друга, так что убедитесь что вы редактируете правильный. Добавьте строку fanX_div 4 в начале конфигурации вашего чипсета. Замените X на количество ваших процессорных кулеров, у меня это 2. Вы должны сами найти это число для своего компьютера, но скорее всего это 1, 2 или 3.<br />
<br />
Сохраните и выполните:<br />
# sensors -s<br />
<br />
это загрузит новые значения переменных из sensors.conf.<br />
Запустите sensors снова и проверьте RPM теперь. Если его нет, то увеличте делитель до 8, 16 или 32.<br />
<br />
Можете не опасаясь игнорировать всё, кроме fanX_div. Я бы посоветовал вам оставить все остальные значения по умолчанию.<br />
<br />
=== pwmconfig ===<br />
<br />
После того как lm-sensors правильно сконфигурированы запустите pwmconfig и настройте скорость работы ваших вентиляторов:<br />
pwmconfig<br />
<br />
Следуйте инструкциям в pwmconfig для установки базовых скоростей.<br />
<br />
Опции конфигурации по умолчанию должны создать новый файл, {{ic|/etc/fancontrol}}.<br />
<br />
Для настройки всех скоростей следуйте инструкциям в pwmconfig.<br />
<br />
==== Тонкая настройка ====<br />
<br />
{{Warning (Русский)|Некоторые из приведённых ниже шагов описывают тонкую настройку кулеров. Прежде чем что-то выполнять убедитесь что ваш процессор не очень сильно нагружен и у вас есть пространство для маневров. Если в какой-то момент настройки вы заметите что температура процессора катастрофически растёт выполните {{Ic|echo "255" > /sys/class/hwmon/hwmon0/device/pwm1}} чтобы раскрутить кулер как можно сильнее пока ситуация не нормализуется и процессор не охладится. Вообще, вы должны знать что вы делаете, прежде чем вы допустите глупость в конфигурационном файле.}}<br />
<br />
Если вы хотите больше контроля, вам возможно надо редактировать сгенерированный файл конфигурации чтобы добиться желаемого результата. Вот пример конфигурационного файла:<br />
INTERVAL=10<br />
FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp1_input<br />
FCFANS= hwmon0/device/pwm1=hwmon0/device/fan1_input<br />
MINTEMP=hwmon0/device/pwm1=20<br />
MAXTEMP=hwmon0/device/pwm1=55<br />
MINSTART=hwmon0/device/pwm1=150<br />
MINSTOP=hwmon0/device/pwm1=105<br />
<br />
* <strong>INTERVAL</strong>: как часто демон должен опрашивать датчики температуры процессора и корректировать скорость вращения кулера. Интервал задаётся в секундах.<br />
<br />
Оставшаяся часть конфигурационного файла разделена на (как минимум) два значения на каждую опцию конфигурации. Каждая опция сначала указывает на PWM-устройство в которое будет производиться запись при смене скорости кулера. Второе "поле" &mdash; это непосредственно значение, которое надо записать. Это позволяет вам наблюдать и контролировать несколько вентиляторов и датчиков температуры (если ваш компьютер это поддерживает).<br />
<br />
* <strong>FCTEMPS</strong>: устройство ввода температуры процессора. Предыдущий пример указывает на {{ic|/sys/class/hwmon/hwmon0/device/temp1_input}}.<br />
<br />
* <strong>FCFANS</strong>: устройство ввода текущей скорости кулера. Пример: {{ic|/sys/class/hwmon/hwmon0/device/fan1_input}}<br />
<br />
* <strong>MINTEMP</strong>: температура (&deg;C) при которой нужно ''ВЫКЛЮЧАТЬ'' кулер на процессоре. Эффективные процессоры не нуждаются в охлаждении во время простоя. Устанавливая этот параметр, вы должны быть ''уверены'' в том, что эта температура безопасна. Установка этого параметра в 0 не рекомендуется, используйте более корректное (для данного оборудования) значение.<br />
<br />
* <strong>MAXTEMP</strong>: температура (&deg;C) при которой кулер надо включать на ''МАКСИМАЛЬНУЮ'' скорость. Этот параметр надо выставлять задавать примерно на 10-20 &deg;C ниже ''критической температуры''/''температуры выключения'' для вашего процессора. Установка этого параметра ближе к MINTEMP приведёт к повышению средней скорости вращения кулера.<br />
<br />
* <strong>MINSTOP</strong>: значение PWM при котором останавливается кулер. Все кулеры немного отличаются друг от друга. Вы можете записывать при помощи {{Ic|echo}} различные значения (от 0 до 255) в {{ic|/sys/class/hwmon/hwmon0/device/pwm1}} и наблюдать за кулером. Когда какое-то значение приведёт к его остановке, используйте это значение.<br />
<br />
* <strong>MINSTART</strong>: значение PWM при котором кулер запускается вновь. Зачастую это значение превышающее MINSTOP, т.к. большее напряжение необходимо кулеру для преодоления инерции.<br />
<br />
=== fancontrol ===<br />
<br />
Попробуйте запустить fancontrol:<br />
/usr/bin/fancontrol<br />
<br />
После запуска этой программы вы возможно услышите как ваш кулер замедляется.<br />
Если это работает, то можно добавить "fancontrol" в автозапуск<br />
systemctl enable fancontrol<br />
либо к массиву DAEMONS в {{ic|/etc/[[rc.conf]]}} если вы используете init, чтобы это происходило при старте системы, благо init-скрипт fancontrol теперь предоставляется по умолчанию!<br />
<br />
<br />
''Большая часть материала для этого howto взята с [[http://ubuntuforums.org/ Ubuntu forums]] и [[http://ubuntuguide.org/ Ubuntu guide]].''</div>Deemytchhttps://wiki.archlinux.org/index.php?title=Redmine&diff=310902Redmine2014-04-19T13:10:37Z<p>Deemytch: </p>
<hr />
<div>[[Category:Version Control System]]<br />
{{Related articles start}}<br />
{{Related|Ruby on Rails}}<br />
{{Related|RVM}}<br />
{{Related|MariaDB}}<br />
{{Related|Apache}}<br />
{{Related|Nginx}}<br />
{{Related articles end}}<br />
Redmine is a free and open source, web-based project management and bug-tracking tool. It includes a calendar and Gantt charts to aid visual representation of projects and their deadlines. It handles multiple projects. Redmine provides integrated project management features, issue tracking, and support for various version control systems.<br />
<br />
Redmine is written using the Ruby on Rails framework. It is cross-platform and cross-database.<br />
<br />
==Prerequisites==<br />
<br />
This document will guide you through the installation process of the Redmine and all of its prerequisites, including the optional ones. If desired, however, you may install Redmine and it's prerequisites separately, simply refering to the relevant sections below.<br />
<br />
Although this guide will go through all the installation process, this isn't a one way path. So Redmine can use different versions of the other softwares (mariaDB, mySQL, postgreSQL, etc, as your database).<br />
<br />
{{Note|At this time is important to note that this guide is an default suggestion, feel free to use other of the prerequisites mentioned on this wiki.}}<br />
<br />
===Ruby===<br />
<br />
<table border="1"><br />
<tr><br />
<th>Redmine version</th><br />
<th>Supported Ruby versions</th><br />
<th>Rails version used</th><br />
<th>Supported RubyGems versions</th><br />
</tr><br />
<tr><br />
<td rowspan="2">2.5.0</td><br />
<td>ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0</td><br />
<td rowspan="2">Rails 3.2</td><br />
<td rowspan="2">RubyGems <= 1.8</td><br />
</tr><br />
<tr><br />
<td>jruby 1.7.6</td><br />
</tr><br />
</table><br />
<br />
There are two simple ways to install Ruby: installing the {{Pkg|ruby}} package as described in [[ruby]] or installing RVM as described in [[RVM]] '''(recommended)'''.<br />
<br />
{{Note|Ruby MRI 1.8.7 support has reached its EOL and its use is discouraged. See [http://www.redmine.org/boards/1/topics/38518 Important: Ruby 1.8.7 out of support] and [http://www.redmine.org/issues/14371 #14371] for additional information.}}<br />
<br />
{{Note|MRI 1.9.3p327 contains a [http://bugs.ruby-lang.org/issues/7374 bug] breaking plugin loading under Windows which 1.9.3p194 or 1.9.3p392 haven't.}}<br />
<br />
{{Note|Ruby 2.1 on Rails 3.2 has a bug. See upstream bug track [http://www.redmine.org/issues/16194 #16194].}}<br />
<br />
{{Warning|If you use RVM, pay attention to the single and multiple user differences! If you are not creating a hosting service, the multiple user (available for all users on the machine) should be the choice for simpler debuging.}}<br />
<br />
===Database===<br />
<br />
Redmine [http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Database supports many different databases].<br />
<br />
====MariaDB 5.0 or higher (recommended)====<br />
MariaDB is a drop-in replacement for MySQL, in fact it was a fork of it and maintain binarie compatibility.<br />
<br />
To install {{Pkg|mariadb}} simply refer to [[MariaDB]].<br />
<br />
====MySQL 5.0 or higher====<br />
To install {{AUR|mysql}} simply refer to [[MySQL]].<br />
<br />
====PostgreSQL 8.2 or higher====<br />
To install {{Pkg|postgresql}} simply refer to [[Postgresql]].<br />
<br />
Make sure your database datestyle is set to ISO (Postgresql default setting). You can set it using:<br />
<br />
{{bc|1=ALTER DATABASE "redmine_db" SET datestyle="ISO,MDY";}}<br />
<br />
{{Note|Some bugs in PostgreSQL 8.4.0 and 8.4.1 affect Redmine behavior ([[http://www.redmine.org/issues/4259 #4259]], [[http://www.redmine.org/issues/4314 #4314]]), they are fixed in PostgreSQL 8.4.2}}<br />
<br />
====Microsoft SQL Server====<br />
{{Warning|Support is temporarily broken (with ruby 2.0.0 under Windows because of [https://github.com/rails-sqlserver/tiny_tds/issues/110 database adapter gem incompatibility]).}}<br />
<br />
====SQLite 3====<br />
Not supported for multi-user production use. So, it will not be detailed how to install and configure it for use with Redmine. See [http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Supported-database-back-ends upstream document] for more info.<br />
<br />
{{Warning|Support is temporarily broken (with ruby 2.0.0 under Windows because of database adapter gems incompatibilities).}}<br />
<br />
===Web Server===<br />
<br />
====Apache====<br />
To install {{Pkg|apache}} simply refer to [[Apache]].<br />
<br />
====Mongrel====<br />
To install Mongrel server (ruby gem) simply refer to [[Ruby_on_Rails#Mongrel]].<br />
<br />
==== Unicorn ====<br />
To install Unicorn server (ruby gem) simply refer to [[Ruby_on_Rails#Unicorn]].<br />
<br />
====Nginx====<br />
To install {{Pkg|nginx}} simply refer to [[Nginx]].<br />
<br />
====Apache Tomcat====<br />
To install {{Pkg|tomcat6}} or {{Pkg|tomcat7}} simply refer to [[Tomcat]].<br />
<br />
==Optional Prerequisites==<br />
<br />
===SCM (Source Code Management)===<br />
<br />
<table border="1"><br />
<tr><br />
<th>SCM</th><br />
<th>Supported versions</th><br />
<th>Comments</th><br />
</tr><br />
<tr><br />
<td>[http://git-scm.com Git]</td><br />
<td>>=1.5.4.2</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://subversion.apache.org Subversion]</td><br />
<td>1.3, 1.4, 1.5, 1.6 & 1.7</td><br />
<td>1.3 or higher required.<br/><br />
Doesn't support Ruby Bindings for Subversion.<br/><br />
Subversion 1.7.0 and 1.7.1 contains bugs [http://www.redmine.org/issues/9541 #9541]</td><br />
</tr><br />
<tr><br />
<td>[http://www.selenic.com/mercurial Mercurial]</td><br />
<td>>=1.6</td><br />
<td>Support bellow version 1.6 is droped as seen in [http://www.redmine.org/issues/9465 #9465].</td><br />
</tr><br />
<tr><br />
<td>[http://bazaar-vcs.org Bazaar]</td><br />
<td>>= 2.0.4</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://darcs.net Darcs]</td><br />
<td>>=1.0.7</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://www.nongnu.org/cvs CVS]</td><br />
<td>1.12.12</td><br />
<td>1.12 required.<br/><br />
Won't work with CVSNT.</td><br />
</tr><br />
</table><br />
<br />
<br />
More information can be read at [http://www.redmine.org/projects/redmine/wiki/RedmineRepositories Redmine Repositories Wiki].<br />
<br />
===ImageMagick===<br />
[http://www.imagemagick.org ImageMagick] is necessary to enable Gantt export to png image.<br />
<br />
To install {{pkg|imagemagick}} simply:<br />
# pacman -S imagemagick<br />
<br />
===Ruby OpenID Library===<br />
To enable [http://janrain.com/openid-enabled OpenID] support, is required a version >= 2 of the library.<br />
<br />
==Installation==<br />
<br />
===Build and Installation===<br />
Download the package {{AUR|redmine}} from the [[Arch User Repository|AUR]].<br />
<br />
{{Note|Detailed build instructions at [[Arch User Repository#Build the package]]. It's '''HIGHLY''' recommended to read all the [[Arch User Repository|AUR]] page to understand what are you doing. }}<br />
<br />
===Database Configuration===<br />
<br />
Now, we will need to create the database that the Redmine will use to store your data. For now on, the database and its user will be named {{ic|redmine}}. But this names can be changed to anything else.<br />
<br />
{{Note|The configuration for [[MariaDB]] and [[MySQL]] will be the same since both are binary compatible.}}<br />
<br />
====Database Creation====<br />
<br />
To create the database, the user and set privileges (MariaDB and MySQL >= 5.0.2):<br />
{{hc|# mysql -u root -p|<br />
CREATE DATABASE redmine CHARACTER SET UTF8;<br />
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';<br />
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';}}<br />
<br />
For versions of MariaDB and MySQL prior to 5.0.2:<br />
{{hc|# mysql -u root -p|<br />
CREATE DATABASE redmine CHARACTER SET UTF8;<br />
GRANT ALL PRIVILEGES ON redmine.* TO'redmine'@'localhost' IDENTIFIED BY 'my_password';}}<br />
<br />
For PostgreSQL:<br />
{{bc|1=CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity';<br />
CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;}}<br />
<br />
For SQLServer:<br />
<br />
Although the database, login and user can be created within SQL Server Management Studio with a few clicks, you can always use the command line with {{ic|SQLCMD}}:<br />
{{bc|1=USE [master]<br />
GO<br />
-- Very basic DB creation<br />
CREATE DATABASE [REDMINE]<br />
GO<br />
-- Creation of a login with SQL Server login/password authentication and no password expiration policy<br />
CREATE LOGIN [REDMINE] WITH PASSWORD=N'redminepassword', DEFAULT_DATABASE=[REDMINE], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF<br />
GO<br />
-- User creation using previously created login authentication<br />
USE [REDMINE]<br />
GO<br />
CREATE USER [REDMINE] FOR LOGIN [REDMINE]<br />
GO<br />
-- User permissions set via roles<br />
EXEC sp_addrolemember N'db_datareader', N'REDMINE'<br />
GO<br />
EXEC sp_addrolemember N'db_datawriter', N'REDMINE'<br />
GO}}<br />
<br />
{{Note|If you want to use additional environments, you must create separate databases for each one (for example: ''development'' and ''test'').}}<br />
<br />
====Database Access Configuration====<br />
<br />
Now you need to configure Redmine to access the database we just created. To do that you have to copy {{ic|/usr/share/webapps/redmine/config/database.yml.example}} to {{ic|database.yml}}:<br />
<br />
# cd /usr/share/webapps/redmine/config<br />
# cp database.yml.example database.yml<br />
<br />
And then edit this file in order to configure your database settings for "production" environment (you can configure for the "development" and "test" environments too, just change the appropriate sections).<br />
<br />
Example for MariaDB and MySQL database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: mysql2<br />
database: redmine<br />
host: localhost<br />
port: 3307 '''#If your server is not running on the standard port (3306), set it here, otherwise this line is unnecessary.'''<br />
username: redmine<br />
password: my_password}}<br />
<br />
{{Note|For ruby1.9 the "adapter" value must be set to {{ic|mysql2}}, and for ruby1.8 or jruby, it must be set to {{ic|mysql}}.}}<br />
<br />
Example for PostgreSQL database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: postgresql<br />
database: redmine<br />
host: localhost<br />
username: redmine<br />
password: my_password<br />
encoding: utf8<br />
schema_search_path: <database_schema> (default - public)}}<br />
<br />
Example for a SQL Server database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: sqlserver<br />
database: redmine<br />
host: localhost '''#Set not default host (localhost) here, otherwise this line is unnecessary.'''<br />
port: 1433 '''#Set not standard port (1433) here, otherwise this line is unnecessary.'''<br />
username: redmine<br />
password: my_password<br />
}}<br />
<br />
=== Ruby gems ===<br />
Redmine requires some [https://wiki.archlinux.org/index.php/Ruby#RubyGems RubyGems] to be installed and there are multiple ways of installing them (as listed on the referenced page).<br />
* prototype-rails<br />
* unicorn (an application-server)<br />
* mysql2 (high-performance Ruby bindings for MySQL)<br />
* coderay<br />
* erubis<br />
* fastercsv<br />
* rdoc<br />
* net-ldap<br />
* rack-openid<br />
<br />
Obviously, if you choose a different database-server, or want to use a different application-server you should replace ''mysql2'' and ''unicorn'' to your liking.<br />
<br />
====Adding Additional Gems (Optional)====<br />
If you need to load gems that are not required by Redmine core (eg. Puma, fcgi), create a file named {{ic|Gemfile.local}} at the root of your redmine directory. It will be loaded automatically when running {{ic|bundle install}}:<br />
<br />
{{hc|# nano Gemfile.local|<br />
gem 'puma'}}<br />
<br />
==== Check previously installed gems ====<br />
The Redmine devs included Bundler in Redmine, which can manage Gems just like pacman manages packages. Run the following command to assure that all Redmine dependencies are met:<br />
# bundle install --without development test<br />
This should output a list of gems Redmine needs.<br />
<br />
====Gems Installation====<br />
<br />
{{Note|If you prefer, you can install all the gems as pacman packages. You have only to search for the gem package and install them as usual. As of using Ruby gem is much simpler to manage and maintain up to date gems, this will be preferable and used as default bellow.}}<br />
<br />
Redmine uses Bundler to manage gems dependencies. So, you need to install Bundler first:<br />
# gem install bundler<br />
<br />
Then you can install all the gems required by Redmine using the following command:<br />
# cd /usr/share/webapps/redmine<br />
# bundle install<br />
<br />
To install without the ruby ''development'' and ''test'' environments use this instead of the last command:<br />
# bundle install --without development test<br />
<br />
{{Note|You can include/exclude environments using the above syntax.}}<br />
<br />
Although it is highly recommend to enjoy all the features of Redmine, if you really does not want to use {{Pkg|imagemagick}}, you should skip the installation of the {{ic|rmagick}} gem using:<br />
<br />
# bundle install --without rmagick<br />
<br />
{{Note|Only the gems that are needed by the adapters you've specified in your database configuration file are actually installed (eg. if your {{ic|config/database.yml}} uses the ''mysql2'' adapter, then only the mysql2 gem will be installed). Don't forget to re-run {{ic|bundle install}} when you change or add adapters in this file.}}<br />
<br />
===Session Store Secret Generation===<br />
Now you must generate a random key that will be used by Rails to encode cookies that stores session data thus preventing their tampering:<br />
<br />
# rake generate_secret_token<br />
<br />
{{Note|For Redmine prior to 2.x this step is done by executing {{ic|# rake generate_session_store}}.}}<br />
<br />
{{Warning|Generating a new secret token invalidates all existing sessions after restart.}}<br />
<br />
===Database Structure Creation===<br />
With the database created and the access configured for Redmine, now it's time to create the database structure. This is done by running the following command under the application root directory:<br />
<br />
# cd /usr/share/webapps/redmine<br />
# RAILS_ENV=production rake db:migrate<br />
<br />
These command will create tables by running all migrations one by one then create the set of the permissions and the application administrator account, named admin.<br />
<br />
===Database Population with Default Data===<br />
Now you may want to insert the default configuration data in database, like basic types of task, task states, groups, etc. To do so execute the following:<br />
<br />
# RAILS_ENV=production rake redmine:load_default_data<br />
<br />
Redmine will prompt for the data set language that should be loaded; you can also define the REDMINE_LANG environment variable before running the command to a value which will be automatically and silently picked up by the task:<br />
<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake redmine:load_default_data<br />
<br />
{{Note|This step is not mandatory, but it certainly will save you a lot of work to start using Redmine. And for a first time it can be very instructive.}}<br />
<br />
===File System Permissions===<br />
The user account running the application '''must''' have write permission on the following subdirectories:<br />
<br />
'''files''': storage of attachments.<br />
'''log''': application log file production.log.<br />
'''tmp''' and '''tmp/pdf''': used to generate PDF documents among other things (create these ones if not present).<br />
<br />
Assuming you run the application with a the default Apache user {{ic|http}} account:<br />
<br />
# mkdir tmp tmp/pdf public/plugin_assets<br />
# chown -R http:http files log tmp public/plugin_assets<br />
# chmod -R 755 files log tmp tmp/pdf public/plugin_assets<br />
<br />
===Test the installation===<br />
To test your new installation using WEBrick web server run the following in the Redmine folder:<br />
<br />
# ruby script/rails server webrick -e production<br />
<br />
Once WEBrick has started, point your browser to '''http://localhost:3000/'''. You should now see the application welcome page. Use default administrator account to log in: '''''admin'''''/'''''admin'''''. You can go to Administration menu and choose Settings to modify most of the application settings.<br />
<br />
{{Warning|Webrick is not suitable for production use, please only use webrick for testing that the installation up to this point is functional. Use one of the many other guides in this wiki to setup redmine to use either Passenger (aka mod_rails), FCGI or a Rack server (Unicorn, Thin, Puma or hellip) to serve up your redmine.}}<br />
<br />
===Configure the production server===<br />
For Apache and Nginx, it is recommended to use Phusion Passenger. [http://www.modrails.com/ Passenger], also known as {{ic|mod_rails}}, is a module available for [[Nginx]] and [[Apache]].<br />
<br />
Start by installing the 'passenger' gem:<br />
# gem install passenger<br />
<br />
Now you have to look at your passenger gem installation directory to continue. If you don't known where it is, type:<br />
# gem env<br />
<br />
And look at the {{ic|GEM PATHS}} to find where the gems are installed. If you followed this guide and installed [[RVM]], you can have more than one path, look at the one you are using.<br />
<br />
For this guide so far, the gem path is {{ic|/usr/local/rvm/gems/ruby-2.0.0-p247@global}}.<br />
# cd /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/passenger-4.0.23<br />
<br />
If you are aiming to use [[Apache]], run:<br />
# passenger-install-apache2-module<br />
<br />
In case a rails application is deployed with a sub-URI, like http://example.com/yourapplication, some additional configuration is required, see [http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri the modrails documentation]<br />
<br />
For [[Nginx]]:<br />
# passenger-install-nginx-module<br />
<br />
And finally, the installer will provide you with further information regarding the installation (such as installing additional libraries). So, to setup your server, simply follow the output from the passenger installer.<br />
<br />
==Updating==<br />
<br />
Backup the files used in Redmine:<br />
# tar czvf ~/redmine_files.tar.gz -C /usr/share/webapps/redmine/ files<br />
<br />
Backup the plugins installed in Redmine:<br />
# tar czvf ~/redmine_plugins.tar.gz -C /usr/share/webapps/redmine/ plugins<br />
<br />
Backup the database:<br />
# mysqldump -u root -p <redmine_database> | gzip > ~/redmine_db.sql.gz<br />
<br />
Update the package as normal (through [[AUR]]):<br />
# wget https://aur.archlinux.org/packages/re/redmine/redmine.tar.gz<br />
# tar -zxpvf redmine.tar.gz<br />
# cd redmine<br />
<br />
Inspect the downloaded files, mainly the [[PKGBUILD]], and then build:<br />
# makepkg -s<br />
# pacman -U redmine-2.3.0-2-any.pkg.tar.gz<br />
<br />
{{Note|To simplify all this [[AUR]] install and update process, you can always use the [[AUR Helpers]], although this isn't a supported way.}}<br />
<br />
Update the gems requirements:<br />
# bundle update<br />
<br />
For a clean gems environment, you may want to remove all the gems and reinstall them. To go through this, do:<br />
# for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done<br />
<br />
{{Warning|The command above will delete ALL the gems in your system or user, depending of what type of Ruby installation you did in the prerequisites step. You must take care or you can stop working another applications that rely on Ruby gems.}}<br />
<br />
If you did the last step and removed all the gems, now you will need to reinstall them all:<br />
# gem install bundler<br />
# bundle install --without development test<br />
<br />
{{Note|If you removed ALL the gems as above, and used a server that uses a gem, remember to reinstall the server gem: passenger (for Apache and Nginx), Mongrel or Unicorn. To do this, just follow the steps in the installation tutorial above.}}<br />
<br />
Copy the saved files:<br />
# tar xzvf ~/redmine_files.tar.gz -C /usr/share/webapps/redmine/<br />
<br />
Copy the installed plugins<br />
# tar xzvf ~/redmine_plugins.tar.gz -C /usr/share/webapps/redmine/<br />
<br />
Regenerate the secret token:<br />
# cd /usr/share/webapps/redmine<br />
# rake generate_secret_token<br />
<br />
Check for any themes that you may have installed in the {{ic|public/themes}} directory. You can copy them over but checking for updated version is ideal.<br />
<br />
{{Warning|Do NOT overwrite config/settings.yml with the old one.}}<br />
<br />
Update the database. This step is the one that could change the contents of your database. Go to your new redmine directory, then migrate your database:<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake db:migrate<br />
<br />
If you have installed any plugins, you should also run their database migrations:<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake redmine:plugins:migrate<br />
<br />
Now, it's time to clean the cache and the existing sessions:<br />
# rake tmp:cache:clear<br />
# rake tmp:sessions:clear<br />
<br />
Restart the application server (e.g. puma, thin, passenger, etc). And finally go to "Admin -> Roles & permissions" to check/set permissions for the new features, if any.<br />
<br />
==Troubleshooting==<br />
===RMagick gem without support for High Dynamic Range in ImageMagick===<br />
As of ImageMagick 6.8.6.8-1, it is built with HDRI (High Dynamic Range Image) support, and this breaks the RMagick gem as seen in [https://bugs.archlinux.org/task/36518 Arch bug #36518].<br />
<br />
The github [https://github.com/rmagick/rmagick rmagick] is already patched, but the mantainer did not packed it for rubygems yet.<br />
<br />
To install this patched version download the git repository:<br />
# git clone https://github.com/rmagick/rmagick.git<br />
<br />
Then, you need to build the gem:<br />
# cd rmagick<br />
# gem build rmagick.gemspec<br />
<br />
And finally install it:<br />
# gem install rmagick-2.13.2.gem<br />
<br />
{{Note|It will show some complains like {{ic|unable to convert "\xE0" from ASCII-8BIT to UTF-8 for ext/RMagick/RMagick2.so, skipping}}, but you can safelly ignore it.}}<br />
<br />
===Runtime error complaining that RMagick was configured with older version===<br />
<br />
If you get the following runtime error after upgrading ImageMagick {{ic|This installation of RMagick was configured with ImageMagick 6.8.7 but ImageMagick 6.8.8-1 is in use.}} then you only need to reinstall (or rebuild as shown above if is the case).<br />
<br />
{{Note|This is due to that when you install the RMagick gem it compiles some native extensions and they may need to be rebuilt after some ImageMagick upgrades.}}<br />
<br />
===Error when installing gems: Cannot load such file -- mysql2/mysql2===<br />
<br />
If you see an error like {{ic| cannot load such file -- mysql2/mysql2}}, you are having a problem with the installation of the database gem. Probably a misconfiguration in the [[Redmine#Database Access Configuration|Database Access Configuration]] step.<br />
In this case you should verify the {{ic|database.yml}} file.<br />
<br />
If no success, you can manually install the database gem by:<br />
<br />
# gem install mysql2<br />
<br />
In last case, as suggested by [[User:Bobdog|Bobdog]], you can try to comment the line of the database gem and add a new one as bellow:<br />
<br />
{{hc|<path-to-mysql2-gem-directory>/lib/mysql2/mysql2.rb|<br />
<br />
# require 'mysql2/mysql2'<br />
require '<path-to-mysql2-gem-directory>/lib/mysql2/mysql2.so'}}<br />
<br />
=== Apache 2.4 Updating ===<br />
<br />
When updating to Apache 2.4 will be necessary to remove and install all your gems to make sure all of them that need to build native extensions will be rebuilt against the new Apache server.<br />
<br />
So, for a clean gems environment, remove all the gems:<br />
<br />
# for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done<br />
<br />
To reinstall the gems:<br />
<br />
# cd /usr/share/webapps/redmine<br />
# gem install bundler<br />
# bundle install --without development test<br />
<br />
Remember to reinstall the RMagick gem as describe above in [[Redmine#RMagick gem without support for High Dynamic Range in ImageMagick|RMagick gem without support for High Dynamic Range in ImageMagick]].<br />
<br />
And if you are using Passenger to serve your apps through Apache you will need to reinstall it as described above in [[Redmine#Configure the production server|Configure the production server]].<br />
<br />
=== Checkout SVN Source ===<br />
Get the Redmine source ([http://www.redmine.org/projects/redmine/wiki/Download Download instructions]). Here is method of installing Redmine directly from subversion in /srv/http/redmine/<br />
# useradd -d /srv/http/redmine -s /bin/false redmine<br />
# mkdir -p /srv/http/redmine<br />
# svn checkout http://svn.redmine.org/redmine/branches/2.1-stable /srv/http/redmine<br />
# chown -R redmine: /srv/http/redmine<br />
<br />
=== Automating The Update Process ===<br />
Example of an after-update script:<br />
<br />
#!/usr/bin/bash<br />
export RAILS_ENV=production<br />
grep -E "^gem 'thin'" Gemfile || echo "gem 'thin'" >> Gemfile<br />
bundle update && bundle exec rake generate_secret_token db:migrate redmine:plugins:migrate tmp:cache:clear tmp:sessions:clear<br />
<br />
{{Note| Note that this script uses Thin as application server, so you must change it to your needs.}}<br />
<br />
=== Creating a Systemd Unit===<br />
If you want to automatic run you application server when system starts, you need to create a systemd unit file.<br />
<br />
{{Note| This is not needed if you use {{Pkg|apache}} or {{Pkg|nginx}} with Passenger gem. Those servers already have their own unit file, so you have only to enable it.}}<br />
<br />
{{hc|/etc/systemd/system/redmine.service|<nowiki><br />
[Unit]<br />
Description=Redmine server<br />
After=syslog.target<br />
After=network.target<br />
<br />
[Service]<br />
Type=simple<br />
User=redmine2<br />
Group=redmine2<br />
Environment=GEM_HOME=/home/redmine2/.gem/<br />
ExecStart=/usr/bin/ruby /usr/share/webapps/redmine/script/rails server webrick -e production<br />
<br />
# Give a reasonable amount of time for the server to start up/shut down<br />
TimeoutSec=300<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</nowiki>}}<br />
<br />
=== Complaints about psych===<br />
<br />
Like that:<br />
<br />
/usr/lib/ruby/2.1.0/psych/parser.rb:33:in `<class:Parser>': superclass mismatch for class Mark (TypeError)<br />
from /usr/lib/ruby/2.1.0/psych/parser.rb:32:in `<module:Psych>'<br />
from /usr/lib/ruby/2.1.0/psych/parser.rb:1:in `<top (required)>'<br />
from /usr/lib/ruby/2.1.0/psych.rb:7:in `require'<br />
<br />
[http://www.redmine.org/boards/2/topics/36728 according to that] that is a bundler issue, and you have to add<br />
gem 'psych'<br />
to your Gemfile.local<br />
<br />
== See Also ==<br />
* [http://www.redmine.org/projects/redmine/wiki/RedmineInstall Official install guide from Redmine Wiki]</div>Deemytchhttps://wiki.archlinux.org/index.php?title=Redmine&diff=304336Redmine2014-03-13T18:38:58Z<p>Deemytch: /* Updating */</p>
<hr />
<div>[[Category:Version Control System]]<br />
{{Related articles start}}<br />
{{Related|Ruby on Rails}}<br />
{{Related|RVM}}<br />
{{Related|MariaDB}}<br />
{{Related|Apache}}<br />
{{Related|Nginx}}<br />
{{Related articles end}}<br />
Redmine is a free and open source, web-based project management and bug-tracking tool. It includes a calendar and Gantt charts to aid visual representation of projects and their deadlines. It handles multiple projects. Redmine provides integrated project management features, issue tracking, and support for various version control systems.<br />
<br />
Redmine is written using the Ruby on Rails framework. It is cross-platform and cross-database.<br />
<br />
==Prerequisites==<br />
<br />
This document will guide you through the installation process of the Redmine and all of its prerequisites, including the optional ones. If desired, however, you may install Redmine and it's prerequisites separately, simply refering to the relevant sections below.<br />
<br />
Although this guide will go through all the installation process, this isn't a one way path. So Redmine can use different versions of the other softwares (mariaDB, mySQL, postgreSQL, etc, as your database).<br />
<br />
{{Note|At this time is important to note that this guide is an default suggestion, feel free to use other of the prerequisites mentioned on this wiki.}}<br />
<br />
===Ruby===<br />
<br />
<table border="1"><br />
<tr><br />
<th>Redmine version</th><br />
<th>Supported Ruby versions</th><br />
<th>Rails version used</th><br />
<th>Supported RubyGems versions</th><br />
</tr><br />
<tr><br />
<td rowspan="2">2.5.0</td><br />
<td>ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0</td><br />
<td rowspan="2">Rails 3.2</td><br />
<td rowspan="2">RubyGems <= 1.8</td><br />
</tr><br />
<tr><br />
<td>jruby 1.7.6</td><br />
</tr><br />
</table><br />
<br />
There are two simple ways to install Ruby: installing the {{Pkg|ruby}} package as described in [[ruby]] or installing RVM as described in [[RVM]] '''(recommended)'''.<br />
<br />
{{Note|Ruby MRI 1.8.7 support has reached its EOL and its use is discouraged. See [http://www.redmine.org/boards/1/topics/38518 Important: Ruby 1.8.7 out of support] and [http://www.redmine.org/issues/14371 #14371] for additional information.}}<br />
<br />
{{Note|MRI 1.9.3p327 contains a [http://bugs.ruby-lang.org/issues/7374 bug] breaking plugin loading under Windows which 1.9.3p194 or 1.9.3p392 haven't.}}<br />
<br />
{{Note|Ruby 2.1 on Rails 3.2 has a bug. See upstream bug track [http://www.redmine.org/issues/16194 #16194].}}<br />
<br />
{{Warning|If you use RVM, pay attention to the single and multiple user differences! If you are not creating a hosting service, the multiple user (available for all users on the machine) should be the choice for simpler debuging.}}<br />
<br />
===Database===<br />
<br />
Redmine [http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Database supports many different databases].<br />
<br />
====MariaDB 5.0 or higher (recommended)====<br />
MariaDB is a drop-in replacement for MySQL, in fact it was a fork of it and maintain binarie compatibility.<br />
<br />
To install {{Pkg|mariadb}} simply refer to [[MariaDB]].<br />
<br />
====MySQL 5.0 or higher====<br />
To install {{Pkg|mysql}} simply refer to [[MySQL]].<br />
<br />
====PostgreSQL 8.2 or higher====<br />
To install {{Pkg|postgresql}} simply refer to [[Postgresql]].<br />
<br />
Make sure your database datestyle is set to ISO (Postgresql default setting). You can set it using:<br />
<br />
{{bc|1=ALTER DATABASE "redmine_db" SET datestyle="ISO,MDY";}}<br />
<br />
{{Note|Some bugs in PostgreSQL 8.4.0 and 8.4.1 affect Redmine behavior ([[http://www.redmine.org/issues/4259 #4259]], [[http://www.redmine.org/issues/4314 #4314]]), they are fixed in PostgreSQL 8.4.2}}<br />
<br />
====Microsoft SQL Server====<br />
{{Warning|Support is temporarily broken (with ruby 2.0.0 under Windows because of [https://github.com/rails-sqlserver/tiny_tds/issues/110 database adapter gem incompatibility]).}}<br />
<br />
====SQLite 3====<br />
Not supported for multi-user production use. So, it will not be detailed how to install and configure it for use with Redmine. See [http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Supported-database-back-ends upstream document] for more info.<br />
<br />
{{Warning|Support is temporarily broken (with ruby 2.0.0 under Windows because of database adapter gems incompatibilities).}}<br />
<br />
===Web Server===<br />
<br />
====Apache====<br />
To install {{Pkg|apache}} simply refer to [[Apache]].<br />
<br />
====Mongrel====<br />
To install Mongrel server (ruby gem) simply refer to [[Ruby_on_Rails#Mongrel]].<br />
<br />
==== Unicorn ====<br />
To install Unicorn server (ruby gem) simply refer to [[Ruby_on_Rails#Unicorn]].<br />
<br />
====Nginx====<br />
To install {{Pkg|nginx}} simply refer to [[Nginx]].<br />
<br />
====Apache Tomcat====<br />
To install {{Pkg|tomcat6}} or {{Pkg|tomcat7}} simply refer to [[Tomcat]].<br />
<br />
==Optional Prerequisites==<br />
<br />
===SCM (Source Code Management)===<br />
<br />
<table border="1"><br />
<tr><br />
<th>SCM</th><br />
<th>Supported versions</th><br />
<th>Comments</th><br />
</tr><br />
<tr><br />
<td>[http://git-scm.com Git]</td><br />
<td>>=1.5.4.2</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://subversion.apache.org Subversion]</td><br />
<td>1.3, 1.4, 1.5, 1.6 & 1.7</td><br />
<td>1.3 or higher required.<br/><br />
Doesn't support Ruby Bindings for Subversion.<br/><br />
Subversion 1.7.0 and 1.7.1 contains bugs [http://www.redmine.org/issues/9541 #9541]</td><br />
</tr><br />
<tr><br />
<td>[http://www.selenic.com/mercurial Mercurial]</td><br />
<td>>=1.6</td><br />
<td>Support bellow version 1.6 is droped as seen in [http://www.redmine.org/issues/9465 #9465].</td><br />
</tr><br />
<tr><br />
<td>[http://bazaar-vcs.org Bazaar]</td><br />
<td>>= 2.0.4</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://darcs.net Darcs]</td><br />
<td>>=1.0.7</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://www.nongnu.org/cvs CVS]</td><br />
<td>1.12.12</td><br />
<td>1.12 required.<br/><br />
Won't work with CVSNT.</td><br />
</tr><br />
</table><br />
<br />
<br />
More information can be read at [http://www.redmine.org/projects/redmine/wiki/RedmineRepositories Redmine Repositories Wiki].<br />
<br />
===ImageMagick===<br />
[http://www.imagemagick.org ImageMagick] is necessary to enable Gantt export to png image.<br />
<br />
To install {{pkg|imagemagick}} simply:<br />
# pacman -S imagemagick<br />
<br />
===Ruby OpenID Library===<br />
To enable [http://janrain.com/openid-enabled OpenID] support, is required a version >= 2 of the library.<br />
<br />
==Installation==<br />
<br />
===Build and Installation===<br />
Download the package {{AUR|redmine}} from the [[Arch User Repository|AUR]].<br />
<br />
{{Note|Detailed build instructions at [[Arch User Repository#Build the package]]. It's '''HIGHLY''' recommended to read all the [[Arch User Repository|AUR]] page to understand what are you doing. }}<br />
<br />
===Database Configuration===<br />
<br />
Now, we will need to create the database that the Redmine will use to store your data. For now on, the database and its user will be named {{ic|redmine}}. But this names can be changed to anything else.<br />
<br />
{{Note|The configuration for [[MariaDB]] and [[MySQL]] will be the same since both are binary compatible.}}<br />
<br />
====Database Creation====<br />
<br />
To create the database, the user and set privileges (MariaDB and MySQL >= 5.0.2):<br />
{{hc|# mysql -u root -p|<br />
CREATE DATABASE redmine CHARACTER SET UTF8;<br />
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';<br />
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';}}<br />
<br />
For versions of MariaDB and MySQL prior to 5.0.2:<br />
{{hc|# mysql -u root -p|<br />
CREATE DATABASE redmine CHARACTER SET UTF8;<br />
GRANT ALL PRIVILEGES ON redmine.* TO'redmine'@'localhost' IDENTIFIED BY 'my_password';}}<br />
<br />
For PostgreSQL:<br />
{{bc|1=CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity';<br />
CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;}}<br />
<br />
For SQLServer:<br />
<br />
Although the database, login and user can be created within SQL Server Management Studio with a few clicks, you can always use the command line with {{ic|SQLCMD}}:<br />
{{bc|1=USE [master]<br />
GO<br />
-- Very basic DB creation<br />
CREATE DATABASE [REDMINE]<br />
GO<br />
-- Creation of a login with SQL Server login/password authentication and no password expiration policy<br />
CREATE LOGIN [REDMINE] WITH PASSWORD=N'redminepassword', DEFAULT_DATABASE=[REDMINE], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF<br />
GO<br />
-- User creation using previously created login authentication<br />
USE [REDMINE]<br />
GO<br />
CREATE USER [REDMINE] FOR LOGIN [REDMINE]<br />
GO<br />
-- User permissions set via roles<br />
EXEC sp_addrolemember N'db_datareader', N'REDMINE'<br />
GO<br />
EXEC sp_addrolemember N'db_datawriter', N'REDMINE'<br />
GO}}<br />
<br />
{{Note|If you want to use additional environments, you must create separate databases for each one (for example: ''development'' and ''test'').}}<br />
<br />
====Database Access Configuration====<br />
<br />
Now you need to configure Redmine to access the database we just created. To do that you have to copy {{ic|/usr/share/webapps/redmine/config/database.yml.example}} to {{ic|database.yml}}:<br />
<br />
# cd /usr/share/webapps/redmine/config<br />
# cp database.yml.example database.yml<br />
<br />
And then edit this file in order to configure your database settings for "production" environment (you can configure for the "development" and "test" environments too, just change the appropriate sections).<br />
<br />
Example for MariaDB and MySQL database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: mysql2<br />
database: redmine<br />
host: localhost<br />
port: 3307 '''#If your server is not running on the standard port (3306), set it here, otherwise this line is unnecessary.'''<br />
username: redmine<br />
password: my_password}}<br />
<br />
{{Note|For ruby1.9 the "adapter" value must be set to {{ic|mysql2}}, and for ruby1.8 or jruby, it must be set to {{ic|mysql}}.}}<br />
<br />
Example for PostgreSQL database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: postgresql<br />
database: redmine<br />
host: localhost<br />
username: redmine<br />
password: my_password<br />
encoding: utf8<br />
schema_search_path: <database_schema> (default - public)}}<br />
<br />
Example for a SQL Server database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: sqlserver<br />
database: redmine<br />
host: localhost '''#Set not default host (localhost) here, otherwise this line is unnecessary.'''<br />
port: 1433 '''#Set not standard port (1433) here, otherwise this line is unnecessary.'''<br />
username: redmine<br />
password: my_password<br />
}}<br />
<br />
=== Ruby gems ===<br />
Redmine requires some [https://wiki.archlinux.org/index.php/Ruby#RubyGems RubyGems] to be installed and there are multiple ways of installing them (as listed on the referenced page).<br />
* prototype-rails<br />
* unicorn (an application-server)<br />
* mysql2 (high-performance Ruby bindings for MySQL)<br />
* coderay<br />
* erubis<br />
* fastercsv<br />
* rdoc<br />
* net-ldap<br />
* rack-openid<br />
<br />
Obviously, if you choose a different database-server, or want to use a different application-server you should replace ''mysql2'' and ''unicorn'' to your liking.<br />
<br />
====Adding Additional Gems (Optional)====<br />
If you need to load gems that are not required by Redmine core (eg. Puma, fcgi), create a file named {{ic|Gemfile.local}} at the root of your redmine directory. It will be loaded automatically when running {{ic|bundle install}}:<br />
<br />
{{hc|# nano Gemfile.local|<br />
gem 'puma'}}<br />
<br />
==== Check previously installed gems ====<br />
The Redmine devs included Bundler in Redmine, which can manage Gems just like pacman manages packages. Run the following command to assure that all Redmine dependencies are met:<br />
# bundle install --without development test<br />
This should output a list of gems Redmine needs.<br />
<br />
====Gems Installation====<br />
<br />
{{Note|If you prefer, you can install all the gems as pacman packages. You have only to search for the gem package and install them as usual. As of using Ruby gem is much simpler to manage and maintain up to date gems, this will be preferable and used as default bellow.}}<br />
<br />
Redmine uses Bundler to manage gems dependencies. So, you need to install Bundler first:<br />
# gem install bundler<br />
<br />
Then you can install all the gems required by Redmine using the following command:<br />
# cd /usr/share/webapps/redmine<br />
# bundle install<br />
<br />
To install without the ruby ''development'' and ''test'' environments use this instead of the last command:<br />
# bundle install --without development test<br />
<br />
{{Note|You can include/exclude environments using the above syntax.}}<br />
<br />
Although it is highly recommend to enjoy all the features of Redmine, if you really does not want to use {{Pkg|ImageMagick}}, you should skip the installation of the {{ic|rmagick}} gem using:<br />
<br />
# bundle install --without rmagick<br />
<br />
{{Note|Only the gems that are needed by the adapters you've specified in your database configuration file are actually installed (eg. if your {{ic|config/database.yml}} uses the ''mysql2'' adapter, then only the mysql2 gem will be installed). Don't forget to re-run {{ic|bundle install}} when you change or add adapters in this file.}}<br />
<br />
===Session Store Secret Generation===<br />
Now you must generate a random key that will be used by Rails to encode cookies that stores session data thus preventing their tampering:<br />
<br />
# rake generate_secret_token<br />
<br />
{{Note|For Redmine prior to 2.x this step is done by executing {{ic|# rake generate_session_store}}.}}<br />
<br />
{{Warning|Generating a new secret token invalidates all existing sessions after restart.}}<br />
<br />
===Database Structure Creation===<br />
With the database created and the access configured for Redmine, now it's time to create the database structure. This is done by running the following command under the application root directory:<br />
<br />
# cd /usr/share/webapps/redmine<br />
# RAILS_ENV=production rake db:migrate<br />
<br />
These command will create tables by running all migrations one by one then create the set of the permissions and the application administrator account, named admin.<br />
<br />
===Database Population with Default Data===<br />
Now you may want to insert the default configuration data in database, like basic types of task, task states, groups, etc. To do so execute the following:<br />
<br />
# RAILS_ENV=production rake redmine:load_default_data<br />
<br />
Redmine will prompt for the data set language that should be loaded; you can also define the REDMINE_LANG environment variable before running the command to a value which will be automatically and silently picked up by the task:<br />
<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake redmine:load_default_data<br />
<br />
{{Note|This step is not mandatory, but it certainly will save you a lot of work to start using Redmine. And for a first time it can be very instructive.}}<br />
<br />
===File System Permissions===<br />
The user account running the application '''must''' have write permission on the following subdirectories:<br />
<br />
'''files''': storage of attachments.<br />
'''log''': application log file production.log.<br />
'''tmp''' and '''tmp/pdf''': used to generate PDF documents among other things (create these ones if not present).<br />
<br />
Assuming you run the application with a the default Apache user {{ic|http}} account:<br />
<br />
# mkdir tmp tmp/pdf public/plugin_assets<br />
# chown -R http:http files log tmp public/plugin_assets<br />
# chmod -R 755 files log tmp tmp/pdf public/plugin_assets<br />
<br />
===Test the installation===<br />
To test your new installation using WEBrick web server run the following in the Redmine folder:<br />
<br />
# ruby script/rails server webrick -e production<br />
<br />
Once WEBrick has started, point your browser to '''http://localhost:3000/'''. You should now see the application welcome page. Use default administrator account to log in: '''''admin'''''/'''''admin'''''. You can go to Administration menu and choose Settings to modify most of the application settings.<br />
<br />
{{Warning|Webrick is not suitable for production use, please only use webrick for testing that the installation up to this point is functional. Use one of the many other guides in this wiki to setup redmine to use either Passenger (aka mod_rails), FCGI or a Rack server (Unicorn, Thin, Puma or hellip) to serve up your redmine.}}<br />
<br />
===Configure the production server===<br />
For Apache and Nginx, it is recommended to use Phusion Passenger. [http://www.modrails.com/ Passenger], also known as {{ic|mod_rails}}, is a module available for [[Nginx]] and [[Apache]].<br />
<br />
Start by installing the 'passenger' gem:<br />
# gem install passenger<br />
<br />
Now you have to look at your passenger gem installation directory to continue. If you don't known where it is, type:<br />
# gem env<br />
<br />
And look at the {{ic|GEM PATHS}} to find where the gems are installed. If you followed this guide and installed [[RVM]], you can have more than one path, look at the one you are using.<br />
<br />
For this guide so far, the gem path is {{ic|/usr/local/rvm/gems/ruby-2.0.0-p247@global}}.<br />
# cd /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/passenger-4.0.23<br />
<br />
If you are aiming to use [[Apache]], run:<br />
# passenger-install-apache2-module<br />
<br />
In case a rails application is deployed with a sub-URI, like http://example.com/yourapplication, some additional configuration is required, see [http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri the modrails documentation]<br />
<br />
For [[Nginx]]:<br />
# passenger-install-nginx-module<br />
<br />
And finally, the installer will provide you with further information regarding the installation (such as installing additional libraries). So, to setup your server, simply follow the output from the passenger installer.<br />
<br />
==Updating==<br />
<br />
Backup the files used in Redmine:<br />
# tar czvf ~/redmine_files.tar.gz -C /usr/share/webapps/redmine/ files<br />
<br />
Backup the plugins installed in Redmine:<br />
# tar czvf ~/redmine_plugins.tar.gz -C /usr/share/webapps/redmine/ plugins<br />
<br />
Backup the database:<br />
# mysqldump -u root -p <redmine_database> | gzip > ~/redmine_db.sql.gz<br />
<br />
Update the package as normal (through [[AUR]]):<br />
# wget https://aur.archlinux.org/packages/re/redmine/redmine.tar.gz<br />
# tar -zxpvf redmine.tar.gz<br />
# cd redmine<br />
<br />
Inspect the downloaded files, mainly the [[PKGBUILD]], and then build:<br />
# makepkg -s<br />
# pacman -U redmine-2.3.0-2-any.pkg.tar.gz<br />
<br />
{{Note|To simplify all this [[AUR]] install and update process, you can always use the [[AUR Helpers]], although this isn't a supported way.}}<br />
<br />
Update the gems requirements:<br />
# bundle update<br />
<br />
For a clean gems environment, you may want to remove all the gems and reinstall them. To go through this, do:<br />
# for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done<br />
<br />
{{Warning|The command above will delete ALL the gems in your system or user, depending of what type of Ruby installation you did in the prerequisites step. You must take care or you can stop working another applications that rely on Ruby gems.}}<br />
<br />
If you did the last step and removed all the gems, now you will need to reinstall them all:<br />
# gem install bundler<br />
# bundle install --without development test<br />
<br />
{{Note|If you removed ALL the gems as above, and used a server that uses a gem, remember to reinstall the server gem: passenger (for Apache and Nginx), Mongrel or Unicorn. To do this, just follow the steps in the installation tutorial above.}}<br />
<br />
Copy the saved files:<br />
# tar xzvf ~/redmine_files.tar.gz -C /usr/share/webapps/redmine/<br />
<br />
Copy the installed plugins<br />
# tar xzvf ~/redmine_plugins.tar.gz -C /usr/share/webapps/redmine/<br />
<br />
Regenerate the secret token:<br />
# cd /usr/share/webapps/redmine<br />
# rake generate_secret_token<br />
<br />
Check for any themes that you may have installed in the {{ic|public/themes}} directory. You can copy them over but checking for updated version is ideal.<br />
<br />
{{Warning|Do NOT overwrite config/settings.yml with the old one.}}<br />
<br />
Update the database. This step is the one that could change the contents of your database. Go to your new redmine directory, then migrate your database:<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake db:migrate<br />
<br />
If you have installed any plugins, you should also run their database migrations:<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake redmine:plugins:migrate<br />
<br />
Now, it's time to clean the cache and the existing sessions:<br />
# rake tmp:cache:clear<br />
# rake tmp:sessions:clear<br />
<br />
Restart the application server (e.g. puma, thin, passenger, etc). And finally go to "Admin -> Roles & permissions" to check/set permissions for the new features, if any.<br />
<br />
'''Example of an after-update script:'''<br />
#!/usr/bin/bash<br />
export RAILS_ENV=production<br />
grep -E "^gem 'thin'" Gemfile || echo "gem 'thin'" >> Gemfile<br />
bundle update && bundle exec rake generate_secret_token db:migrate redmine:plugins:migrate tmp:cache:clear tmp:sessions:clear<br />
<br />
<br />
=== Example of systemd unit ===<br />
that starts redmine with thin as redmine user and group<br />
<br />
[Unit]<br />
Description=redmine<br />
After=syslog.target network.target<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
EnvironmentFile=/usr/share/webapps/redmine/.env<br />
User=redmine<br />
Group=redmine<br />
WorkingDirectory=/usr/share/webapps/redmine<br />
ExecStartPre=/usr/bin/mkdir -p -m 0770 /run/redmine<br />
ExecStartPre=/usr/bin/chown redmine.http /run/redmine<br />
ExecStart=/etc/init.d/redmine start<br />
ExecReload=/etc/init.d/redmine restart<br />
ExecStop=/etc/init.d/redmine stop<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
together with that '''/etc/init.d/redmine''' file:<br />
#!/bin/sh<br />
. ~/.env<br />
bundle exec thin -s 2 -S /run/redmine/redmine.socket $1<br />
<br />
and '''~/.env''' file that contains:<br />
PATH=$HOME/.gem/ruby/2.1.0/bin:/usr/bin<br />
RAILS_ENV=production<br />
<br />
==Troubleshooting==<br />
===RMagick gem without support for High Dynamic Range in ImageMagick===<br />
As of ImageMagick 6.8.6.8-1, it is built with HDRI (High Dynamic Range Image) support, and this breaks the RMagick gem as seen in [https://bugs.archlinux.org/task/36518 Arch bug #36518].<br />
<br />
The github [https://github.com/rmagick/rmagick rmagick] is already patched, but the mantainer did not packed it for rubygems yet.<br />
<br />
To install this patched version download the git repository:<br />
# git clone https://github.com/rmagick/rmagick.git<br />
<br />
Then, you need to build the gem:<br />
# cd rmagick<br />
# gem build rmagick.gemspec<br />
<br />
And finally install it:<br />
# gem install rmagick-2.13.2.gem<br />
<br />
{{Note|It will show some complains like {{ic|unable to convert "\xE0" from ASCII-8BIT to UTF-8 for ext/RMagick/RMagick2.so, skipping}}, but you can safelly ignore it.}}<br />
<br />
===Runtime error complaining that RMagick was configured with older version===<br />
<br />
If you get the following runtime error after upgrading ImageMagick {{ic|This installation of RMagick was configured with ImageMagick 6.8.7 but ImageMagick 6.8.8-1 is in use.}} then you only need to reinstall (or rebuild as shown above if is the case).<br />
<br />
{{Note|This is due to that when you install the RMagick gem it compiles some native extensions and they may need to be rebuilt after some ImageMagick upgrades.}}<br />
<br />
===Error when installing gems: Cannot load such file -- mysql2/mysql2===<br />
<br />
If you see an error like {{ic| cannot load such file -- mysql2/mysql2}}, you are having a problem with the installation of the database gem. Probably a misconfiguration in the [[Redmine#Database Access Configuration|Database Access Configuration]] step.<br />
In this case you should verify the {{ic|database.yml}} file.<br />
<br />
If no success, you can manually install the database gem by:<br />
<br />
# gem install mysql2<br />
<br />
In last case, as suggested by [[User:Bobdog|Bobdog]], you can try to comment the line of the database gem and add a new one as bellow:<br />
<br />
{{hc|<path-to-mysql2-gem-directory>/lib/mysql2/mysql2.rb|<br />
<br />
# require 'mysql2/mysql2'<br />
require '<path-to-mysql2-gem-directory>/lib/mysql2/mysql2.so'}}<br />
<br />
=== Apache 2.4 Updating ===<br />
<br />
When updating to Apache 2.4 will be necessary to remove and install all your gems to make sure all of them that need to build native extensions will be rebuilt against the new Apache server.<br />
<br />
So, for a clean gems environment, remove all the gems:<br />
<br />
# for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done<br />
<br />
To reinstall the gems:<br />
<br />
# cd /usr/share/webapps/redmine<br />
# gem install bundler<br />
# bundle install --without development test<br />
<br />
Remember to reinstall the RMagick gem as describe above in [[Redmine#RMagick gem without support for High Dynamic Range in ImageMagick|RMagick gem without support for High Dynamic Range in ImageMagick]].<br />
<br />
And if you are using Passenger to serve your apps through Apache you will need to reinstall it as described above in [[Redmine#Configure the production server|Configure the production server]].<br />
<br />
=== Checkout SVN Source ===<br />
Get the Redmine source ([http://www.redmine.org/projects/redmine/wiki/Download Download instructions]). Here is method of installing Redmine directly from subversion in /srv/http/redmine/<br />
# useradd -d /srv/http/redmine -s /bin/false redmine<br />
# mkdir -p /srv/http/redmine<br />
# svn checkout http://svn.redmine.org/redmine/branches/2.1-stable /srv/http/redmine<br />
# chown -R redmine: /srv/http/redmine<br />
<br />
== See Also ==<br />
* [http://www.redmine.org/projects/redmine/wiki/RedmineInstall Official install guide from Redmine Wiki]</div>Deemytchhttps://wiki.archlinux.org/index.php?title=Redmine&diff=304335Redmine2014-03-13T18:35:32Z<p>Deemytch: /* Updating */</p>
<hr />
<div>[[Category:Version Control System]]<br />
{{Related articles start}}<br />
{{Related|Ruby on Rails}}<br />
{{Related|RVM}}<br />
{{Related|MariaDB}}<br />
{{Related|Apache}}<br />
{{Related|Nginx}}<br />
{{Related articles end}}<br />
Redmine is a free and open source, web-based project management and bug-tracking tool. It includes a calendar and Gantt charts to aid visual representation of projects and their deadlines. It handles multiple projects. Redmine provides integrated project management features, issue tracking, and support for various version control systems.<br />
<br />
Redmine is written using the Ruby on Rails framework. It is cross-platform and cross-database.<br />
<br />
==Prerequisites==<br />
<br />
This document will guide you through the installation process of the Redmine and all of its prerequisites, including the optional ones. If desired, however, you may install Redmine and it's prerequisites separately, simply refering to the relevant sections below.<br />
<br />
Although this guide will go through all the installation process, this isn't a one way path. So Redmine can use different versions of the other softwares (mariaDB, mySQL, postgreSQL, etc, as your database).<br />
<br />
{{Note|At this time is important to note that this guide is an default suggestion, feel free to use other of the prerequisites mentioned on this wiki.}}<br />
<br />
===Ruby===<br />
<br />
<table border="1"><br />
<tr><br />
<th>Redmine version</th><br />
<th>Supported Ruby versions</th><br />
<th>Rails version used</th><br />
<th>Supported RubyGems versions</th><br />
</tr><br />
<tr><br />
<td rowspan="2">2.5.0</td><br />
<td>ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0</td><br />
<td rowspan="2">Rails 3.2</td><br />
<td rowspan="2">RubyGems <= 1.8</td><br />
</tr><br />
<tr><br />
<td>jruby 1.7.6</td><br />
</tr><br />
</table><br />
<br />
There are two simple ways to install Ruby: installing the {{Pkg|ruby}} package as described in [[ruby]] or installing RVM as described in [[RVM]] '''(recommended)'''.<br />
<br />
{{Note|Ruby MRI 1.8.7 support has reached its EOL and its use is discouraged. See [http://www.redmine.org/boards/1/topics/38518 Important: Ruby 1.8.7 out of support] and [http://www.redmine.org/issues/14371 #14371] for additional information.}}<br />
<br />
{{Note|MRI 1.9.3p327 contains a [http://bugs.ruby-lang.org/issues/7374 bug] breaking plugin loading under Windows which 1.9.3p194 or 1.9.3p392 haven't.}}<br />
<br />
{{Note|Ruby 2.1 on Rails 3.2 has a bug. See upstream bug track [http://www.redmine.org/issues/16194 #16194].}}<br />
<br />
{{Warning|If you use RVM, pay attention to the single and multiple user differences! If you are not creating a hosting service, the multiple user (available for all users on the machine) should be the choice for simpler debuging.}}<br />
<br />
===Database===<br />
<br />
Redmine [http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Database supports many different databases].<br />
<br />
====MariaDB 5.0 or higher (recommended)====<br />
MariaDB is a drop-in replacement for MySQL, in fact it was a fork of it and maintain binarie compatibility.<br />
<br />
To install {{Pkg|mariadb}} simply refer to [[MariaDB]].<br />
<br />
====MySQL 5.0 or higher====<br />
To install {{Pkg|mysql}} simply refer to [[MySQL]].<br />
<br />
====PostgreSQL 8.2 or higher====<br />
To install {{Pkg|postgresql}} simply refer to [[Postgresql]].<br />
<br />
Make sure your database datestyle is set to ISO (Postgresql default setting). You can set it using:<br />
<br />
{{bc|1=ALTER DATABASE "redmine_db" SET datestyle="ISO,MDY";}}<br />
<br />
{{Note|Some bugs in PostgreSQL 8.4.0 and 8.4.1 affect Redmine behavior ([[http://www.redmine.org/issues/4259 #4259]], [[http://www.redmine.org/issues/4314 #4314]]), they are fixed in PostgreSQL 8.4.2}}<br />
<br />
====Microsoft SQL Server====<br />
{{Warning|Support is temporarily broken (with ruby 2.0.0 under Windows because of [https://github.com/rails-sqlserver/tiny_tds/issues/110 database adapter gem incompatibility]).}}<br />
<br />
====SQLite 3====<br />
Not supported for multi-user production use. So, it will not be detailed how to install and configure it for use with Redmine. See [http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Supported-database-back-ends upstream document] for more info.<br />
<br />
{{Warning|Support is temporarily broken (with ruby 2.0.0 under Windows because of database adapter gems incompatibilities).}}<br />
<br />
===Web Server===<br />
<br />
====Apache====<br />
To install {{Pkg|apache}} simply refer to [[Apache]].<br />
<br />
====Mongrel====<br />
To install Mongrel server (ruby gem) simply refer to [[Ruby_on_Rails#Mongrel]].<br />
<br />
==== Unicorn ====<br />
To install Unicorn server (ruby gem) simply refer to [[Ruby_on_Rails#Unicorn]].<br />
<br />
====Nginx====<br />
To install {{Pkg|nginx}} simply refer to [[Nginx]].<br />
<br />
====Apache Tomcat====<br />
To install {{Pkg|tomcat6}} or {{Pkg|tomcat7}} simply refer to [[Tomcat]].<br />
<br />
==Optional Prerequisites==<br />
<br />
===SCM (Source Code Management)===<br />
<br />
<table border="1"><br />
<tr><br />
<th>SCM</th><br />
<th>Supported versions</th><br />
<th>Comments</th><br />
</tr><br />
<tr><br />
<td>[http://git-scm.com Git]</td><br />
<td>>=1.5.4.2</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://subversion.apache.org Subversion]</td><br />
<td>1.3, 1.4, 1.5, 1.6 & 1.7</td><br />
<td>1.3 or higher required.<br/><br />
Doesn't support Ruby Bindings for Subversion.<br/><br />
Subversion 1.7.0 and 1.7.1 contains bugs [http://www.redmine.org/issues/9541 #9541]</td><br />
</tr><br />
<tr><br />
<td>[http://www.selenic.com/mercurial Mercurial]</td><br />
<td>>=1.6</td><br />
<td>Support bellow version 1.6 is droped as seen in [http://www.redmine.org/issues/9465 #9465].</td><br />
</tr><br />
<tr><br />
<td>[http://bazaar-vcs.org Bazaar]</td><br />
<td>>= 2.0.4</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://darcs.net Darcs]</td><br />
<td>>=1.0.7</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://www.nongnu.org/cvs CVS]</td><br />
<td>1.12.12</td><br />
<td>1.12 required.<br/><br />
Won't work with CVSNT.</td><br />
</tr><br />
</table><br />
<br />
<br />
More information can be read at [http://www.redmine.org/projects/redmine/wiki/RedmineRepositories Redmine Repositories Wiki].<br />
<br />
===ImageMagick===<br />
[http://www.imagemagick.org ImageMagick] is necessary to enable Gantt export to png image.<br />
<br />
To install {{pkg|imagemagick}} simply:<br />
# pacman -S imagemagick<br />
<br />
===Ruby OpenID Library===<br />
To enable [http://janrain.com/openid-enabled OpenID] support, is required a version >= 2 of the library.<br />
<br />
==Installation==<br />
<br />
===Build and Installation===<br />
Download the package {{AUR|redmine}} from the [[Arch User Repository|AUR]].<br />
<br />
{{Note|Detailed build instructions at [[Arch User Repository#Build the package]]. It's '''HIGHLY''' recommended to read all the [[Arch User Repository|AUR]] page to understand what are you doing. }}<br />
<br />
===Database Configuration===<br />
<br />
Now, we will need to create the database that the Redmine will use to store your data. For now on, the database and its user will be named {{ic|redmine}}. But this names can be changed to anything else.<br />
<br />
{{Note|The configuration for [[MariaDB]] and [[MySQL]] will be the same since both are binary compatible.}}<br />
<br />
====Database Creation====<br />
<br />
To create the database, the user and set privileges (MariaDB and MySQL >= 5.0.2):<br />
{{hc|# mysql -u root -p|<br />
CREATE DATABASE redmine CHARACTER SET UTF8;<br />
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';<br />
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';}}<br />
<br />
For versions of MariaDB and MySQL prior to 5.0.2:<br />
{{hc|# mysql -u root -p|<br />
CREATE DATABASE redmine CHARACTER SET UTF8;<br />
GRANT ALL PRIVILEGES ON redmine.* TO'redmine'@'localhost' IDENTIFIED BY 'my_password';}}<br />
<br />
For PostgreSQL:<br />
{{bc|1=CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity';<br />
CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;}}<br />
<br />
For SQLServer:<br />
<br />
Although the database, login and user can be created within SQL Server Management Studio with a few clicks, you can always use the command line with {{ic|SQLCMD}}:<br />
{{bc|1=USE [master]<br />
GO<br />
-- Very basic DB creation<br />
CREATE DATABASE [REDMINE]<br />
GO<br />
-- Creation of a login with SQL Server login/password authentication and no password expiration policy<br />
CREATE LOGIN [REDMINE] WITH PASSWORD=N'redminepassword', DEFAULT_DATABASE=[REDMINE], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF<br />
GO<br />
-- User creation using previously created login authentication<br />
USE [REDMINE]<br />
GO<br />
CREATE USER [REDMINE] FOR LOGIN [REDMINE]<br />
GO<br />
-- User permissions set via roles<br />
EXEC sp_addrolemember N'db_datareader', N'REDMINE'<br />
GO<br />
EXEC sp_addrolemember N'db_datawriter', N'REDMINE'<br />
GO}}<br />
<br />
{{Note|If you want to use additional environments, you must create separate databases for each one (for example: ''development'' and ''test'').}}<br />
<br />
====Database Access Configuration====<br />
<br />
Now you need to configure Redmine to access the database we just created. To do that you have to copy {{ic|/usr/share/webapps/redmine/config/database.yml.example}} to {{ic|database.yml}}:<br />
<br />
# cd /usr/share/webapps/redmine/config<br />
# cp database.yml.example database.yml<br />
<br />
And then edit this file in order to configure your database settings for "production" environment (you can configure for the "development" and "test" environments too, just change the appropriate sections).<br />
<br />
Example for MariaDB and MySQL database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: mysql2<br />
database: redmine<br />
host: localhost<br />
port: 3307 '''#If your server is not running on the standard port (3306), set it here, otherwise this line is unnecessary.'''<br />
username: redmine<br />
password: my_password}}<br />
<br />
{{Note|For ruby1.9 the "adapter" value must be set to {{ic|mysql2}}, and for ruby1.8 or jruby, it must be set to {{ic|mysql}}.}}<br />
<br />
Example for PostgreSQL database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: postgresql<br />
database: redmine<br />
host: localhost<br />
username: redmine<br />
password: my_password<br />
encoding: utf8<br />
schema_search_path: <database_schema> (default - public)}}<br />
<br />
Example for a SQL Server database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: sqlserver<br />
database: redmine<br />
host: localhost '''#Set not default host (localhost) here, otherwise this line is unnecessary.'''<br />
port: 1433 '''#Set not standard port (1433) here, otherwise this line is unnecessary.'''<br />
username: redmine<br />
password: my_password<br />
}}<br />
<br />
=== Ruby gems ===<br />
Redmine requires some [https://wiki.archlinux.org/index.php/Ruby#RubyGems RubyGems] to be installed and there are multiple ways of installing them (as listed on the referenced page).<br />
* prototype-rails<br />
* unicorn (an application-server)<br />
* mysql2 (high-performance Ruby bindings for MySQL)<br />
* coderay<br />
* erubis<br />
* fastercsv<br />
* rdoc<br />
* net-ldap<br />
* rack-openid<br />
<br />
Obviously, if you choose a different database-server, or want to use a different application-server you should replace ''mysql2'' and ''unicorn'' to your liking.<br />
<br />
====Adding Additional Gems (Optional)====<br />
If you need to load gems that are not required by Redmine core (eg. Puma, fcgi), create a file named {{ic|Gemfile.local}} at the root of your redmine directory. It will be loaded automatically when running {{ic|bundle install}}:<br />
<br />
{{hc|# nano Gemfile.local|<br />
gem 'puma'}}<br />
<br />
==== Check previously installed gems ====<br />
The Redmine devs included Bundler in Redmine, which can manage Gems just like pacman manages packages. Run the following command to assure that all Redmine dependencies are met:<br />
# bundle install --without development test<br />
This should output a list of gems Redmine needs.<br />
<br />
====Gems Installation====<br />
<br />
{{Note|If you prefer, you can install all the gems as pacman packages. You have only to search for the gem package and install them as usual. As of using Ruby gem is much simpler to manage and maintain up to date gems, this will be preferable and used as default bellow.}}<br />
<br />
Redmine uses Bundler to manage gems dependencies. So, you need to install Bundler first:<br />
# gem install bundler<br />
<br />
Then you can install all the gems required by Redmine using the following command:<br />
# cd /usr/share/webapps/redmine<br />
# bundle install<br />
<br />
To install without the ruby ''development'' and ''test'' environments use this instead of the last command:<br />
# bundle install --without development test<br />
<br />
{{Note|You can include/exclude environments using the above syntax.}}<br />
<br />
Although it is highly recommend to enjoy all the features of Redmine, if you really does not want to use {{Pkg|ImageMagick}}, you should skip the installation of the {{ic|rmagick}} gem using:<br />
<br />
# bundle install --without rmagick<br />
<br />
{{Note|Only the gems that are needed by the adapters you've specified in your database configuration file are actually installed (eg. if your {{ic|config/database.yml}} uses the ''mysql2'' adapter, then only the mysql2 gem will be installed). Don't forget to re-run {{ic|bundle install}} when you change or add adapters in this file.}}<br />
<br />
===Session Store Secret Generation===<br />
Now you must generate a random key that will be used by Rails to encode cookies that stores session data thus preventing their tampering:<br />
<br />
# rake generate_secret_token<br />
<br />
{{Note|For Redmine prior to 2.x this step is done by executing {{ic|# rake generate_session_store}}.}}<br />
<br />
{{Warning|Generating a new secret token invalidates all existing sessions after restart.}}<br />
<br />
===Database Structure Creation===<br />
With the database created and the access configured for Redmine, now it's time to create the database structure. This is done by running the following command under the application root directory:<br />
<br />
# cd /usr/share/webapps/redmine<br />
# RAILS_ENV=production rake db:migrate<br />
<br />
These command will create tables by running all migrations one by one then create the set of the permissions and the application administrator account, named admin.<br />
<br />
===Database Population with Default Data===<br />
Now you may want to insert the default configuration data in database, like basic types of task, task states, groups, etc. To do so execute the following:<br />
<br />
# RAILS_ENV=production rake redmine:load_default_data<br />
<br />
Redmine will prompt for the data set language that should be loaded; you can also define the REDMINE_LANG environment variable before running the command to a value which will be automatically and silently picked up by the task:<br />
<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake redmine:load_default_data<br />
<br />
{{Note|This step is not mandatory, but it certainly will save you a lot of work to start using Redmine. And for a first time it can be very instructive.}}<br />
<br />
===File System Permissions===<br />
The user account running the application '''must''' have write permission on the following subdirectories:<br />
<br />
'''files''': storage of attachments.<br />
'''log''': application log file production.log.<br />
'''tmp''' and '''tmp/pdf''': used to generate PDF documents among other things (create these ones if not present).<br />
<br />
Assuming you run the application with a the default Apache user {{ic|http}} account:<br />
<br />
# mkdir tmp tmp/pdf public/plugin_assets<br />
# chown -R http:http files log tmp public/plugin_assets<br />
# chmod -R 755 files log tmp tmp/pdf public/plugin_assets<br />
<br />
===Test the installation===<br />
To test your new installation using WEBrick web server run the following in the Redmine folder:<br />
<br />
# ruby script/rails server webrick -e production<br />
<br />
Once WEBrick has started, point your browser to '''http://localhost:3000/'''. You should now see the application welcome page. Use default administrator account to log in: '''''admin'''''/'''''admin'''''. You can go to Administration menu and choose Settings to modify most of the application settings.<br />
<br />
{{Warning|Webrick is not suitable for production use, please only use webrick for testing that the installation up to this point is functional. Use one of the many other guides in this wiki to setup redmine to use either Passenger (aka mod_rails), FCGI or a Rack server (Unicorn, Thin, Puma or hellip) to serve up your redmine.}}<br />
<br />
===Configure the production server===<br />
For Apache and Nginx, it is recommended to use Phusion Passenger. [http://www.modrails.com/ Passenger], also known as {{ic|mod_rails}}, is a module available for [[Nginx]] and [[Apache]].<br />
<br />
Start by installing the 'passenger' gem:<br />
# gem install passenger<br />
<br />
Now you have to look at your passenger gem installation directory to continue. If you don't known where it is, type:<br />
# gem env<br />
<br />
And look at the {{ic|GEM PATHS}} to find where the gems are installed. If you followed this guide and installed [[RVM]], you can have more than one path, look at the one you are using.<br />
<br />
For this guide so far, the gem path is {{ic|/usr/local/rvm/gems/ruby-2.0.0-p247@global}}.<br />
# cd /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/passenger-4.0.23<br />
<br />
If you are aiming to use [[Apache]], run:<br />
# passenger-install-apache2-module<br />
<br />
In case a rails application is deployed with a sub-URI, like http://example.com/yourapplication, some additional configuration is required, see [http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri the modrails documentation]<br />
<br />
For [[Nginx]]:<br />
# passenger-install-nginx-module<br />
<br />
And finally, the installer will provide you with further information regarding the installation (such as installing additional libraries). So, to setup your server, simply follow the output from the passenger installer.<br />
<br />
==Updating==<br />
<br />
Backup the files used in Redmine:<br />
# tar czvf ~/redmine_files.tar.gz -C /usr/share/webapps/redmine/ files<br />
<br />
Backup the plugins installed in Redmine:<br />
# tar czvf ~/redmine_plugins.tar.gz -C /usr/share/webapps/redmine/ plugins<br />
<br />
Backup the database:<br />
# mysqldump -u root -p <redmine_database> | gzip > ~/redmine_db.sql.gz<br />
<br />
Update the package as normal (through [[AUR]]):<br />
# wget https://aur.archlinux.org/packages/re/redmine/redmine.tar.gz<br />
# tar -zxpvf redmine.tar.gz<br />
# cd redmine<br />
<br />
Inspect the downloaded files, mainly the [[PKGBUILD]], and then build:<br />
# makepkg -s<br />
# pacman -U redmine-2.3.0-2-any.pkg.tar.gz<br />
<br />
{{Note|To simplify all this [[AUR]] install and update process, you can always use the [[AUR Helpers]], although this isn't a supported way.}}<br />
<br />
Update the gems requirements:<br />
# bundle update<br />
<br />
For a clean gems environment, you may want to remove all the gems and reinstall them. To go through this, do:<br />
# for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done<br />
<br />
{{Warning|The command above will delete ALL the gems in your system or user, depending of what type of Ruby installation you did in the prerequisites step. You must take care or you can stop working another applications that rely on Ruby gems.}}<br />
<br />
If you did the last step and removed all the gems, now you will need to reinstall them all:<br />
# gem install bundler<br />
# bundle install --without development test<br />
<br />
{{Note|If you removed ALL the gems as above, and used a server that uses a gem, remember to reinstall the server gem: passenger (for Apache and Nginx), Mongrel or Unicorn. To do this, just follow the steps in the installation tutorial above.}}<br />
<br />
Copy the saved files:<br />
# tar xzvf ~/redmine_files.tar.gz -C /usr/share/webapps/redmine/<br />
<br />
Copy the installed plugins<br />
# tar xzvf ~/redmine_plugins.tar.gz -C /usr/share/webapps/redmine/<br />
<br />
Regenerate the secret token:<br />
# cd /usr/share/webapps/redmine<br />
# rake generate_secret_token<br />
<br />
Check for any themes that you may have installed in the {{ic|public/themes}} directory. You can copy them over but checking for updated version is ideal.<br />
<br />
{{Warning|Do NOT overwrite config/settings.yml with the old one.}}<br />
<br />
Update the database. This step is the one that could change the contents of your database. Go to your new redmine directory, then migrate your database:<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake db:migrate<br />
<br />
If you have installed any plugins, you should also run their database migrations:<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake redmine:plugins:migrate<br />
<br />
Now, it's time to clean the cache and the existing sessions:<br />
# rake tmp:cache:clear<br />
# rake tmp:sessions:clear<br />
<br />
Restart the application server (e.g. puma, thin, passenger, etc). And finally go to "Admin -> Roles & permissions" to check/set permissions for the new features, if any.<br />
<br />
'''Example of an after-update script:'''<br />
#!/usr/bin/bash<br />
export RAILS_ENV=production<br />
grep -E "^gem 'thin'" Gemfile || echo "gem 'thin'" >> Gemfile<br />
bundle update && bundle exec rake generate_secret_token db:migrate redmine:plugins:migrate tmp:cache:clear tmp:sessions:clear<br />
<br />
'''Example of systemd unit fo starting redmine as redmine user and group'''<br />
[Unit]<br />
Description=redmine<br />
After=syslog.target network.target<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
EnvironmentFile=/usr/share/webapps/redmine/.env<br />
User=redmine<br />
Group=redmine<br />
WorkingDirectory=/usr/share/webapps/redmine<br />
ExecStartPre=/usr/bin/mkdir -p -m 0770 /run/redmine<br />
ExecStartPre=/usr/bin/chown redmine.http /run/redmine<br />
ExecStart=/etc/init.d/redmine start<br />
ExecReload=/etc/init.d/redmine restart<br />
ExecStop=/etc/init.d/redmine stop<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
together with that '''/etc/init.d/redmine''' file<br />
#!/bin/sh<br />
. ~/.env<br />
bundle exec thin -s 2 -S /run/redmine/redmine.socket $1<br />
<br />
and '''~/.env''' file that contains<br />
PATH=$HOME/.gem/ruby/2.1.0/bin:/usr/bin<br />
RAILS_ENV=production<br />
<br />
==Troubleshooting==<br />
===RMagick gem without support for High Dynamic Range in ImageMagick===<br />
As of ImageMagick 6.8.6.8-1, it is built with HDRI (High Dynamic Range Image) support, and this breaks the RMagick gem as seen in [https://bugs.archlinux.org/task/36518 Arch bug #36518].<br />
<br />
The github [https://github.com/rmagick/rmagick rmagick] is already patched, but the mantainer did not packed it for rubygems yet.<br />
<br />
To install this patched version download the git repository:<br />
# git clone https://github.com/rmagick/rmagick.git<br />
<br />
Then, you need to build the gem:<br />
# cd rmagick<br />
# gem build rmagick.gemspec<br />
<br />
And finally install it:<br />
# gem install rmagick-2.13.2.gem<br />
<br />
{{Note|It will show some complains like {{ic|unable to convert "\xE0" from ASCII-8BIT to UTF-8 for ext/RMagick/RMagick2.so, skipping}}, but you can safelly ignore it.}}<br />
<br />
===Runtime error complaining that RMagick was configured with older version===<br />
<br />
If you get the following runtime error after upgrading ImageMagick {{ic|This installation of RMagick was configured with ImageMagick 6.8.7 but ImageMagick 6.8.8-1 is in use.}} then you only need to reinstall (or rebuild as shown above if is the case).<br />
<br />
{{Note|This is due to that when you install the RMagick gem it compiles some native extensions and they may need to be rebuilt after some ImageMagick upgrades.}}<br />
<br />
===Error when installing gems: Cannot load such file -- mysql2/mysql2===<br />
<br />
If you see an error like {{ic| cannot load such file -- mysql2/mysql2}}, you are having a problem with the installation of the database gem. Probably a misconfiguration in the [[Redmine#Database Access Configuration|Database Access Configuration]] step.<br />
In this case you should verify the {{ic|database.yml}} file.<br />
<br />
If no success, you can manually install the database gem by:<br />
<br />
# gem install mysql2<br />
<br />
In last case, as suggested by [[User:Bobdog|Bobdog]], you can try to comment the line of the database gem and add a new one as bellow:<br />
<br />
{{hc|<path-to-mysql2-gem-directory>/lib/mysql2/mysql2.rb|<br />
<br />
# require 'mysql2/mysql2'<br />
require '<path-to-mysql2-gem-directory>/lib/mysql2/mysql2.so'}}<br />
<br />
=== Apache 2.4 Updating ===<br />
<br />
When updating to Apache 2.4 will be necessary to remove and install all your gems to make sure all of them that need to build native extensions will be rebuilt against the new Apache server.<br />
<br />
So, for a clean gems environment, remove all the gems:<br />
<br />
# for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done<br />
<br />
To reinstall the gems:<br />
<br />
# cd /usr/share/webapps/redmine<br />
# gem install bundler<br />
# bundle install --without development test<br />
<br />
Remember to reinstall the RMagick gem as describe above in [[Redmine#RMagick gem without support for High Dynamic Range in ImageMagick|RMagick gem without support for High Dynamic Range in ImageMagick]].<br />
<br />
And if you are using Passenger to serve your apps through Apache you will need to reinstall it as described above in [[Redmine#Configure the production server|Configure the production server]].<br />
<br />
=== Checkout SVN Source ===<br />
Get the Redmine source ([http://www.redmine.org/projects/redmine/wiki/Download Download instructions]). Here is method of installing Redmine directly from subversion in /srv/http/redmine/<br />
# useradd -d /srv/http/redmine -s /bin/false redmine<br />
# mkdir -p /srv/http/redmine<br />
# svn checkout http://svn.redmine.org/redmine/branches/2.1-stable /srv/http/redmine<br />
# chown -R redmine: /srv/http/redmine<br />
<br />
== See Also ==<br />
* [http://www.redmine.org/projects/redmine/wiki/RedmineInstall Official install guide from Redmine Wiki]</div>Deemytchhttps://wiki.archlinux.org/index.php?title=Redmine&diff=304333Redmine2014-03-13T18:31:05Z<p>Deemytch: /* Updating */</p>
<hr />
<div>[[Category:Version Control System]]<br />
{{Related articles start}}<br />
{{Related|Ruby on Rails}}<br />
{{Related|RVM}}<br />
{{Related|MariaDB}}<br />
{{Related|Apache}}<br />
{{Related|Nginx}}<br />
{{Related articles end}}<br />
Redmine is a free and open source, web-based project management and bug-tracking tool. It includes a calendar and Gantt charts to aid visual representation of projects and their deadlines. It handles multiple projects. Redmine provides integrated project management features, issue tracking, and support for various version control systems.<br />
<br />
Redmine is written using the Ruby on Rails framework. It is cross-platform and cross-database.<br />
<br />
==Prerequisites==<br />
<br />
This document will guide you through the installation process of the Redmine and all of its prerequisites, including the optional ones. If desired, however, you may install Redmine and it's prerequisites separately, simply refering to the relevant sections below.<br />
<br />
Although this guide will go through all the installation process, this isn't a one way path. So Redmine can use different versions of the other softwares (mariaDB, mySQL, postgreSQL, etc, as your database).<br />
<br />
{{Note|At this time is important to note that this guide is an default suggestion, feel free to use other of the prerequisites mentioned on this wiki.}}<br />
<br />
===Ruby===<br />
<br />
<table border="1"><br />
<tr><br />
<th>Redmine version</th><br />
<th>Supported Ruby versions</th><br />
<th>Rails version used</th><br />
<th>Supported RubyGems versions</th><br />
</tr><br />
<tr><br />
<td rowspan="2">2.5.0</td><br />
<td>ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0</td><br />
<td rowspan="2">Rails 3.2</td><br />
<td rowspan="2">RubyGems <= 1.8</td><br />
</tr><br />
<tr><br />
<td>jruby 1.7.6</td><br />
</tr><br />
</table><br />
<br />
There are two simple ways to install Ruby: installing the {{Pkg|ruby}} package as described in [[ruby]] or installing RVM as described in [[RVM]] '''(recommended)'''.<br />
<br />
{{Note|Ruby MRI 1.8.7 support has reached its EOL and its use is discouraged. See [http://www.redmine.org/boards/1/topics/38518 Important: Ruby 1.8.7 out of support] and [http://www.redmine.org/issues/14371 #14371] for additional information.}}<br />
<br />
{{Note|MRI 1.9.3p327 contains a [http://bugs.ruby-lang.org/issues/7374 bug] breaking plugin loading under Windows which 1.9.3p194 or 1.9.3p392 haven't.}}<br />
<br />
{{Note|Ruby 2.1 on Rails 3.2 has a bug. See upstream bug track [http://www.redmine.org/issues/16194 #16194].}}<br />
<br />
{{Warning|If you use RVM, pay attention to the single and multiple user differences! If you are not creating a hosting service, the multiple user (available for all users on the machine) should be the choice for simpler debuging.}}<br />
<br />
===Database===<br />
<br />
Redmine [http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Database supports many different databases].<br />
<br />
====MariaDB 5.0 or higher (recommended)====<br />
MariaDB is a drop-in replacement for MySQL, in fact it was a fork of it and maintain binarie compatibility.<br />
<br />
To install {{Pkg|mariadb}} simply refer to [[MariaDB]].<br />
<br />
====MySQL 5.0 or higher====<br />
To install {{Pkg|mysql}} simply refer to [[MySQL]].<br />
<br />
====PostgreSQL 8.2 or higher====<br />
To install {{Pkg|postgresql}} simply refer to [[Postgresql]].<br />
<br />
Make sure your database datestyle is set to ISO (Postgresql default setting). You can set it using:<br />
<br />
{{bc|1=ALTER DATABASE "redmine_db" SET datestyle="ISO,MDY";}}<br />
<br />
{{Note|Some bugs in PostgreSQL 8.4.0 and 8.4.1 affect Redmine behavior ([[http://www.redmine.org/issues/4259 #4259]], [[http://www.redmine.org/issues/4314 #4314]]), they are fixed in PostgreSQL 8.4.2}}<br />
<br />
====Microsoft SQL Server====<br />
{{Warning|Support is temporarily broken (with ruby 2.0.0 under Windows because of [https://github.com/rails-sqlserver/tiny_tds/issues/110 database adapter gem incompatibility]).}}<br />
<br />
====SQLite 3====<br />
Not supported for multi-user production use. So, it will not be detailed how to install and configure it for use with Redmine. See [http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Supported-database-back-ends upstream document] for more info.<br />
<br />
{{Warning|Support is temporarily broken (with ruby 2.0.0 under Windows because of database adapter gems incompatibilities).}}<br />
<br />
===Web Server===<br />
<br />
====Apache====<br />
To install {{Pkg|apache}} simply refer to [[Apache]].<br />
<br />
====Mongrel====<br />
To install Mongrel server (ruby gem) simply refer to [[Ruby_on_Rails#Mongrel]].<br />
<br />
==== Unicorn ====<br />
To install Unicorn server (ruby gem) simply refer to [[Ruby_on_Rails#Unicorn]].<br />
<br />
====Nginx====<br />
To install {{Pkg|nginx}} simply refer to [[Nginx]].<br />
<br />
====Apache Tomcat====<br />
To install {{Pkg|tomcat6}} or {{Pkg|tomcat7}} simply refer to [[Tomcat]].<br />
<br />
==Optional Prerequisites==<br />
<br />
===SCM (Source Code Management)===<br />
<br />
<table border="1"><br />
<tr><br />
<th>SCM</th><br />
<th>Supported versions</th><br />
<th>Comments</th><br />
</tr><br />
<tr><br />
<td>[http://git-scm.com Git]</td><br />
<td>>=1.5.4.2</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://subversion.apache.org Subversion]</td><br />
<td>1.3, 1.4, 1.5, 1.6 & 1.7</td><br />
<td>1.3 or higher required.<br/><br />
Doesn't support Ruby Bindings for Subversion.<br/><br />
Subversion 1.7.0 and 1.7.1 contains bugs [http://www.redmine.org/issues/9541 #9541]</td><br />
</tr><br />
<tr><br />
<td>[http://www.selenic.com/mercurial Mercurial]</td><br />
<td>>=1.6</td><br />
<td>Support bellow version 1.6 is droped as seen in [http://www.redmine.org/issues/9465 #9465].</td><br />
</tr><br />
<tr><br />
<td>[http://bazaar-vcs.org Bazaar]</td><br />
<td>>= 2.0.4</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://darcs.net Darcs]</td><br />
<td>>=1.0.7</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td>[http://www.nongnu.org/cvs CVS]</td><br />
<td>1.12.12</td><br />
<td>1.12 required.<br/><br />
Won't work with CVSNT.</td><br />
</tr><br />
</table><br />
<br />
<br />
More information can be read at [http://www.redmine.org/projects/redmine/wiki/RedmineRepositories Redmine Repositories Wiki].<br />
<br />
===ImageMagick===<br />
[http://www.imagemagick.org ImageMagick] is necessary to enable Gantt export to png image.<br />
<br />
To install {{pkg|imagemagick}} simply:<br />
# pacman -S imagemagick<br />
<br />
===Ruby OpenID Library===<br />
To enable [http://janrain.com/openid-enabled OpenID] support, is required a version >= 2 of the library.<br />
<br />
==Installation==<br />
<br />
===Build and Installation===<br />
Download the package {{AUR|redmine}} from the [[Arch User Repository|AUR]].<br />
<br />
{{Note|Detailed build instructions at [[Arch User Repository#Build the package]]. It's '''HIGHLY''' recommended to read all the [[Arch User Repository|AUR]] page to understand what are you doing. }}<br />
<br />
===Database Configuration===<br />
<br />
Now, we will need to create the database that the Redmine will use to store your data. For now on, the database and its user will be named {{ic|redmine}}. But this names can be changed to anything else.<br />
<br />
{{Note|The configuration for [[MariaDB]] and [[MySQL]] will be the same since both are binary compatible.}}<br />
<br />
====Database Creation====<br />
<br />
To create the database, the user and set privileges (MariaDB and MySQL >= 5.0.2):<br />
{{hc|# mysql -u root -p|<br />
CREATE DATABASE redmine CHARACTER SET UTF8;<br />
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';<br />
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';}}<br />
<br />
For versions of MariaDB and MySQL prior to 5.0.2:<br />
{{hc|# mysql -u root -p|<br />
CREATE DATABASE redmine CHARACTER SET UTF8;<br />
GRANT ALL PRIVILEGES ON redmine.* TO'redmine'@'localhost' IDENTIFIED BY 'my_password';}}<br />
<br />
For PostgreSQL:<br />
{{bc|1=CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity';<br />
CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;}}<br />
<br />
For SQLServer:<br />
<br />
Although the database, login and user can be created within SQL Server Management Studio with a few clicks, you can always use the command line with {{ic|SQLCMD}}:<br />
{{bc|1=USE [master]<br />
GO<br />
-- Very basic DB creation<br />
CREATE DATABASE [REDMINE]<br />
GO<br />
-- Creation of a login with SQL Server login/password authentication and no password expiration policy<br />
CREATE LOGIN [REDMINE] WITH PASSWORD=N'redminepassword', DEFAULT_DATABASE=[REDMINE], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF<br />
GO<br />
-- User creation using previously created login authentication<br />
USE [REDMINE]<br />
GO<br />
CREATE USER [REDMINE] FOR LOGIN [REDMINE]<br />
GO<br />
-- User permissions set via roles<br />
EXEC sp_addrolemember N'db_datareader', N'REDMINE'<br />
GO<br />
EXEC sp_addrolemember N'db_datawriter', N'REDMINE'<br />
GO}}<br />
<br />
{{Note|If you want to use additional environments, you must create separate databases for each one (for example: ''development'' and ''test'').}}<br />
<br />
====Database Access Configuration====<br />
<br />
Now you need to configure Redmine to access the database we just created. To do that you have to copy {{ic|/usr/share/webapps/redmine/config/database.yml.example}} to {{ic|database.yml}}:<br />
<br />
# cd /usr/share/webapps/redmine/config<br />
# cp database.yml.example database.yml<br />
<br />
And then edit this file in order to configure your database settings for "production" environment (you can configure for the "development" and "test" environments too, just change the appropriate sections).<br />
<br />
Example for MariaDB and MySQL database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: mysql2<br />
database: redmine<br />
host: localhost<br />
port: 3307 '''#If your server is not running on the standard port (3306), set it here, otherwise this line is unnecessary.'''<br />
username: redmine<br />
password: my_password}}<br />
<br />
{{Note|For ruby1.9 the "adapter" value must be set to {{ic|mysql2}}, and for ruby1.8 or jruby, it must be set to {{ic|mysql}}.}}<br />
<br />
Example for PostgreSQL database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: postgresql<br />
database: redmine<br />
host: localhost<br />
username: redmine<br />
password: my_password<br />
encoding: utf8<br />
schema_search_path: <database_schema> (default - public)}}<br />
<br />
Example for a SQL Server database:<br />
{{hc|nano database.yml|<br />
production:<br />
adapter: sqlserver<br />
database: redmine<br />
host: localhost '''#Set not default host (localhost) here, otherwise this line is unnecessary.'''<br />
port: 1433 '''#Set not standard port (1433) here, otherwise this line is unnecessary.'''<br />
username: redmine<br />
password: my_password<br />
}}<br />
<br />
=== Ruby gems ===<br />
Redmine requires some [https://wiki.archlinux.org/index.php/Ruby#RubyGems RubyGems] to be installed and there are multiple ways of installing them (as listed on the referenced page).<br />
* prototype-rails<br />
* unicorn (an application-server)<br />
* mysql2 (high-performance Ruby bindings for MySQL)<br />
* coderay<br />
* erubis<br />
* fastercsv<br />
* rdoc<br />
* net-ldap<br />
* rack-openid<br />
<br />
Obviously, if you choose a different database-server, or want to use a different application-server you should replace ''mysql2'' and ''unicorn'' to your liking.<br />
<br />
====Adding Additional Gems (Optional)====<br />
If you need to load gems that are not required by Redmine core (eg. Puma, fcgi), create a file named {{ic|Gemfile.local}} at the root of your redmine directory. It will be loaded automatically when running {{ic|bundle install}}:<br />
<br />
{{hc|# nano Gemfile.local|<br />
gem 'puma'}}<br />
<br />
==== Check previously installed gems ====<br />
The Redmine devs included Bundler in Redmine, which can manage Gems just like pacman manages packages. Run the following command to assure that all Redmine dependencies are met:<br />
# bundle install --without development test<br />
This should output a list of gems Redmine needs.<br />
<br />
====Gems Installation====<br />
<br />
{{Note|If you prefer, you can install all the gems as pacman packages. You have only to search for the gem package and install them as usual. As of using Ruby gem is much simpler to manage and maintain up to date gems, this will be preferable and used as default bellow.}}<br />
<br />
Redmine uses Bundler to manage gems dependencies. So, you need to install Bundler first:<br />
# gem install bundler<br />
<br />
Then you can install all the gems required by Redmine using the following command:<br />
# cd /usr/share/webapps/redmine<br />
# bundle install<br />
<br />
To install without the ruby ''development'' and ''test'' environments use this instead of the last command:<br />
# bundle install --without development test<br />
<br />
{{Note|You can include/exclude environments using the above syntax.}}<br />
<br />
Although it is highly recommend to enjoy all the features of Redmine, if you really does not want to use {{Pkg|ImageMagick}}, you should skip the installation of the {{ic|rmagick}} gem using:<br />
<br />
# bundle install --without rmagick<br />
<br />
{{Note|Only the gems that are needed by the adapters you've specified in your database configuration file are actually installed (eg. if your {{ic|config/database.yml}} uses the ''mysql2'' adapter, then only the mysql2 gem will be installed). Don't forget to re-run {{ic|bundle install}} when you change or add adapters in this file.}}<br />
<br />
===Session Store Secret Generation===<br />
Now you must generate a random key that will be used by Rails to encode cookies that stores session data thus preventing their tampering:<br />
<br />
# rake generate_secret_token<br />
<br />
{{Note|For Redmine prior to 2.x this step is done by executing {{ic|# rake generate_session_store}}.}}<br />
<br />
{{Warning|Generating a new secret token invalidates all existing sessions after restart.}}<br />
<br />
===Database Structure Creation===<br />
With the database created and the access configured for Redmine, now it's time to create the database structure. This is done by running the following command under the application root directory:<br />
<br />
# cd /usr/share/webapps/redmine<br />
# RAILS_ENV=production rake db:migrate<br />
<br />
These command will create tables by running all migrations one by one then create the set of the permissions and the application administrator account, named admin.<br />
<br />
===Database Population with Default Data===<br />
Now you may want to insert the default configuration data in database, like basic types of task, task states, groups, etc. To do so execute the following:<br />
<br />
# RAILS_ENV=production rake redmine:load_default_data<br />
<br />
Redmine will prompt for the data set language that should be loaded; you can also define the REDMINE_LANG environment variable before running the command to a value which will be automatically and silently picked up by the task:<br />
<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake redmine:load_default_data<br />
<br />
{{Note|This step is not mandatory, but it certainly will save you a lot of work to start using Redmine. And for a first time it can be very instructive.}}<br />
<br />
===File System Permissions===<br />
The user account running the application '''must''' have write permission on the following subdirectories:<br />
<br />
'''files''': storage of attachments.<br />
'''log''': application log file production.log.<br />
'''tmp''' and '''tmp/pdf''': used to generate PDF documents among other things (create these ones if not present).<br />
<br />
Assuming you run the application with a the default Apache user {{ic|http}} account:<br />
<br />
# mkdir tmp tmp/pdf public/plugin_assets<br />
# chown -R http:http files log tmp public/plugin_assets<br />
# chmod -R 755 files log tmp tmp/pdf public/plugin_assets<br />
<br />
===Test the installation===<br />
To test your new installation using WEBrick web server run the following in the Redmine folder:<br />
<br />
# ruby script/rails server webrick -e production<br />
<br />
Once WEBrick has started, point your browser to '''http://localhost:3000/'''. You should now see the application welcome page. Use default administrator account to log in: '''''admin'''''/'''''admin'''''. You can go to Administration menu and choose Settings to modify most of the application settings.<br />
<br />
{{Warning|Webrick is not suitable for production use, please only use webrick for testing that the installation up to this point is functional. Use one of the many other guides in this wiki to setup redmine to use either Passenger (aka mod_rails), FCGI or a Rack server (Unicorn, Thin, Puma or hellip) to serve up your redmine.}}<br />
<br />
===Configure the production server===<br />
For Apache and Nginx, it is recommended to use Phusion Passenger. [http://www.modrails.com/ Passenger], also known as {{ic|mod_rails}}, is a module available for [[Nginx]] and [[Apache]].<br />
<br />
Start by installing the 'passenger' gem:<br />
# gem install passenger<br />
<br />
Now you have to look at your passenger gem installation directory to continue. If you don't known where it is, type:<br />
# gem env<br />
<br />
And look at the {{ic|GEM PATHS}} to find where the gems are installed. If you followed this guide and installed [[RVM]], you can have more than one path, look at the one you are using.<br />
<br />
For this guide so far, the gem path is {{ic|/usr/local/rvm/gems/ruby-2.0.0-p247@global}}.<br />
# cd /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/passenger-4.0.23<br />
<br />
If you are aiming to use [[Apache]], run:<br />
# passenger-install-apache2-module<br />
<br />
In case a rails application is deployed with a sub-URI, like http://example.com/yourapplication, some additional configuration is required, see [http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri the modrails documentation]<br />
<br />
For [[Nginx]]:<br />
# passenger-install-nginx-module<br />
<br />
And finally, the installer will provide you with further information regarding the installation (such as installing additional libraries). So, to setup your server, simply follow the output from the passenger installer.<br />
<br />
==Updating==<br />
<br />
Backup the files used in Redmine:<br />
# tar czvf ~/redmine_files.tar.gz -C /usr/share/webapps/redmine/ files<br />
<br />
Backup the plugins installed in Redmine:<br />
# tar czvf ~/redmine_plugins.tar.gz -C /usr/share/webapps/redmine/ plugins<br />
<br />
Backup the database:<br />
# mysqldump -u root -p <redmine_database> | gzip > ~/redmine_db.sql.gz<br />
<br />
Update the package as normal (through [[AUR]]):<br />
# wget https://aur.archlinux.org/packages/re/redmine/redmine.tar.gz<br />
# tar -zxpvf redmine.tar.gz<br />
# cd redmine<br />
<br />
Inspect the downloaded files, mainly the [[PKGBUILD]], and then build:<br />
# makepkg -s<br />
# pacman -U redmine-2.3.0-2-any.pkg.tar.gz<br />
<br />
{{Note|To simplify all this [[AUR]] install and update process, you can always use the [[AUR Helpers]], although this isn't a supported way.}}<br />
<br />
Update the gems requirements:<br />
# bundle update<br />
<br />
For a clean gems environment, you may want to remove all the gems and reinstall them. To go through this, do:<br />
# for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done<br />
<br />
{{Warning|The command above will delete ALL the gems in your system or user, depending of what type of Ruby installation you did in the prerequisites step. You must take care or you can stop working another applications that rely on Ruby gems.}}<br />
<br />
If you did the last step and removed all the gems, now you will need to reinstall them all:<br />
# gem install bundler<br />
# bundle install --without development test<br />
<br />
{{Note|If you removed ALL the gems as above, and used a server that uses a gem, remember to reinstall the server gem: passenger (for Apache and Nginx), Mongrel or Unicorn. To do this, just follow the steps in the installation tutorial above.}}<br />
<br />
Copy the saved files:<br />
# tar xzvf ~/redmine_files.tar.gz -C /usr/share/webapps/redmine/<br />
<br />
Copy the installed plugins<br />
# tar xzvf ~/redmine_plugins.tar.gz -C /usr/share/webapps/redmine/<br />
<br />
Regenerate the secret token:<br />
# cd /usr/share/webapps/redmine<br />
# rake generate_secret_token<br />
<br />
Check for any themes that you may have installed in the {{ic|public/themes}} directory. You can copy them over but checking for updated version is ideal.<br />
<br />
{{Warning|Do NOT overwrite config/settings.yml with the old one.}}<br />
<br />
Update the database. This step is the one that could change the contents of your database. Go to your new redmine directory, then migrate your database:<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake db:migrate<br />
<br />
If you have installed any plugins, you should also run their database migrations:<br />
# RAILS_ENV=production REDMINE_LANG=pt-BR rake redmine:plugins:migrate<br />
<br />
Now, it's time to clean the cache and the existing sessions:<br />
# rake tmp:cache:clear<br />
# rake tmp:sessions:clear<br />
<br />
Restart the application server (e.g. puma, thin, passenger, etc). And finally go to "Admin -> Roles & permissions" to check/set permissions for the new features, if any.<br />
<br />
'''example of an after-update script:'''<br />
#!/usr/bin/bash<br />
export RAILS_ENV=production<br />
grep -E "^gem 'thin'" Gemfile || echo "gem 'thin'" >> Gemfile<br />
bundle update && bundle exec rake generate_secret_token db:migrate redmine:plugins:migrate tmp:cache:clear tmp:sessions:clear<br />
<br />
==Troubleshooting==<br />
===RMagick gem without support for High Dynamic Range in ImageMagick===<br />
As of ImageMagick 6.8.6.8-1, it is built with HDRI (High Dynamic Range Image) support, and this breaks the RMagick gem as seen in [https://bugs.archlinux.org/task/36518 Arch bug #36518].<br />
<br />
The github [https://github.com/rmagick/rmagick rmagick] is already patched, but the mantainer did not packed it for rubygems yet.<br />
<br />
To install this patched version download the git repository:<br />
# git clone https://github.com/rmagick/rmagick.git<br />
<br />
Then, you need to build the gem:<br />
# cd rmagick<br />
# gem build rmagick.gemspec<br />
<br />
And finally install it:<br />
# gem install rmagick-2.13.2.gem<br />
<br />
{{Note|It will show some complains like {{ic|unable to convert "\xE0" from ASCII-8BIT to UTF-8 for ext/RMagick/RMagick2.so, skipping}}, but you can safelly ignore it.}}<br />
<br />
===Runtime error complaining that RMagick was configured with older version===<br />
<br />
If you get the following runtime error after upgrading ImageMagick {{ic|This installation of RMagick was configured with ImageMagick 6.8.7 but ImageMagick 6.8.8-1 is in use.}} then you only need to reinstall (or rebuild as shown above if is the case).<br />
<br />
{{Note|This is due to that when you install the RMagick gem it compiles some native extensions and they may need to be rebuilt after some ImageMagick upgrades.}}<br />
<br />
===Error when installing gems: Cannot load such file -- mysql2/mysql2===<br />
<br />
If you see an error like {{ic| cannot load such file -- mysql2/mysql2}}, you are having a problem with the installation of the database gem. Probably a misconfiguration in the [[Redmine#Database Access Configuration|Database Access Configuration]] step.<br />
In this case you should verify the {{ic|database.yml}} file.<br />
<br />
If no success, you can manually install the database gem by:<br />
<br />
# gem install mysql2<br />
<br />
In last case, as suggested by [[User:Bobdog|Bobdog]], you can try to comment the line of the database gem and add a new one as bellow:<br />
<br />
{{hc|<path-to-mysql2-gem-directory>/lib/mysql2/mysql2.rb|<br />
<br />
# require 'mysql2/mysql2'<br />
require '<path-to-mysql2-gem-directory>/lib/mysql2/mysql2.so'}}<br />
<br />
=== Apache 2.4 Updating ===<br />
<br />
When updating to Apache 2.4 will be necessary to remove and install all your gems to make sure all of them that need to build native extensions will be rebuilt against the new Apache server.<br />
<br />
So, for a clean gems environment, remove all the gems:<br />
<br />
# for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done<br />
<br />
To reinstall the gems:<br />
<br />
# cd /usr/share/webapps/redmine<br />
# gem install bundler<br />
# bundle install --without development test<br />
<br />
Remember to reinstall the RMagick gem as describe above in [[Redmine#RMagick gem without support for High Dynamic Range in ImageMagick|RMagick gem without support for High Dynamic Range in ImageMagick]].<br />
<br />
And if you are using Passenger to serve your apps through Apache you will need to reinstall it as described above in [[Redmine#Configure the production server|Configure the production server]].<br />
<br />
=== Checkout SVN Source ===<br />
Get the Redmine source ([http://www.redmine.org/projects/redmine/wiki/Download Download instructions]). Here is method of installing Redmine directly from subversion in /srv/http/redmine/<br />
# useradd -d /srv/http/redmine -s /bin/false redmine<br />
# mkdir -p /srv/http/redmine<br />
# svn checkout http://svn.redmine.org/redmine/branches/2.1-stable /srv/http/redmine<br />
# chown -R redmine: /srv/http/redmine<br />
<br />
== See Also ==<br />
* [http://www.redmine.org/projects/redmine/wiki/RedmineInstall Official install guide from Redmine Wiki]</div>Deemytchhttps://wiki.archlinux.org/index.php?title=Amavis&diff=287968Amavis2013-12-14T12:58:11Z<p>Deemytch: /* Install & Setup */</p>
<hr />
<div>[[Category:Mail Server]]<br />
{{Stub}}<br />
Amavis gives you an interface between mail servers (MTAs such as Postfix or DoveCot) and mail filters (ClamAV, SpamAssassin). In many cases it is more efficient than running separate daemons like spamd.<br />
<br />
==Install & Setup==<br />
<br />
Build {{AUR|amavisd-new}} from the AUR and install it with pacman. You'd be wise to also install optdepends such as {{Pkg|p7zip}} and {{Pkg|unrar}} so your filters can actually see inside compressed files.<br />
<br />
sudo pacman -U amavisd-new-*-any.pkg.tar.xz<br />
sudo pacman -Syu p7zip unrar<br />
<br />
or, with yaourt<br />
<br />
yaourt -Syu amavisd-new p7zip unrar<br />
<br />
If your hostname is not a FQDN, you must set $myhostname in /etc/amavisd/amavisd.conf. You probably want to set $mydomain too. After that, you probably want to start it like this:<br />
<br />
sudo systemctl enable amavisd<br />
sudo systemctl start amavisd<br />
<br />
Some ways to check for errors:<br />
<br />
systemctl status amavisd<br />
journalctl -xbo short -u amavisd<br />
<br />
==Postfix==<br />
<br />
digest of the excellent [http://www.ijs.si/software/amavisd/README.postfix.html upstream README]<br />
<br />
==SpamAssassin==<br />
<br />
todo<br />
<br />
==ClamAV==<br />
<br />
todo</div>Deemytchhttps://wiki.archlinux.org/index.php?title=Lightweight_Applications_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=262490Lightweight Applications (Русский)2013-06-12T08:24:52Z<p>Deemytch: /* Почтовый клиент */</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Программное обеспечение (Русский)]]<br />
[[cs:Lightweight Applications]]<br />
[[en:Lightweight Applications]]<br />
[[es:Lightweight Applications]]<br />
[[it:Lightweight Applications]]<br />
[[sv:Lightweight Applications]]<br />
[[zh-cn:Lightweight Applications]]<br />
== Пояснения == <br />
<br />
Довольно часто люди стремятся найти под Арч программы, которые соответствовали бы философии дистрибутива - легковесные, быстрые и не перегруженные лишними функциями. Здесь представлен список программ, которые могли бы их заинтересовать. Список составлен на основе [https://bbs.archlinux.org/viewtopic.php?pid=448593 соответствующей темы] на официальном форуме Archlinux.<br />
<br />
== Интернет == <br />
<br />
=== Браузер === <br />
<br />
[http://www.dillo.org/ Dillo] - чрезвычайно простой, легкий графический браузер, написанный на FLTK (старые версии используют GTK+). <br />
<br />
[http://kazehakase.sourceforge.jp/ Kazehakase] — легкий, но очень функциональный GTK+ браузер, использующий Gecko. <br />
<br />
[http://links.sourceforge.net/ Links-g] - текстовый браузер, похожий на Lynx с поддержкой графики. <br />
<br />
[http://elinks.or.cz/ ELinks] - текстовый браузер с множеством возможностей.<br />
<br />
[http://www.twotoasts.de/index.php?/pages/midori_summary.html Midori] - простой, легкий браузер, основанный на Gtk WebKit. Часть проекта Xfce.<br />
<br />
[http://code.google.com/p/arora/ Arora] - простой, кроссплатформенный браузер основанный на Qt (Webkit).<br />
<br />
[http://tkhtml.tcl.tk/hv3.html/ HV3] - очень быстрый и лёгкий графический браузер, написанный на Tcl/Tk.<br />
<br />
[http://www.netsurf-browser.org Netsurf] - быстрый и лёгкий браузер написанный на C и обладающий собственным движком для рендера страниц.<br />
<br />
[http://uzbl.org uzbl] - браузер основанный на Webkit, который следует философии UNIX - все функции (кроме как просмотр сайтов) реализуются через внешние скрипты (в том числе и wget как менеджер загрузок и /etc/hosts против банеров).<br />
<br />
=== Почтовый клиент === <br />
<br />
[http://www.mutt.org/ mutt] - очень легкий почтовый клиент с текстовым интерфейсом. <br />
<br />
[http://www.claws-mail.org/ Sylpheed Claws] - легкий и быстрый почтовый клиент, не требущий дополнительных библиотек. <br />
<br />
[http://www.mozilla.com/thunderbird/ Thunderbird] - мощный почтовый клиент и rss-агрегатор от Mozilla. Медленнее, чем [http://sylpheed.sraoss.jp/en Sylpheed], но и возможностей больше.<br />
<br />
=== Обмен сообщениями === <br />
[http://www.bitlbee.org/ Bitlbee] — необычный клиент для обмена сообщениями. По сути не является клиентом в полном смысле этого слова, но позволяет подключаться к сетям ICQ, Jabber и т.д., используя IRC-клиент.<br />
<br />
[http://www.emesene.org/ emesene] - написанный на python/Gtk клиент для Windows Live Messenger network. <br />
<br />
[[Pidgin]] - мощный, функциональный клиент, поддерживающий наиболее популярные протоколы. <br />
<br />
[http://pidgin.im Pidgin Light] - облегченная версия Pidgin. Исключена поддержка gstreamer, tcl, tk, xscreensaver.<br />
<br />
=== IRC === <br />
<br />
[http://irssi.org/ Irssi] -простой клиент IRC с текстовым интерфейсом, написанный на perl. <br />
<br />
[http://lostirc.sourceforge.net LostIRC] — простой IRC-клиент. <br />
<br />
[http://weechat.flashtux.org/ WeeChat] — быстрый, легкий и расширяемый клиент IRC.<br />
<br />
[http://xchat.org XChat] — функциональный клиент с поддержкой скриптов на python и perl. <br />
<br />
=== Bittorrent === <br />
<br />
[http://deluge-torrent.org/ Deluge] - BitTorrent клиент, созданный на Python и GTK+. <br />
<br />
[http://50hz.ws/hrktorrent/ hrktorrent] — очень легкий, консольный клиент на основе [http://www.rasterbar.com/products/libtorrent/ libtorrent]. <br />
<br />
[http://libtorrent.rakshasa.no/ rTorrent] консольный клиент BitTorrent, написанный на C++ на основе библиотеки libTorrent (не путать с libtorrent). <br />
<br />
[http://www.transmissionbt.com/ Transmission] — простой, легкий и быстрый графический BitTorrent клиент.<br />
<br />
[http://sourceforge.net/projects/flush/ flush] - BitTorrent клиент, написанный на C++ под GTK+<br />
<br />
== Мультимедиа == <br />
<br />
=== Аудиоплеер === <br />
<br />
[http://cmus.sourceforge.net/ cmus (C* Music Player)] - лёгкий и быстрый консольный медиаплеер. <br />
<br />
[http://moc.daper.net/ MOC (Music On Console)] — простой и очень легкий консольный аудиоплеер.<br />
<br />
[http://sourceforge.net/projects/cplay/ cplay] - еще один консольный аудиоплеер.<br />
<br />
[http://hem.bredband.net/kaw/ncmpc/ ncmpc] - консольный клиент для [[mpd]] основанный на ncurses. <br />
<br />
[http://mpd.wikia.com/wiki/Client:Mpc mpc] - простой консольный клиент [[mpd]]<br />
<br />
[http://sonata.berlios.de/ Sonata] - графический клиент [[mpd]] написанный на Python c GTK+.<br />
<br />
[http://consonance.sourceforge.net/ consonance] - легкий и удобный инструмент для проигрывания музыки и организации музыкальной коллекции.<br />
<br />
[http://code.google.com/p/quodlibet/ Quod Libet] - небольшой, но функциональный плеер написанный на Python c GTK+<br />
<br />
=== Редактор графики === <br />
<br />
[http://mtpaint.sourceforge.net/ mtPaint] — растровый редактор графики, направленный на создание изображений с индексированной палитрой и пиксель арт. <br />
<br />
=== Программа для просмотра изображений === <br />
<br />
[http://linuxbrit.co.uk/feh/ Feh] — быстрый, легкий просмотрщик изображений, использующий imlib2. <br />
<br />
[http://lxde.sourceforge.net/gpicview/ GPicView] - быстрая, легкая и простая программа для просмотра изображений. Часть проекта [[LXDE]] <br />
<br />
[http://gqview.sourceforge.net/ GQview] — небольшая и функциональная программа для просмотра изображений. <br />
<br />
[http://geeqie.sourceforge.net/ Geeqie] — более быстрый и функциональный форк GQview. <br />
<br />
[http://goodies.xfce.org/projects/applications/ristretto Ristretto] — быстрая и легкая программа для просмотра изображений. Часть проекта Xfce. <br />
<br />
[http://mirageiv.berlios.de Mirage] — быстрый и простой просмотрщик, написанный на GTK+.<br />
<br />
=== Видеоплеер === <br />
[[MPlayer]] — легкий видеоплеер с огромными возможностями. Графический интерфейс необязателен. <br />
<br />
[http://smplayer.sourceforge.net/ SMPlayer] — оболочка для [[MPlayer]], обладающая рядом очень полезных возможностей. <br />
<br />
[http://www.videolan.org/vlc/ VLC] — кросплатформенный медиаплеер с богатым набором функций. Может использоваться для для трансляции потока аудио\видео по сети.<br />
<br />
== Офисные программы == <br />
<br />
=== Чтение PDF === <br />
<br />
[http://www.emma-soft.com/projects/epdfview/ ePDFView] - легкая программа для просмотра pdf-документов, использующая библиотеки Poppler и GTK+. <br />
<br />
[http://www.foolabs.com/xpdf/ Xpdf] - простая программа просмотра pdf-файлов. Без привязки к библиотекам QT и GTK.<br />
<br />
[http://code.google.com/p/apvlv/ apvlv] - легкая программа для просмотра pdf-документов с хоткеями Vim`a.<br />
<br />
=== Текстовый редактор === <br />
<br />
[http://www.nongnu.org/beaver/ Beaver] — простой текстовый редактор с подсветкой синтаксиса. <br />
<br />
[http://www.geany.org Geany] — легковесный текстовый редактор, использующая GTK2. Предназначен для разработки программ.<br />
<br />
[http://tarot.freeshell.org/leafpad/ Leafpad] — клон «Блокнота» на GTK+ 2.0. <br />
<br />
[http://mooedit.sourceforge.net/ medit] - текстовый редактор с богатыми возможностями, написанный на GTK.<br />
<br />
[http://www.xfce.org/projects/mousepad/ Mousepad] — простой текстовый редактор, основанный на lefpad. Часть проекта Xfce. <br />
<br />
Vi, [[Vim]], gVim — думаю, здесь пояснения не требуются.<br />
<br />
[[nano]] - простой консольный редактор с поддержкой подсветки синтаксиса.<br />
<br />
=== Текстовый процессор === <br />
<br />
[[Abiword|AbiWord]] — полноценный легкий текстовый процессор.<br />
<br />
[http://txt2tags.sourceforge.net txt2tags] простой, лёгкий и человеко-понятный язык разметки.<br />
<br />
== Система == <br />
<br />
=== Оконный менеджер и рабочая среда ===<br />
[[Xfce]] - лёгкое настольное рабочее окружение. Xfce основана на GTK+ 2 и использует менеджер окон Xfwm.<br />
<br />
[[Openbox]] - легкий, быстрый и настраиваемый оконный менеджер.<br />
<br />
[[dwm]] - динамический фреймовый оконный менеджер для X11 с широкими возможностями для конфигурации, которая производится путем изменения исходных кодов.<br />
<br />
[[Awesome]] - это миниатюрный и быстрый фреймовый менеджер для X Window System, поддерживающий несколько вариантов расположения окон. Появился в результате ответвления от dwm. Конфиг и расширения на Lua. В отличии от всех фреймовых wm в списке, поставляется с рабочим дефолтным конфигом, включающим tray.<br />
<br />
[[Xmonad]] - фреймовый оконный менеджер для X Window System, написанный на функциональном языке программирования Haskell..<br />
<br />
[[Subtle]] [http://subforge.org/projects/subtle/wiki Subtle] - очень легкий фреймовый оконный менеджер, написанный на С, но конфиг на Ruby, со своей системой пакетов.<br />
<br />
=== Файловый менеджер === <br />
<br />
[http://emelfm2.net/ emelFM2] — простой двухпанельный графический файловый менеджер. <br />
<br />
[http://www.ibiblio.org/mc/ Midnight Commander] — консольный двухпанельный файловый менеджер.<br />
<br />
[http://pcmanfm.sourceforge.net/ PCManFM] — легкий и быстрый файловый менеджер с поддержкой вкладок. Часть проекта LXDE.<br />
<br />
[http://roscidus.com/desktop/ROX-Filer ROX-Filer] - основанный на GTK+, очень минималистичный файловый менеджер. <br />
<br />
[http://thunar.xfce.org/ Thunar] — быстрый, простой но при этом довольно функциональный файловый менеджер. Часть проекта Xfce.<br />
<br />
=== Упаковка и распаковка архивов === <br />
<br />
[http://squeeze.xfce.org/ Squeeze] — простой и легкий менеджер архивов. Входит в состав Xfce. <br />
<br />
[http://xarchive.sourceforge.net Xarchive] — GTK2-оболочка для различных консольных архиваторов.<br />
<br />
[http://xarchiver.xfce.org/ Xarchiver] — легкий менеджер архивов, основанный на GTK+. Часть проекта xfce. <br />
<br />
=== Монитор ресурсов === <br />
<br />
[[Conky]] — легкий, но очень мощный системный монитор. <br />
<br />
[http://htop.sourceforge.net/ htop] — консольный, функциональный монитор процессов.<br />
<br />
=== Панель рабочего стола=== <br />
<br />
[http://fbpanel.sourceforge.net fbpanel] - легковесная панель рабочего стола с множеством функций, написанная на GTK. <br />
<br />
[http://lxde.org LXPanel] — легковесная панель рабочего стола. Часть проекта LXDE.<br />
<br />
[[PyPanel]] — удобная панель задач, написанная на языках C и Python.<br />
<br />
[[Tint]] — удобная панель задач, созданная для openbox3, работает и с другими окоными менеджерами.<br />
<br />
[http://nsf.110mb.com/bmpanel/ BMPanel] — легковесная панель рабочего стола. Содержит переключатель рабочих столов, панель задач, трей и часы.<br />
<br />
=== Эмулятор терминала === <br />
<br />
[http://lilyterm.luna.com.tw/index_en.html Lilyterm] — легкий и простой эмулятор терминала.<br />
<br />
[http://rox.sourceforge.net ROXTerm] — легкий и очень быстрый терминал, поддерживающий вкладки.<br />
<br />
[http://www.pleyades.net/david/sakura.php Sakura] — эмулятор терминала, основанный на GTK и VTE. <br />
<br />
[http://software.schmorp.de/pkg/rxvt-unicode urxvt] — клон терминала rxvt с поддержкой юникода. Также поддерживает вкладки.<br />
<br />
=== Системный лоток === <br />
<br />
[http://icculus.org/openbox/2/docker/ Docker] - программа, реализующая функции системного лотка, написанная для openbox. Работает так же и в остальных оконных менеджерах. <br />
<br />
[http://gna.org/projects/fvwm-crystal/ Trayer] — маленькая программа, написанная на GTK 1.2/2.x, обеспечивающая функции системного лотка.<br />
<br />
[http://stalonetray.sourceforge.net Stalonetray] — системный лоток для различных оконных менеджеров.</div>Deemytchhttps://wiki.archlinux.org/index.php?title=CUPS_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=261222CUPS (Русский)2013-06-05T06:13:59Z<p>Deemytch: /* Определение URIs для Windows Print Servers */</p>
<hr />
<div>[[Category:Принтеры (Русский)]]<br />
[[Category:Русский]]<br />
[[cs:CUPS]]<br />
[[en:CUPS]]<br />
[[es:CUPS]]<br />
[[it:CUPS]]<br />
[[pl:CUPS]]<br />
[[th:CUPS]]<br />
[[tr:CUPS]]<br />
[[zh-CN:CUPS]]<br />
[[zh-TW:CUPS]]<br />
{{Article summary start|Описание}}<br />
{{Article summary text|Установка и настройка CUPS}}<br />
{{Article summary heading|Полезные ссылки}}<br />
{{Article summary wiki|CUPS printer sharing}}<br />
{{Article summary wiki|CUPS printer-specific problems}}<br />
{{Article summary wiki|Samba}}<br />
{{Article summary end}}<br />
<br />
:"''Common UNIX Printing System ([[Wikipedia:CUPS|CUPS]], общая UNIX система печати) - это кроссплатформенное решение для печати для всех UNIX систем. Оно основано на "Internet Printing Protocol" (IPP, интернет-протокол печати) и предоставляет полный спектр возможностей для печати для большинства Postscript и растровых принтеров. CUPS распространяется под GNU GPL....''"<br />
Хотя существуют другие пакеты печати, такие как LPRNG, CUPS более популярен и довольно прост в использовании. Это система печати по умолчанию как в Arch Linux, так и во многих других Linux-дистрибутивах.<br />
<br />
<br />
= Установка =<br />
<br />
Вам скорее всего потребуются пакеты {{Pkg|cups}}, {{Pkg|ghostscript}} и {{Pkg|gsfonts}}. [[pacman|Установить]] их можно из [[Official repositories|официального репозитория]].<br />
<br />
Если стандартный cups не работает, то можно попробовать установить пакет {{AUR|cups-usblp}}, находящийся в [[AUR]].<br />
<br />
* '''cups''' - собственно пакет CUPS<br />
* '''ghostscript''' - интерпретатор для языка Postscript<br />
* '''gsfonts''' - стандартные Type1 шрифты GhostScript<br />
* '''hpoj''' - при использовании HP Officejet, во избежание проблем, установите этот пакет согласно инструкциям. Почитайте [http://answers.launchpad.net/hplip/+question/133425 обсуждение на launchpad/hplip] для получения дополнительной информации.<br />
<br />
<br />
Если ваша система подключена к сетевому принтеру с использованием протокола samba, или система является сервером печати для Windows клиентов - установите {{Pkg|samba}}.<br />
<br />
===Драйвера принтеров===<br />
Выбор пакета с драйверами для принтера зависит от используемого вами принтера. Если вы не уверены, установите gutenprint.<br />
<br />
* '''{{Pkg|gutenprint}}''' - Набор высококачественных драйверов для принтеров Canon, Epson, Lexmark, Sony, Olympus и PCL использующихся с GhostSscript, CUPS, Foomatic и [[GIMP]].<br />
* '''{{Pkg|foomatic-db}}, {{Pkg|foomatic-db-engine}}, {{Pkg|foomatic-db-nonfree}} и {{Pkg|foomatic-filters}}''' - Foomatic - это система под управлением базы данных для интеграции открытых драйверов для принтера с обычными спулерами под Unix. Установка foomatic-filters должна разрешить ваши проблемы, если в error.log от CUPS будут записи: "stopped with status 22!"<br />
* '''{{AUR|foo2zjs}}''' - драйвер для принтеров использующих протокол ZjStream, например таких как HP Laserjet 1018. Дополнительная информация [http://foo2zjs.rkkda.com здесь]. Для использования Foo2zsj - установите {{AUR|foo2zjs}}.<br />
* '''{{Pkg|hplip}}''' - HP GNU/Linux драйвер. Обеспечивает поддержку DeskJet, OfficeJet, Photosmart, Business Inkjet и других принтеров моделей LaserJet, a также ряд принтеров Brother.<br />
* '''{{Pkg|splix}}''' - драйвера Samsung для принтеров SPL (Samsung Printer Language). (для USB принтеров возможно понадобится пакет {{AUR|cups-usblp}} доступный в [[AUR]])<br />
* '''{{AUR|samsung-unified-driver}}''' - универсальный драйвер для принтеров и сканеров Samsung. Неодходим, если у Вас новый принтер (например, ML-2160), для которого пока нет драйвера в '''{{Pkg|splix}}'''. Пакет доступен в [[AUR]]. <br />
* '''{{AUR|ufr2}}''' или '''{{AUR|cndrvcups-lb}}''' - Canon UFR2 драйвер, обеспечивающий поддержку принтеров серии LBP, iR и MF. Пакет доступен в [[AUR]]. <br />
* '''{{Pkg|cups-pdf}}''' - пакет, позволяющий настроить виртуальный PDF принтер, который будет создавать PDF из всего, что будет отправлено на принтер.<br />
<br />
Если вы не уверены в работоспособности драйвера для вашего принтера или он не работает - то, возможно, стоит установить все доступные драйверы, поскольку для вашей модели принтера может подойти драйвер от другого производителя. Например, для Brother HL-2140 необходимо установить драйвер hplip.<br />
<br />
====Загрузка PPD для принтера====<br />
<br />
Так как CUPS в стандартной установке уже содержит множество PPD (Postscript Printer Description) файлов, и в зависимости от вашего принтера, этот пункт является необязательным и может быть пропущен. Более того, в пакетах <i>foomatic-filters</i>, <i>gimp-print</i> и <i>hplip</i> уже имеется большое количество PPD файлов, которые будут автоматически определены CUPS.<br />
<br />
Вот объяснение с сайта Linux Printing того, что такое PPD файл:<br />
:"''Для каждого PostScript принтера производитель предоставляет PPD файл, содержащий всю уникальную информацию об этой модели принтера: основные возможности принтера (цветной он или нет, шрифты, уровень PostScript и т. д.) и особенно настройки, которые может изменять пользователь, такие как размер бумаги, разрешение печати и т. д.''"<br />
<br />
Если в CUPS для вашего принтера отсутствует нужный PPD файл, то:<br />
*Поищите пакеты для вашего принтера/производителя в [[AUR]].<br />
*Посетите [http://www.openprinting.org/printers базу данных OpenPrinting] и выберите своего производителя и модель принтера.<br />
*Поищите драйверы под GNU/Linux на сайте производителя.<br />
<br />
<br />
{{Note|Поместите PPD файлы в {{ic|/usr/share/cups/model/}}}}<br />
<br />
= Настройка CUPS =<br />
Итак, после установки CUPS, у вас есть множество способов его настройки. Вы всегда можете использовать старую добрую командную строку. Некоторые DE, такие как GNOME и KDE, предоставляют удобные программы, которые могут вам помочь в управлении принтерами. Однако, для того чтобы сделать этот процесс максимально доступным обыкновенному пользователю, мы будем использовать web-интерфейс, предоставляемый CUPS.<br />
<br />
Если планируется подключение не к локальному, а к сетевому принтеру, то, возможно, вначале стоит почитать о настройке [[CUPS printer sharing|общего доступа к принтерам в CUPS]]. Настройка общего доступа к принтерам внутри GNU/Linux довольно проста и имеет малое количество опций, а вот организация общего доступа к принтерам между Windows и GNU/Linux является немного более сложной.<br />
<br />
=== Модули ядра ===<br />
<br />
Перед использованием веб-интерфейса CUPS, вам понадобится загрузить соответствующие модули ядра. Далее описаны шаги, взятые из руководства по установке принтера в Gentoo.<br />
<br />
Данный раздел может понадобиться в зависимости от используемого ядра. После подключения принтера нужный модуль ядра может быть загружен автоматически. Воспользуйтесь командой {{ic|tail}} (описана далее) для того, чтобы определить обнаружен ли принтер. Для просмотра загруженных модулей ядра также можно воспользоваться утилитой {{ic|lsmod}}.<br />
<br />
==== USB-принтеры ====<br />
Для использования USB-принтера может потребоваться внести в черный список модуль {{ic|usblp}}. Учтите, что насчет добавления {{ic|usblp}} в черный список имеется некоторая [https://bbs.archlinux.org/viewtopic.php?pid=660601 неопределенность], так как некоторые USB-принтеры, в частности некоторые серии принтеров Canon и Epson, не определяются без этого модуля. Несколько пользователей принтеров Samsung, после добавления в черный список модуля {{ic|usblp}}, сообщили о проблемах с {{ic|cups}}, в качестве решения предлагается повторное включение модуля {{ic|usblp}} и установка из [[AUR]] пакета {{ic|cups-usblp}} вместо стандартного пакета {{ic|cups}} (https://bbs.archlinux.org/viewtopic.php?pid=778104). С февраля 2012, ранее работавший с cups-usblp USB-принтер Samsung ML2010, работает с cups и внесением в черный список usblp.<br />
<br />
Добавление модуля в черный список:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|blacklist usblp}}<br />
<br />
либо создав в {{ic|/etc/modprobe.d/}} свой файл, например {{ic|usblp_blacklist.conf}}, со следующим содержимым:<br />
<br />
{{hc|/etc/modprobe.d/usblp_blacklist.conf|blacklist usblp}}<br />
<br />
При использовании ядра собранного самостоятельно, возможно придется вручную загрузить модуль {{ic|usbcore}}:<br />
# modprobe usbcore<br />
<br />
После загрузки всех необходимых модулей - включите принтер и проверьте обнаружен ли он ядром, для этого выполните следующее:<br />
# tail /var/log/messages.log<br />
или<br />
# dmesg<br />
<br />
При использовании {{ic|usblp}}, сообщение об обнаружении принтера будет выглядеть примерно так:<br />
Feb 19 20:17:11 kernel: printer.c: usblp0: USB Bidirectional<br />
printer dev 2 if 0 alt 0 proto 2 vid 0x04E8 pid 0x300E<br />
Feb 19 20:17:11 kernel: usb.c: usblp driver claimed interface cfef3920<br />
Feb 19 20:17:11 kernel: printer.c: v0.13: USB Printer Device Class driver<br />
<br />
Если {{ic|usblp}} находится в черном списке, то будет выведено примерно следующее:<br />
usb 3-2: new full speed USB device using uhci_hcd and address 3<br />
usb 3-2: configuration #1 chosen from 1 choice<br />
<br />
==== Принтеры с параллельным портом ====<br />
Если вы желаете использовать принтер с параллельным портом, настройка в общем-то такая же, за исключением модулей:<br />
<br />
# modprobe lp<br />
# modprobe parport<br />
# modprobe parport_pc<br />
<br />
Еще раз проверьте настройки выполнив команду:<br />
# tail /var/log/messages.log<br />
Должно быть показано что-то вроде этого:<br />
lp0: using parport0 (polling)<br />
<br />
При использовании адаптера с USB на параллельный порт, CUPS не сможет обнаружить принтер. В качестве обходного пути - добавьте принтер используя другие типы соединений, а затем измените DeviceID в файле {{ic|/etc/cups/printers.conf}}:<br />
DeviceID = parallel:/dev/usb/lp0<br />
<br />
==== Автозагрузка ====<br />
Возможно, вам будет удобнее если соответствующий модуль будет загружен при старте системы. Для этого откройте в текстовом редакторе файл {{ic|/etc/[[rc.conf]]}}, и добавьте нужный модуль в строку {{ic|1=MODULES=()}}. Например, так:<br />
MODULES=(!usbserial scsi_mod sd_mod snd-ymfpci snd-pcm-oss '''lp parport parport_pc''' ide-scsi)<br />
<br />
===Демон CUPS===<br />
<br />
После установки соответствующих модулей ядра, можно приступать к [[Daemon#Performing daemon actions manually|запуску демона CUPS]]. Для автоматического запуска демона при старте системы следует добавить cupsd в [[daemons#Starting on Boot|строку DAEMONS]].<br />
<br />
=== Web-интерфейс и средства управления ===<br />
<br />
После запуска демона откройте браузер и зайдите на: http://localhost:631 (''Строку '''localhost''', возможно, придется заменить на имя хоста из'' {{ic|/etc/hosts}}).<br />
<br />
Теперь для добавления принтера можно использовать различные мастера. Для запуска обыкновенной процедуры установки кликните ''Добавление принтеров и групп'', затем ''Добавить принтер''. При запросе имени пользователя и пароля нужно будет войти в качестве root. Далее будет представлен список устройств для выбора. Фактическое имя принтера отображается рядом с меткой ( например, USB-принтеры напротив ''USB Printer #1''). Принтеру можно присваивать любое имя, аналогично для пунктов 'Расположение' и 'Описание'. После выбора соответствующего драйвера настройки будут окончены.<br />
<br />
<br />
Убедитесь в правильности настроек, нажав на кнопку ''Print Test Page'' (''Печать тестовой страницы'') в выпадающем меню ''Maintenance'' (''Обслуживание''). Если принтер не печатает, но вы уверены в правильности всех настроек, попытайтесь сменить драйвер принтера на другой.<br />
<br />
{{Tip|Ознакомьтесь с другими программами в разделе [[#Альтернативные интерфейсы CUPS]].}}<br />
{{Note|При установке USB-принтер должен отображаться в списке устройств на странице ''Добавить принтер''. Если будет доступен только вариант "SCSI printer", то это означает, что CUPS не смог распознать ваш принтер.}}<br />
<br />
==== Администрирование CUPS ====<br />
<br />
При администрировании принтера через веб-интерфейс (например для: добавления или удаления принтеров, остановки заданий печати, и т.д) понадобятся имя пользователя и пароль. Пользователем по-умолчанию может быть пользователь из группы ''sys'' или root (для изменения измените значение в строке ''SystemGroup'' файла {{ic|/etc/cups/cupsd.conf}}). <br />
<br />
При заблокированной учетной записи root (т.е. используя sudo) будет невозможно войти в веб-интерфейс управления CUPS с именем пользователя по умолчанию и его паролем. В этом случае придерживайтесь [http://www.cups.org/articles.php?L237+T+Qprintadmin инструкций] из CUPS FAQ. Дополнительно прочтите [https://bbs.archlinux.org/viewtopic.php?id=35567 это сообщение].<br />
<br />
====Удаленный доступ к веб-интерфейсу====<br />
По умолчанию, доступ к веб-интерфейсу CUPS разрешен только ''localhost''; т.е. компьютеру на котором он установлен. Для разрешения удаленного доступа нужно внести следующие изменения в файл {{ic|/etc/cups/cupsd.conf}}. Замените строку:<br />
Listen localhost:631<br />
на строку<br />
Port 631<br />
для того, чтобы CUPS мог слушать входящие запросы.<br />
<br />
Можно предоставить три уровня доступа:<br />
<Location /> #доступ к серверу<br />
<Location /admin> #доступ к странице администрирования<br />
<Location /admin/conf> #доступ к конфигурационным файлам<br />
<br />
Для разрешения удаленного доступа к одному из уровней, добавьте параметр {{ic|Allow}} в секцию соответствующую выбранному уровню. Параметр {{ic|Allow}} может принимать одно или несколько из перечисленных ниже значений:<br />
Allow all<br />
Allow host.domain.com<br />
Allow *.domain.com<br />
Allow ip-address<br />
Allow ip-address/netmask<br />
<br />
Параметр также может быть использован для запрета. Например, если нужно дать полный доступ всем хостам подсети 192.168.1.0/255.255.255.0, файл {{ic|/etc/cups/cupsd.conf}} должен содержать следующее:<br />
# Ограничение доступа к серверу...<br />
# По умолчанию возможны только локальные подключения<br />
<Location /><br />
Order allow,deny<br />
Allow From localhost<br />
'''Allow From 192.168.1.0/255.255.255.0'''<br />
</Location><br />
<br />
# Ограничение доступа к странице администрирования...<br />
<Location /admin><br />
# Encryption disabled by default<br />
#Encryption Required<br />
Order allow,deny<br />
Allow From localhost<br />
'''Allow From 192.168.1.0/255.255.255.0'''<br />
</Location><br />
<br />
# Ограничение доступа к конфигурационным файлам...<br />
<Location /admin/conf><br />
AuthType Basic<br />
Require user @SYSTEM<br />
Order allow,deny<br />
Allow From localhost<br />
'''Allow From 192.168.1.0/255.255.255.0'''<br />
</Location><br />
<br />
Также вам потребуется добавить:<br />
<br />
DefaultEncryption Never<br />
<br />
Для того, чтоб избежать получения ошибки: 426 - Upgrade Required when using the CUPS web interface from a remote machine.<br />
<br />
= Устранение проблем =<br />
<br />
Наилучший способ борьбы с неисправностями - это выставить 'LogLevel' в файле {{ic|/etc/cups/cupsd.conf}} в:<br />
LogLevel debug<br />
<br />
А потом посмотреть вывод из файла {{ic|/var/log/cups/error_log}} например так:<br />
# tail -n 100 -f /var/log/cups/error_log<br />
<br />
Символы слева от вывода означают следующее:<br />
*D=Debug (отладка)<br />
*E=Error (ошибка)<br />
*I=Information (информация)<br />
*И так далее<br />
<br />
Следующие файлы также могут быть полезны:<br />
*{{ic|/var/log/cups/page_log}} - каждый раз при успешной печати, пишет новую запись<br />
*{{ic|/var/log/cups/access_log}} - записывает всю активность на cupsd http1.1 сервере<br />
<br />
Также, если вы хотите решить свои проблемы, важно понимать, как вообще работает CUPS. Вот краткая информация об этом:<br />
# Когда вы жмёте 'печать' приложение отправляет .ps-файл (PostScript, язык-скрипт, который описывает, как выглядит страница) в систему CUPS (так происходит в большинстве программ).<br />
# CUPS смотрит на PPD-файл (файл описания принтера) и находит, фильтры которые ему нужно использовать для преобразования .ps-файла в файл, который понимает ваш принтер (например, PJL,PCL). Обычно для этого ему требуется ghostscript.<br />
# GhostScript принимает ввод и решает, какие фильтры ему использовать, потом применяет их и преобразовывает .ps-файл в формат, который понимает принтер.<br />
# Затем файл передается бэкенду. Например, если у вас принтер подключен к usb порту, то используется usb бэкенд<br />
<br />
===Проблемы в результате обновления===<br />
''Проблемы возникшие после обновления CUPS и сопутствующего ему набора программ''<br />
<br />
====CUPS останавливается====<br />
Существует вероятность, что для правильной работы в обновленной версии понадобится новый файл конфигурации. Например, получение сообщения "404 - page not found" при попытке входа в панель управления CUPS через localhost:631.<br />
<br />
Для того, чтобы воспользоваться новым конфигом, скопируйте {{ic|/etc/cups/cupsd.conf.default}} в {{ic|/etc/cups/cupsd.conf}} (при необходимости сделайте резервную копию старого конфига):<br />
# cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf<br />
и, чтобы новые настройки вступили в силу, перезапустите CUPS.<br />
<br />
====Для всех заданий - "остановлено" ("stopped")====<br />
Если для всех отправленных на печать заданий установился статус "остановлено" ("stopped"), - удалите принтер и установите его заново.<br />
Для этого войдите в [http://localhost:631 веб-интерфейс CUPS], перейдите Принтеры > Удалить Принтер.<br />
<br />
Для проверки настроек принтера перейдите во вкладку ''Принтеры'', затем ''Администрирование''. В выпадающем списке кликните 'Изменить принтер', перейдите к следующей странице (ам), и так далее.<br />
<br />
====Для всех заданий - "Принтер не отвечает" ("The printer is not responding")====<br />
Для сетевых принтеров, поскольку CUPS подключается через URI, необходимо убедиться, что в DNS настроен доступ к принтерам по IP. Например, если принтер подключен следующим образом:<br />
lpd://BRN_020554/BINARY_P1<br />
то имени хоста 'BRN_020554' должны соответствовать IP принтеров, управляемых сервером CUPS.<br />
<br />
====Версия PPD не совместима с gutenprint====<br />
Запустите:<br />
# /usr/sbin/cups-genppdupdate<br />
<br />
И перезагрузите CUPS (будет выведено соответствующее сообщение после установки gutenprint).<br />
<br />
===USB-принтеры под CUPS 1.4.x===<br />
Новый CUPS 1.4.x принес множество изменений:<br />
<br />
====Занесение в черный список usblp====<br />
Теперь CUPS, вместо генерирования устройств /dev/usb/lpX с помощью usblp, использует устройства libusb и USB-принтеры (из /dev/bus/usb/). Для того, чтобы заработали USB-принтеры - необходимо выключить модуль usblp.<br />
Выключить можно либо добавив в {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
<br />
{{hc|/etc/modprobe.d/modprobe.conf|blacklist usblp}}<br />
<br />
либо создав в {{ic|/etc/modprobe.d/}} свой файл, например {{ic|usblp_blacklist.conf}}, со следующим содержимым:<br />
<br />
{{hc|/etc/modprobe.d/usblp_blacklist.conf|blacklist usblp}}<br />
<br />
Некоторым пользователям, возможно, прийдется переустановить принтер.<br />
<br />
====Определение устройства====<br />
В дополнение к отключению загрузки usblp, CUPS могут понадобится права на файл устройства USB-принтера - root:lp, и должны быть 660. Например.<br />
$ ls -l /dev/bus/usb/003/002<br />
crw-rw---- 1 root lp 189, 257 20. Okt 10:32 /dev/bus/usb/003/002<br />
<br />
Этого можно добиться добавлением двумя правилами udev в {{ic|/lib/udev/rules.d/50-udev-default.rules}}:<br />
# hplip and cups 1.4+ use raw USB devices, so permissions should be similar to<br />
# the ones from the old usblp kernel module<br />
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"<br />
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}==":0701*:", GROUP="lp", MODE="660"<br />
<br />
Тем не менее, для некоторых устройств, например, многофункциональных устройств принтер/сканер, эти правила либо не используются, либо перекрываются правилами пакета 'sane'. В этом случае нужно будет добавлять пользовательские правила udev. Смотри далее.<br />
<br />
=====Устранение неполадок при определении устройств=====<br />
Узнаем файл устройства принтера и права доступа к нему: <br />
$ lsusb<br />
...<br />
Bus 003 Device 002: ID 04b8:0841 Seiko Epson Corp.<br />
$ ls -l /dev/bus/usb/003/002<br />
crw-rw---- 1 root lp 189, 257 20. Okt 10:32 /dev/bus/usb/003/002<br />
<br />
Если права доступа не root:lp 660, придется создать пользовательское правило [[udev]] для этого устройства, пример<br />
{{hc|cat /etc/udev/rules.d/10-usbprinter.rules|<nowiki>ATTR{idVendor}=="04b8", ATTR{idProduct}=="0841", MODE:="0660", GROUP:="lp"</nowiki>}}<br />
<br />
Для многофункциональных устройств (принтер+сканер), для того, чтоб [[sane]] определил его корректно:<br />
{{hc|cat /etc/udev/rules.d/10-usbprinter.rules|<nowiki>ATTR{idVendor}=="04b8", ATTR{idProduct}=="0841", MODE:="0660", GROUP:="lp", ENV{libsane_matched}:="yes"</nowiki>}}<br />
<br />
Обратите внимание:<br />
* {{ic|idVendor}} и {{ic|idProduct}} взяты из вывода команды {{ic|lsusb}} показанного выше.<br />
* некоторым принтерам понадобятся права доступа {{ic|666}}.<br />
<br />
=====Загрузка прошивки (firmware)=====<br />
<br />
Для некоторых принтеров и драйверов понадобится загрузка прошивки принтера (таким как, использующие foo2zjs, принтеры HP LaserJet 10xx) и сделать это будет нужно путем записи прямо на устройство lp, такие функциональные возможности предоставляет usblp. Для обхода этого ограничения нужно будет загрузить модуль usblp при загрузке прошивки, а затем, для нормальной работы CUPS, удалить модуль. Для ручной загрузки модуля выполните<br />
$ modprobe usblp<br />
загрузка прошивки, затем:<br />
$ rmmod usblp<br />
Также можно обойтись без добавления usblp в черный список, добавьте "rmmod usblp" в {{ic|/etc/rc.local}}, при этом прошивка будет загружена при старте системы, а затем, при чтении {{ic|rc.local}}, модуль usblp будет выгружен.<br />
<br />
В случае если принтер окажется подключенным или на нем будет включено питание уже на работающей системе - файл {{ic|/etc/rc.local}} не будет использован и модуль usblp останется подгруженным. Обойти это можно изменив {{ic|/etc/udev/rules.d/11-hpj10xx.rules}}, созданный для foo2zjs, таким образом чтоб при добавлении устройства выполнялось нужное событие, например: 15 секунд для загрузки прошивки и автоматического удаления usblp. Следующий пример для HP LaserJet 1018. Для других моделей значения ATTRS{idProduct} должны быть изменены, соответственно модели принтера.<br />
<br />
Найдите в {{ic|/etc/udev/rules.d/11-hpj10xx.rules}} строку соответствующую вашему принтеру:<br />
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \<br />
ATTRS{idProduct}=="4117", RUN+="/sbin/foo2zjs-loadfw 1018 $tempnode"<br />
Добавьте после нее следующие строки, при этом убедитесь, что соответствуют IDs продукта и производителя:<br />
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \<br />
ATTRS{idProduct}=="4117", RUN+="/usr/bin/sleep 15"<br />
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \<br />
ATTRS{idProduct}=="4117", RUN+="/usr/bin/rmmod usblp"<br />
<br />
===Остальное===<br />
<br />
=====Устранение ошибок CUPS=====<br />
*Пользователям, регулярно получающим ошибки вида 'NT_STATUS_ACCESS_DENIED' (Windows-клиенты), следует слегка изменить синтаксис:<br />
smb://workgroup/username:password@hostname/printer_name<br />
<br />
*Иногда, блочные устройства могут иметь не правильные права:<br />
# ls /dev/usb/<br />
lp0<br />
# chgrp lp /dev/usb/lp0<br />
<br />
====Принтер HPLIP выдает ошибку "/usr/lib/cups/backend/hp failed"====<br />
Убедитесь, что dbus установлен и запущен, для этого или проверьте секцию DAEMONS в {{ic|/etc/rc.conf}}, или выполните {{ic|ls /var/run/daemons}}.<br />
<br />
Если демон dbus запущен, но ошибка все равно повторяется - нужен avahi-daemon.<br />
<br />
{{Note|возможно понадобиться решить вопрос с правами. Более подробно можно прочесть здесь: [[CUPS_%28%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%29#.D0.9E.D0.BF.D1.80.D0.B5.D0.B4.D0.B5.D0.BB.D0.B5.D0.BD.D0.B8.D0.B5_.D1.83.D1.81.D1.82.D1.80.D0.BE.D0.B9.D1.81.D1.82.D0.B2.D0.B0|Определение устройства]].}}<br />
<br />
====Настройка HPLIP выполнена, но принтер не работает====<br />
Данная проблема возникает при использовании драйвера hpijs (устарел) (напр. для серии Deskjet D1600). Вместо него, при добавлении принтера, выбирайте драйвер hpcups.<br />
<br />
====hp-toolbox выдает ошибку "Unable to communicate with device" ("Невозможно соединиться с устройством")====<br />
Если в результате запуска hp-toolbox от обычного пользователя получаете сообщение:<br />
# hp-toolbox<br />
# error: Unable to communicate with device (code=12): hp:/usb/<printer id><br />
или, "{{ic|Unable to communicate with device"}}", значит следует добавить пользователя в группу lp, для этого выполните следующую команду:<br />
# gpasswd -a <username> lp<br />
<br />
====CUPS с принтером HP возвращает '"foomatic-rip" not available/stopped with status 3' ('"foomatic-rip" не используется/остановлен со статусом 3')====<br />
Если, во время использования принтера HP, задания появляются в очереди, но все завершаются со статусом 'stopped', а в {{ic|/var/log/cups/error_log}} возникает одно из следующих сообщений об ошибках:<br />
Filter "foomatic-rip" for printer "<printer_name>" not available: No such file or director<br />
или:<br />
PID 5771 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!<br />
Убедитесь, что установлен '''hplip''', также может понадобится пакет '''net-snmp'''. Прочитайте [https://bbs.archlinux.org/viewtopic.php?id=65615 эти сообщения на форуме].<br />
# pacman -S hplip<br />
<br />
====Завершение печати из-за ошибок авторизации====<br />
Если пользователь уже добавлен в группу lp, и ему разрешена печать (настраивается в {{ic|cupsd.conf}}), то проблему следует искать в файле {{ic|/etc/cups/printers.conf}}. Проблема может заключаться в следующей строке:<br />
AuthInfoRequired negotiate<br />
<br />
Закомментируйте ее и перезапустите CUPS.<br />
<br />
====Неактивна кнопка Печать в диалогах приложений GNOME====<br />
:''<small>Источник: [https://bbs.archlinux.org/viewtopic.php?id=70418 I can't print from gnome applications. - Arch Forums]</small>''<br />
<br />
Убедитесь, что установлен пакет: '''libgnomeprint'''<br />
<br />
Отредактируйте {{ic|/etc/cups/cupsd.conf}} добавив в него<br />
# HostNameLookups Double<br />
<br />
Перезапустите CUPS:<br />
# /etc/rc.d/cupsd restart<br />
<br />
====Не найдена поддержка формата: application/postscript====<br />
Закомментируйте строки:<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
в {{ic|/etc/cups/mime.convs}}, и:<br />
application/octet-stream<br />
в {{ic|/etc/cups/mime.types}}.<br />
<br />
====Определение URIs для Windows Print Servers====<br />
<br />
Иногда Windows предоставляет не полную информацию об URI (расположение устройств). Если в CUPS возникли проблемы с указанием местоположения устройств - необходимо выполнить команду получения списка всех ресурсов, которые доступны данному windows-пользователю:<br />
$ smbtree -U ''windowsusername''<br />
Если [[Samba]] работает и настроена правильно, то будут отображены все, доступные выбранному Windows-пользователю, ресурсы локальной сети. Команда должна отобразить что-то, типа этого:<br />
{{bc| WORKGROUP<br />
\\REGULATOR-PC <br />
\\REGULATOR-PC\Z <br />
\\REGULATOR-PC\Public <br />
\\REGULATOR-PC\print$ Printer Drivers<br />
\\REGULATOR-PC\G <br />
\\REGULATOR-PC\EPSON Stylus CX8400 Series EPSON Stylus CX8400 Series}}<br />
Нам понадобится первая часть последней строки -ресурс соответствующий описанию принтера. Таким образом, для получения возможности печатать на принтере EPSON Stylus, в качестве URI в CUPS следует ввести:<br />
smb://username:password@REGULATOR-PC/EPSON Stylus CX8400 Series<br />
Обратите внимание на то, что в URI допускаются пробелы, а знаки "\\" следует заменять на "//".<br />
<br />
====Ошибка задания для печати client-error-document-format-not-supported====<br />
Нужно установить пакет foomatic и использовать драйвер foomatic.<br />
<br />
====Не работает /usr/lib/cups/backend/hp====<br />
В {{ic|/etc/cups/cupsd.conf}} замените:<br />
<br />
SystemGroup sys root<br />
на<br />
SystemGroup lp root<br />
<br />
====Принтер Samsung не печатает некоторые документы====<br />
<br />
Бывает, что принтер Samsung прекрасно работает с {{ic|cups}}, но не печатает некоторые документы (файлы Inkscape с текстом) и даже сбоит. В качестве решения можно посоветовать использовать пакет {{AUR|cups-usblp}} с добавлением модуля {{ic|usblp}} в черный список (как было описано ранее).<br />
<br />
====Не отображается локальный USB-принтер====<br />
<br />
Если ваш usb-принтер не отображается - попробуйте заменить {{pkg|cups}} на {{AUR|cups-usblp}} (пакет можно найти в [[AUR]]). Затем проверьте работоспособность сначала с загруженным модулем {{ic|usblp}}, а затем, если не поможет, - с добавленным в черный список.<br />
<br />
===="Не удается получить список драйверов для принтеров"====<br />
Попробуйте удалить драйверы Foomatic.<br />
<br />
=Приложение=<br />
<br />
===Альтернативные интерфейсы CUPS===<br />
<br />
В среде [[GNOME]], вы можете конфингурировать ваш принтер с помощью system-config-printer-gnome. С помощью pacman можно установить этот пакет:<br />
# pacman -S system-config-printer-gnome<br />
<br />
Для нормальной работы system-config-printer понадобиться или запуск с правами администратора, или, если от обычного пользователя, то такому пользователю должно быть разрешено администрировать CUPS (если это так - '''выполните шаги 1-3''')<br />
<br />
* 1. Создайте группу и внесите в нее нужного пользователя:<br />
# groupadd lpadmin<br />
# usermod -aG lpadmin <username><br />
<br />
* 2. Добавьте "lpadmin" (без кавычек) в следующую строку файла {{ic|/etc/cups/cupsd.conf}}<br />
SystemGroup sys root <insert here><br />
<br />
* 3. Перезапустите cups, выйдите и снова войдите в систему (или перезагрузите компьютер)<br />
{{bc|# rc.d restart cupsd}}<br />
<br />
Пользователи [[KDE]] могут изменять настройки из "Control Center" (kcontrol). Для получения дополнительной информации, обратитесь к документации вашего рабочего окружения (DE).<br />
<br />
Также в [[AUR]] можно найти пакет [https://aur.archlinux.org/packages.php?ID=43505 gtklp]<br />
<br />
===Виртуальный PDF-принтер===<br />
<br />
Существует прекрасный пакет - CUPS-PDF. Этот пакет позволяет настроить виртуальный принтер, генерирующий PDF-файлы из того, что отправлено на печать на этот принтер. Возможно этот пакет вам и не понадобиться, но иногда он может быть очень полезен.<br />
<br />
Созданные PDF-документы можно найти в {{ic|var/spool/cups-pdf}}. Обычно, более удобно такие документы добавлять в домашнюю директорию пользователя. Настроить такое поведение не сложно. В файле /etc/cups/cups-pdf.conf найдите и строку:<br />
#Out /var/spool/cups-pdf/${USER}<br />
<br />
и приведите ее к такому виду:<br />
<br />
Out /home/${USER}<br />
<br />
<br />
Установить этот пакет можно командой:<br />
# pacman -S cups-pdf<br />
<br />
После установки пакета, настройте PDF-принтер аналогично обычному принтеру, например с помощью веб-интерфейса. В Device (Оборудование) выберите - '''CUPS-PDF (Virtual PDF Printer)'''; Make/Manufacturer (Марка/Производитель) выберите - '''Generic'''; Model/Driver (Модель/Драйвер) выберите - '''Generic postscript color printer''' или '''Generic Cups-PDF Printer'''. В качестве альтернативы, [http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/cups-pdf-CURRENT/extra/CUPS-PDF.ppd по этой ссылке] можно найти другой PPD-файл.<br />
<br />
==== Печать в postscript: тонкости использования виртуального CUPS-PDF-принтера ====<br />
<br />
Для большинства приложений, таких как OpenOffice, печать в PDF не является проблемой; достаточно просто нажать кнопку. Для печати в postscript, потребуется выполнить небольшой дополнительный объем работ. CUPS-PDF (Виртуальный PDF-принтер) на самом деле создает postscript-файл, а затем уже с помощью утилиты ps2pdf, преобразовывает его в PDF. Для печати в postscript, необходимо сначала передать созданные CUPS-PDF postscript-файлы. Для этого в диалоге печати нужно выбрать вариант "print to file" ("печатать в файл"). (выберите расширение для файла или .ps, или .eps). После того, как будет отмечен флажок "print to file" ("печатать в файл"), введите имя файла и нажмите "print" ("печать").<br />
<br />
=====Настройка виртуального CUPS-PDF-принтера=====<br />
#Прочтите инструкция по настройке демона cups.<br />
#Установите {{Pkg|cups-pdf}} из [extra].<br />
#Запустите менеджер печати cups: http://localhost:631 и выберите:<br />
Administration -> Add Printer<br />
Select CUPS-PDF (Virtual PDF), выберите марку и модель:<br />
Make: Generic<br />
Driver: Generic CUPS-PDF Printer<br />
<br />
Теперь, для печати в postscript, в диалоговом окне печати установите "CUPS-PDF" в качестве принтера, установите флажок на "print to file" ("печатать в файл"), нажмите печать, введите имя_файла.ps и кликните сохранить. Метод удобен при обработке факсов и т.д...<br />
<br />
===Другие источники драйверов для принтеров===<br />
<br />
[http://www.turboprint.de/english.html Turboprint] - проприетарный драйвер для многих моделей принтеров, которые до сих пор не поддерживаются в GNU/Linux (например Canon i*). Единственная проблема в том, что высококачественная печать будет либо с водяным знаком, либо за отдельную плату...<br />
<br />
=Дополнение=<br />
<br />
Список вебсайтов, которые могут быть вам полезны:<br />
<br />
* <b>Official CUPS documentation on your computer</b> http://localhost:631/documentation.html<br />
* <b>Official CUPS Website</b> - http://www.cups.org/<br />
* <b>Linux Printing</b> - http://www.linuxprinting.org/<br />
* <b>Tips and Suggestions on common CUPS problems</b> - http://home.nyc.rr.com/computertaijutsu/cups.html<br />
* <b>Gentoo's Printing Guide</b> - http://www.gentoo.org/doc/en/printing-howto.xml<br />
* <b>Arch Linux User Forums</b> - https://bbs.archlinux.org/<br />
<br />
==Особые случаи==<br />
<br />
Дальнейшее описание посвящено специфическим проблемам и их решениям. Если вы сталкивались с какой-либо ''необычной'' работой принтера, пожалуйста, поместите решение проблемы здесь.<br />
<br />
=== Принтеры с параллельным портом HP (hplip) ===<br />
{{Note|Действия проводились для настройки HP LaserJet 6L}}<br />
Если HP принтер подключен через параллельный порт, то потребуется пересобрать пакет '''hplip''' с опцией '''--enable-pp-build'''.<br />
Для этого устанавливаем и обновляем ABS:<br />
<pre><br />
# pacman -S abs<br />
# abs<br />
</pre><br />
Копируем необходимые файлы для сборки<br />
<pre><br />
# cp -r /var/abs/extra/hplip /tmp<br />
</pre><br />
Правим файл {{ic|/tmp/hplip/PKGBUILD}} и добавляем опцию '''--enable-pp-build''' для '''./configure''':<br />
<pre><br />
[...]<br />
./configure --prefix=/usr \<br />
--enable-qt4 \<br />
--enable-pp-build \<br />
--enable-foomatic-rip-hplip-install \<br />
--enable-foomatic-ppd-install \<br />
--enable-hpcups-install \<br />
--enable-cups-drv-install \<br />
--enable-hpijs-install \<br />
--enable-foomatic-drv-install \<br />
--enable-udev-acl-rules<br />
[...]<br />
</pre><br />
Собираем и ставим пакет:<br />
<pre><br />
cd /tmp/hplip<br />
makepkg -s<br />
pacman -U hplip-3.10.6-1-i686.pkg.tar.xz<br />
</pre><br />
Далее принтер настраивается обычным путем через web-интерфейс '''CUPS''' [http://localhost:631 http://localhost:631].<br />
<br />
Если принтер правильно настроен для работы с '''hplip''', то строка подключения в '''CUPS''' будет начинаться с '''hp:'''<br />
<pre><br />
hp:/par/HP_LaserJet_6L?device=/dev/parport0<br />
</pre><br />
<br />
{{Note|Действия проводились для настройки HP LaserJet 5L, x86_64}}<br />
Устанавливаем hplip (пересобирать пакет не надо, он уже собран с --enable-pp-build)<br />
<pre><br />
# pacman -S hplip<br />
</pre><br />
Далее запускаем<br />
<pre><br />
# hp-setup -i -a -x /dev/parport0<br />
</pre><br />
для автоматического добавления принтера в CUPS, либо добавляем "ручками" через веб-интерфейс [http://localhost:631 http://localhost:631].<br />
<br />
===Печать не работает/прерывается на принтерах HP Deskjet 700===<br />
<br />
Проблема решается установкой фильтра pnm2ppa для принтеров HP Deskjet 700 series. Без этого задания на печать будут отменяться системой. [[Arch Build System (Русский)| PKGBUILD]] для pnm2ppa можно найти здесь: [https://aur.archlinux.org/index.php?setlang=ru AUR].<br />
<br />
===Заставить работать HP LaserJet 1010===<br />
Мне для этого пришлось самому собрать ghostscript, потому что gs ESP в репозитории был версии 7.07 и имел некоторые ошибки, исправленные в ESP 8.15.1. Я никогда не пользовался пакетом 'foomatic' из репозитория. Я думаю что этот пакет устарел.<br />
<pre><br />
$ pacman -Qs cups a2ps psutils foo ghost<br />
local/cups 1.1.23-3<br />
The CUPS Printing System<br />
local/a2ps 4.13b-3<br />
a2ps is an Any to PostScript filter<br />
local/psutils p17-3<br />
A set of postscript utilities.<br />
local/foomatic-db 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-db-engine 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-db-ppd 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-filters 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/espgs 8.15.1-1<br />
ESP Ghostscript<br />
</pre><br />
Также я был вынужден выставить LogLevel в /etc/cups/cupsd.conf в debug2 для того чтобы обнаружить отсутствие некоторых шрифтов "Nimbus". Затем я переименовал их и положил туда, куда мне подсказывал лог. Тут нужно привести хитрый способ поиска в google, [http://www.google.com/search?q=n019003l+filetype%3Apfb например] т.к. шрифты являются проприетарными (уверен что в windows это по умолчанию). В любом случае, после скачивания шрифтов (около 7) и помещения их в правильную директорию печать заработала.<br />
<br />
До этого я получал ошибки описанные [http://linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1010 здесь]: 'Unsupport PCL' и т.п...<br />
<br />
Уверен что это работало бы и с gs ESP 7.07 (в репозитории) если бы у меня раньше хватило ума включить DebugLevel2 :-/<br />
<br />
''Обновление:'' да, это работает... может быть эта информация окажется полезной для кого-либо ещё... извините за неудобства.<br />
<br />
===Заставить работать HP LaserJet 1020 (1018 и похожие)===<br />
После множества попыток связанных с hplib и gutenprint я наконец нашёл решение как заставить мой HP Laserjet 1020 печатать. <br />
<br />
Первым делом вам надо уставить cups и ghostscript. Затем пройдите по ссылке <br />
http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1020 на страницу драйверов печати http://foo2zjs.rkkda.com/ и следуйте интрукциям по установке. Залогиньтесь как root. После скачивания и распаковки архива переместитесь в распакованную директорию foo2zjs. Теперь вы можете делать всё по оригинальной инструкции по установке, лишь с небольшой модификацией для изменения userid пользователя для печати:<br />
<pre><br />
$ make<br />
$ ./getweb 1020<br />
</pre><br />
Откройте ''Makefile''<br />
<pre>$ nano Makefile</pre><br />
найдите там строку<br />
<pre># LPuid=-olp</pre><br />
и модифицируйте её таки образом:<br />
<pre># LPuid=-oroot</pre><br />
дальше выполняйте сборку<br />
<pre><br />
$ make install<br />
$ make install-hotplug<br />
$ make cups<br />
</pre><br />
Сейчас в этих действиях нет необходимости. Теперь строка '''LPuid=-oroot''' стоит по умолчанию.<br />
<br />
Вы также можете взять пакет foo2zjs из [https://aur.archlinux.org/index.php?setlang=ru AUR] и модифицировать [[Arch Build System (Русский)| PKGBUILD]]: измените строку<br />
<pre>./getweb all</pre><br />
на<br />
<pre>./getweb 1020</pre><br />
(или, если устанавливаете другой принтер, измените эту строку на что, что вам нужно).<br />
<br />
Последним шагом является добавление и конфигурирование принтера в CUPS manager. Принтер должен определиться автоматически. Это отлично работает для root'а и всех ползователей. Когда ОС загружается, принтер инициализируется и сигнализирует о том, что он работает.<br />
Так же строку<br />
<pre>./getweb 1020</pre><br />
можно изменять на необходимые 1018 (для работы принтера Hewlett-Packard 1018) и т.д.<br />
<pre>./getweb 1018</pre><br />
Список поддерживаемы моделей тут: http://foo2zjs.rkkda.com/<br />
<br />
====HPLIP====<br />
<br />
Больше нет необходимости устанавливать драйвер foo2zjs для работы принтера HP LJ 1018/1020, поскольку в последних версиях hplip он работает "из коробки". Вам следует установить hplip, gnomesu или gksu, qt и pyqt4, после чего запустить <br />
<pre>sudo hp-setup</pre><br />
CUPS-сервер должен быть запущен. Мастер установки hplip автоматически установит ваш принтер. После следует установить плагин к принтеру. Для этого запустить от пользователя программу hp-toolbox и выберите "install required plugin". Плагин автоматически загрузится с сайта производителя.<br />
Никаких дополнительных действий (вроде внесения usblp и MODULES_BLACKLIST) выполнять не надо.<br />
<br />
===Выполнение сервисных операций на принтерах Epson===<br />
====Escputil====<br />
<br />
Здесь объясняется как выполнить некоторые вспомогательные операции, такие как очистка и проверка сопел на принтерах Epson. Для этого мы будем использовать утилиту escputil, которая входит в состав пакета gutenprint.<br />
<br />
Man-страница этой утилиты ("man escputil") содержит очень полезную информацию, но не включает в себя необходимых сведений о том как идентифицировать ваш принтер. Для этого могут быть использованы два параметра. Первый из них --printer; он принимает имя принтера, которое вы использовали при его конфигурировании. Другой &mdash --raw-device. Эта опция примаетпуть к устройству. Если ваш принтер подключен к последовательному порту, то устройство будет выглядеть примерно как "/dev/lp0". Если же ваш принтер подключен к USB, по устройство будет "/dev/usb/lp0". Если у вас более одного принтера они будут иметь имена файлов устройств "lp1", "lp2" и т.д.<br />
<br />
* очистка печатающей головки:<br />
<pre>escputil -u --clean-head</pre><br />
<br />
* проверка сопел:<br />
<pre>escputil -u --nozzle-check</pre><br />
<br />
Если вам необходимо произвести операцию, которая требует двухстороннего общения с принтером вы должны использовать спецификацию "--raw-device", а ваш пользователь должен состоять в группе "lp" или быть root'ом.<br />
<br />
* получение внутреннего имени принтера:<br />
<br />
sudo escputil --raw-device=/dev/usb/lp0 --identify<br />
<br />
* получение уровня чернил:<br />
<br />
sudo escputil --raw-device=/dev/usb/lp0 --ink-level<br />
<br />
====Mtink====<br />
<br />
Это монитор состояния принтера, который позволяет получить количество оставшихся чернил, печатать тестовые страницы, сбрасывать принтер и очищать сопла. Он использует интуитивный графический интерфейс пользователя. Пакет можно скачать [https://aur.archlinux.org/packages.php?ID=476 отсюда].<br />
<br />
= См. также =<br />
* [http://localhost:631/documentation.html Официальная документация CUPS documentation], ''локальная установка''<br />
* [http://www.cups.org/ Официальный Веб-сайт CUPS]<br />
* [http://www.linuxprinting.org/ Linux Printing], ''[http://www.linuxfoundation.org Linux Foundation]''<br />
* [http://www.gentoo.org/doc/en/printing-howto.xml Руководство по печати в Gentoo], ''[http://www.gentoo.org/doc/en Источники Документации Gentoo]''<br />
* [https://bbs.archlinux.org/ Форум пользователей Arch Linux]<br />
<br />
* [http://wiki.gotux.net/config/hp-printer Простая установка принтеров HP]</div>Deemytchhttps://wiki.archlinux.org/index.php?title=List_of_applications/Internet&diff=237415List of applications/Internet2012-11-29T19:08:09Z<p>Deemytch: /* FTP Servers */</p>
<hr />
<div><noinclude><br />
[[Category:Internet Applications]]<br />
[[it:List of Applications/Internet]]<br />
[[zh-CN:List of Applications/Internet]]<br />
{{List of Applications navigation}}<br />
</noinclude><br />
== Internet ==<br />
{{Note|1=For possibly more up to date selection of applications, try checking the [https://aur.archlinux.org/packages.php?O=0&K=&do_Search=Go&detail=1&C=13&SeB=nd&SB=n&SO=a&PP=50 AUR 'network' category]}}<br />
<br />
=== BitTorrent Clients ===<br />
{{Wikipedia|Comparison of BitTorrent clients}}<br />
<br />
==== Console ====<br />
* {{App|[[aria2]]|A lightweight download utility that supports simultaneous adaptive downloading via HTTP(S), FTP, BitTorrent (DHT, PEX, MSE/PE) protocols and Metalink. It can run as a daemon controlled via a built-in JSON-RPC or XML-RPC interface.|http://aria2.sourceforge.net/|{{Pkg|aria2}}}}<br />
* {{App|[[Deluge]]|A user-friendly BitTorrent client written in PyGTK that can run as a daemon.|http://deluge-torrent.org/|{{Pkg|deluge}}}}<br />
* {{App|[[Wikipedia:MLDonkey|MLDonkey]]|A multi-protocol P2P client that supports BitTorrent, HTTP, FTP, eDonkey and Direct Connect.|http://mldonkey.sourceforge.net/|{{Pkg|mldonkey}}}}<br />
* {{App|[[rTorrent]]|A simple and lightweight ncurses BitTorrent client.|http://libtorrent.rakshasa.no/|{{Pkg|rtorrent}}}}<br />
* {{App|[[Wikipedia:Transmission (BitTorrent client)|Transmission]]|A simple and easy-to-use BitTorrent client with a daemon version, GTK+, Qt GUI, web and CLI front-ends.|http://transmissionbt.com/|{{Pkg|transmission-cli}}}} {{AUR|transmission-remote-cli}} {{AUR|transmission-remote-gtk}} (remote clients work with the daemon in the -cli package)<br />
<br />
==== Graphical ====<br />
* {{App|[[Wikipedia:KGet|KGet]]|A download manager for KDE that supports HTTP(S), FTP and BitTorrent.|http://www.kde.org/applications/internet/kget/|{{Pkg|kdenetwork-kget}}}}<br />
* {{App|[[Wikipedia:KTorrent|KTorrent]]|A feature-rich BitTorrent client for KDE.|http://ktorrent.org/|{{Pkg|ktorrent}}}}<br />
* {{App|[[Wikipedia:qBittorrent|qBittorrent]]|An open source (GPLv2) BitTorrent client that strongly resembles µtorrent.|http://qbittorrent.sourceforge.net/|{{AUR|qbittorrent}}}}<br />
<!-- QTorrent site down for maintenance (2012-09-26) --><br />
* {{App|QTorrent|A BitTorrent client written in PyQt.|http://thegraveyard.org/qtorrent.php{{Linkrot|2012|09|20}}|{{Pkg|qtorrent}}}}<br />
* {{App|[[Wikipedia:Transmission (BitTorrent client)|Transmission]]|A simple and easy-to-use BitTorrent client with daemon version, GTK+, Qt GUI, web and CLI front-ends|http://transmissionbt.com/|{{Pkg|transmission-gtk}} {{Pkg|transmission-qt}}}}<br />
* {{App|[[Wikipedia:Vuze|Vuze]]|A feature-rich BitTorrent client written in Java (formerly Azureus).|https://www.vuze.com/|{{AUR|vuze}}}}<br />
<br />
=== eDonkey Clients ===<br />
eDonkey is still the second-largest p2p network (see [http://ipoque.com/en/resources/internet-studies Internet Study 2008/2009]).<br />
{{Wikipedia|Comparison of eDonkey software}}<br />
<br />
* {{App|[[aMule]]|A well-known eDonkey/Kad client with a daemon version and GTK+, web, and CLI front-ends.|http://www.amule.org/|{{Pkg|amule}}}}<br />
* {{App|KaMule|A KDE graphical front-end for aMule.|http://kde-apps.org/content/show.php?content&#61;150270|{{AUR|kamule}}}}<br />
<br />
=== eMoney ===<br />
{{Stub}}<br />
<br />
==== Bitcoin ====<br />
{{Box||See the main article: [[Bitcoin]]|#E5E5FF|#FCFCFC}}<br />
<br />
* {{App|Armory|A Bitcoin client with with features such as support for multiple wallets, importing keys and backups.|https://github.com/etotheipi/BitcoinArmory|{{AUR|armory-git}}}}<br />
* {{App|[[Bitcoin]]|The official tool to manage Bitcoins, a P2P currency.|http://bitcoin.org/|{{Pkg|bitcoin-daemon}} {{Pkg|bitcoin-qt}}}}<br />
<br />
=== Chat Clients ===<br />
{{Wikipedia|Comparison of instant messaging clients}}<br />
<br />
==== Multi-Protocol Clients ====<br />
{{Wikipedia|Comparison of instant messaging clients#Multiprotocol clients}}<br />
<br />
{{Box||All messengers, that support several networks by means of direct connections to them, belong to this section.|#E5E5FF|#FCFCFC}}<br />
<br />
Many clients listed here (including Pidgin and all it's forks) support multiple IM networks via [[Wikipedia:libpurple|libpurple]]. The number of networks supported by these clients is very large but they (like any multiprotocol clients) usually have very limited or no support for network-specific features.<br />
<br />
===== Console =====<br />
* {{App|BarnOwl|An ncurses-based chat client with support for the Zephyr, AIM, Jabber, IRC, and Twitter protocols.|http://barnowl.mit.edu/|{{AUR|barnowl}}}}<br />
* {{App|[[Bitlbee]]|An IRC client that provides a gateway to popular chat networks (XMPP, MSN, Yahoo, AIM, ICQ and Twitter).|http://bitlbee.org/|{{Pkg|bitlbee}}}}<br />
* {{App|[[Wikipedia:Centericq|CenterIM]]|A fork of CenterICQ, a text mode menu- and window-driven IM interface.|http://centerim.org/|{{Pkg|centerim}}}}<br />
* {{App|Finch|An ncurses-based chat client that uses libpurple and supports all its protocols.|http://developer.pidgin.im/wiki/Using%20Finch|{{Pkg|finch}}}}<br />
* {{App|[[Wikipedia:naim (software)|naim]]|An ncurses chat client with support for AOL, ICQ, IRC and the Lily CMC.|http://naim.n.ml.org/|{{Pkg|naim}}}}<br />
<br />
===== Graphical =====<br />
* {{App|Carrier|A Pidgin fork providing minor GUI enhancements (formerly FunPidgin).|http://funpidgin.sourceforge.net/|{{AUR|carrier}}}}<br />
* {{App|[[Wikipedia:Emesene|Emesene]]|A PyGTK instant messenger for the Windows Live Messenger network, also compatible with Jabber, Facebook and Google Talk.|http://emesene.org/|{{Pkg|emesene}}}}<br />
* {{App|[[Wikipedia:Empathy (software)|Empathy]]|A GNOME instant messaging client using the [[Wikipedia:Telepathy (software)|Telepathy]] framework.|http://live.gnome.org/Empathy|{{Pkg|empathy}}}}<br />
* {{App|Galaxium Messenger|A messenger application designed for the GNOME desktop.|https://code.google.com/p/galaxium/|{{AUR|galaxium}}}}<br />
* {{App|[[Wikipedia:Instantbird|Instantbird]]|A multi-protocol chat client using Mozilla's XUL and libpurple.|http://instantbird.com/|{{AUR|instantbird}}}}<br />
* {{App|[[Wikipedia:Kopete|Kopete]]|A user-friendly IM supporting AIM, ICQ, Windows Live Messenger, Yahoo, Jabber, Gadu-Gadu, Novell GroupWise Messenger, and other IM networks.|http://kopete.kde.org/|{{Pkg|kdenetwork-kopete}}}}<br />
* {{App|Licq|An instant messaging client for UNIX supporting multiple protocols (currently ICQ, MSN and Jabber).|http://www.licq.org|{{Pkg|licq}}}}<br />
* {{App|[[Pidgin]]|A multi-protocol instant messaging client.|http://pidgin.im/|{{Pkg|pidgin}}}}<br />
* {{App|Pidgin Light|A light Pidgin version without GStreamer, Tcl/Tk or XScreenSaver support.|http://pidgin.im/|{{AUR|pidgin-light}}}}<br />
* {{App|qutIM|A simple and user-friendly IM supporting ICQ, Jabber, Mail.Ru, IRC and VKontakte messaging.|http://qutim.org/|{{AUR|qutim}}}}<br />
<br />
==== Jabber/XMPP Clients ====<br />
{{Wikipedia|Comparison of instant messaging clients#XMPP clients}}<br />
<br />
===== Console =====<br />
* {{App|Freetalk|A console-based Jabber client.|https://gnu.org/s/freetalk/|{{Pkg|freetalk}}}}<br />
* {{App|jabber.el|A minimal Jabber client for [[Emacs]].|http://emacs-jabber.sourceforge.net/|{{AUR|emacs-jabber}}}}<br />
* {{App|[[Wikipedia:MCabber|MCabber]]|A small Jabber console client, includes features: SSL, PGP, MUC, OTR, and UTF8.|http://mcabber.com/|{{Pkg|mcabber}}}}<br />
<br />
===== Graphical =====<br />
* {{App|[[Wikipedia:Gajim|Gajim]]|A Jabber client written in PyGTK.|https://gajim.org/|{{Pkg|gajim}}}}<br />
* {{App|Jabbim|A Jabber client written in PyQt.|http://dev.jabbim.cz/jabbim|{{AUR|jabbim-svn}}}}<br />
* {{App|[[Wikipedia:Psi (instant messaging client)|Psi]]|A Qt-based Jabber client.|http://psi-im.org/|{{Pkg|psi}}}}<br />
* {{App|Psi+|An enhanced version of the Psi Jabber client with many new [http://psi-plus.com/wiki/en:features#differences_between_psi_beta_version_and_the_official_psi_015-dev_version features].|https://code.google.com/p/psi-dev/|{{AUR|psi-plus}}}}<br />
<br />
==== MSN Clients ====<br />
* {{App|[[Wikipedia:AMSN|aMSN]]|A MSN client written in Tcl/Tk with webcam and conferencing support.|http://amsn-project.net/|{{Pkg|amsn}}}}<br />
* {{App|[[Wikipedia:Emesene|Emesene]]|A PyGTK MSN Messenger client.|http://blog.emesene.org/|{{Pkg|emesene}}}}<br />
* {{App|[[Wikipedia:Kmess|KMess]]|A MSN Messenger client for Linux with support for custom emoticons, nudges, winks, file transfers and many others.|http://kmess.org/|{{Pkg|kmess}}}}<br />
<br />
==== IRC Clients ====<br />
{{Wikipedia|Comparison of Internet Relay Chat clients}}<br />
<br />
===== Console =====<br />
* {{App|[[Wikipedia:BitchX|BitchX]]|A console-based IRC client developed from the popular [[Wikipedia:ircII|ircII]].|http://www.bitchx.org/|{{Pkg|ircii-pana}}}}<br />
* {{App|ERC|A powerful, modular, and extensible IRC client for [[Emacs]].|http://savannah.gnu.org/projects/erc/|{{AUR|erc-git}}}}<br />
* {{App|[[Wikipedia:Ii (IRC client)|ii]]|A featherweight IRC client, literally {{ic|tail -f}} the conversation and {{ic|echo}} back your replies to a file.|http://tools.suckless.org/ii|{{AUR|ii}}}}<br />
* {{App|Ircfs|A file system interface to IRC written in [http://limbo.cat-v.org Limbo].|http://www.ueber.net/code/r/ircfs|{{AUR?|ircfs}}}}<br />
* {{App|[[Irssi]]|A highly-configurable ncurses-based IRC client.|http://irssi.org/|{{Pkg|irssi}}}}<br />
* {{App|ScrollZ|An advanced IRC client based on [[Wikipedia:ircII|ircII]].|http://www.scrollz.com/|{{AUR|scrollz}}}}<br />
* {{App|sic|An extremely simple IRC client, similar to [[Wikipedia:Ii (IRC client)|ii]].|http://tools.suckless.org/sic|{{AUR|sic}}}}<br />
* {{App|[[Wikipedia:WeeChat|WeeChat]]|A modular, lightweight ncurses-based IRC client.|http://weechat.org/|{{Pkg|weechat}}}}<br />
<br />
===== Graphical =====<br />
* {{App|[[Wikipedia:Konversation|Konversation]]|A Qt-based IRC client for the KDE desktop.|http://konversation.kde.org/|{{Pkg|konversation}}}}<br />
* {{App|[[Wikipedia:KVIrc|KVIrc]]|A Qt-based IRC client featuring extensive themes support.|http://kvirc.net/|{{Pkg|kvirc}}}}<br />
* {{App|Loqui|A GTK+ IRC client with only one dependency: [https://live.gnome.org/GNetLibrary GNet].|https://launchpad.net/loqui|{{AUR|loqui}}}}<br />
* {{App|LostIRC|A simple GTK+ IRC client with tab-autocompletion, multiple server support, logging and others.|http://lostirc.sourceforge.net|{{AUR|lostirc}}}}<br />
* {{App|pcw|A frontend for [http://tools.suckless.org/ii ii] that opens a new terminal for each channel.|https://bitbucket.org/emg/pcw|{{AUR|pcw-hg}}}}<br />
* {{App|[[Wikipedia:Quassel IRC|Quassel]]|A modern, cross-platform, distributed IRC client.|http://quassel-irc.org/|{{Pkg|quassel}}}}<br />
* {{App|[[Wikipedia:Smuxi|Smuxi]]|A cross-platform IRC client for the GNOME desktop inspired by [[Irssi]].|http://smuxi.org/|{{Pkg|smuxi}}}}<br />
* {{App|[[Wikipedia:XChat|XChat]]|A GTK+-based IRC client that works on both Linux and Windows.|http://xchat.org/|{{Pkg|xchat}}}}<br />
<br />
=== Softphone ===<br />
{{Wikipedia|Comparison of VoIP software}}<br />
{{Wikipedia|List of SIP software}}<br />
<br />
==== Clients ====<br />
* {{App|[[Wikipedia:Blink (software)|Blink]]|A state of the art, easy to use SIP client.|http://www.icanblink.com/|{{AUR|blink-darcs}}}}<br />
* {{App|[[Wikipedia:Ekiga|Ekiga]]|A VoIP and video conferencing application with full SIP and H.323 support (formerly known as GNOME Meeting).|http://www.ekiga.org/|{{Pkg|ekiga}}}}<br />
* {{App|[[Wikipedia:Empathy (software)|Empathy]]|A GNOME instant messenger client using the Telepathy framework with SIP support (using the Sofia-SIP library).|https://live.gnome.org/Empathy|{{Pkg|empathy}}}}<br />
* {{App|iaxComm|An open source softphone for the Asterisk PBX (using the IAX protocol).|http://iaxclient.sourceforge.net/iaxcomm/|{{AUR?|iaxcomm}}}}<br />
* {{App|[[Wikipedia:Jitsi|Jitsi]]|An audio/video SIP VoIP phone and instant messenger written in Java (formerly SIP-Communicator).|https://jitsi.org/|{{AUR|jitsi}}}}<br />
* {{App|Kiax|A Qt-based IAX/2 Softphone.|http://www.forschung-direkt.eu/projects/kiax2/|{{AUR|kiax}}}}<br />
* {{App|[[Wikipedia:KPhone|KPhone]]|A Qt SIP User Agent with voice, video and text messaging support.|http://sourceforge.net/projects/kphone/|{{AUR?|kphone}}}}<br />
* {{App|[[Wikipedia:Linphone|Linphone]]|An VoIP phone application that allows you to to communicate freely with people over the internet, with voice, video, and text instant messaging.|http://www.linphone.org/|{{Pkg|linphone}}}}<br />
* {{App|Minisip|A SIP User Agent with focus on security (supports TLS, end-to-end security, SRTP, MIKEY (DH, PSK, PKE)).|http://www.minisip.org/|{{AUR|minisip-svn}}}}<br />
* {{App|[[Wikipedia:Psi (instant messaging client)|Psi]]|A Qt-based Jabber client which supports video conferencing (since version 0.13).|http://psi-im.org/|{{Pkg|psi}} {{AUR|psi-plus}}}}<br />
* {{App|[[Wikipedia:QuteCom|QuteCom]]|A softphone which allows you to make free PC to PC video and voice calls, and to integrate all your IM contacts in one place. (formerly Wengo Phone)|http://trac.qutecom.org/|{{AUR|qutecom}}}}<br />
* {{App|[[Wikipedia:SFLphone|SFLPhone]]|An open-source SIP/IAX2 compatible softphone with PulseAudio support.|http://sflphone.org/|{{AUR|sflphone}}}}<br />
* {{App|[[Skype]]|A popular P2P application for high-quality voice communication.|http://www.skype.com/|{{Pkg|skype}}}}<br />
* {{App|[[TeamSpeak]]|A proprietary VoIP application with gamers as its target audience.|http://www.teamspeak.com/|{{AUR|teamspeak}}}}<br />
* {{App|[[Wikipedia:Twinkle (software)|Twinkle]]|A Qt softphone for VoIP and IM communication using SIP.|http://www.twinklephone.com/|{{AUR|twinkle}}}}<br />
* {{App|[[Wikipedia:X-Lite|X-Lite]]|A proprietary freeware VoIP soft phone that uses SIP.|http://www.counterpath.net/x-lite|{{AUR|xlite_bin}}}}<br />
* {{App|[[Wikipedia:Zfone|Zfone]]|A softphone application for secure voice communication over the Internet (VoIP), using the ZRTP protocol.|http://zfoneproject.com/|{{AUR|zfone}}}}<br />
<br />
==== Utilities ====<br />
* {{App|Gladstone|An educational ITU-T G.729 compliant codec with a GStreamer plugin.|http://code.google.com/p/gladstone/|{{AUR|gladstone-drizztbsd-git}}}}<br />
* {{App|SIPp|An open source test tool and traffic generator for the SIP protocol.|http://sipp.sourceforge.net/|{{AUR|sipp}}}}<br />
* {{App|Sipsak|A small command-line tool for developers and administrators of SIP applications.|http://sipsak.org/|{{AUR|sipsak}}}}<br />
<br />
=== Pastebin Clients ===<br />
{{wikipedia|Pastebin}}<br />
Pastebin services are often used to paste information into [[IRC_Channel|IRC channels]] to help with troubleshooting. There are services for both text (e.g. [http://sprunge.us/ sprunge.org], [http://pastie.org/ pastie.org], [http://codepad.org/ codepad.org]) and images (e.g. [http://imgur.com/ imgur.com], [http://picpaste.com/ picpaste.com]). Pastebin clients allow you to post directy from the cli without using a web browser.<br />
<br />
{{Tip|The sprunge pastebin can be accessed directly via curl: {{bc|<nowiki><command> | curl -F 'sprunge=<-' http://sprunge.us</nowiki>}}<br />
There is also a [https://github.com/robbyrussell/oh-my-zsh/wiki/Usage-of-the-%22sprunge%22-command sprunge plugin] for [https://github.com/robbyrussell/oh-my-zsh/wiki oh-my-zsh] (a configuration tool for the [[Zsh]] command shell).}}<br />
<br />
{{Warning|Do not use [http://pastebin.com/ pastebin.com]. It appears to be the most popular site but it is slow, full of adverts, formats the text badly (it will mess up your code) and many people can not even open the site due to aggressive spam filters.}}<br />
<br />
* {{App|Curlpaste|A utility to post text files to a number of pastebin sites using curl and Lua. Servers: [http://pastebin.ca/ pastebin.ca], [http://codepad.org/ codepad.org], [http://dpaste.com/ dpaste.com] and [http://fpaste.org/ fpaste.org].|https://github.com/Kiwi/curlpaste/|{{Pkg|curlpaste}}}}<br />
* {{App|Elmer|A pastebin client similar to wgetpaste and curlpaste, except written in Perl and usable with wget or curl. Servers: [http://codepad.org/ codepad.org], [http://rafb.me/ rafb.me], [http://sprunge.us/ sprunge.us], [http://ompldr.org/ ompldr.org].|https://github.com/sudokode/elmer|{{AUR|elmer}}}}<br />
* {{App|Fb-client|A client for the [http://paste.xinu.at/ paste.xinu.at] pastebin.|http://paste.xinu.at|{{pkg|fb-client}}}}<br />
* {{App|Gist|A command-line interface for the [https://gist.github.com/ gist.github.com] pastebin service.|http://github.com/defunkt/gist|{{AUR|gist}}}}<br />
* {{App|Haste|A universal pastebin tool, written in Haskell. Servers: [http://hpaste.org/ hpaste.org], [http://paste2.org/ paste2.org], [http://pastebin.com/ pastebin.com] and others.|http://hackage.haskell.org/package/haste|{{AUR|haste}}}}<br />
* {{App|Hg-paste|A pastebin extension for Mercurial which can send diffs to various pastebin websites for easy sharing. Servers: [http://dpaste.com/ dpaste.com] and [http://dpaste.org/ dpaste.org].|http://bitbucket.org/sjl/hg-paste|{{AUR|hg-paste}}}}<br />
* {{App|Ix|A client for the ix.io pastebin.|http://ix.io|{{pkg|ix}}}}<br />
* {{App|Npaste-client|A client for the [http://npaste.de/ npaste.de] pastebin.|http://npaste.de|{{AUR|npaste-client}}}}<br />
* {{App|Pastebinit|A really small Python script that acts as a Pastebin client. Servers: [http://pastie.org/ pastie.org], [http://paste.kde.org/ paste.kde.org], [http://paste.debian.net/ paste.debian.net], [http://paste.ubuntu.com/ paste.ubuntu.com] and others (for a full list see {{ic|pastebinit -l}}).|http://launchpad.net/pastebinit|{{AUR|pastebinit}}}}<br />
* {{App|Vim-gist| A Vim script for [https://gist.github.com/ gist.github.com].| http://www.vim.org/scripts/script.php?script_id&#61;2423 |{{pkg|vim-gist}}}}<br />
* {{App|Vim-paster|A Vim plugin to paste to any pastebin service using curl.|http://eugeneciurana.com/site.php?page&#61;tools|{{AUR|vim-paster}}}}<br />
* {{App|Wgetpaste|A bash script that automates pasting to a number of pastebin services. Servers: [http://pastebin.ca/ pastebin.ca], [http://codepad.org/ codepad.org], [http://dpaste.com/ dpaste.com] and [http://pastebin.osuosl.org/ pastebin.osuosl.org].|http://wgetpaste.zlin.dk/|{{Pkg|wgetpaste}}}}<br />
<br />
=== Email clients ===<br />
{{Wikipedia|Comparison of e-mail clients}}<br />
<br />
==== Console ====<br />
* {{App|[[Alpine]]|A fast, easy-to-use and Apache-licensed email client based on [[Wikipedia:Pine (email client)|Pine]].|https://washington.edu/alpine|{{Pkg|alpine}}}}<br />
* {{App|[[Wikipedia:Gnus|Gnus]]|An email, NNTP and RSS client for Emacs.|http://gnus.org/|{{AUR|emacs-gnus-git}}}}<br />
* {{App|[[Wikipedia:mailx|Heirloom mailx]]|A full-featured command-line Mail User Agent derived from Berkeley Mail.|http://heirloom.sourceforge.net/mailx.html|{{Pkg|heirloom-mailx}}}}<br />
* {{App|[[Mutt]]|A small but very powerful text-based mail client.|http://www.mutt.org/|{{Pkg|mutt}}}}<br />
* {{App|[[Sup]]|A CLI mail client with very fast searching, tagging, threading and GMail like operation.|http://sup.rubyforge.org/|{{AUR|sup}}}}<br />
* {{App|[[Wikipedia:Wanderlust (software)|Wanderlust]]|An email client and news reader for Emacs.|http://www.gohome.org/wl/|{{Pkg|wanderlust}}}}<br />
<br />
==== Graphical ====<br />
* {{App|[[Balsa]]|A simple and light email client that is part of the Gnome project.|http://balsa.gnome.org/|{{Pkg|balsa}}}}<br />
* {{App|[[Wikipedia:Claws Mail|Claws Mail]]|A lightweight GTK+-based email client and news reader.|http://claws-mail.org/|{{Pkg|claws-mail}}}}<br />
* {{App|[[Evolution]]|A mature and feature-rich e-mail client used in GNOME by default.|http://projects.gnome.org/evolution/|{{Pkg|evolution}}}}<br />
* {{App|Geary|A simple desktop mail client built in [[Wikipedia:Vala (programming language)|Vala]].|http://redmine.yorba.org/projects/geary/wiki|{{AUR|geary}}}}<br />
* {{App|[[Wikipedia:Kmail|Kmail]]|A mature and feature-rich email client part of the KDE project.|http://kde.org/applications/internet/kmail/|{{Pkg|kdepim-kmail}}}}<br />
* {{App|Manitou Mail|A database-driven email system.|http://www.manitou-mail.org/|{{AUR|manitou-mdx}} {{AUR|manitou-ui}}}}<br />
* {{App|[[Wikipedia:Sylpheed|Sylpheed]]|A lightweight and user-friendly GTK+ email client.|http://sylpheed.sraoss.jp/en/|{{Pkg|sylpheed}}}}<br />
* {{App|[[Thunderbird]]|A feature-rich email client from Mozilla written in GTK+.|http://www.mozilla.org/thunderbird/|{{Pkg|thunderbird}}}}<br />
* {{App|Trojitá|A Qt IMAP email client.|http://trojita.flaska.net/|{{AUR|trojita}}}}<br />
<br />
=== Network Managers ===<br />
* {{App|[[netcfg]]|A simple and robust network configuration application that uses profile scripts.|http://projects.archlinux.org/netcfg.git/|{{Pkg|netcfg}}}}<br />
* {{App|[[NetworkManager]]|A manager that provides wired, wireless, mobile broadband and OpenVPN detection with configuration and automatic connection.|http://projects.gnome.org/NetworkManager/|{{Pkg|networkmanager}}}}<br />
* {{App|[[Wicd]]|A wireless and wired connection manager with few dependencies and GTK+, KDE and command-line interfaces.|http://wicd.sourceforge.net/|{{Pkg|wicd}}}}<br />
<br />
=== News Aggregators ===<br />
{{Wikipedia|Comparison of feed aggregators}}<br />
<br />
==== Console ====<br />
* {{App|[[Wikipedia:Canto (news aggregator)|Canto]]|A ncurses RSS aggregator|http://codezen.org/canto/|{{AUR|canto}}}}<br />
* {{App|[[Wikipedia:Gnus|Gnus]]|An email, NNTP and RSS client for Emacs.|http://gnus.org/|{{AUR|emacs-gnus-git}}}}<br />
* {{App|Newsbeuter|An ncurses RSS aggregator with layout and keybinding similar to the [[Mutt]] email client.|http://newsbeuter.org|{{Pkg|newsbeuter}}}}<br />
* {{App|Rawdog|An "RSS Aggregator Without Delusions Of Grandeur" that parses RSS/CDF/Atom feeds into a static HTML page of articles in chronological order.|http://offog.org/code/rawdog.html|{{AUR|rawdog}}}}<br />
* {{App|Snownews|A text mode RSS news reader.|http://kiza.kcore.de/software/snownews/|{{Pkg|snownews}}}}<br />
<br />
==== Graphical ====<br />
* {{App|[[Wikipedia:Kontact#News Feed Aggregator|Akregator]]|A news aggregator for KDE, part of KDE PIM.|http://kde.org/applications/internet/akregator/|{{Pkg|kdepim-akregator}}}}<br />
* {{App|[[Wikipedia:BlogBridge|BlogBridge]]|An excellent Java-based aggregator, which gives users the option to synchronize their feeds across multiple computers.|http://blogbridge.com|{{AUR|blogbridge}}}}<br />
* {{App|[[Wikipedia:Liferea|Liferea]]|A GTK+ news aggregator for online news feeds and weblogs.| http://liferea.sourceforge.net|{{Pkg|liferea}}}}<br />
* {{App|RSS Guard|A (very) tiny RSS and Atom news reader developed using Qt framework.|https://code.google.com/p/rss-guard/|{{AUR|rss-guard}}}}<br />
* {{App|[[Wikipedia:RSSOwl|RSSOwl]]|A powerful aggregator for RSS and Atom feeds, written in Java using Eclipse Rich Client Platform and SWT as a widget toolkit.|http://boreal.rssowl.org|{{AUR|rssowl}}}}<br />
* {{App|[[Thunderbird]]|An email client from Mozilla which also functions as a pretty nice news aggregator.|http://www.mozilla.org/thunderbird/|{{Pkg|thunderbird}}}}<br />
* {{App|Tickr (formerly News)|A GTK+-based RSS Reader that displays feeds as a smooth scrolling line on your Desktop, as known from TV stations.|http://newsrssticker.com/|{{AUR|tickr}}}}<br />
* {{App|Urssus|A cross platform GUI news aggregator.|https://code.google.com/p/urssus/|{{AUR|urssus}}}}<br />
<br />
=== Web Browsers ===<br />
{{Wikipedia|Comparison of web browsers}}<br />
<br />
==== Console ====<br />
* {{App|[[Wikipedia:ELinks|ELinks]]|An advanced and well-established feature-rich text mode web browser. (Links fork, barely supported since 2009)|http://elinks.or.cz/|{{Pkg|elinks}}}}<br />
* {{App|[[Wikipedia:Links (web browser)|Links]]|A text WWW browser, similar to Lynx, but with CSS-based rendering.|http://links.twibright.com/|{{Pkg|links}}}}<br />
* {{App|[[Wikipedia:Lynx (web browser)|Lynx]]|A text browser for the World Wide Web.|http://lynx.isc.org|{{Pkg|lynx}}}}<br />
* {{App|[[Wikipedia:W3m|w3m]]|A pager/text-based web browser.|http://w3m.sourceforge.net/|{{Pkg|w3m}}}}<br />
<br />
==== Graphical ====<br />
* {{App|[[Wikipedia:Abaco (web browser)|Abaco]]|A multi-page graphical web browser for the Plan 9 OS.|http://lab-fgb.com/abaco/|{{AUR|abaco}}}}<br />
* {{App|[[Wikipedia:Arora (browser)|Arora]]|A cross-platform web browser built using QtWebKit.|https://code.google.com/p/arora/|{{Pkg|arora}}}}<br />
* {{App|[[Chromium]]|A web browser developed by Google that uses the WebKit layout engine and application framework, the open source project behind Google Chrome.|http://www.chromium.org/|{{Pkg|chromium}}}}<br />
* {{App|[[Wikipedia:Conkeror|Conkeror]]|A highly programmable web browser, with Emacs-like keybindings, based on Mozilla's XULRunner.|http://conkeror.org/|{{AUR|conkeror-git}}}}<br />
* {{App|[[Wikipedia:Dillo|Dillo]]|A small, fast graphical web browser built on [[Wikipedia:Fltk|FLTK]].|http://dillo.org/|{{Pkg|dillo}}}}<br />
* {{App|[[DWB]]|A lightweight, highly customizable web browser based on the WebKit engine with vi-like shortcuts and tiling layouts. |http://portix.bitbucket.org/dwb/|{{AUR|dwb}}}}<br />
* {{App|[[Epiphany]]|A browser which uses the WebKit rendering engine, the Gnome default.|http://projects.gnome.org/epiphany/|{{Pkg|epiphany}}}}<br />
* {{App|[[Firefox]]|An extensible GTK+ browser from Mozilla based on Gecko with fast rendering.|https://mozilla.com/firefox|{{Pkg|firefox}}}}<br />
* {{App|Hv3|A minimalist web browser based on [[Wikipedia:Tkhtml|Tkhtml3]].|http://tkhtml.tcl.tk/hv3.html|{{AUR|hv3}}}}<br />
* {{App|[[Jumanji]]|A highly customizable and functional web browser.|http://pwmt.org/projects/jumanji|{{AUR|jumanji}}}}<br />
* {{App|[[Wikipedia:Kazehakase|Kazehakase]]|A much lighter, but rather feature-lacking alternative to other browsers, based on GTK+ and Gecko.|http://kazehakase.sourceforge.jp/|{{AUR|kazehakase}}}}<br />
* {{App|[[Wikipedia:Konqueror|Konqueror]]|A web browser based on Qt and KHTML, part of the KDE desktop|http://konqueror.org/|{{Pkg|kdebase-konqueror}}}}<br />
* {{App|[[Luakit]]|A highly configurable, micro-browser framework based on the WebKit engine and the GTK+ toolkit. It is very fast, extensible by Lua and licensed under the GNU GPLv3 license.|http://mason-larobina.github.com/luakit/|{{Pkg|luakit}}}}<br />
* {{App|[[Wikipedia:Midori (web browser)|Midori]]|A lightweight web browser based on GTK+ and WebKit.|http://twotoasts.de/index.php/midori/|{{Pkg|midori}}}}<br />
* {{App|[[Wikipedia:NetSurf|NetSurf]]|A featherweight browser written in C, notable for its lack of JavaScript support and fast rendering through its own custom rendering engine.|http://netsurf-browser.org|{{Pkg|netsurf}}}}<br />
* {{App|[[Opera]]|A highly customizable browser with focuses on an adherence to web rendering standards.|http://opera.com|{{Pkg|opera}}}}<br />
* {{App|[[Wikipedia:QupZilla|QupZilla]]|A new and very fast open source browser based on WebKit core, written in Qt framework.| http://www.qupzilla.com |{{pkg|qupzilla}}}} <br />
* {{App|[[wikipedia:Rekonq|Rekonq]]|A WebKit-based web browser for KDE.|http://rekonq.kde.org/|{{Pkg|rekonq}}}}<br />
* {{App|Sb|A very lightweight WebKit-based browser that uses keybindings to perform most things the URL bar would usually do.|https://github.com/mutantturkey/sb/|{{AUR|sb-git}}}} <br />
* {{App|Surf|A lightweight WebKit-based browser, which follows the [http://suckless.org/philosophy suckless ideology] (basically, the browser itself is a single C source file).|http://surf.suckless.org|{{AUR|surf-hg}}}}<br />
* {{App|[[Wikipedia:Uzbl|Uzbl]]|A group of web interface tools which adhere to the Unix philosophy.|http://uzbl.org/|{{Pkg|uzbl-browser}}}}<br />
* {{App|[[Vimprobable]]|A browser that behaves like the Vimperator plugin available for Mozilla Firefox. It is based on the WebKit engine and uses the GTK+ bindings.|http://sourceforge.net/apps/trac/vimprobable/|{{AUR|vimprobable-git}}}}<br />
<br />
=== Microblogging Clients ===<br />
{{Wikipedia|List of Twitter services and applications}}<br />
<br />
* {{App|Choqok|A microblogging client for KDE that supports Twitter.com, Identi.ca and opendesktop.org services.|http://choqok.gnufolks.org/|{{Pkg|choqok}}}}<br />
* {{App|[[Wikipedia:Gwibber|Gwibber]]|A GTK+-based microblogging client with support for Twitter, Identi.ca, StatusNet, Facebook, FriendFeed, Digg, Flikr and Qaiku.|http://gwibber.com/|{{Pkg|gwibber}}}}<br />
* {{App|[[Wikipedia:Hotot (program)|Hotot]]|A lightweight and open source microblogging client with support for Twitter and Identi.ca and integration with various image sharing services and URL shorteners.|http://hotot.org|{{AUR|hotot}}}}<br />
* {{App|Pino|A simple and fast client for Twitter and Identi.ca. written in [[Wikipedia:Vala (programming language)|Vala]].|http://pino-app.appspot.com/|{{AUR|pino}}}}<br />
* {{App|Qwit|A cross-platform client for Twitter using the Qt toolkit.|http://code.google.com/p/qwit/|{{AUR|qwit}}}}<br />
* {{App|tyrs|A simple client for for Twitter and Identi.ca supporting virtually all its features with nice console UI.|http://tyrs.nicosphere.net/|{{AUR|tyrs}}}}<br />
<br />
=== FTP ===<br />
==== FTP Clients ====<br />
{{Wikipedia|Comparison of FTP client software}}<br />
<br />
* {{App|CurlFtpFS|A filesystem for acessing FTP hosts based on FUSE and libcurl.|http://curlftpfs.sourceforge.net/|{{Pkg|curlftpfs}}}}<br />
* {{App|[[Wikipedia:FatRat|FatRat]]|A download manager with support for HTTP, FTP, SFTP, BitTorrent, RapidShare and more.|http://fatrat.dolezel.info/|{{Pkg|fatrat}}}}<br />
* {{App|[[Wikipedia:FileZilla|FileZilla]]|A fast and reliable FTP, FTPS and SFTP client.|http://filezilla-project.org/|{{Pkg|filezilla}}}}<br />
* {{App|fuseftp|An FTP filesystem written in Perl, using [[Wikipedia:Filesystem in Userspace|FUSE]].|http://freshmeat.net/projects/fuseftp/|{{AUR|fuseftp}}}}<br />
* {{App|[[Wikipedia:gFTP|gFTP]]|A multithreaded FTP client for Linux.|http://gftp.seul.org/|{{Pkg|gftp}}}}<br />
* {{App|[[Wikipedia:Lftp|LFTP]]|A sophisticated command-line FTP client.|http://lftp.yar.ru/|{{Pkg|lftp}}}}<br />
* {{App|[[Wikipedia:tnftp|tnftp]]|A FTP client with several advanced features for [[Wikipedia:NetBSD|NetBSD]].|http://freecode.com/projects/tnftp|{{Pkg|tnftp}}}}<br />
Some file managers like [[Dolphin]], [[Nautilus]] and [[Thunar]] also provide FTP functionality.<br />
<br />
==== FTP Servers ====<br />
* {{App|[[Very Secure FTP Daemon|vsftpd]]|lightweight, stable and secure FTP server for UNIX-like systems.|https://security.appspot.com/vsftpd.html|{{Pkg|vsftpd}}}}<br />
<br />
* {{App|[[Pure FTP Daemon|pure-ftpd]]|a free (BSD), secure, production-quality and standard-conformant FTP server.|http://www.pureftpd.org/project/pure-ftpd|[https://aur.archlinux.org/packages/pure-ftpd/ AUR Package], [[Wikipedia:Pure-FTPd|Wikipedia]] }}</div>Deemytchhttps://wiki.archlinux.org/index.php?title=Diskless_system&diff=152420Diskless system2011-08-18T14:25:08Z<p>Deemytch: /* Server-Side Setup */</p>
<hr />
<div>[[Category:Boot process (English)]]<br />
[[Category:Networking (English)]]<br />
==Root over NFS (diskless boot)==<br />
<br />
This HOWTO will explain the step-by-step method for booting an Arch Linux installation over an NFS share. The first half will primarily cover configuration of the server, and the second will cover client side configuration.<br />
<br />
<!-- This text will contain errors, please report any problems you have with error messages on the talk page. --><br />
<br />
For more information on Network File Sharing, see [[Nfs]].<br />
<br />
==Hardware Considerations==<br />
<br />
Server: <br />
Any standard computer should work, but for performance reasons it should have fast disk access and preferably gigabit ethernet.<br />
<br />
Client:<br />
For a completely diskless boot, the client computer must have a network-bootable (PXE) network card. Wireless will not work, with exception of a wireless-to-ethernet external bridge. Many motherboards have a PXE-compatible ethernet card built in, but you will need to enable support in the BIOS.<br />
<br />
If you don't have a PXE-compatible network card, you can set up a semi-diskless client. This involves building a flashdrive or CD-based boot partition with syslinux or grub. The configuration is the same, but skipping the tftp steps. Creating boot-CDs or flashdrives is beyond the scope of this article.<br />
<br />
For more Information see [http://etherboot.org/ Etherboot/gPXE]<br />
<br />
Prebuilt gPXE images are available from [http://rom-o-matic.net/ http://rom-o-matic.net/]<br />
<br />
=Server-Side Setup=<br />
<br />
The server will have to run a tftp daemon to share the kernel/bootsector along with an NFS share to share the root directory. PXE requires the DHCP server to announce the location of the tftp server to any clients that connect. Most routers will not support this, and this article will show how to modify an existing DNSMasq or DHCPD server. See [[NAT'ing_firewall_-_Share_your_broadband_connection]] for setting up a simple router replacement, including DHCP via DNSMasq, a good place to start for this project. If you do have a router that supports PXE, then you will need to tell it to send all tftp requests to the server.<br />
<br />
You could also use gpxe from [http://etherboot.org/] without tftp at all if you already have some web-server up and running. gPXE supports ftp, http, https and wifi booting.<br />
<br />
At this point I will assume you have a server running with DNSMasq or DHCPd providing DHCP services, along with some space for the client's root.<br />
<br />
First, install nfs-utils, syslinux (for the pxelinux bootloader, you can substitute for GRUB, see [http://wiki.linuxmce.org/index.php/GRUB_PXE_network_boot]).<br />
<pre><br />
pacman -S nfs-utils syslinux<br />
</pre><br />
<br />
==Create Client Root Directory==<br />
<br />
First, create a directory that will hold the root filesystem, this can be anywhere. For this example, I will use /disklessroot.<br />
<pre><br />
mkdir /disklessroot<br />
</pre><br />
<br />
Create a directory for new pacman database,proc and dev mountpoints.<br />
<pre><br />
mkdir -p /disklessroot/var/lib/pacman<br />
mkdir /disklessroot/proc<br />
mkdir /disklessroot/dev<br />
mkdir /disklessroot/sys<br />
</pre><br />
<br />
Mount the /proc and /sys filesystems to allow the installation to use the kernel-provided information within the chrooted environment, and then mount-bind the /dev filesystem.<br />
<pre><br />
mount -t proc none /disklessroot/proc<br />
mount -t sysfs none /disklessroot/sys<br />
mount -o bind /dev /disklessroot/dev<br />
</pre><br />
<br />
Now you need to populate that root with an installation of Arch Linux.<br />
<br />
If you are running 64-bit server and your client is 32-bit, you want to change /etc/pacman.d/mirrorlist entry to point 32-bit architecture. Remember to switch it back after populating client's filesystem. Also you want to add "--arch i686" to the following command.<br />
<pre><br />
pacman -Sy --root /disklessroot --dbpath /disklessroot/var/lib/pacman base<br />
</pre><br />
Install mkinitcpio-nfs-utils for ipconfig and nfsmount tools for NFS root support in mkinitcpio<br />
<pre><br />
pacman -Sy --root /disklessroot --dbpath /disklessroot/var/lib/pacman mkinitcpio-nfs-utils<br />
</pre><br />
Edit /disklessroot/etc/mkinitcpio.conf, add 'nfs' to the MODULE section, and add 'net' after udev under HOOKS..<br />
<pre><br />
MODULES="nfs"<br />
HOOKS="base udev net autodetect pata scsi sata filesystems"<br />
</pre><br />
<br />
Now, chroot into /disklessroot and recreate the kernel image.<br />
<pre><br />
chroot /disklessroot<br />
mkinitcpio -p kernel26<br />
exit<br />
umount /disklessroot/dev<br />
umount /disklessroot/proc<br />
umount /disklessroot/sys<br />
</pre><br />
You should be back to the normal root, the exit command should leave the chroot. Check before continuing.<br />
<br />
==PXE/TFTP Setup==<br />
===Using DNSMasq===<br />
Now to setup tftp and PXE.<br />
<br />
Within DNSMasq, there is an easy-to-use tftp server, so this article will use that.<br />
First, edit /etc/dnsmasq.conf and uncomment these lines, changing them to reflect your file paths.<br />
<pre><br />
dhcp-range=192.168.0.1,192.168.0.100,12h #change ip addresses to your network<br />
# Set the boot filename for BOOTP. You will only need <br />
# this is you want to boot machines over the network and you will need<br />
# a TFTP server; either dnsmasq's built in TFTP server or an<br />
# external one. (See below for how to enable the TFTP server.)<br />
dhcp-boot=pxelinux.0 #change this if you are using GRUB.<br />
<br />
# Enable dnsmasq's built-in TFTP server<br />
enable-tftp<br />
<br />
# Set the root directory for files available via FTP.<br />
tftp-root=/disklessroot/boot/<br />
<br />
#Send options to PXELinux. Note that we need to send the options even<br />
#though they don't appear in the parameter request list, so we need<br />
#to use dhcp-option-force here.<br />
#See http://syslinux.zytor.com/pxe.php#special for details.<br />
#Magic number - needed before anything else is recognised<br />
dhcp-option-force=208,f1:00:74:7e<br />
<br />
#Configuration file name<br />
dhcp-option-force=209,pxelinux.cfg/default<br />
<br />
#Path prefix<br />
dhcp-option-force=210,/disklessroot/boot/<br />
</pre><br />
<br />
This has the additional feature of allowing you to update the kernel within the client OS.<br />
<br />
Make sure the firewall on your server does not block UDP port 69 (UDP ports 67-68 and 4011 are also used, but should not need to be opened).<br />
<br />
=== Using DHCP & XINETD===<br />
If you already have XINETD & DHCP running then you can use them to support net booting in place of the DNSMasq method above. The xinetd service will start the TFTP program on demand as needed.<br />
<br />
First, edit /etc/dhcpd.conf to add the following statements (assuming you already have dhcpd working.)<br />
<br />
<pre><br />
#added for PXE net booting<br />
allow booting;<br />
allow bootp;<br />
group {<br />
next-server 10.0.0.1; #change IP address to match your server<br />
# This is the pxe bootloader file<br />
filename "pxelinux.0";<br />
# One host block per client. This network only has one.<br />
host netboot1 {<br />
#change below to match MAC address of client network device<br />
hardware ethernet 08:00:27:d0:9b:97;<br />
#change below to IP address desired for client <br />
fixed-address 10.0.0.10; <br />
}<br />
}<br />
#group<br />
</pre><br />
<br />
Second, create a file /etc/xinetd.d/tftp with the following lines. After the the xinetd service is restarted the tftpd program will start on demand. <br />
<br />
<pre><br />
service tftp<br />
{<br />
per_source = 11<br />
socket_type = dgram<br />
protocol = udp<br />
user = root<br />
server = /usr/sbin/tftpd<br />
server_args = /disklessroot/boot<br />
wait = yes<br />
cps = 100 2<br />
}<br />
</pre><br />
<br />
Be sure to restart the DHCP & XINETD services to activate the changes. <br />
<br />
==NFS Setup==<br />
Edit /etc/exports, add this line.<br />
<pre><br />
/disklessroot *(rw,fsid=0,no_root_squash,no_subtree_check)<br />
</pre><br />
<br />
Add "rpcbind nfs-common nfs-server" to the server's /etc/rc.conf under DAEMONS, in that specific order. (Assuming dnsmasq was already installed and on the daemons list.)<br />
<br />
Refer to [[Nfs]] for any configuration/security issues that are not covered here.<br />
<br />
=Client Configuration=<br />
These files are to be edited from the server, as the client is not ready yet.<br />
<br />
==Boot Configuration==<br />
Copy pxelinux.0 to /disklessroot/boot/<br />
<pre><br />
cp /usr/lib/syslinux/pxelinux.0 /disklessroot/boot/<br />
mkdir /disklessroot/boot/pxelinux.cfg<br />
</pre><br />
Create and edit /disklessroot/boot/pxelinux.cfg/default (Replacing IP addresses and file-paths as needed.)<br />
<pre><br />
default linux<br />
<br />
label linux<br />
kernel vmlinuz26<br />
append initrd=kernel26.img rootfstype=nfs root=/dev/nfs nfsroot=10.0.0.1:/disklessroot,v3,rsize=16384,wsize=16384 ip=::::::dhcp<br />
</pre><br />
For more ip option look here [http://wiki.archlinux.org/index.php/Mkinitcpio#Using_net Using net]<br />
<br />
The syntax for the pxelinux bootloader is the same as Syslinux, here[http://syslinux.zytor.com/faq.php] under "CONFIGURATION FILE".<br />
Remember that any filenames will be relative to the tftp server, check the setting in /etc/dnsmasq.conf named "tftp-root=". <br />
This example places tftp-root at /disklessroot/boot/. Thus the kernel should be at /disklessroot/boot/vmlinuz26 on the server, and will show up as /vmlinuz26 for the first stage of client boot. Exactly like a separate /boot partition.<br />
<br />
As there is no entry for / in the clients /etc/fstab file, the client may display the error "mount: can't find / in /etc/fstab or /etc/mtab" on startup. This error can be safely ignored. However, if you want to suppress the error you can add a hack to /etc/fstab. This involves adding the following to /disklessroot/etc/fstab:<br />
<pre><br />
none / none<br />
</pre><br />
<br />
Note:If you want ssh into netbooted machine,add this line to /disklessroot/etc/fstab:<br />
<pre><br />
none /dev/pts devpts gid=5,mode=620 0 0<br />
</pre><br />
Without this,you will get an error that states: "Server refused to allocate pty".<br />
--[[User:Edacval|edacval]] 16:54, 26 October 2008 (EDT)<br />
<br />
=DHCP/Network Daemon Workaround=<br />
This is to prevent the client from trying to reconnect the network and killing itself. Any disconnect of the network and your client will freeze.<br />
<br />
The following workaround involves running the dhcpcd DHCP client on startup with the -s option to use the existing kernel DHCP auto-configured IP address instead of requesting a new one.<br />
Note: This workaround assumes that eth0 is the network interface used for DHCP.<br />
<br />
Edit <code>/etc/conf.d/dhcpcd</code> and append the DHCPCD_ARGS options with <code>-s $(ifconfig eth0 | grep -o '[0-9]*\.[0-9\.]*' | head -n1)</code><br />
<pre><br />
#<br />
# Arguments to be passed to the DHCP client daemon<br />
#<br />
<br />
DHCPCD_ARGS=" -s $(ifconfig eth0 | grep -o '[0-9]*\.[0-9\.]*' | head -n1)"<br />
</pre><br />
<br />
To allow the shutdown process to work properly you must also set the following option in <code>/etc/rc.conf</code> <br />
<pre><br />
NETWORK_PERSIST="yes"<br />
</pre><br />
<br />
<br />
<br />
Another workaround is presented below which configures the DNS server manually.<br />
<br />
=DHCP/Network Daemon Workaround Number 2=<br />
<br />
Edit the client's rc.conf and disable the network daemon (/disklessroot/etc/rc.conf, or just /etc/rc.conf once you boot into the client).<br />
<pre><br />
DAEMONS=(syslog-ng !network ...<br />
</pre><br />
<br />
The main issue with this method is the fact that your resolv.conf will not auto-update (since this bypasses DHCP).<br />
To work around this, edit /etc/resolv.conf and add this line (/disklessroot/etc/resolv.conf on the server).<br />
<pre><br />
nameserver 10.0.0.1 #change this IP for whatever DHCP/DNS server you have, the server's IP usually works if you configured DNS correctly.<br />
</pre><br />
<br />
<br />
=Testing/Debugging the Client=<br />
Now reboot the client computer, making sure the network card is first in the boot-order.<br />
<br />
If all goes right, you should see the network card get an IP address from the server, then connect and boot the kernel. After the initial kernel messages, you should either see Arch Linux boot, or a "killed init" message. <br />
<br />
If init was killed, check your configuration, it usually means it could not mount the NFS folder. Refer to [[Nfs]] for more help. <br />
<br />
If it freezes during a mounting operation, check the client's /etc/fstab or the /boot/pxelinux.cfg/default settings.<br />
<br />
If it freezes duing the "Network" section, either disable it using the previously mentioned workaround, or specify IP settings in /etc/rc.conf. (You can try setting <i>eth0="dhcp"</i>)<br />
<br />
==Performance Notes==<br />
I am currently using a diskless client as my primary internet/development OS due to a hard-drive restriction on my PC. My server is an older machine is running Arch Linux with a software-based raid5 array. My client can read files from the NFS share almost as fast as my server can, but there is a limitation with latency and caching. It slows down during "pacman -Sy" and package installs that involve many small files. Otherwise, it runs fine. It also seems that NFS runs synchronously by default, meaning that all writes have to be committed before continuing, no caching in free memory like it would on a local hard drive. This is actually a good thing, from the data integrity standpoint, as fewer files are lost during a random power outage. I have not tried the "async" NFS option because the nfs man page does not suggest it will work for NFSv3.<br />
<br />
<br />
----<br />
<br />
<br><br><br />
<i>Mostly Complete.<br />
Thank you, Net147, for your excellent edits.<br />
Please edit/update as needed.</i></div>Deemytch