*epelレポジトリを使って、インストールを行う。 [#e08335be] *DBの設定 [#rd4b57b5] mysqlをインストールする。 [root@inventory ~]# yum install mysql-server Loaded plugins: refresh-packagekit, security Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package mysql-server.x86_64 0:5.1.73-3.el6_5 will be installed --> Processing Dependency: mysql = 5.1.73-3.el6_5 for package: mysql-server-5.1.73-3.el6_5.x86_64 --> Running transaction check ---> Package mysql.x86_64 0:5.1.73-3.el6_5 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================= Package Arch Version Repository Size ======================================================================================================= Installing: mysql-server x86_64 5.1.73-3.el6_5 sl-security 8.6 M Installing for dependencies: mysql x86_64 5.1.73-3.el6_5 sl-security 893 k Transaction Summary ======================================================================================================= Install 2 Package(s) Total download size: 9.5 M Installed size: 27 M Is this ok [y/N]: y Downloading Packages: (1/2): mysql-5.1.73-3.el6_5.x86_64.rpm | 893 kB 00:05 (2/2): mysql-server-5.1.73-3.el6_5.x86_64.rpm | 8.6 MB 00:51 ------------------------------------------------------------------------------------------------------- Total 167 kB/s | 9.5 MB 00:58 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : mysql-5.1.73-3.el6_5.x86_64 1/2 Installing : mysql-server-5.1.73-3.el6_5.x86_64 2/2 Verifying : mysql-server-5.1.73-3.el6_5.x86_64 1/2 Verifying : mysql-5.1.73-3.el6_5.x86_64 2/2 Installed: mysql-server.x86_64 0:5.1.73-3.el6_5 Dependency Installed: mysql.x86_64 0:5.1.73-3.el6_5 Complete! [root@inventory ~]# **mysql設定 [#o364275c] [root@inventory ~]# vi /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 character-set-server = utf8 # 追加 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid **mysql起動 [#s9c41991] [root@inventory ~]# service mysqld start MySQL データベースを初期化中: Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h inventory.hanzou.jp password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script! [ OK ] mysqld を起動中: [ OK ] [root@inventory ~]# **mysqld自動起動設定 [#c5c276b1] [root@inventory ~]# chkconfig mysqld on [root@inventory ~]# **mysql初期設定 [#l3f671a9] [root@inventory ~]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): ←空ENTER OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. Set root password? [Y/n] ←空ENTER(rootパスワード設定) New password: ←rootパスワード応答 Re-enter new password: ←rootパスワード応答(確認) Password updated successfully! Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] ←空ENTER(匿名ユーザー削除) ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] ←空ENTER(リモートからのrootログイン禁止) ... Success! By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] ←空ENTER(testデータベース削除) - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] ←空ENTER ... Success! Cleaning up... All done! If you've completed all of the above steps, your MySQL installation should now be secure. Thanks for using MySQL! [root@inventory ~]# *データベースの作成 [#r9b668e5] [root@inventory ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 5.1.73 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database ocsweb; Query OK, 1 row affected (0.00 sec) mysql> grant all privileges on ocsweb.* to ocs@localhost identified by 'パスワード'; Query OK, 0 rows affected (0.00 sec) mysql> alter database `ocsweb` default character set utf8 collate utf8_general_ci; Query OK, 1 row affected (0.00 sec) mysql> \q Bye [root@inventory ~]# *epelレポジトリを使って、ocsinventoryのインストールを行う。 [#e08335be] [root@inventory ~]# yum install --enablerepo=epel ocsinventory-server.noarch Loaded plugins: refresh-packagekit, security epel/metalink | 6.3 kB 00:00 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package ocsinventory-server.noarch 0:1.3.3-5.el6 will be installed --> Processing Dependency: perl(XML::Simple) for package: ocsinventory-server-1.3.3-5.el6.noarch --> Processing Dependency: perl(XML::Entities) for package: ocsinventory-server-1.3.3-5.el6.noarch --> Processing Dependency: perl(SOAP::Transport::HTTP2) for package: ocsinventory-server-1.3.3-5.el6.noarch --> Processing Dependency: perl(SOAP::Lite) for package: ocsinventory-server-1.3.3-5.el6.noarch --> Processing Dependency: perl(Net::IP) for package: ocsinventory-server-1.3.3-5.el6.noarch --> Processing Dependency: perl(DBD::mysql) for package: ocsinventory-server-1.3.3-5.el6.noarch --> Processing Dependency: perl(Compress::Zlib) for package: ocsinventory-server-1.3.3-5.el6.noarch --> Processing Dependency: perl(Apache::DBI) for package: ocsinventory-server-1.3.3-5.el6.noarch --> Processing Dependency: mod_perl for package: ocsinventory-server-1.3.3-5.el6.noarch --> Running transaction check ---> Package mod_perl.x86_64 0:2.0.4-10.el6 will be installed --> Processing Dependency: perl(BSD::Resource) for package: mod_perl-2.0.4-10.el6.x86_64 ---> Package perl-Apache-DBI.noarch 0:1.09-1.el6 will be installed --> Processing Dependency: perl(Digest::SHA1) for package: perl-Apache-DBI-1.09-1.el6.noarch --> Processing Dependency: perl(DBI) for package: perl-Apache-DBI-1.09-1.el6.noarch ---> Package perl-Apache2-SOAP.noarch 0:0.73-3.el6 will be installed ---> Package perl-Compress-Zlib.x86_64 0:2.021-136.el6 will be installed --> Processing Dependency: perl(IO::Uncompress::Gunzip) >= 2.021 for package: perl-Compress-Zlib-2.021-136.el6.x86_64 --> Processing Dependency: perl(IO::Compress::Gzip::Constants) >= 2.021 for package: perl-Compress-Zlib-2.021-136.el6.x86_64 --> Processing Dependency: perl(IO::Compress::Gzip) >= 2.021 for package: perl-Compress-Zlib-2.021-136.el6.x86_64 --> Processing Dependency: perl(IO::Compress::Base::Common) >= 2.021 for package: perl-Compress-Zlib-2.021-136.el6.x86_64 --> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.021 for package: perl-Compress-Zlib-2.021-136.el6.x86_64 ---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed ---> Package perl-Net-IP.noarch 0:1.25-13.el6 will be installed ---> Package perl-SOAP-Lite.noarch 0:0.710.10-3.el6 will be installed --> Processing Dependency: perl(URI::_userpass) for package: perl-SOAP-Lite-0.710.10-3.el6.noarch --> Processing Dependency: perl(URI::_server) for package: perl-SOAP-Lite-0.710.10-3.el6.noarch --> Processing Dependency: perl(URI::Escape) for package: perl-SOAP-Lite-0.710.10-3.el6.noarch --> Processing Dependency: perl(URI) for package: perl-SOAP-Lite-0.710.10-3.el6.noarch --> Processing Dependency: perl(MIME::Lite) for package: perl-SOAP-Lite-0.710.10-3.el6.noarch ---> Package perl-XML-Entities.noarch 0:1.0000-1.el6 will be installed --> Processing Dependency: perl(LWP::UserAgent) for package: perl-XML-Entities-1.0000-1.el6.noarch ---> Package perl-XML-Simple.noarch 0:2.18-6.el6 will be installed --> Processing Dependency: perl(XML::Parser) for package: perl-XML-Simple-2.18-6.el6.noarch --> Running transaction check ---> Package perl-BSD-Resource.x86_64 0:1.29.03-3.el6 will be installed ---> Package perl-Compress-Raw-Zlib.x86_64 1:2.021-136.el6 will be installed ---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed ---> Package perl-Digest-SHA1.x86_64 0:2.12-2.el6 will be installed ---> Package perl-IO-Compress-Base.x86_64 0:2.021-136.el6 will be installed ---> Package perl-IO-Compress-Zlib.x86_64 0:2.021-136.el6 will be installed ---> Package perl-MIME-Lite.noarch 0:3.027-2.el6 will be installed --> Processing Dependency: perl(MIME::Types) >= 1.28 for package: perl-MIME-Lite-3.027-2.el6.noarch --> Processing Dependency: perl(Mail::Address) for package: perl-MIME-Lite-3.027-2.el6.noarch --> Processing Dependency: perl(Email::Date::Format) for package: perl-MIME-Lite-3.027-2.el6.noarch ---> Package perl-URI.noarch 0:1.40-2.el6 will be installed ---> Package perl-XML-Parser.x86_64 0:2.36-7.el6 will be installed ---> Package perl-libwww-perl.noarch 0:5.833-2.el6 will be installed --> Processing Dependency: perl-HTML-Parser >= 3.33 for package: perl-libwww-perl-5.833-2.el6.noarch --> Processing Dependency: perl(HTML::Entities) for package: perl-libwww-perl-5.833-2.el6.noarch --> Running transaction check ---> Package perl-Email-Date-Format.noarch 0:1.002-5.el6 will be installed ---> Package perl-HTML-Parser.x86_64 0:3.64-2.el6 will be installed --> Processing Dependency: perl(HTML::Tagset) >= 3.03 for package: perl-HTML-Parser-3.64-2.el6.x86_64 --> Processing Dependency: perl(HTML::Tagset) for package: perl-HTML-Parser-3.64-2.el6.x86_64 ---> Package perl-MIME-Types.noarch 0:1.28-2.el6 will be installed ---> Package perl-MailTools.noarch 0:2.04-4.el6 will be installed --> Processing Dependency: perl(Date::Parse) for package: perl-MailTools-2.04-4.el6.noarch --> Processing Dependency: perl(Date::Format) for package: perl-MailTools-2.04-4.el6.noarch --> Running transaction check ---> Package perl-HTML-Tagset.noarch 0:3.20-4.el6 will be installed ---> Package perl-TimeDate.noarch 1:1.16-11.1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================= Package Arch Version Repository Size ======================================================================================================= Installing: ocsinventory-server noarch 1.3.3-5.el6 epel 66 k Installing for dependencies: mod_perl x86_64 2.0.4-10.el6 sl 3.2 M perl-Apache-DBI noarch 1.09-1.el6 epel 50 k perl-Apache2-SOAP noarch 0.73-3.el6 epel 12 k perl-BSD-Resource x86_64 1.29.03-3.el6 sl 34 k perl-Compress-Raw-Zlib x86_64 1:2.021-136.el6 sl 68 k perl-Compress-Zlib x86_64 2.021-136.el6 sl 44 k perl-DBD-MySQL x86_64 4.013-3.el6 sl 133 k perl-DBI x86_64 1.609-4.el6 sl 704 k perl-Digest-SHA1 x86_64 2.12-2.el6 sl 48 k perl-Email-Date-Format noarch 1.002-5.el6 sl 15 k perl-HTML-Parser x86_64 3.64-2.el6 sl 108 k perl-HTML-Tagset noarch 3.20-4.el6 sl 15 k perl-IO-Compress-Base x86_64 2.021-136.el6 sl 68 k perl-IO-Compress-Zlib x86_64 2.021-136.el6 sl 134 k perl-MIME-Lite noarch 3.027-2.el6 epel 82 k perl-MIME-Types noarch 1.28-2.el6 epel 32 k perl-MailTools noarch 2.04-4.el6 sl 100 k perl-Net-IP noarch 1.25-13.el6 sl 31 k perl-SOAP-Lite noarch 0.710.10-3.el6 sl 328 k perl-TimeDate noarch 1:1.16-11.1.el6 sl 33 k perl-URI noarch 1.40-2.el6 sl 116 k perl-XML-Entities noarch 1.0000-1.el6 epel 30 k perl-XML-Parser x86_64 2.36-7.el6 sl 223 k perl-XML-Simple noarch 2.18-6.el6 sl 71 k perl-libwww-perl noarch 5.833-2.el6 sl 386 k Transaction Summary ======================================================================================================= Install 26 Package(s) Total download size: 6.0 M Installed size: 13 M Is this ok [y/N]: y Downloading Packages: (1/26): mod_perl-2.0.4-10.el6.x86_64.rpm | 3.2 MB 00:18 (2/26): ocsinventory-server-1.3.3-5.el6.noarch.rpm | 66 kB 00:00 (3/26): perl-Apache-DBI-1.09-1.el6.noarch.rpm | 50 kB 00:00 (4/26): perl-Apache2-SOAP-0.73-3.el6.noarch.rpm | 12 kB 00:00 (5/26): perl-BSD-Resource-1.29.03-3.el6.x86_64.rpm | 34 kB 00:00 (6/26): perl-Compress-Raw-Zlib-2.021-136.el6.x86_64.rpm | 68 kB 00:00 (7/26): perl-Compress-Zlib-2.021-136.el6.x86_64.rpm | 44 kB 00:00 (8/26): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm | 133 kB 00:00 (9/26): perl-DBI-1.609-4.el6.x86_64.rpm | 704 kB 00:04 (10/26): perl-Digest-SHA1-2.12-2.el6.x86_64.rpm | 48 kB 00:00 (11/26): perl-Email-Date-Format-1.002-5.el6.noarch.rpm | 15 kB 00:00 (12/26): perl-HTML-Parser-3.64-2.el6.x86_64.rpm | 108 kB 00:00 (13/26): perl-HTML-Tagset-3.20-4.el6.noarch.rpm | 15 kB 00:00 (14/26): perl-IO-Compress-Base-2.021-136.el6.x86_64.rpm | 68 kB 00:00 (15/26): perl-IO-Compress-Zlib-2.021-136.el6.x86_64.rpm | 134 kB 00:00 (16/26): perl-MIME-Lite-3.027-2.el6.noarch.rpm | 82 kB 00:00 (17/26): perl-MIME-Types-1.28-2.el6.noarch.rpm | 32 kB 00:00 (18/26): perl-MailTools-2.04-4.el6.noarch.rpm | 100 kB 00:00 (19/26): perl-Net-IP-1.25-13.el6.noarch.rpm | 31 kB 00:00 (20/26): perl-SOAP-Lite-0.710.10-3.el6.noarch.rpm | 328 kB 00:01 (21/26): perl-TimeDate-1.16-11.1.el6.noarch.rpm | 33 kB 00:00 (22/26): perl-URI-1.40-2.el6.noarch.rpm | 116 kB 00:00 (23/26): perl-XML-Entities-1.0000-1.el6.noarch.rpm | 30 kB 00:00 (24/26): perl-XML-Parser-2.36-7.el6.x86_64.rpm | 223 kB 00:01 (25/26): perl-XML-Simple-2.18-6.el6.noarch.rpm | 71 kB 00:00 (26/26): perl-libwww-perl-5.833-2.el6.noarch.rpm | 386 kB 00:02 ------------------------------------------------------------------------------------------------------- Total 155 kB/s | 6.0 MB 00:39 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : perl-URI-1.40-2.el6.noarch 1/26 Installing : perl-IO-Compress-Base-2.021-136.el6.x86_64 2/26 Installing : 1:perl-Compress-Raw-Zlib-2.021-136.el6.x86_64 3/26 Installing : perl-DBI-1.609-4.el6.x86_64 4/26 Installing : perl-DBD-MySQL-4.013-3.el6.x86_64 5/26 Installing : perl-IO-Compress-Zlib-2.021-136.el6.x86_64 6/26 Installing : perl-Compress-Zlib-2.021-136.el6.x86_64 7/26 Installing : perl-Net-IP-1.25-13.el6.noarch 8/26 Installing : perl-HTML-Tagset-3.20-4.el6.noarch 9/26 Installing : perl-HTML-Parser-3.64-2.el6.x86_64 10/26 Installing : perl-libwww-perl-5.833-2.el6.noarch 11/26 Installing : perl-XML-Entities-1.0000-1.el6.noarch 12/26 Installing : perl-XML-Parser-2.36-7.el6.x86_64 13/26 Installing : perl-XML-Simple-2.18-6.el6.noarch 14/26 Installing : perl-MIME-Types-1.28-2.el6.noarch 15/26 Installing : perl-BSD-Resource-1.29.03-3.el6.x86_64 16/26 Installing : mod_perl-2.0.4-10.el6.x86_64 17/26 Installing : perl-Email-Date-Format-1.002-5.el6.noarch 18/26 Installing : 1:perl-TimeDate-1.16-11.1.el6.noarch 19/26 Installing : perl-MailTools-2.04-4.el6.noarch 20/26 Installing : perl-MIME-Lite-3.027-2.el6.noarch 21/26 Installing : perl-SOAP-Lite-0.710.10-3.el6.noarch 22/26 Installing : perl-Apache2-SOAP-0.73-3.el6.noarch 23/26 Installing : perl-Digest-SHA1-2.12-2.el6.x86_64 24/26 Installing : perl-Apache-DBI-1.09-1.el6.noarch 25/26 Installing : ocsinventory-server-1.3.3-5.el6.noarch 26/26 Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64 1/26 Verifying : perl-Digest-SHA1-2.12-2.el6.x86_64 2/26 Verifying : perl-DBI-1.609-4.el6.x86_64 3/26 Verifying : 1:perl-Compress-Raw-Zlib-2.021-136.el6.x86_64 4/26 Verifying : perl-XML-Simple-2.18-6.el6.noarch 5/26 Verifying : perl-Apache2-SOAP-0.73-3.el6.noarch 6/26 Verifying : perl-Apache-DBI-1.09-1.el6.noarch 7/26 Verifying : ocsinventory-server-1.3.3-5.el6.noarch 8/26 Verifying : 1:perl-TimeDate-1.16-11.1.el6.noarch 9/26 Verifying : perl-libwww-perl-5.833-2.el6.noarch 10/26 Verifying : perl-XML-Entities-1.0000-1.el6.noarch 11/26 Verifying : perl-IO-Compress-Zlib-2.021-136.el6.x86_64 12/26 Verifying : perl-Email-Date-Format-1.002-5.el6.noarch 13/26 Verifying : perl-IO-Compress-Base-2.021-136.el6.x86_64 14/26 Verifying : perl-BSD-Resource-1.29.03-3.el6.x86_64 15/26 Verifying : perl-MIME-Types-1.28-2.el6.noarch 16/26 Verifying : perl-MIME-Lite-3.027-2.el6.noarch 17/26 Verifying : perl-URI-1.40-2.el6.noarch 18/26 Verifying : perl-MailTools-2.04-4.el6.noarch 19/26 Verifying : perl-HTML-Tagset-3.20-4.el6.noarch 20/26 Verifying : perl-Compress-Zlib-2.021-136.el6.x86_64 21/26 Verifying : mod_perl-2.0.4-10.el6.x86_64 22/26 Verifying : perl-Net-IP-1.25-13.el6.noarch 23/26 Verifying : perl-XML-Parser-2.36-7.el6.x86_64 24/26 Verifying : perl-HTML-Parser-3.64-2.el6.x86_64 25/26 Verifying : perl-SOAP-Lite-0.710.10-3.el6.noarch 26/26 Installed: ocsinventory-server.noarch 0:1.3.3-5.el6 Dependency Installed: mod_perl.x86_64 0:2.0.4-10.el6 perl-Apache-DBI.noarch 0:1.09-1.el6 perl-Apache2-SOAP.noarch 0:0.73-3.el6 perl-BSD-Resource.x86_64 0:1.29.03-3.el6 perl-Compress-Raw-Zlib.x86_64 1:2.021-136.el6 perl-Compress-Zlib.x86_64 0:2.021-136.el6 perl-DBD-MySQL.x86_64 0:4.013-3.el6 perl-DBI.x86_64 0:1.609-4.el6 perl-Digest-SHA1.x86_64 0:2.12-2.el6 perl-Email-Date-Format.noarch 0:1.002-5.el6 perl-HTML-Parser.x86_64 0:3.64-2.el6 perl-HTML-Tagset.noarch 0:3.20-4.el6 perl-IO-Compress-Base.x86_64 0:2.021-136.el6 perl-IO-Compress-Zlib.x86_64 0:2.021-136.el6 perl-MIME-Lite.noarch 0:3.027-2.el6 perl-MIME-Types.noarch 0:1.28-2.el6 perl-MailTools.noarch 0:2.04-4.el6 perl-Net-IP.noarch 0:1.25-13.el6 perl-SOAP-Lite.noarch 0:0.710.10-3.el6 perl-TimeDate.noarch 1:1.16-11.1.el6 perl-URI.noarch 0:1.40-2.el6 perl-XML-Entities.noarch 0:1.0000-1.el6 perl-XML-Parser.x86_64 0:2.36-7.el6 perl-XML-Simple.noarch 0:2.18-6.el6 perl-libwww-perl.noarch 0:5.833-2.el6 Complete! [root@inventory ~]# *DBの設定 [#rd4b57b5] *epelレポジトリを使って、ocsinventory-reportsのインストールを行う。 [#e08335be] [root@inventory ~]# yum install --enablerepo=epel ocsinventory-reports Loaded plugins: refresh-packagekit, security Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package ocsinventory-reports.noarch 0:1.3.3-5.el6 will be installed --> Processing Dependency: php-zip for package: ocsinventory-reports-1.3.3-5.el6.noarch --> Processing Dependency: php-mysql for package: ocsinventory-reports-1.3.3-5.el6.noarch --> Processing Dependency: php-gd for package: ocsinventory-reports-1.3.3-5.el6.noarch --> Processing Dependency: php-domxml for package: ocsinventory-reports-1.3.3-5.el6.noarch --> Processing Dependency: php for package: ocsinventory-reports-1.3.3-5.el6.noarch --> Processing Dependency: nmap for package: ocsinventory-reports-1.3.3-5.el6.noarch --> Running transaction check ---> Package nmap.x86_64 2:5.51-3.el6 will be installed ---> Package php.x86_64 0:5.3.3-27.el6_5.1 will be installed --> Processing Dependency: php-cli(x86-64) = 5.3.3-27.el6_5.1 for package: php-5.3.3-27.el6_5.1.x86_64 ---> Package php-common.x86_64 0:5.3.3-27.el6_5.1 will be installed ---> Package php-gd.x86_64 0:5.3.3-27.el6_5.1 will be installed --> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-5.3.3-27.el6_5.1.x86_64 ---> Package php-mysql.x86_64 0:5.3.3-27.el6_5.1 will be installed --> Processing Dependency: php-pdo(x86-64) for package: php-mysql-5.3.3-27.el6_5.1.x86_64 ---> Package php-xml.x86_64 0:5.3.3-27.el6_5.1 will be installed --> Running transaction check ---> Package libXpm.x86_64 0:3.5.10-2.el6 will be installed ---> Package php-cli.x86_64 0:5.3.3-27.el6_5.1 will be installed ---> Package php-pdo.x86_64 0:5.3.3-27.el6_5.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================= Package Arch Version Repository Size ======================================================================================================= Installing: ocsinventory-reports noarch 1.3.3-5.el6 epel 1.2 M Installing for dependencies: libXpm x86_64 3.5.10-2.el6 sl 50 k nmap x86_64 2:5.51-3.el6 sl 2.7 M php x86_64 5.3.3-27.el6_5.1 sl-security 1.1 M php-cli x86_64 5.3.3-27.el6_5.1 sl-security 2.2 M php-common x86_64 5.3.3-27.el6_5.1 sl-security 525 k php-gd x86_64 5.3.3-27.el6_5.1 sl-security 106 k php-mysql x86_64 5.3.3-27.el6_5.1 sl-security 81 k php-pdo x86_64 5.3.3-27.el6_5.1 sl-security 75 k php-xml x86_64 5.3.3-27.el6_5.1 sl-security 103 k Transaction Summary ======================================================================================================= Install 10 Package(s) Total download size: 8.2 M Installed size: 27 M Is this ok [y/N]: y Downloading Packages: (1/10): libXpm-3.5.10-2.el6.x86_64.rpm | 50 kB 00:00 (2/10): nmap-5.51-3.el6.x86_64.rpm | 2.7 MB 00:15 (3/10): ocsinventory-reports-1.3.3-5.el6.noarch.rpm | 1.2 MB 00:00 (4/10): php-5.3.3-27.el6_5.1.x86_64.rpm | 1.1 MB 00:06 (5/10): php-cli-5.3.3-27.el6_5.1.x86_64.rpm | 2.2 MB 00:12 (6/10): php-common-5.3.3-27.el6_5.1.x86_64.rpm | 525 kB 00:02 (7/10): php-gd-5.3.3-27.el6_5.1.x86_64.rpm | 106 kB 00:00 (8/10): php-mysql-5.3.3-27.el6_5.1.x86_64.rpm | 81 kB 00:00 (9/10): php-pdo-5.3.3-27.el6_5.1.x86_64.rpm | 75 kB 00:00 (10/10): php-xml-5.3.3-27.el6_5.1.x86_64.rpm | 103 kB 00:00 ------------------------------------------------------------------------------------------------------- Total 198 kB/s | 8.2 MB 00:42 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : php-common-5.3.3-27.el6_5.1.x86_64 1/10 Installing : php-pdo-5.3.3-27.el6_5.1.x86_64 2/10 Installing : php-mysql-5.3.3-27.el6_5.1.x86_64 3/10 Installing : php-cli-5.3.3-27.el6_5.1.x86_64 4/10 Installing : php-5.3.3-27.el6_5.1.x86_64 5/10 Installing : php-xml-5.3.3-27.el6_5.1.x86_64 6/10 Installing : 2:nmap-5.51-3.el6.x86_64 7/10 Installing : libXpm-3.5.10-2.el6.x86_64 8/10 Installing : php-gd-5.3.3-27.el6_5.1.x86_64 9/10 Installing : ocsinventory-reports-1.3.3-5.el6.noarch 10/10 Verifying : php-pdo-5.3.3-27.el6_5.1.x86_64 1/10 Verifying : php-cli-5.3.3-27.el6_5.1.x86_64 2/10 Verifying : php-gd-5.3.3-27.el6_5.1.x86_64 3/10 Verifying : php-5.3.3-27.el6_5.1.x86_64 4/10 Verifying : libXpm-3.5.10-2.el6.x86_64 5/10 Verifying : php-xml-5.3.3-27.el6_5.1.x86_64 6/10 Verifying : php-mysql-5.3.3-27.el6_5.1.x86_64 7/10 Verifying : 2:nmap-5.51-3.el6.x86_64 8/10 Verifying : php-common-5.3.3-27.el6_5.1.x86_64 9/10 Verifying : ocsinventory-reports-1.3.3-5.el6.noarch 10/10 Installed: ocsinventory-reports.noarch 0:1.3.3-5.el6 Dependency Installed: libXpm.x86_64 0:3.5.10-2.el6 nmap.x86_64 2:5.51-3.el6 php.x86_64 0:5.3.3-27.el6_5.1 php-cli.x86_64 0:5.3.3-27.el6_5.1 php-common.x86_64 0:5.3.3-27.el6_5.1 php-gd.x86_64 0:5.3.3-27.el6_5.1 php-mysql.x86_64 0:5.3.3-27.el6_5.1 php-pdo.x86_64 0:5.3.3-27.el6_5.1 php-xml.x86_64 0:5.3.3-27.el6_5.1 Complete! [root@inventory ~]# *設定変更 [#vf04d2c9] [root@inventory ~]# vi /usr/share/ocsinventory-reports/ocsreports/files/ocsbase.sql CREATE TABLE files ( NAME VARCHAR(255) NOT NULL, VERSION VARCHAR(255) NOT NULL, OS VARCHAR(255) NOT NULL, CONTENT LONGBLOB NOT NULL, PRIMARY KEY (NAME, OS, VERSION) ) ENGINE=MYISAM; ↓ ) ENGINE=INNODB; CREATE TABLE tags ( Tag VARCHAR(255) NOT NULL default '', Login VARCHAR(255) NOT NULL default '', PRIMARY KEY (Tag,Login), KEY Tag (Tag), KEY Login (Login) ) ENGINE=MYISAM; ↓ ) ENGINE=INNODB; [root@inventory ~]# *httpdの開始 [#oe0a3dd0] [root@inventory ~]# service httpd start httpd を起動中: [ OK ] [root@inventory ~]# *インストール&設定 [#la4c1326] **ブラウザで以下のアドレスにアクセスをする [#eaf6d983] http://サーバーのIPアドレス/ocsreports/install.php &ref(WS000000.jpg); 以下を入力し、Sendボタンを押す。 MySql login :データベースのユーザ(ocs) MySql password :パスワード(設定したもの) MySql HostName :データベースサーバー名(localhost) ※ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull) が出る場合は、SELINUXを殺す必要がある。 *以下、書きかけ中 [#fb9b4eef]