{"id":208,"date":"2010-10-25T07:33:00","date_gmt":"2010-10-25T07:33:00","guid":{"rendered":"https:\/\/www.shaopin.link\/wordpress\/index.php\/2010\/10\/25\/glpi%e4%b8%ad%e6%96%87%e5%8c%96\/"},"modified":"2021-03-19T06:22:00","modified_gmt":"2021-03-19T06:22:00","slug":"glpi-translate-to-tw","status":"publish","type":"post","link":"https:\/\/www.shaopin.link\/wordpress\/index.php\/glpi-translate-to-tw\/","title":{"rendered":"GLPI\u4e2d\u6587\u5316"},"content":{"rendered":"<p><span style=\"font-size:100%;\"><span style=\"font-family:arial;\"><a href=\"http:\/\/www.glpi-project.org\/?lang=en\">GLPI<\/a>\u662f\u5e6b\u52a9\u4f01\u696d\u9032\u884c\u8cc7\u7522\u7ba1\u7406\u53ca\u554f\u984c\u7ba1\u7406Help Desk\u7684\u5229\u5668(\u514d\u8cbb)<\/span><\/span><\/p>\n<p><span style=\"font-family:arial;\">\u5728<a href=\"http:\/\/www.glpi-project.org\/spip.php?page=annonce&amp;id_breve=200&amp;lang=en\">0.78\u7248\u672c<\/a>\u4e2d<span style=\"color: rgb(153, 51, 153);\">\u6211\u5df2\u5b8c\u6210\u7e41\u9ad4\u4e2d\u6587\u5316\u7684\u5de5\u4f5c<\/span>,<br \/>\n\u4e26\u8a3b\u518a\u70baGLPI\u7e41\u9ad4\u4e2d\u6587\u5316\u5de5\u4f5c\u8005,\u5df2\u5b8c\u6210\u5171\u8a081840\u500b\u8fad\u53e5<\/span>\u7ffb\u8b6f.<br \/>\n<span style=\"font-family:arial;\">\u5982\u6709<\/span><span style=\"font-size:100%;\"><span style=\"font-family:arial;\">\u7ffb\u8b6f<\/span><\/span><span style=\"font-size:100%;\"><span style=\"font-family:arial;\">\u4e0d\u5b8c\u6574\u6216\u932f\u8aa4\u7684\u5730\u65b9,\u6b61\u8fce\u7559\u8a00\u4f86\u4fe1<\/span><\/span><\/p>\n<p>2011\/02\/10 \u65b0\u589e\u8aaa\u660e<br \/>\nGLPI 0.80\u65b0\u589e\u670d\u52d9\u6c34\u6e96\u5354\u8b70(SLA)\u7684\u7d71\u8a08\u9078\u9805,<br \/>\n\u4e3b\u8981\u662f\u7d66\u9700\u8981\u505aITIL,BSC\u8a55\u5206\u5361\u6216\u662fKPI\u7684\u4eba\u4f7f\u7528,<br \/>\n\u76ee\u524d\u6211\u5df2\u7d93\u9032\u884c GLPI 0.80\u7684\u4e2d\u6587\u5316,\u5df2\u5b8c\u621096%,\u5982\u679c\u7ffb\u8b6f\u4e0a\u6709\u751a\u9ebc\u554f\u984c,\u8acb\u7559\u8a00.<\/p>\n<p><span style=\"font-family:arial;\">\u53e6\u5916,\u4ee5\u4e0b\u662f\u6211\u627e\u5230\u8f03\u5b8c\u6574\u7684<\/span><span style=\"border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:100%;\">OCS and GLPI<\/span><span style=\"font-size:100%;\"><span style=\"font-family:arial;\"> \u5b89\u88dd\u8207\u8a2d\u5b9a\u8aaa\u660e,\u8acb\u4eab\u7528.<\/span><br \/>\n<\/span><\/p>\n<h2 style=\"font-family:arial;\"><span style=\"border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-size:100%;\">English : OCS and GLPI installation guide<\/span><\/h2>\n<div>\n<p style=\"font-family:arial;\"><span style=\"border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-size:100%;\"> Lisez le<span> <\/span><a href=\"http:\/\/blog.famillecollet.com\/pages\/OCS-GLPI\">Guide d&#8217;installation d&#8217;OCS et GLPI<\/a><span> <\/span>en fran\u00e7ais.<\/span><\/p>\n<p>This is a quick installation Guide for<span> <\/span><a href=\"http:\/\/www.ocsinventory-ng.org\/index.php?page=English\">OCS Inventory NG<\/a><span> <\/span>and<span> <\/span><a href=\"http:\/\/www.glpi-project.org\/spip.php?lang=en\">GLPI<\/a>.<\/p>\n<\/div>\n<div>\n<h2>Prerequisites<\/h2>\n<p>This guide is designed for<span> <\/span><a href=\"http:\/\/fedoraproject.org\/\">Fedora<\/a>,<span> <\/span><a href=\"http:\/\/www.redhat.com\/rhel\/\">RHEL<\/a><span> <\/span>and<span> <\/span><a href=\"http:\/\/www.centos.org\/\">CentOS<\/a><span> <\/span>distributions which provides RPM of OCS and GLPI in their official repositories (also available here, you need to activate<span> <\/span><a href=\"http:\/\/blog.famillecollet.com\/pages\/Config-en\">my repository<\/a>).<\/p>\n<p>We consider the server is freshly installed : MySQL is not installed nor configured.<\/p>\n<p>This article was writen with<span> <\/span><strong>OCS<\/strong><span> <\/span>version 1.02 RC3 and<span> <\/span><strong>GLPI<\/strong><span> <\/span>0.71.2.<\/p>\n<p>In this tutorial, I use<span> <\/span><em>rootsecret<\/em>,<span> <\/span><em>ocssecret<\/em>,<span> <\/span><em>glpisecret<\/em>,<span> <\/span><em>syncsecret<\/em><span> <\/span>as password, of course, you should use other values&#8230;<\/p>\n<h2>The database server<\/h2>\n<p><strong>MySQL installation<\/strong>, launch and activation :<\/p>\n<pre># yum install mysql-server\n# service mysqld start\n# chkconfig mysqld on\n<\/pre>\n<p><strong>Some security on the server<\/strong><span> <\/span>: we must change the database administrator password, drop the test database, disable anonymous access, etc:<\/p>\n<pre># mysql_secure_installation\n<\/pre>\n<p>If you&#8217;ve completed all of the above steps, your MySQL installation should now be secure. (We will consider the root password is set to<span> <\/span><em>rootsecret<\/em>)<\/p>\n<h2>OCS Inventory NG<\/h2>\n<p><strong>Installation<\/strong><span> <\/span>:<\/p>\n<pre># yum install ocsinventory\n# service httpd restart\n# chkconfig httpd on\n<\/pre>\n<p><strong>Configuration and database schema creation :<\/strong><\/p>\n<p>Connect to <span> <\/span><a href=\"http:\/\/localhost\/ocsreports\/install.php\">http:\/\/localhost\/ocsreports\/install.php<\/a><span> <\/span>(must be modified if you are connected to the server from another computer).<\/p>\n<ul>\n<li>Step 1 : enter the MySQL administrator login and password, then<span> <\/span><strong>Send<\/strong>.<\/li>\n<li>Step 2 : schema creation. If all is ok (must be true using the RPM), clic on<span> <\/span><strong>Send<\/strong><\/li>\n<li>Step 3 : installation final step. write somewhere the account created  (admin\/admin) and clic on<span> <\/span><strong>Click here to enter OCS-NG GUI<\/strong>.<\/li>\n<li>Step 4 : choose your language (using the flag on the right top)<\/li>\n<li>Step 5 : connect to the application (admin\/admin)<\/li>\n<\/ul>\n<p><strong>Congratulations<\/strong>. You have OCS installed  !<\/p>\n<p>Some required configuration options : open the <span> <\/span><strong>pipe wrench<\/strong><span> <\/span>\/ Configuration \/ Config and then the<span> <\/span><strong>Server<\/strong><span> <\/span>tabs:<\/p>\n<ul>\n<li>LOGLEVEL = On (really usefull when you encounter an issue)<\/li>\n<li>PROLOG_FREQ = 24 (time between 2 inventory)<\/li>\n<li>AUTO_DUPLICATE_LVL = crtieria used to detect that 2 computers are the same (I use Model +  Serial + Mac Address).<\/li>\n<li>TRACE_DELETED = On (required by GLPI).<\/li>\n<li>SESSION_VALIDITY_TIME = 600 (session duration, the empty value provided is not valid).<\/li>\n<\/ul>\n<p>Changing the application<span> <\/span><strong>admin<\/strong><span> <\/span>password is also really a good idea (don&#8217;t forget it) : use the &#8220;key&#8221; icon on the right top.<\/p>\n<p>During the installation step a new database<span> <\/span><strong>ocsweb<\/strong><span> <\/span>is created and a MySQL account<span> <\/span><strong>ocs<\/strong><span> <\/span>with a default password =<span> <\/span><strong>ocs<\/strong>, which is really not secure.<\/p>\n<p>We need to change the MySQL password :<\/p>\n<pre># mysql -uroot -prootsecret\nmysql&gt; UPDATE mysql.user SET Password = PASSWORD('ocssecret') WHERE User = 'ocs';\nmysql&gt; FLUSH PRIVILEGES;\nmysql&gt; exit\n<\/pre>\n<p>And to update the configuration file with this new password :<\/p>\n<p>In the <span> <\/span><strong>\/etc\/httpd\/conf.d\/ocsinventory-server.conf<\/strong><span> <\/span>file (arround line 31) :<\/p>\n<pre>PerlSetVar OCS_DB_PWD ocssecret\n<\/pre>\n<p>In the<span> <\/span><strong>\/etc\/ocsinventory\/ocsinventory-reports\/dbconfig.inc.php<\/strong><span> <\/span>file :<\/p>\n<pre>$_SESSION[\"PSWD_BASE\"]=\"ocssecret\"\n<\/pre>\n<p>Tell apache to reload his configuration for perl module to read the new parameter value:<\/p>\n<pre># service httpd reload\n<\/pre>\n<h2>First computer<\/h2>\n<p>To test the inventory feature, we are going to install the inventory agent on a first computer. Of course it will be on our server.<\/p>\n<pre># yum install ocsinventory-agent\n<\/pre>\n<p>Now, send the inventory:<\/p>\n<pre># ocsinventory-agent --server=localhost\n<\/pre>\n<p>If all is ok, your server should be in the computer list in OCS.<\/p>\n<p>You can enable the automatic inventory of this computer, edit the <span> <\/span><strong>\/etc\/sysconfig\/ocsinventory-agent<\/strong>:<\/p>\n<pre>OCSMODE[0]=cron\nOCSSERVER[0]=http:\/\/localhost\/ocsinventory\n<\/pre>\n<h2>GLPI<\/h2>\n<p>To start, we are going to create the database schema and the MySQL accounts for GLPI. Using the administrator (root) account is really a bad idea. The<span> <\/span><strong>glpi<\/strong><span> <\/span>account will be used by the application, and the<span> <\/span><strong>synchro<\/strong><span> <\/span>account for the synchronizaton process (to read the ocsweb database from glpi with only minimum rights).<\/p>\n<p>N.B. in this example, the synchro user rights are reduce to the minimal. In the case you want to use some special plugins (uninstall p.e.), full right are required.<\/p>\n<pre># mysql -uroot -prootsecret\nmysql&gt; CREATE USER 'glpi'@'%' IDENTIFIED BY 'glpisecret';\nmysql&gt; GRANT USAGE ON *.* TO 'glpi'@'%' IDENTIFIED BY 'glpisecret';\nmysql&gt; CREATE DATABASE IF NOT EXISTS `glpi` ;\nmysql&gt; GRANT ALL PRIVILEGES ON `glpi`.* TO 'glpi'@'%';\nmysql&gt; CREATE USER 'synchro'@'%' IDENTIFIED BY 'syncsecret';\nmysql&gt; GRANT USAGE ON *.* TO 'synchro'@'%' IDENTIFIED BY 'syncsecret';\nmysql&gt; GRANT SELECT ON `ocsweb`.* TO 'synchro'@'%';\nmysql&gt; GRANT DELETE ON `ocsweb`.`deleted_equiv` TO 'synchro'@'%';\nmysql&gt; GRANT UPDATE (`CHECKSUM`) ON `ocsweb`.`hardware` TO 'synchro'@'%';\nmysql&gt; FLUSH PRIVILEGES;\nmysql&gt; exit\n<\/pre>\n<p><strong>Installation :<\/strong><\/p>\n<pre># yum install glpi\n# service httpd reload\n<\/pre>\n<p><strong>Database schema creation and configuration<\/strong><\/p>\n<p>Connect to the application :<span> <\/span><a href=\"http:\/\/localhost\/glpi\/\">http:\/\/localhost\/glpi\/<\/a><span> <\/span>it will launch the configuration wizard.<\/p>\n<ul>\n<li>select your language and :<span> <\/span><strong>OK<\/strong>.<\/li>\n<li>read and accept the license (GPL) :<span> <\/span><strong>Continue<\/strong><\/li>\n<li>start the installation :<span> <\/span><strong>Installation<\/strong><\/li>\n<li>step 0 : prerequisites check (must be ok with the RPM) :<span> <\/span><strong>Continue<\/strong><\/li>\n<li>step 1 : enter the database connexion parameters (localhost \/ glpi \/ glpisecret) :<span> <\/span><strong>Continue<\/strong><\/li>\n<li>step 2 : select the<span> <\/span><strong>glpi<\/strong><span> <\/span>database and<span> <\/span><strong>Continue<\/strong><\/li>\n<li>step 3 : write somewhere the adminstrateur login and password (glpi\/glpi) et<span> <\/span><strong>Continue<\/strong><\/li>\n<li>step 4 : also write the other account informations :<span> <\/span><strong>Use GLPI<\/strong><\/li>\n<li>Authentificate yourself with the new account : glpi\/glpi<\/li>\n<\/ul>\n<p><strong>Congratulations (again)<\/strong><span> <\/span>: you have GLPI installed !<\/p>\n<h2>OCSNG mode configuration<\/h2>\n<p><strong>OCSNG mode activation :<br \/>\n<\/strong><\/p>\n<ul>\n<li>Menu Setup \/<span> <\/span><strong>General<\/strong><\/li>\n<li><strong>Restrictions<\/strong><span> <\/span>tabs<\/li>\n<li>Activate<span> <\/span><strong>OCSNG<\/strong><span> <\/span>mode : Yes, and<span> <\/span><strong>Post<\/strong><\/li>\n<\/ul>\n<p><strong>Server Configuration :<br \/>\n<\/strong><\/p>\n<ul>\n<li>Menu Setup \/<span> <\/span><strong>OCSNG mode<br \/>\n<\/strong><\/li>\n<li>Select the server created during installation:<span> <\/span><strong>localhost<\/strong><\/li>\n<li>Name:<span> <\/span><strong>My OCS Server<br \/>\n<\/strong><\/li>\n<li>OCSweb host:<span> <\/span><strong>localhost<\/strong><\/li>\n<li>Name of the OCS database:<span> <\/span><strong>ocsweb<\/strong><\/li>\n<li>OCSweb database user:<span> <\/span><strong>synchro<\/strong><\/li>\n<li>OCSweb user password:<span> <\/span><strong>syncsecret<\/strong><\/li>\n<li><strong>Post<\/strong><\/li>\n<\/ul>\n<p>You must get the<span> <\/span><strong>Connection to OCS database successful<\/strong><span> <\/span>message.<\/p>\n<p>Now, we must configure the informations that will be imported from OCS to GLPI. Here is a few examples :<\/p>\n<ul>\n<li><strong>Monitors<\/strong><span> <\/span>:<span> <\/span><strong>Unit<\/strong><span> <\/span>import on Serial number<\/li>\n<li><strong>Logiciels<\/strong><span> <\/span>:<span> <\/span><strong>Unit<\/strong><span> <\/span>Import<\/li>\n<li>Use the software<span> <\/span><strong>dictionary<\/strong><span> <\/span>of OCS:<span> <\/span><strong>No<\/strong><\/li>\n<li>Number of computers to synchronize using the cron:<span> <\/span><strong>0<\/strong><span> <\/span>(we are going to use another solution)<\/li>\n<li>General<span> <\/span><strong>informations<\/strong><span> <\/span>Computers : Yes for all that you are interested by.<\/li>\n<li><strong>Components<\/strong><span> <\/span>: Yes for what you want.<\/li>\n<li>etc, etc (you should notice that a lot of behavior are configurable)<\/li>\n<li><strong>Post<\/strong><\/li>\n<\/ul>\n<p>Check :<\/p>\n<ul>\n<li>Menu Tools \/<span> <\/span><strong>OCSNG<\/strong><\/li>\n<li>Import<span> <\/span><strong>new<\/strong><span> <\/span>computers<\/li>\n<\/ul>\n<p>In the displayed list, you should see your server (on which we have installed the agent). Don&#8217;t ask for it to be imported as we are going to see how to use automatic synchronization.<\/p>\n<h2>Automatic OCSNG synchronization<\/h2>\n<p>This step is not required as the internal<span> <\/span><em>pseudo<\/em>&#8211;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Cron\">cron<\/a><span> <\/span>integrated in GLPI also do an automatic synchronization. But this solution seems more cumfortable and flexible (at least, for me).<\/p>\n<p>We are going to use the<span> <\/span><a href=\"http:\/\/www.glpi-project.org\/spip.php?article254\">Mass import from OCSNG<\/a><span> <\/span>plugin.<\/p>\n<p>Disconnect from GLPI (logout link) and install the plugin:<\/p>\n<pre># yum install glpi-mass-ocs-import\n<\/pre>\n<p>Connect into GLPI to install \/ configure the plugin :<\/p>\n<ul>\n<li>Menu Setup \/<span> <\/span><strong>Plugins<\/strong><\/li>\n<li>Link :<span> <\/span><strong>OCS massive Import<br \/>\n<\/strong><\/li>\n<li>Link :<span> <\/span><strong>Install OCS massive import plugin<\/strong><span> <\/span>(plugin tables creation)<\/li>\n<li>Default OCS server:<span> <\/span><strong>My OCS Server<br \/>\n<\/strong><\/li>\n<li><strong>Post<\/strong><span> <\/span>the configuration page<\/li>\n<li><strong>Enable<\/strong><span> <\/span>the synchronization<\/li>\n<\/ul>\n<p>The planified task configured by the RPM will be launched every 5 minutes. Be patient, your first computer should be imported into GLPI.<\/p>\n<p>Tu supervise the synchronization :<\/p>\n<ul>\n<li>Menu : Plugins \/<span> <\/span><strong>OCS Massive Import<\/strong><\/li>\n<li>Tab : <span> <\/span><strong>Informations<\/strong><span> <\/span>about scripts execution<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>We have configured one of the best inventory and asset management solution in a few minutes (probably the best, as it is<a href=\"http:\/\/en.wikipedia.org\/wiki\/Opensource\">OpenSource<\/a>)<\/p>\n<p>You can now continue to deploy the inventory agent on your other computers, it&#8217;s available for most OS.<\/p>\n<p>Take also some time to read the official documentation to be able to tune your configuration to fully suite your need:<\/p>\n<ul>\n<li><a href=\"http:\/\/wiki.ocsinventory-ng.org\/\">OCS Documentation<\/a><\/li>\n<li><a href=\"http:\/\/glpi-project.org\/wiki\/doku.php?id=en:welcome\">GLPI Documentation<\/a><\/li>\n<\/ul>\n<p>Don&#8217;t forget than<span> <\/span><a href=\"http:\/\/en.wikipedia.org\/wiki\/Opensource\">OpenSource<\/a><span> <\/span>projects exists thanks to their community and to their users contributions. So when you&#8217;ll have seen what OCS and GLPI can do for you, don&#8217;t forget to do something for this projects:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.ocsinventory-ng.org\/index.php?page=donate\">OCS NG donations<\/a><\/li>\n<li><a href=\"http:\/\/www.glpi-project.org\/spip.php?article52&amp;lang=en\">Contribute to GLPI<\/a><\/li>\n<\/ul>\n<h2>Comments and support<\/h2>\n<p>Of course, comments on this guide are welcome and could be posted here. For support questions, please, use each application official forums:<\/p>\n<ul>\n<li><a href=\"http:\/\/forums.ocsinventory-ng.org\/\">OCS Forums<\/a><\/li>\n<li><a href=\"http:\/\/glpi-project.org\/forum\/\">GLPI Forums<\/a><\/li>\n<li><a href=\"http:\/\/forums.famillecollet.com\/\">Forums &#8211; Les RPM de Remi<\/a><span> <\/span>for questions about this tutorial or the RPM.<\/li>\n<\/ul>\n<p>Don&#8217;t forget to read and to respect forum usage rules.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>GLPI\u662f\u5e6b\u52a9\u4f01\u696d\u9032\u884c\u8cc7\u7522\u7ba1\u7406\u53ca\u554f\u984c\u7ba1\u7406 &hellip; <a href=\"https:\/\/www.shaopin.link\/wordpress\/index.php\/glpi-translate-to-tw\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">GLPI\u4e2d\u6587\u5316<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-208","post","type-post","status-publish","format-standard","hentry","category-glpi"],"_links":{"self":[{"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=208"}],"version-history":[{"count":1,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/208\/revisions"}],"predecessor-version":[{"id":436,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/208\/revisions\/436"}],"wp:attachment":[{"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}