最新消息:

Centos 5.3 OCSNG+GLPI安装配置

centos admin 3790浏览 0评论

安装前言* 随着企业pc、服务器、日常办公机器越来越多,人工登记服务器信息不可取,我们可以使用开源固定资产管理软件来实现批量管理。OCSNG+GLPI可以实现这个功能。

一、 安装环境及软件:
系统环境:centos 5.3 _64位
OCSNG版本: OCSNG-2.0
GLPI版本:glpi-0.78

二、 安装LAMP环境(略)
通过脚本安装OCSNG相关perl模块,脚本如下:
[root@localhost OCSNG]# cat auto_ocsng.sh
#!/bin/sh
###脚本编写目的:自动安装ocsng2.0相关包
###编写日期:2011年7月20日9:36:49
###定义变量: SRCDIR 表示源码包存放路径
SRCDIR=/usr/src/OCSNG

if
[ ! -d $SRCDIR ];then
mkdir -p $SRCDIR
fi

cd $SRCDIR && wget http://launchpad.net/ocsinventory-server/stable-2.0/2.0/+download/OCSNG_UNIX_SERVER-2.0.tar.gz https://forge.indepnet.net/attachments/download/656/glpi-0.78.tar.gz http://chinaapp.sinaapp.com/download/OCSNG/{SOAP-Lite-0.69.tar.gz,Apache-DBI-1.06.tar.gz,XML-Entities-1.0000.tar.gz}

if
[ $? -eq 0 ];then

echo “Download OCSNG code is success ,please waiting…………”

else

echo “Download OCSNG code is failed ,please check ………..”
exit 0
fi

########make install code ##################

tar xzf Digest-SHA1-2.02.tar.gz && cd Digest-SHA1-2.02 && perl Makefile.PL &&make &&make test &&make install

if
[ $? -eq 0 ];then

echo “Make install Digest-SHA1-2.02 is success ,Please waiting install Apache-DBI-1.06 ”

else
echo “Make install Digest-SHA1-2.02 is failed ,please check ……………….”

fi

cd ../ && tar xzf Apache-DBI-1.06.tar.gz && cd Apache-DBI-1.06 && perl Makefile.PL &&make &&make test &&make install
if
[ $? -eq 0 ];then

echo “Make install Apache-DBI-1.06 is success ,Please waiting install perl lib …….. ”
fi

yum install -y perl mod_perl perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Net-IP

if
[ $? -eq 0 ];then

echo “perl lib install success !”

else

echo “perl lib is failed ,please check ………..”

fi

cd ../ && tar xzf SOAP-Lite-0.69.tar.gz && cd SOAP-Lite-0.69 && perl Makefile.PL &&make &&make test &&make install
if
[ $? -eq 0 ];then

echo “Make install SOAP-Lite-0.69 is success ,Please waiting install XML-ENTITIES ”
else
echo “Make install SOAP-Lite-0.69 is failed ,Please check …………”
fi

cd ../ && tar xzf XML-Entities-1.0000.tar.gz && cd XML-Entities && perl Makefile.PL &&make &&make test &&make install
if
[ $? -eq 0 ];then

echo “Make install XML-Entities is success ”
else
echo “Make install XML-Entities is failed ,Please check …………”
fi

sleep 2

echo “This all OCSNG per lib make install end ………………….. ”

转载请注明:爱开源 » Centos 5.3 OCSNG+GLPI安装配置

您必须 登录 才能发表评论!