- 论坛徽章:
- 0
|
本帖最后由 liheng 于 2012-10-10 16:31 编辑
[root @heng ~] # rpm -ihv perl-XML-Entities-0.03-1.el5.noarch.rpm
[root @heng ~] # groupadd apache
[root @heng ~] # useradd -g apache apache
在APACHE 中添加 mod_perl模块,并将 apache daemon的用户修改成 apache
[root @heng ~] # vi /usr/local/apache/conf/httpd.conf
#添加 mod_perl 模块,因为 ocs-ng 通信需要 mod_perl 支持才能正常工作
LoadModule perl_module modules/mod_perl.so
将
User daemon
Group daemon
修改成为
User apache
Group apache
保存退出
[root @heng ~] # chown -R apache.apache /usr/local/apache/htdocs
[root @heng ~] # /usr/local/apache/bin/apachectl restart
[root @heng ~] # cd /usr/local
[root @heng ~] # tar xzvf /root/OCSNG_UNIX_SERVER_1.02_RC2.tar.gz
[root @heng OCSNG_UNIX_SERVER_1.02_RC2] # ./setup.sh
+----------------------------------------------------------+ |
|
Welcome to OCS Inventory NG Management server setup ! |
+----------------------------------------------------------+
CAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and
previous, please remove any Apache configuration for Communication Server!
Do you wish to continue ([y]/n)?y
Assuming Communication server 1.0 RC2 or previous is not installed
on this computer.
Starting OCS Inventory NG Management server setup from folder /usr/local/OCSNG_UNIX_SERVER_1.02_RC2
Storing log in file /usr/local/OCSNG_UNIX_SERVER_1.02_RC2/ocs_server_setup.log
+----------------------------------------------------------+
| Checking for database server properties... |
+----------------------------------------------------------+
./setup.sh: line 111: mysql: command not found
./setup.sh: line 112: mysql: command not found
Your MySQL client seems to be part of MySQL version ..
./setup.sh: line 116: [: -gt: unary operator expected
./setup.sh: line 120: [: -eq: unary operator expected
Your computer does not seem to be compliant with MySQL 4.1 or higher.
//这里提示 OCS_SERVER 的安装程序在我的系统中没有找到 MySQL,而事实上我是有安装 MySQL 的,只不过 OCS_SERVER 默认是在 /etc 目录下查找,是查找系统默认安装的MySQL,而我的 MySQL 是自己编译安装的,安装在 /usr/local 目录下,所以 OCS_SERVER 提示找不到,这个不要紧,在下面自己指定就行啦。
Do you wish to continue (y/[n])?y
Ensure your database server is running MySQL 4.1 or higher !
Ensure also this computer is able to connect to your MySQL server !
Which host is running database server [localhost] ?
//这里要你指定哪一台主机运行数据库服务器,预选项是 localhost ,这里因为我要使用本机安装的 mysql,所以直接回车就行了,如果你的 mysql 安装在其它电脑上,请在这里指定 mysql 服务器的 IP 地址。//
OK, database server is running on host localhost ;-)
On which port is running database server [3306] ?
// 指定 mysql 服务器的运行端口,默认是3306 。本例中我并没有改变 mysql 使用的端口号,直接回车即可。//
OK, database server is running on port 3306 ;-
+----------------------------------------------------------+
Checking for Apache web server daemon... |
+----------------------------------------------------------+
Where is Apache daemon binary [] ?/usr/local/apache/bin/apachectl
// 指定 apache 程序的二进制执行文件位置,也就是启动 apache 服务器的指令路径,通过指定 apache 程序的二进制执行文件位置,OCS_SERVER安装程序来找到apache的主配置文件。 这里我的 apache 是自己编译安装的,apaceh 安装在 /usr/local/apache 目录下 。如果你安装的路径不同或采用的是系统自带的 apache,请根据自己的情况进行调整。//
OK, using Apache daemon /usr/local/apache/bin/apachectl ;-)
+----------------------------------------------------------+
Checking for Apache main configuration file... |
+----------------------------------------------------------+
Where is Apache main configuration file [/usr/local/apache/conf/httpd.conf] ?
//指定 apache 服务器的主配置文件路径,确认路径是否正确,如果没有错误,直接回车即可,如果不对,请输入正确的路径。//。
OK, using Apache main configuration file /usr/local/apache/conf/httpd.conf ;
+----------------------------------------------------------+
Checking for Apache user account...
+----------------------------------------------------------+
Which user account is running Apache web server [User] ?apache
// 指定运行 APACHE 的用户,这个可以在 APACHE 的主配置文件里查看到。//
OK, Apache is running under user account daemon ;-)
+----------------------------------------------------------+
Checking for Apache group... |
+----------------------------------------------------------+
Which user group is running Apache web server [apache] ?apache
// 指定运行 APACHE 的用户组,这个可以在 APACHE 的主配置文件里查看到。//
OK, Apache is running under users group daemon ;
+----------------------------------------------------------+
Checking for Apache Include configuration directory... |
+----------------------------------------------------------+
Setup found Apache Include configuration directory in
Setup will put OCS Inventory NG Apache configuration in this directory.
Where is Apache Include configuration directory [] ?/usr/local/apache/conf/extra
//指定 apache 保存指定模块配置文件的目录
OK, Apache Include configuration directory /usr/local/apache/conf found ;)
+----------------------------------------------------------+
Checking for PERL Interpreter... |
+----------------------------------------------------------+
Found PERL Intrepreter at </usr/bin/perl> ;-)
Where is PERL Intrepreter binary [/usr/bin/perl] ?
//指定 perl 的二进制目录,如果使用系统自带的 perl,直接回车即可,如果你自己安装了 perl 的话,就指定正确的路径。//
OK, using PERL Intrepreter /usr/bin/perl ;-)
Do you wish to setup Communication server on this computer ([y]/n)?y
//是否安装通信服务器,当然要啦,输入 y
+----------------------------------------------------------+
Checking for Make utility...
+----------------------------------------------------------+
OK, Make utility found at </usr/bin/make> ;-)
+----------------------------------------------------------+
Checking for Apache mod_perl version...
+----------------------------------------------------------+
Checking for Apache mod_perl version 1.99_22 or higher
Found that mod_perl version 1.99_22 or higher is available.
OK, Apache is using mod_perl version 1.99_22 or higher ;-)
+----------------------------------------------------------+
| Checking for Communication server log directory...
+----------------------------------------------------------+
Communication server can create detailled logs. This logs can be enabled
by setting interger value of LOGLEVEL to 1 in Administration console
menu Configuration.
Where to put Communication server log directory [/var/log/ocsinventory-server] ?
// 指定通信服务器的日志目录,如果不想改,直接回车就行啦。//
OK, Communication server will put logs into directory /var/log/ocsinventory-server ;-)
+----------------------------------------------------------+
Checking for required Perl Modules... |
+----------------------------------------------------------+
Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for Apache::DBI PERL module...
Found that PERL module Apache::DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for Compress::Zlib PERL module..
Found that PERL module Compress::Zlib is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.
+----------------------------------------------------------+
Checking for optional Perl Modules... |
+----------------------------------------------------------+
Checking for SOAP::Lite PERL module...
Found that PERL module SOAP::Lite is available.
Checking for XML::Entities PERL module...
Found that PERL module XML::Entities is available.
+----------------------------------------------------------+
OK, looks good ;-)
//上面是在检查是否已经安装了需要的 perl 模块,所有的测试都是 available,都通过啦,没问题。// | |
|
Configuring Communication server Perl modules... |
+----------------------------------------------------------+
Checking if your kit is complete...
Looks good
Writing Makefile for Apache::Ocsinventory
+----------------------------------------------------------+
| OK, looks good ;-) |
| |
| Preparing Communication server Perl modules... |
+----------------------------------------------------------+
+----------------------------------------------------------+
| OK, prepare finshed ;-) || |
| Installing Communication server Perl modules... |
+----------------------------------------------------------+
+----------------------------------------------------------+
| OK, Communication server Perl modules install finished;-)|
|
| Creating Communication server log directory... |
+----------------------------------------------------------+
Creating Communication server log directory /var/log/ocsinventory-server.
Fixing Communication server log directory files permissions.
Configuring logrotate for Communication server.
Removing old communication server logrotate file /etc/logrotate.d/ocsinventory-NG
Writing communication server logrotate to file /etc/logrotate.d/ocsinventory-server
+----------------------------------------------------------+
| OK, Communication server log directory created ;-) |
| |
| Now configuring Apache web server... |
+----------------------------------------------------------+
To ensure Apache loads mod_perl before OCS Inventory NG Communication Server,
Setup can name Communication Server Apache configuration file
z-ocsinventory-server.conf' instead of 'ocsinventory-server.conf'.
Do you allow Setup renaming Communication Server Apache configuration file
to 'z-ocsinventory-server.conf' ([y]/n) ? 直接回车
//是否允许安装程序重命名通信服务器的 apache 配置文件到to 'z-ocsinventory-server.con,输入 y 吧。//
OK, using 'z-ocsinventory-server.conf' as Communication Server Apache configuration file
Removing old communication server configuration to file /usr/local/apache/conf/ocsinventory.conf
Writing communication server configuration to file /usr/local/apache/conf/ocsinventory-server.conf
+----------------------------------------------------------+|
OK, Communication server setup sucessfully finished ;-) | |
| Please, review /usr/local/apache/conf/ocsinventory-server.conf
| to ensure all is good. Then restart Apache daemon.
+----------------------------------------------------------+
Do you wish to setup Administration Server (Web Administration Console)
on this computer ([y]/n)?y
//是否安装管理服务器(WEB 管理控制台)?当然要啦,输入 y。//
+----------------------------------------------------------+
| Checking for Administration Server directories... |
+----------------------------------------------------------+
CAUTION: Setup now install files in accordance with Filesystem Hierarchy
Standard. So, no file is installed under Apache root document directory
(Refer to Apache configuration files to locate it).
If you're upgrading from OCS Inventory NG Server 1.01 and previous, YOU
MUST REMOVE (or move) directories 'ocsreports' and 'download' from Apache
root document directory.
If you choose to move directory, YOU MUST MOVE 'download' directory to
Administration Server writable/cache directory (by default
/var/lib/ocsinventory-server), especialy if you use deployement feature.
Do you wish to continue ([y]/n)?y
Assuming directories 'ocsreports' and 'download' removed from
Apache root document directory.
Where to copy Administration Server static files for PHP Web Console
[/usr/share/ocsinventory-server] ?
//复制管理服务器的PHP WEB 控制台的静态文件到哪里?直接回车即可
OK, PHP files copied into /usr/share/ocsinventory-server/ocsreports ;-)
Where to create writable/cache directories for deployement packages and
IPDiscover [/var/lib/ocsinventory-server] ?
//开发包和 IPDiscover 的可写/缓存 指定在什么地方?
OK, writable/cache directory is /var/lib/ocsinventory-server ;-)
+----------------------------------------------------------+
|
Checking for required Perl Modules... |
+----------------------------------------------------------+
Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.
+----------------------------------------------------------+
|
Installing files for Administration server... |
+----------------------------------------------------------+
Creating PHP directory /usr/share/ocsinventory-server/ocsreports.
Copying PHP files to /usr/share/ocsinventory-server/ocsreports.
Fixing permissions on directory /usr/share/ocsinventory-server/ocsreports.
Creating database configuration file /usr/share/ocsinventory-server/ocsreports/dbconfig.inc.php.
Creating IPDiscover directory /var/lib/ocsinventory-server/ipd.
Fixing permissions on directory /var/lib/ocsinventory-server/ipd.
Creating packages directory /var/lib/ocsinventory-server/download.
Fixing permissions on directory /var/lib/ocsinventory-server/download.
Configuring IPDISCOVER-UTIL Perl script.
Installing IPDISCOVER-UTIL Perl script.
Fixing permissions on IPDISCOVER-UTIL Perl script.
Writing Administration server configuration to file /usr/local/apache/conf/ocsinventory-reports.conf
+----------------------------------------------------------+|
OK, Administration server installation finished ;-) |
| |
|
Please, review /usr/local/apache/conf/ocsinventory-reports.conf
| to ensure all is good and restart Apache daemon. |
| |
| Then, point your browser to http://server//ocsreports
| to configure database server and create/update schema. |
+----------------------------------------------------------+
Setup has created a log file /usr/local/OCSNG_UNIX_SERVER_1.02_RC2/ocs_server_setup.log. Please, save this file.
If you encounter error while running OCS Inventory NG Management server,
we can ask you to show us his content !
DON'T FORGET TO RESTART APACHE DAEMON !
Enjoy OCS Inventory NG ;-)
修改 apache 的配置文件
[root@mail OCSNG_UNIX_SERVER_1.02_RC2] # vi /usr/local/apache/conf/httpd.conf
#在 apache 的主配置文件的末尾添加下面的内容
# OCS-NG REPORTS
Include conf/extra/ocsinventory-reports.conf
# OCS-NG SERVER
Include conf/extra/z-ocsinventory-server.conf
[root@mail OCSNG_UNIX_SERVER_1.02_RC2] # /usr/local/apache/bin/apachectl stop
[root@mail OCSNG_UNIX_SERVER_1.02_RC2] # /usr/local/apache/bin/apachectl start
打开浏览器在地址栏中输入:http://192.168.98.240/ocsreports/install.php
输入 mysql 服务器的用户名、密码与服务器地址,点击”send”
继续....
继续....
OCS-NG 数据库建立成功,点击“提交查询”
|
|