安装 GLPI¶
请按以下步骤操作:
版本选择,
下载档案,
安装 :)
选择版本¶
备注
强烈建议您为生产用途选择最新的稳定版本。
GLPI遵循3位数的语义版本控制方案。第一个是主要版本,第二个是次要版本,第三个是修订版本。
主要版本可能具有重要的不兼容性和新功能;次要版本也可能带来新功能,但在主要版本内保持完美兼容。
修复版本只会修复报告的问题而不添加任何新内容。
下载¶
警告
在GitHub上,总有两个名为*Source code*的档案,不应该使用。不应该这样说啊,github上不使用的source code好像没这说法。
点击 下载 按钮 GLPI 官方网站 (或从Github获取 Github release) 选择 glpi-{version}.tgz 文档.
安装¶
GLPI安装由三个步骤组成:
解压缩您网站中的存档;
让你的web服务器写入``files``和``config``目录;
Launch installation wizard (or use the command line installation script).
完成这三个步骤后,即可使用该应用程序。
If you need to set advanced configuration, like SSL database connection parameters, please refer to advanced configuration.
文件和目录位置¶
As long as the web server is configured properly (see web server configuration), sensible files should not be exposed publicly.
GLPI stores some data in the files directory, the database access configuration is stored in the config directory, etc. To ease the GLPI maintenance, the location of GLPI storage directories can be customized.
There are a few configuration directives you may use to achieve that:
GLPI_CONFIG_DIR:设置配置目录的路径;GLPI_VAR_DIR: 设置files目录路径;GLPI_LOG_DIR: 设置日志文件路径.
备注
There are many other configuration directives available, the ones we talked about are the main to move all stored files outside the GLPI source code.
目录的选择完全取决于你;以下示例将遵循`FHS <http://www.pathname.com/fhs/>`_建议。
我们的GLPI实例将安装在``/var/www/glpi``中,Web服务器配置中的特定虚拟主机将反映此路径。
GLPI configuration will be stored in /etc/glpi, just copy the contents of the config directory to this place. GLPI requires read rights on this directory to work; and write rights during the installation process.
GLPI data will be stored in /var/lib/glpi/files, just copy the contents of the files directory to this place. GLPI requires read and write rights on this directory.
GLPI日志文件将存储在``/var/log/glpi``中,此处无需复制,只需创建目录即可。GLPI需要对此目录进行读写访问。
按照这些说明,我们将在GLPI目录中创建一个``inc/downstream.php``文件,其中包含以下内容:
<?php
define('GLPI_CONFIG_DIR', '/etc/glpi/');
if (file_exists(GLPI_CONFIG_DIR . '/local_define.php')) {
require_once GLPI_CONFIG_DIR . '/local_define.php';
}
警告
GLPI包肯定会提供一个``inc/downstream.php``文件。这个不能编辑!
GLPI looks for a local_define.php file in its own config directory. If you want to use one from new config directory, you have to load it.
然后,使用以下内容在`/etc/glpi/local_define.php``中创建一个文件:
<?php
define('GLPI_VAR_DIR', '/var/lib/glpi/files');
define('GLPI_LOG_DIR', '/var/log/glpi');
备注
GLPI_VAR_DIR permits to change the storage path of all the GLPI files, but you can adapt the storage path for each kind of files.
<?php
define('GLPI_VAR_DIR', '/var/lib/glpi/files');
define('GLPI_DOC_DIR', GLPI_VAR_DIR); // Path for documents storage
define('GLPI_CACHE_DIR', GLPI_VAR_DIR . '/_cache'); // Path for cache storage
define('GLPI_CRON_DIR', GLPI_VAR_DIR . '/_cron'); // Path for cron storage
define('GLPI_GRAPH_DIR', GLPI_VAR_DIR . '/_graphs'); // Path for graph storage
define('GLPI_LOCAL_I18N_DIR', GLPI_VAR_DIR . '/_locales'); // Path for local i18n files
define('GLPI_LOCK_DIR', GLPI_VAR_DIR . '/_lock'); // Path for lock files storage (used by cron)
define('GLPI_LOG_DIR', GLPI_VAR_DIR . '/_log'); // Path for log storage
define('GLPI_PICTURE_DIR', GLPI_VAR_DIR . '/_pictures'); // Path for picture storage
define('GLPI_PLUGIN_DOC_DIR', GLPI_VAR_DIR . '/_plugins'); // Path for plugins documents storage
define('GLPI_RSS_DIR', GLPI_VAR_DIR . '/_rss'); // Path for RSS feeds storage
define('GLPI_SESSION_DIR', GLPI_VAR_DIR . '/_sessions'); // Path for sessions files storage
define('GLPI_TMP_DIR', GLPI_VAR_DIR . '/_tmp'); // Path for temporary files storage
define('GLPI_UPLOAD_DIR', GLPI_VAR_DIR . '/_uploads'); // Path for upload storage
define('GLPI_INVENTORY_DIR', GLPI_VAR_DIR . '/_inventories');// Path for inventory files storage
define('GLPI_THEMES_DIR', GLPI_VAR_DIR . '/_themes'); // Path for custom themes storage
Plugins files locations¶
在 11.0.0 版本加入.
Plugins files location can be configured using the GLPI_MARKETPLACE_DIR configuration directive.
To store the plugins in the /var/lib/glpi/plugins directory, just copy the contents of the marketplace and plugins directories to this place. GLPI requires read and write rights on this directory.
Then, in the /etc/glpi/local_define.php file, add the following contents:
define('GLPI_MARKETPLACE_DIR', '/var/lib/glpi/plugins');