1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853
|
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<!-- $Id: installation-and-basic-configuration.xml,v 1.16 2012/02/23 13:44:38 mg Exp $ -->
<chapter id="installation">
<title>Установка</title>
<abstract>
<para>
В этой главе описывается установка и базовая конфигурация главного
OTRS-фреймворка. Здесь вы найдете информацию об установке OTRS из исходных
кодов или из бинарных пакетов, например RPM, или с помощью
Windows-инсталлятора.
</para>
<para>
В этой главе рассматриваются такие вопросы как: конфигурация веб-сервера и
сервера базы данных, интефейса между OTRS и базой данных, установка
дополнительных Perl-модулей, установка соответствующих прав доступа для
OTRS, настройка планировщика задач cron jobs для OTRS и основных параметров
в конфигурационных файлах.
</para>
<para>
Следуйте подробным шагам этой главы чтобы установить OTRS на своем
сервере. Потом можно использовать его веб-интерфейс чтобы войти в систему и
производить администрирование.
</para>
</abstract>
<section id="installation-of-prepared-packages">
<title>Самый простой способ - установка из готовых бинарных пакетов</title>
<para>
Самый простой и удобный способ установки OTRS - использовать готовые
(встроенные) пакеты, которые можно найти и загрузить перейдя по ссылке
<ulink url="http://www.otrs.org"> <citetitle>http://www.otrs.org</citetitle>
</ulink>. В следующих разделах описывается установка OTRS из готовых
(встроенных) или бинарных пакетов, специально собраных для операционных
систем: SUSE, Debian и Microsoft Windows. В случае если нету возможности
использовать готовые (встроенные) пакеты - установку придется производить
вручную.
</para>
<section id="installation-on-suse">
<title>Установка из rpm-пакетов на сервер под управлением Suse Linux</title>
<para>
This section demonstrates the installation of a pre-built RPM package on a
SUSE Linux distro. We have tested against all recent SLES and openSUSE
versions. Before you start the installation, please have a look at <ulink
url="http://www.otrs.org/downloads">
<citetitle>http://www.otrs.org/downloads</citetitle> </ulink> and check if a
newer OTRS RPM package is available. Always use the latest RPM package.
</para>
<para>
Для установки OTRS используйте конфигурационную утилиту
<application>yast</application> (yast2), командную строку
и<command>rpm</command>. Так как для работы OTRS необходимы Perl-модули,
которые по умолчанию не устанавливаются в системе SUSE, мы всегда
рекомендуем использовать менеджер пакетов <application>yast</application>,
поскольку он позволяет автоматически разрешать конфлиткы и зависимости между
пакетами.
</para>
<para>
If you decide to install OTRS via the command line and
<command>rpm</command>, first you have to manually install the needed Perl
modules. Assuming you saved the file <filename>otrs.rpm</filename> in the
directory <filename>/tmp</filename>, you can execute the command specified
in the following script to install OTRS.
</para>
<para>
<screen>
linux:~ # rpm -i /tmp/otrs-xxx.rpm
otrs ##################################################
Check OTRS user (/etc/passwd)... otrs exists.
Next steps:
[SuSEconfig]
Execute 'SuSEconfig' to configure the web server.
[start Apache and MySQL]
Execute 'rcapache restart' and 'rcmysql start' in case they don't run.
[install the OTRS database]
Use a web browser and open this link:
http://localhost/otrs/installer.pl
[OTRS services]
Start OTRS 'rcotrs start-force' (rcotrs {start|stop|status|restart|start-force|stop-force}).
Have fun!
Your OTRS Team
http://otrs.org/
linux:~ #
</screen>
</para>
<para>
<emphasis>Script: Command to install OTRS.</emphasis>
</para>
<para>
After the installation of the OTRS RPM package, you have to run
<application>SuSEconfig</application>, as shown in the following script.
</para>
<para>
<screen>
linux:~ # SuSEconfig
Starting SuSEconfig, the SuSE Configuration Tool...
Running in full featured mode.
Reading /etc/sysconfig and updating the system...
Executing /sbin/conf.d/SuSEconfig.aaa_at_first...
Executing /sbin/conf.d/SuSEconfig.apache...
Including /opt/otrs/scripts/apache-httpd.include.conf
Executing /sbin/conf.d/SuSEconfig.bootsplash...
Executing /sbin/conf.d/SuSEconfig.doublecheck...
Executing /sbin/conf.d/SuSEconfig.guile...
Executing /sbin/conf.d/SuSEconfig.hostname...
Executing /sbin/conf.d/SuSEconfig.ispell...
Executing /sbin/conf.d/SuSEconfig.perl...
Executing /sbin/conf.d/SuSEconfig.permissions...
Executing /sbin/conf.d/SuSEconfig.postfix...
Setting up postfix local as MDA...
Setting SPAM protection to "off"...
Executing /sbin/conf.d/SuSEconfig.profiles...
Finished.
linux:~ #
</screen>
</para>
<para>
<emphasis>Script: Running the SuSEconfig command.</emphasis>
</para>
<para>
The OTRS installation is done. Restart your web server to load the OTRS
specific changes in its configuration, as shown in the script below.
</para>
<para>
<screen>
linux:~ # rcapache restart
Shutting down httpd done
Starting httpd [ PERL ] done
linux:~ #
</screen>
</para>
<para>
<emphasis>Script: Restarting the web server.</emphasis>
</para>
<para>
Следующим шагом является установка базы данных OTRS, как это сделать,
читайте здесь <link linkend="database-configuration">раздел 3.2.4.</link>
</para>
</section>
<section id="installation-on-centos">
<title>Установка OTRS в операционной системе CentOS</title>
<para>
On the OTRS Wiki you can find detailed instructions for setting up OTRS on a
CentOS system. Please note that these instructions will also apply to Red
Hat Linux systems since they use the same source: <ulink
url="http://wiki.otrs.org/index.php?title=Installation_of_OTRS_3.0b1_on_CentOS_5.5">
http://wiki.otrs.org/index.php?title=Installation_of_OTRS_3.0b1_on_CentOS_5.5
</ulink> .
</para>
</section>
<section id="installation-on-debian">
<title>Установка OTRS в операционной системе Debian</title>
<para>
Подробную информацию по установке OTRS в операционной системе Debian можно
найти на сайте OTRS Wiki по адресу <ulink
url="http://wiki.otrs.org/index.php?title=Installation_on_Debian_5.04_lenny">
http://wiki.otrs.org/index.php?title=Installation_on_Debian_5.04_lenny
</ulink> .
</para>
</section>
<section id="installation-on-ubuntu">
<title>Установка OTRS на системе Ubuntu</title>
<para>
Подробную информацию по установке OTRS в операционной системе Ubuntu можно
найти на сайте OTRS Wiki по адресу <ulink
url="http://wiki.otrs.org/index.php?title=Installation_on_Ubuntu_Lucid_Lynx_(10.4)">
http://wiki.otrs.org/index.php?title=Installation_on_Ubuntu_Lucid_Lynx_(10.4)
</ulink> ..
</para>
</section>
<section id="installation-on-windows">
<title>Установка OTRS на операционной системе Microsoft Windows</title>
<para>
Устанавливать OTRS в операционной системе Microsoft Windows очень легко и
просто. Перейдя по ссылке <ulink url="http://www.otrs.org/downloads/">
<citetitle>http://www.otrs.org/downloads/</citetitle> </ulink> загрузите
последнюю версию установщика для Win32-платформы и сохраните файл на жестком
диске компьютера. Затем просто запустите установочный файл и выполните все
шаги, предложеные мастером установки. После этого можно войти в OTRS с
правами администратора и сконфигурировать систему под свои
требования. Используйте логин root@localhost и пароль root, чтобы войти в
систему с правами администратора. (Примечание: логин root@localhost и пароль
root прописаны в системе по умолчанию).
</para>
<warning>
<para>
Постарайтесь как можно быстрее изменить пароль для аккаунта
'root@localhost'.
</para>
</warning>
<important>
<para>
Win32-инсталлятор содержит все компоненты, необходимые для работы OTRS:
веб-сервер <application>Apache</application>, сервер баз данных
<application>MySQL</application>, <application>Perl</application> (со всеми
необходимыми модулями), а также планировщик задач для
Windows<application>Cron</application>. Именно по этой причине, OTRS
необходимо устанавливать на Windows-системах, которые еще не содержат
установленого веб-сервера <application>Apache</application> или другого, а
также сервера баз данных <application>MySQL</application>.
</para>
</important>
</section>
</section>
<section id="manual-installation-of-otrs">
<title>Установка из исходных кодов (Linux, Unix)</title>
<section id="preparing-manual-installation">
<title>Подготовка к установке из исходных кодов</title>
<para>
Если вы решили устанавливать OTRS из исходных кодов, перейдите по ссылке
<ulink url="http://www.otrs.org/downloads/">
<citetitle>http://www.otrs.org/downloads/</citetitle> </ulink> и загрузите
архив с исходными кодами в любом удобном для вас формате: .tar.gz, .tar.bz2,
или .zip
</para>
<para>
Unpack the archive (for example, using <command>tar</command>) into the
directory <filename>/opt</filename>, and rename the directory from
otrs-3.1.x to otrs (see Script below).
</para>
<para>
<screen>
linux:/opt# tar xf /tmp/otrs-3.1.tar.gz
linux:/opt# mv otrs-3.1 otrs
linux:/opt# ls
otrs
linux:/opt#
</screen>
</para>
<para>
<emphasis>Script: First steps to install OTRS.</emphasis>
</para>
<para>
OTRS should NOT be run with root rights. You should add a new user for OTRS
as the next step. The home directory of this new user should be
<filename>/opt/otrs</filename>. If your web server is not running with the
same user rights as the new 'otrs' user, which is the case on most systems,
you have to add the new 'otrs' user to the group of the web server user (see
Script below).
</para>
<para>
<screen>
linux:/opt# useradd -r -d /opt/otrs/ -c 'OTRS user' otrs
linux:/opt# usermod -G nogroup otrs
linux:/opt#
</screen>
</para>
<para>
<emphasis>Script: Adding a new user 'otrs', and adding it to a
group.</emphasis>
</para>
<para>
Next, you have to copy some sample configuration files. The system will
later use the copied files. The files are located in
<filename>/opt/otrs/Kernel</filename> and
<filename>/opt/otrs/Kernel/Config</filename> and have the suffix .dist (see
Script below).
</para>
<para>
<screen>
linux:/opt# cd otrs/Kernel/
linux:/opt/otrs/Kernel# cp Config.pm.dist Config.pm
linux:/opt/otrs/Kernel# cd Config
linux:/opt/otrs/Kernel/Config# cp GenericAgent.pm.dist GenericAgent.pm
</screen>
</para>
<para>
<emphasis>Script: Copying some sample files.</emphasis>
</para>
<para>
На завершающем этапе установки OTRS необходимо установить соответствующие
права доступа к файлам. Для этого используйте сценарий
<command>otrs.SetPermissions.pl</command>, находящийся в директории
<filename>bin</filename> домашнего каталога пользователя 'otrs'. Скрипт
можно вызвать со следующими параметрами:
</para>
<para>
<cmdsynopsis>
<command>otrs.SetPermissions.pl</command> <arg choice='req'>
<replaceable>Home directory of the OTRS user</replaceable> </arg> <arg
choice='req'> --otrs-user= <replaceable>OTRS user</replaceable> </arg> <arg
choice='req'> --web-user= <replaceable>Web server user</replaceable> </arg>
<arg choice='opt'> --otrs-group= <replaceable>Group of the OTRS
user</replaceable> </arg> <arg choice='opt'> --web-group= <replaceable>Group
of the web server user</replaceable> </arg></cmdsynopsis>
</para>
<para>
Если ваш веб-сервер работает с теми же правами что и пользователь 'otrs', то
команда установки надлежащих прав доступа будет выглядеть так:
<command>otrs.SetPermissions.pl /opt/otrs --otrs-user=otrs
--web-user=otrs</command>. На SUSE-системах веб-сервер работает с правами
пользователя 'wwwrun'. На Debian-системах - 'www-data'. Для установки
надлежащих прав доступа используйте команду <command>otrs.SetPermissions.pl
/opt/otrs --otrs-user=otrs --web-user=wwwrun --otrs-group=nogroup
--web-group=www</command>.
</para>
</section>
<section id="installation-of-perl-modules">
<title>Установка Perl-модулей</title>
<para>
Исходя из Таблицы 3-1. для работы OTRS необходимо установить некоторые
дополнительные модули Perl. При установке OTRS из исходных кодов, эти
модули придется установить вручную. Конечно же это намного проще сделать
используя менеджер пакетов, который прилагается к вашему Linux-дистрибутиву
(<application>yast</application>, <application>apt-get</application>) или,
как описано в этом разделе, использовать оболочку Perl shell и CPAN. Если вы
используете ActiveState Perl, например, на Windows, то можно использовать
PPM, встроенный менеджер пакетов Perl (Perl Package Manager). Мы рекомендуем
использовать менеджер пакетов, если это возможно.
</para>
<para>
<table id="table-of-needed-perl-modules">
<title>Perl-модули, необходимые для работы OTRS</title>
<tgroup cols="2">
<thead>
<row>
<entry>
Название
</entry>
<entry>
Описание
</entry>
</row>
</thead>
<tbody>
<row>
<entry>
DBI
</entry>
<entry>
Устанавливает подключение к базе данных приложения.
</entry>
</row>
<row>
<entry>
DBD::mysql
</entry>
<entry>
Содержит специальные функции для подключения к серверу базы данных MySQL
(только в случае, использования сервера базы данных MySQL)
</entry>
</row>
<row>
<entry>
DBD::pg
</entry>
<entry>
Содержит специальные функции для подключение к серверу базы данных
PostgreSQL (требуется только в случае использования PostgreSQL в качестве
сервера базы данных).
</entry>
</row>
<row>
<entry>
Digest::MD5
</entry>
<entry>
Позволяет использовать алгоритм MD5.
</entry>
</row>
<row>
<entry>
CSS::Minifier
</entry>
<entry>
Уменьшение размера CSS-файла и запись выходного потока напрямую в другой
файл.
</entry>
</row>
<row>
<entry>
Crypt::PasswdMD5
</entry>
<entry>
Обеспечение криптографических возможностей на основе алгоритма хеширования
MD5
</entry>
</row>
<row>
<entry>
MIME::Base64
</entry>
<entry>
Кодирование / декодирование Base64-кодированных строк, например для вложений
электронной почты.
</entry>
</row>
<row>
<entry>
JavaScript:Minifier
</entry>
<entry>
Уменьшение размера JavaScript-файла и запись выходного потока напрямую в
другой файл.
</entry>
</row>
<row>
<entry>
Net::DNS
</entry>
<entry>
Perl-интерфейс для DNS (Domain Name System - системы доменных имен).
</entry>
</row>
<row>
<entry>
LWP::UserAgent
</entry>
<entry>
Обработка HTTP-запросов.
</entry>
</row>
<row>
<entry>
Net::LDAP
</entry>
<entry>
Perl-интерфейс к LDAP-каталогу (только в случае использования LDAP в
качестве хранилища данных).
</entry>
</row>
<row>
<entry>
GD
</entry>
<entry>
Интерфейс к графической библиотеке GD (требуется только в том случае, если
установлен модуль статистики OTRS).
</entry>
</row>
<row>
<entry>
GD::Text, GD::Graph, GD::Graph::lines, GD::Text::Align
</entry>
<entry>
Еще более широкий набор текстовых и графических инструментов для графической
библиотеки GD (требуется только в том случае, если установлен модуль
статистики OTRS).
</entry>
</row>
<row>
<entry>
PDF::API2, Compress::Zlib
</entry>
<entry>
Эти модули необходимы для генерации отчетов, результатов поиска, информации
о заявке в формате PDF.
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
You can verify which modules you need to install with
<command>otrs.CheckModules.pl</command>. This script is located in the
<filename>bin</filename> directory, in the home directory of the 'otrs' user
(see Script below).
</para>
<para>
Пожалуйста, обратите внимание на то, что некоторые модули не являются
обязательными.
</para>
<para>
<screen>
linux:~# cd /opt/otrs/bin/
linux:/opt/otrs/bin# ./otrs.CheckModules.pl
o CGI............................ok (v3.49)
o Crypt::PasswdMD5...............ok (v1.3)
o CSS::Minifier..................ok (v0.01)
o Date::Format...................ok (v2.24)
o Date::Pcalc....................ok (v1.2)
o DBI............................ok (v1.609)
o DBD::mysql.....................ok (v4.013)
o Digest::MD5....................ok (v2.36_01)
o Encode::HanExtra...............ok (v0.23)
o GD.............................ok (v2.44)
o GD::Text....................ok (v0.86)
o GD::Graph...................ok (v1.44)
o GD::Graph::lines............ok (v1.15)
o GD::Text::Align.............ok (v1.18)
o IO::Scalar.....................ok (v2.110)
o IO::Wrap.......................ok (v2.110)
o JavaScript::Minifier...........ok (v1.05)
o JSON...........................ok (v2.21)
o JSON::PP....................ok (v2.27003)
o JSON::XS....................Not installed! (Optional - Install it for faster AJAX/JavaScript handling.)
o LWP::UserAgent.................ok (v5.829)
o Mail::Internet.................ok (v2.06)
o Mail::POP3Client...............ok (v2.18 )
o IO::Socket::SSL.............ok (v1.31)
o MIME::Base64...................ok (v3.07_01)
o MIME::Tools....................ok (v5.428)
o Net::DNS.......................ok (v0.65)
o Net::POP3......................ok (v2.29)
o Net::IMAP::Simple..............ok (v1.1916)
o Net::IMAP::Simple::SSL......ok (v1.3)
o Net::SMTP......................ok (v2.31)
o Authen::SASL................ok (v2.15)
o Net::SMTP::SSL..............ok (v1.01)
o Net::LDAP......................ok (v0.4001)
o PDF::API2......................ok (v0.73)
o Compress::Zlib..............ok (v2.008)
o SOAP::Lite.....................ok (v0.712)
o Text::CSV......................ok (v1.18)
o Text::CSV_PP................ok (v1.26)
o Text::CSV_XS................Not installed! (Optional - Optional, install it for faster CSV handling.)
o XML::Parser....................ok (v2.36)
linux:/opt/otrs/bin#
</screen>
</para>
<para>
<emphasis>Script: Checking needed modules.</emphasis>
</para>
<para>
Для установки недостающих модулей старайтесь использовать менеджер
управления пакетами, входящий в дистрибутив Linux. Таким образом, в случае
выхода обновлений или новых решений по обеспечению большей безопасности,
пакеты будут обновлятся автоматически. Чтобы узнать как установить
дополнительные пакеты обратитесь к документации, которая поставляется вместе
с дистрибутивом вашей операционной системы. Если модуль (соответствующая
версия) не доступен из репозитория пакетов, его всегда можно установить
используя CPAN, Comprehensive Perl Archive Network (всеобъемлющую сеть
архивов Perl).
</para>
<para>
Для установки любого из выше описанных модулей через CPAN, нужно выполнить
команду <command>perl -e shell -MCPAN</command>. Оболочка Perl запустится в
интерактивном режиме и модуль CPAN будет загружен. Если CPAN уже
сконфигурирован, то с помощью команды <command>install</command> "имя
модуля" (install module_name) можно начинать установку необходимых
модулей. CPAN автоматически отслеживает зависимости между Perl-модулями и
тут же оповещает, какие еще модули нужно установить.
</para>
<para>
Execute also the commands <command>perl -cw bin/cgi-bin/index.pl</command>
<command>perl -cw bin/cgi-bin/customer.pl</command> and <command>perl -cw
bin/otrs.PostMaster.pl</command> after changing into the directory
<filename>/opt/otrs</filename>. If the output of both commands is "syntax
OK", your Perl is properly set up (see Script below).
</para>
<para>
<screen>
linux:~# cd /opt/otrs
linux:/opt/otrs# perl -cw bin/cgi-bin/index.pl
cgi-bin/installer.pl syntax OK
linux:/opt/otrs# perl -cw bin/cgi-bin/customer.pl
cgi-bin/customer.pl syntax OK
linux:/opt/otrs# perl -cw bin/otrs.PostMaster.pl
bin/otrs.PostMaster.pl syntax OK
linux:/opt/otrs#
</screen>
</para>
<para>
<emphasis>Script: Syntax check.</emphasis>
</para>
</section>
<section id="web-server-configuration">
<title>Настройка веб-сервера Apache</title>
<para>
В этом разделе описывается базовая конфигурация веб-сервера
<application>Apache</application> с модулем mod_cgi, необходимым для работы
OTRS. Веб-сервер должен поддерживать выполнение CGI-сценариев. OTRS не будет
работать если нету возможности выполнять Perl-сценарии. Поэтому проверьте
настройки в конфигурационных файлах веб-сервера и убедитесть в том, что
строка, отвечающая за загрузку CGI-модуля не закоментирована. Если вы видите
что-то вроде следующего, значит CGI-модуль уже загружен и используется.
</para>
<para>
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
</para>
<para>
Для простого и удобного доступа к веб-интерфейсу OTRS через короткий адрес,
нужно использовать Alias и ScriptAlias. Большинство установок
<application>Apache</application> имеют директорию
<filename>conf.d</filename>. Очень часто в Linux-системах эта директория
находится в <filename>/etc/apache</filename> или
<filename>/etc/apache2</filename>. Войдите в систему с правами
администратора (под root-ом), затем перейдите в диреторию
<filename>conf.d</filename> и скопируйте соответствующий шаблон
конфигурационного файла
<filename>/opt/otrs/scripts/apache2-httpd.include.conf</filename> в файл
<filename>otrs.conf</filename>, который находится в каталоге настроек
Apache.
</para>
<para>
Restart your web server to load the new configuration settings. On most
systems you can start/restart your web server with the command
<command>/etc/init.d/apache2 restart</command> (see Script below).
</para>
<para>
<screen>
linux:/etc/apache2/conf.d# /etc/init.d/apache2 restart
Forcing reload of web server: Apache2.
linux:/etc/apache2/conf.d#
</screen>
</para>
<para>
<emphasis>Script: Restarting the web server.</emphasis>
</para>
<para>
Теперь веб-сервер полностью настроен для работы OTRS.
</para>
<para>
Для увеличения производительности можно установить mod_perl, отключить и не
использовать модуль mod_cgi, а затем, сконфигурировать веб-сервер
<application>Apache</application> на использование модуля mod_perl следующим
образом:
</para>
<para>
Чтобы воспользоваться этой функцией убедитесь в том, что модуль mod_perl
установлен и загружен. В связи с структурой сценария запуска, сервер не
удастся запустить если модуль mod_perl загружен/скомпилирован неправильно
или если он дальше продолжает работать. С технической точки зрения, вы все
же можете оставить модуль mod_cgi работать, но делать это не нужно.
</para>
<para>
Search your /etc/apache* directory for mod_perl.so (see Script below) to see
if the module is already loaded.
</para>
<para>
<screen> #:/ grep -Rn mod_perl.so /etc/apache*</screen>
</para>
<para>
<emphasis>Script: Searching for mod_perl.</emphasis>
</para>
<para>
Когда вы используете соответствующий сценарий запуска, приведенный выше и
модуль загружен, то сценарий /opt/otrs/scripts/apache2-perl-startup.pl может
использоваться для загрузки perl-модулей в память только один раз, что
существенно экономит время загрузки и повышает производительность системы в
целом.
</para>
</section>
<section id="database-configuration">
<title>Настройка базы данных</title>
<section id="installation-of-database-with-the-web-installer">
<title>Самый простой способ - использование веб-инсталлятора (работает только с
<application>MySQL</application>)</title>
<para>
Если в качестве базы данных используется <application>MySQL</application>,
то можно воспользоваться веб-инсталлятором OTRS: <ulink
url="http://localhost/otrs/installer.pl">
<citetitle>http://localhost/otrs/installer.pl</citetitle> </ulink> .</para>
<para>
Когда запустится веб-инсталлятор, выполните, пожалуйста, следующие шаги для
установки системы:
</para>
<para>
1. Check out the information about the OTRS offices and click on next to
continue (see Figure below).
</para>
<para>
<screenshot>
<screeninfo>installer.pl - экран приветствия</screeninfo> <graphic srccredit="installer.pl -
screenshot" scale="40" fileref="screenshots/installer1.png"></graphic></screenshot>
</para>
<para>
<emphasis>Figure: Welcome screen.</emphasis>
</para>
<para>
2. Read the GNU Affero General Public License (see Figure below) and accept
it, by clicking the corresponding button at the bottom of the page.
</para>
<para>
<screenshot>
<screeninfo>installer.pl screen - Лицензионное соглашение (1/4)</screeninfo> <graphic srccredit="installer.pl -
screenshot" scale="40" fileref="screenshots/installer2.png"></graphic></screenshot>
</para>
<para>
<emphasis>Figure: GNU Affero General Public License.</emphasis>
</para>
<para>
3. Provide the username and password of the administrator, the DNS name of
the computer which hosts OTRS and the type of database system to be
used. After that, check the settings (see Figure below).
</para>
<para>
<screenshot>
<screeninfo>installer.pl - Первоначальная настройка базы данных (2/4)</screeninfo> <graphic srccredit="installer.pl -
screenshot" scale="40" fileref="screenshots/installer3.png"></graphic></screenshot>
</para>
<para>
<emphasis>Figure: Database initial settings.</emphasis>
</para>
<para>
You will be notified if the check was successful. Press OK to continue (see
Figure below).
</para>
<para>
<screenshot>
<screeninfo>installer.pl - Первоначальная настройка базы данных (2/4) уведомление об
успешной проверке</screeninfo> <graphic srccredit="installer.pl -
screenshot" scale="40" fileref="screenshots/installer4.png"></graphic></screenshot>
</para>
<para>
<emphasis>Figure: Notification for successful check.</emphasis>
</para>
<para>
4. Create a new database user, choose a name for the database and click on
'Next' (see Figure below).
</para>
<warning>
<para>
Использовать пароли по умолчанию, - не очень хорошая идея. Измените
пожалуйста пароль по умолчанию для базы данных OTRS!
</para>
</warning>
<para>
<screenshot>
<screeninfo>installer.pl - Создание базы данных (2/4) все настройки</screeninfo> <graphic srccredit="installer.pl -
screenshot" scale="40" fileref="screenshots/installer5.png"></graphic></screenshot>
</para>
<para>
<emphasis>Figure: Database settings.</emphasis>
</para>
<para>
If the database and its user were successfully created, you will get a setup
notification, as shown in Figure. Click 'Next' to go to the next screen.
</para>
<para>
<screenshot>
<screeninfo>installer.pl - Создание базы данных (2/4) установка завершена успешно</screeninfo> <graphic srccredit="installer.pl -
screenshot" scale="40" fileref="screenshots/installer6.png"></graphic></screenshot>
</para>
<para>
<emphasis>Figure: Notification indicating successful database
setup.</emphasis>
</para>
<para>
5. Provide all the required system settings and click on 'Next' (see Figure
below).
</para>
<para>
<screenshot>
<screeninfo>installer.pl - Настройкси системы (3/4)</screeninfo> <graphic srccredit="installer.pl -
screenshot" scale="40" fileref="screenshots/installer7.png"></graphic></screenshot>
</para>
<para>
<emphasis>Figure: System settings.</emphasis>
</para>
<para>
6. If you want, you can provide the needed data to configure your inbound
and outbound mail, or skip this step by pressing the right button at the
bottom of the screen (see Figure below).
</para>
<para>
<screenshot>
<screeninfo>installer.pl - Настройка электронной почты (3/4)</screeninfo> <graphic srccredit="installer.pl -
screenshot" scale="40" fileref="screenshots/installer8.png"></graphic></screenshot>
</para>
<para>
<emphasis>Figure: Mail configuration.</emphasis>
</para>
<para>
7. Restart the OTRS service now to use the new configuration settings as
shown in the script below.
</para>
<para>
<screen>
linux:~ # rcotrs restart-force
Shutting down OTRS
Disable /opt/otrs/bin/otrs.PostMaster.pl ... done.
no crontab for otrs
Shutting down cronjobs ... failed!
Shutting down OTRS (completely)
Shutting down Apache ... done.
Shutting down MySQL ... done.
done
Starting OTRS (completely)
Starting Apache ... done.
Starting MySQL ... done.
Starting OTRS
Checking Apache ... done.
Checking MySQL ... done.
Checking database connect... (It looks Ok!).
Enable /opt/otrs/bin/otrs.PostMaster.pl ... done.
Checking otrs spool dir... done.
Creating cronjobs (source /opt/otrs/var/cron/*) ... done.
-->> http://linux.example.com/otrs/index.pl <<--
done
done
linux:~ #
</screen>
</para>
<para>
<emphasis>Script: Restarting the OTRS service.</emphasis>
</para>
<para>
Congratulations! Now the installation of OTRS is finished and you should be
able to work with the system (see Figure below). To log into the web
interface of OTRS, use the address <ulink
url="http://localhost/otrs/index.pl">
<citetitle>http://localhost/otrs/index.pl</citetitle> </ulink> from your web
browser. Log in as OTRS administrator, using the username 'root@localhost'
and the password 'root'. After that you can configure the system for your
needs.
</para>
<warning>
<para>
Постарайтесь как можно быстрее изменить пароль для аккаунта
'root@localhost'.
</para>
</warning>
<para>
<screenshot>
<screeninfo>installer.pl - Завершено (4/4)</screeninfo> <graphic srccredit="installer.pl -
screenshot" scale="40" fileref="screenshots/installer9.png"></graphic></screenshot>
</para>
<para>
<emphasis>Figure: Final steps to install OTRS.</emphasis>
</para>
</section>
<section id="manual-installation-of-database">
<title>Установка базы данных OTRS вручную.</title>
<para>
If you can't use the web installer to setup the OTRS database, you have to
set it up manually. Scripts with the SQL statements to create and configure
the database are located in <filename>scripts/database</filename>, in the
home directory of the 'otrs' user (see Script below).
</para>
<para>
<screen>
linux:~# cd /opt/otrs/scripts/database/
linux:/opt/otrs/scripts/database# ls
otrs-initial_insert.db2.sql otrs-schema.mysql.sql
otrs-schema.oracle.sql
otrs-initial_insert.mssql.sql otrs-schema-post.db2.sql
otrs-initial_insert.mysql.sql otrs-schema.postgresql.sql
otrs-initial_insert.oracle.sql
otrs-initial_insert.postgresql.sql otrs-schema-post.mssql.sql
otrs-initial_insert.xml otrs-schema-post.mysql.sql
otrs-schema.db2.sql otrs-schema-post.oracle.sql
otrs-schema-post.postgresql.sql
otrs-schema.mssql.sql otrs-schema.xml
linux:/opt/otrs/scripts/database#
</screen>
</para>
<para>
<emphasis>Script: Files needed to create and configure the
database.</emphasis>
</para>
<para>
При установке базы данных, для различных СУБД существует свой, определенный
порядок обработки .sql-файлов.
</para>
<para>
<orderedlist numeration="arabic">
<title>Создание базы данных OTRS вручную, шаг за шагом</title>
<listitem>
<para>
Создание базы данных: Используя интерфейс базы данных или свой любимый
менеджер баз даных, создайте базу данных, которую планируете использовать
для OTRS.
</para>
</listitem>
<listitem>
<para>
Создание таблиц: Используя файлы otrs-schema.DatabaseType.sql (например
<filename>otrs-schema.oracle.sql</filename>,
<filename>otrs-schema.postgresql.sql</filename>) можно создать таблицы в
базе данных для OTRS.
</para>
</listitem>
<listitem>
<para>
Inserting the initial system data: OTRS needs some initial system data to
work properly (e.g. the different ticket states, ticket and notification
types). Depending on the type of your database, use one of the files
<filename>otrs-initial_insert.mysql.sql</filename>,
<filename>otrs-initial_insert.oracle.sql</filename>,
<filename>otrs-initial_insert.postgresql.sql</filename> or
<filename>otrs-initial_insert.mssql.sql </filename>.
</para>
</listitem>
<listitem>
<para>
Создание связей между таблицами: Последний шаг - создание связей между
различными таблицами базы данных OTRS Для этого используйте файл
otrs-schema-post.DatabaseType.sql (например
<filename>otrs-schema-oracle.post.sql</filename>,
<filename>otrs-schema-post.postgresql.sql</filename>).
</para>
</listitem>
</orderedlist>
</para>
<para>
После завершения установки базы данных необходимо проверить и установить
соответствующие права доступа для базы данных OTRS. Сделать это необходимо
так, чтобы только один пользователь имел соответствующие права
доступа. Настройка прав доступа отличается в зависимости от выбраного вами
сервера базы данных и должна производится с помощью графического интерфейса
базы данных или с помощью программы клиента.
</para>
<para>
If your database and the access rights are configured properly, you have to
tell OTRS which database back-end you want to use and how the ticket system
can connect to the database. Open the file
<filename>Kernel/Config.pm</filename> located in the home directory of the
'otrs' user, and change the parameters shown in the script below according
to your needs.
</para>
<para>
<programlisting>
# DatabaseHost
# (The database host.)
$Self->{'DatabaseHost'} = 'localhost';
# Database
# (The database name.)
$Self->{Database} = 'otrs';
# DatabaseUser
# (The database user.)
$Self->{DatabaseUser} = 'otrs';
# DatabasePw
# (The password of database user.)
$Self->{DatabasePw} = 'some-pass';
</programlisting>
</para>
<para>
<emphasis>Script: Parameters to be customized.</emphasis>
</para>
</section>
</section>
<section id="cronjobs">
<title>Настрой планировщика задач (cron jobs) для OTRS</title>
<para>
Для правильной работы системы OTRS необходим планировщик задач (cron
jobs). Планировщик задач (cron jobs) должен запускаться с теми же правами,
что и модули OTRS. Именно по этому cron jobs должен быть внесен в
crontab-файл пользователя 'otrs'.
</para>
<para>
All scripts with the cron jobs are located in <filename>var/cron</filename>,
in the home directory of the 'otrs' user (see Script below).
</para>
<para>
<screen>
linux:~# cd /opt/otrs/var/cron
linux:/opt/otrs/var/cron# ls
aaa_base.dist generic_agent.dist rebuild_ticket_index.dist
cache.dist pending_jobs.dist session.dist
fetchmail.dist postmaster.dist unlock.dist
generic_agent-database.dist postmaster_mailbox.dist
linux:/opt/otrs/var/cron#
</screen>
</para>
<para>
<emphasis>Script: Files needed to create the cron jobs.</emphasis>
</para>
<para>
These scripts have a suffix of '.dist'. You should copy them to files with
the suffix removed. If you use bash, you might want to use the command
listed in Script below.
</para>
<para>
<screen>
linux:/opt/otrs/var/cron# for foo in *.dist; do cp $foo `basename $foo .dist`; done
linux:/opt/otrs/var/cron# ls
aaa_base generic_agent-database.dist rebuild_ticket_index
aaa_base.dist generic_agent.dist rebuild_ticket_index.dist
cache pending_jobs session
cache.dist pending_jobs.dist session.dist
fetchmail postmaster unlock
fetchmail.dist postmaster.dist unlock.dist
generic_agent postmaster_mailbox
generic_agent-database postmaster_mailbox.dist
linux:/opt/otrs/var/cron#
</screen>
</para>
<para>
<emphasis>Script: Copying and renaming all the files needed to create the
cron jobs.</emphasis>
</para>
<para>
В Таблице 3-2 приводятся различные задания cron jobs.
</para>
<para>
<table id="table-of-cronjobs-for-otrs">
<title>Описание некоторых сценариев планировщика задач cron job.</title>
<tgroup cols="2">
<thead>
<row>
<entry>
Сценарий
</entry>
<entry>
Назначение
</entry>
</row>
</thead>
<tbody>
<row>
<entry>
aaa_base
</entry>
<entry>
Определяет основные настройки для crontab пользователя 'otrs'.
</entry>
</row>
<row>
<entry>
cache
</entry>
<entry>
Удаляет из диска устаревшие ("просроченные") кэш-записи. Очищает
кэш-погрузчик для CSS и JavaScript файлов.
</entry>
</row>
<row>
<entry>
fetchmail
</entry>
<entry>
Этот сценарий может быть использован в том случае, если новые емейлы будут
поступать в систему обработки заявок через fetchmail.
</entry>
</row>
<row>
<entry>
generic_agent
</entry>
<entry>
Выполняет задания из GenericAgent, которые не сохраняются в базе данных, а в
собственных конфиг-файлах.
</entry>
</row>
<row>
<entry>
generic_agent-database
</entry>
<entry>
Выполняет задания из GenericAgent, которые хранятся в базе данных.
</entry>
</row>
<row>
<entry>
pending_jobs
</entry>
<entry>
Проверяет систему на наличие заявок, ожидающих решения, закрывает их или
отсылает напоминание, если это необходимо.
</entry>
</row>
<row>
<entry>
postmaster
</entry>
<entry>
Проверяет очередь сообщений системы обработки заявок, и доставляет те
сообщения, которые находятся в этой очереди.
</entry>
</row>
<row>
<entry>
postmaster_mailbox
</entry>
<entry>
Получает почту с POP3-счетов, которые были указаны в админке, в разделе
"Учетные записи PostMaster".
</entry>
</row>
<row>
<entry>
rebuild_ticket_index
</entry>
<entry>
Восстанавливает индекс заявки, что значительно повышает скорость просмотра
заявок в разделе QueueView.
</entry>
</row>
<row>
<entry>
session
</entry>
<entry>
Удаляет старые и больше не используемые ID-сессий (session IDs).
</entry>
</row>
<row>
<entry>
unlock
</entry>
<entry>
Открывает заявки, которые были ранее заблокированы в системе.
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
Чтобы настроить все задания cron jobs используйте скрипт
<filename>bin/Cron.sh</filename>, который находится в домашнем каталоге
пользователя 'otrs'. При запуске, скрипту нужно передать один из трех
параметров, указывающий на выполняемое действие: создание, удаление,
переустановка заданий. Допустимы следующие параметры:
</para>
<para>
<cmdsynopsis>
<command>Cron.sh</command> <arg choice='req'>
<replaceable>start</replaceable> </arg> <arg choice='req'>
<replaceable>stop</replaceable> </arg> <arg choice='req'>
<replaceable>restart</replaceable> </arg> <arg choice='opt'>
<replaceable>OTRS user</replaceable> </arg></cmdsynopsis>
</para>
<para>
Because the cron jobs need to be installed in the crontab file of the 'otrs'
user, you need to be logged in as 'otrs'. If you are logged in as root, you
can switch to 'otrs' with the command <command>su otrs</command>. Execute
the commands specified in Script below to install the cron jobs.
</para>
<warning>
<para>
Обратите внимание, что при использовании файла <filename>Cron.sh</filename>
другие задания, установленные в crontab-файле для пользователя 'otrs' будут
перезаписаны или удалены. Внесите все необходимые изменения в файл
<filename>Cron.sh</filename>, чтобы сохранить другие crontab-задания.
</para>
</warning>
<para>
<screen>
linux:/opt/otrs/var/cron# cd /opt/otrs/bin/
linux:/opt/otrs/bin# su otrs
linux:~/bin$ ./Cron.sh start
/opt/otrs/bin
Cron.sh - start/stop OTRS cronjobs
Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
(using /opt/otrs) done
linux:~/bin$ exit
exit
linux:/opt/otrs/bin#
</screen>
</para>
<para>
<emphasis>Script: Installing the cron jobs.</emphasis>
</para>
<para>
The command <command>crontab -l -u otrs</command>, which can be executed as
root, shows you the crontab file of the 'otrs' user, and you can check if
all entries are placed correctly (see Script below).
</para>
<para>
<screen>
linux:/opt/otrs/bin# crontab -l -u otrs
# --
# cron/aaa_base - base crontab package
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# Who gets the cron emails?
MAILTO="root@localhost"
# --
# cron/cache - delete expired cache
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# delete expired cache weekly (Sunday mornings)
20 0 * * 0 $HOME/bin/otrs.CacheDelete.pl --expired >> /dev/null
30 0 * * 0 $HOME/bin/otrs.LoaderCache.pl -o delete >> /dev/null
# --
# cron/fetchmail - fetchmail cron of the OTRS
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# fetch every 5 minutes emails via fetchmail
#*/5 * * * * /usr/bin/fetchmail -a >> /dev/null
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# --
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# start generic agent every 20 minutes
*/20 * * * * $HOME/bin/GenericAgent.pl >> /dev/null
# example to execute GenericAgent.pl on 23:00 with
# Kernel::Config::GenericAgentMove job file
#0 23 * * * $HOME/bin/otrs.GenericAgent.pl -c "Kernel::Config::GenericAgentMove" >> /dev/null
# --
# cron/generic_agent - GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# start generic agent every 10 minutes
*/10 * * * * $HOME/bin/otrs.GenericAgent.pl -c db >> /dev/null
# --
# cron/pending_jobs - pending_jobs cron of the OTRS
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# check every 120 min the pending jobs
45 */2 * * * $HOME/bin/otrs.PendingJobs.pl >> /dev/null
# --
# cron/postmaster - postmaster cron of the OTRS
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# check daily the spool directory of OTRS
#10 0 * * * * test -e /etc/init.d/otrs & /etc/init.d/otrs cleanup >> /dev/null; test -e /etc/rc.d/init.d/otrs && /etc/rc.d/init.d/otrs cleanup >> /dev/null
10 0 * * * $HOME/bin/otrs.CleanUp.pl >> /dev/null
# --
# cron/postmaster_mailbox - postmaster_mailbox cron of the OTRS
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# fetch emails every 10 minutes
*/10 * * * * $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
# --
# cron/rebuild_ticket_index - rebuild ticket index for OTRS
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# just every day
01 01 * * * $HOME/bin/otrs.RebuildTicketIndex.pl >> /dev/null
# --
# cron/session - delete old session ids of the OTRS
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# delete every 120 minutes old/idle session ids
55 */2 * * * $HOME/bin/otrs.DeleteSessionIDs.pl --expired >> /dev/null
# --
# cron/unlock - unlock old locked ticket of the OTRS
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY.
# --
# unlock every hour old locked tickets
35 * * * * $HOME/bin/otrs.UnlockTickets.pl --timeout >> /dev/null
linux:/opt/otrs/bin#
</screen>
</para>
<para>
<emphasis>Script: Crontab file.</emphasis>
</para>
</section>
</section>
<section id="upgrading">
<title>Обновление OTRS-фреймворка</title>
<para>
These instructions are for people upgrading OTRS from version
<emphasis>3.0</emphasis> to <emphasis>3.1</emphasis>, and apply both for RPM
and source code (tarball) upgrades.
</para>
<para>
If you are running a lower version of OTRS you have to follow the upgrade
path to 3.0 first (1.1->1.2->1.3->2.0->2.1->2.2->2.3->2.4->3.0->3.1 ...)!
</para>
<para>
Please note that if you upgrade from OTRS 2.2 or earlier, you have to take
an extra step; please read <ulink
url="http://bugs.otrs.org/show_bug.cgi?id=6798">http://bugs.otrs.org/show_bug.cgi?id=6798</ulink>.
</para>
<para>
If you need to do a "patch level upgrade", which is an upgrade for instance
from OTRS version 3.1.1 to 3.1.3, you should skip steps 8, 10 and 12-19.
</para>
<para>
Please note that for upgrades from 3.1.beta1 or 3.1.beta2, an additional
step 20 is needed!
</para>
<para>
If you are using Microsoft SQL Server as the DBMS for OTRS, please refer to
the manual, chapter "Upgrading Microsoft SQL Server Data Types" for
instructions how to upgrade the data types used by OTRS (<ulink
url="http://doc.otrs.org/3.1/en/html/upgrading-mssql-datatypes.html">http://doc.otrs.org/3.1/en/html/upgrading-mssql-datatypes.html</ulink>).
</para>
<orderedlist>
<listitem>
<para>
Остановите все соответствующие службы.
</para>
<para>
в т.ч. (зависящие от использующихся услуг): <screen>
shell> /etc/init.d/cron stop
shell> /etc/init.d/postfix stop
shell> /etc/init.d/apache stop
</screen>
</para>
</listitem>
<listitem>
<para>
Сделайте резервные копии всех данных из $OTRS_HOME (по умолчанию
OTRS_HOME=/opt/otrs):
<itemizedlist>
<listitem><para><filename>Kernel/Config.pm</filename></para></listitem>
<listitem><para><filename>Kernel/Config/GenericAgent.pm</filename></para></listitem>
<listitem><para><filename>Kernel/Config/Files/ZZZAuto.pm</filename></para></listitem>
<listitem><para><filename>var/*</filename></para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Резервное копирование базы данных.
</para>
</listitem>
<listitem>
<para>
Make sure that you have backed up everything ;-)
</para>
</listitem>
<listitem>
<para>
Setup new system (optional)
</para>
<para>
Если есть возможность, сначала попробуйте произвести установку на отдельном
тестовом компьютере.
</para>
</listitem>
<listitem>
<para>
Установка нового релиза (из tar-архива или с помощью RPM-пакетов).
</para>
<itemizedlist>
<listitem>
<para>
С помощью тарбола (tarball):
</para>
<para>
<screen>
shell> cd /opt
shell> tar -xzf otrs-x.x.x.tar.gz
shell> ln -s otrs-x.x.x otrs
</screen>
</para>
<para>
Восстановите старые конфигурационные файлы.
<itemizedlist>
<listitem><para><filename>Kernel/Config.pm</filename></para></listitem>
<listitem><para><filename>Kernel/Config/GenericAgent.pm</filename></para></listitem>
<listitem><para><filename>Kernel/Config/Files/ZZZAuto.pm</filename></para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
С помощью RPM-пакетов: <screen>
shell> rpm -Uvh otrs-x.x.x.-01.rpm
</screen>
</para>
<para>
В этом случае обновление из RPM автоматически восстанавливает старые
конфигурационные файлы.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Собственные темы
</para>
<para>
Note: The OTRS themes between 3.0 and 3.1 are NOT compatible, so don't use
your old themes!
</para>
<para>
Themes are located under $OTRS_HOME/Kernel/Output/HTML/*/*.dtl (default:
OTRS_HOME=/opt/otrs).
</para>
</listitem>
<listitem>
<para>
Установка прав доступа к файлам.
</para>
<para>
В случае использования тарбола (tarball), выполните <screen>
shell> cd /opt/otrs/
shell> bin/otrs.SetPermissions.pl
</screen> с правами, необходимыми для установки системы.
</para>
</listitem>
<listitem>
<para>
Примените изменения к базе данных (часть 1/2):
</para>
<para>
<screen>
shell> cd /opt/otrs/
# MySQL:
shell> cat scripts/DBUpdate-to-3.1.mysql.sql | mysql -p -f -u root otrs
# PostgreSQL 8.2+:
shell> cat scripts/DBUpdate-to-3.1.postgresql.sql | psql otrs
# PostgreSQL, older versions:
shell> cat scripts/DBUpdate-to-3.1.postgresql_before_8_2.sql | psql otrs
</screen> NOTE: If you use PostgreSQL 8.1 or
earlier, you need to activate the new legacy driver for these older
versions. Do this by adding a new line to your
<filename>Kernel/Config.pm</filename> like this: <screen>
$Self->{DatabasePostgresqlBefore82} = 1;
</screen>
</para>
<para>
Запустите сценарий перемещения (как пользователь 'otrs', а НЕ root):
</para>
<para>
Сценарий перемещения (миграции) нужно запускать для перемещения некоторых
данных из старой базы данных в новую. Пожалуйста, запустите: <screen>
shell> scripts/DBUpdate-to-3.1.pl
</screen>
</para>
<para>
Примените изменения к базе данных (часть 2/2):
</para>
<para>
<screen>
# MySQL:
shell> cat scripts/DBUpdate-to-3.1-post.mysql.sql | mysql -p -f -u root otrs
# PostgreSQL 8.2+:
shell> cat scripts/DBUpdate-to-3.1-post.postgresql.sql | psql otrs
# PostgreSQL, older versions:
shell> cat scripts/DBUpdate-to-3.1-post.postgresql_before_8_2.sql | psql otrs
</screen>
</para>
</listitem>
<listitem>
<para>
Обновите конфигурацию системы и удалите все данные из кэша. Пожалуйста,
введите:
</para>
<para>
<screen>
shell> bin/otrs.RebuildConfig.pl
shell> bin/otrs.DeleteCache.pl
</screen>
</para>
</listitem>
<listitem>
<para>Update your web server configuration</para>
<para>
Note: this applies only if you use the Apache web server together with
mod_perl2, and do not use the configuration file directly from the OTRS
installation directory (e. g. with a symlink from the Apache configuration
directory).
</para>
<para>
Please add a new setting to the Apache configuration file for OTRS:
<screen>
# set mod_perl2 option for generic interface
<Location /otrs/nph-genericinterface.pl>
PerlOptions -ParseHeaders
</Location>
</screen> Please see the file
/opt/otrs/scripts/apache2-httpd.include.conf for an example of where this
new option needs to be added (inside the <IfModule mod_perl.c> block).
</para>
<para>
In this file, you will also note a new section on caching: <screen><![CDATA[
<IfModule mod_headers.c>
<Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
<FilesMatch "\.(css|CSS)$">
Header set Cache-Control "max-age=2592000 must-revalidate"
</FilesMatch>
</Directory>
<Directory "/opt/otrs/var/httpd/htdocs/js/js-cache">
<FilesMatch "\.(js|JS)$">
Header set Cache-Control "max-age=2592000 must-revalidate"
</FilesMatch>
</Directory>
</IfModule>
]]></screen> Please activate this in your local installation too,
and make sure that mod_headers is installed and active.
</para>
</listitem>
<listitem>
<para>
Перезапустите сервисы.
</para>
<para>
e. g. (depends on used services): <screen>
shell> /etc/init.d/cron start
shell> /etc/init.d/postfix start
shell> /etc/init.d/apache start
</screen> Now
you can log into your system.
</para>
</listitem>
<listitem>
<para>Check installed packages</para>
<para>
In the package manager, check if all packages are still marked as correctly
installed or if any require reinstallation or even a package upgrade.
</para>
</listitem>
<listitem>
<para>
Check for encoding issues
</para>
<para>
OTRS 3.1 only allows UTF-8 as internal charset. Non-UTF-8 installations of
OTRS must switch to UTF-8.
</para>
</listitem>
<listitem>
<para>Escalation events</para>
<para>
If you want to use the new escalation events in your system, you need to
activate the corresponding GenericAgent job in
Kernel/Config/GenericAcent.pm. Please look into
Kernel/Config/GenericAgent.pm.dist for an example of how to do this.
</para>
</listitem>
<listitem>
<para>Ticket event handlers</para>
<para>
The Event name TicketFreeTextUpdate_$Counter was renamed to
TicketDynamicFieldUpdate_$FieldName. If you have any custom event handlers
for these events, please adapt them.
</para>
</listitem>
<listitem>
<para>
DynamicField user preferences module
</para>
<para>
If you had one or more active custom settings for
"PreferencesGroups###Freetext", you need to adapt them to work with the new
DynamicFields engine. The PrefKey setting must be changed to
"UserDynamicField_DynamicField", where the part after the _ is the name of
the dynamic field. Existing values would need to be renamed in the database
as well.
</para>
</listitem>
<listitem>
<para>
Custom free field default value event handler
</para>
<para>
If you used the event handler
Ticket::EventModulePost###TicketFreeFieldDefault (not active by default),
you'll need to migrate its configuration to the new setting
Ticket::EventModulePost###TicketDynamicFieldDefault.
</para>
<para>
The configuration of this is slightly different; where you had to specify a
Counter indicating the TicketFreeText number previously, now you need to
specify the name of the DynamicField (for migrated fields, this will be
DynamicField_TicketFreeKey$Counter and
DynamicField_TicketFreeText$Counter. You need two separate entries now if
you want to set both the key and the text field.
</para>
</listitem>
<listitem>
<para>
FreeText/Time based ACLs
</para>
<para>
If you have any ACLs defined which involve freetext or freetime fields, you
need to adjust these ACL definitions.
</para>
<para>
Please have a look at <ulink
url="http://doc.otrs.org/3.1/en/html/acl.html">http://doc.otrs.org/3.1/en/html/acl.html</ulink>.
There you can find a list of all possible ACL settings. In general, you need
to add the prefix "DynamicField_" to existing free field definitions, and
you can add a new "DynamicField" section to the "Properties" list for
situations when a ticket does not exist yet.
</para>
</listitem>
<listitem>
<para>
Database Upgrade During Beta Phase
</para>
<para>
This step is ONLY needed if you upgrade from 3.1.beta1 or 3.1.beta2! Please
apply the required database changes as follows:
</para>
<para>
<screen>
MySQL:
shell> cat scripts/DBUpdate-3.1.beta.mysql.sql | mysql -p -f -u root otrs
PostgreSQL 8.2+:
shell> cat scripts/DBUpdate-3.1.beta.postgresql.sql | psql otrs
PostgreSQL, older versions:
shell> cat scripts/DBUpdate-3.1.beta.postgresql_before_8_2.sql | psql otrs
</screen>
</para>
</listitem>
<listitem>
<para>Молодцы!</para>
</listitem>
</orderedlist>
</section>
<section id="upgrade-windows-installer">
<title>Обновление с помощью Windows Installer</title>
<para>
В настоящее время нету механизма автоматического обновления копии OTRS,
которая была установлена с использованием инсталлятора Windows (Windows
Installer). В основном, процесс обновления состоит из таких шагов:
архивирование базы данных и всей файловой системы, деинсталяция OTRS,
установка новой версии, восстановление базы данных и запуск процедуры
обновления (если она необходима).
</para>
<para>Обновление подробно описано по ссылке <ulink
url="http://faq.otrs.org/otrs/public.pl?Action=PublicFAQ;ItemID=351">FAQ#
4200351</ulink>, также по ссылке <ulink
url="http://www.youtube.com/watch?v=sf0R-reMTWc">YouTube video</ulink> можно
найти достаточно информативное видео.
</para>
</section>
<section id="upgrading-mssql-datatypes">
<title>Upgrading Microsoft SQL Server Data Types</title>
<para>
Starting OTRS version <emphasis>3.1</emphasis>, OTRS uses the
<emphasis>NVARCHAR</emphasis> data type rather than
<emphasis>VARCHAR</emphasis> or <emphasis>TEXT</emphasis>, to store textual
data. This is because the <emphasis>NVARCHAR</emphasis> type has full
support for Unicode, whereas the old data types store data in UCS-2 format,
which is a sub-set of Unicode. Also, the <emphasis>TEXT</emphasis> data type
is deprecated since <emphasis>SQL Server 2005</emphasis>. Due to this,
starting with OTRS version 3.1, the minimal SQL Server version required for
operation with OTRS is now <emphasis>Microsoft SQL Server 2005</emphasis>.
</para>
<para>
Because dropping and re-creating these indexes is a time-consuming
operation, especially on large databases, please plan enough time for
performing the upgrade. We would recommend that you perform the upgrade on a
copy of the database prior to doing the actual conversion to test the
upgrade procedure and to time how much time will be needed on your specific
environment.
</para>
<para>
Please make sure that, before you start, there is enough space available on
the database server. Make sure the free space on your database server is at
least 2.5x the current size of the database.
</para>
<important>
<para>
This upgrade procedure will upgrade all fields of the mentioned data types
to the new types. This procedure first removes any indexes and constraints
in which these fields are referenced, upgrades the fields, and then adds the
indexes and constraints back. It will do so on all tables found in the SQL
Server database that OTRS uses. If you would have stored non-OTRS tables in
the OTRS database, and these tables contain columns of the data types
VARCHAR or TEXT, these will also be updated.
</para>
</important>
<orderedlist>
<listitem>
<para>Open a Command Line on the OTRS server.</para>
</listitem>
<listitem>
<para>Change directory to the OTRS root directory. If you're using the default
OTRS installer this would be C:\Program Files\OTRS\OTRS.</para>
</listitem>
<listitem>
<para>Run the following command: <screen>
shell> perl scripts/DUpdate-to-3.1.mssql-datatypes.pl
</screen>
</para>
</listitem>
<listitem>
<para>This will generate three scripts in the specified directory
scripts\database\update. Run these scripts on the SQL Server database, via
SQL Server Management Studio or isql.
</para>
</listitem>
</orderedlist>
</section>
</chapter>
|