Centos 7 安装OCSInventory NG 2.3.1全记录

OCSInventory Server 安装记录

OS:centos 7 core

IP:192.168.8.108

hostname:OCSInventory

user root:ocsadmin

usr  ocs:ocsadmin

yum install openssh  vim wget -y#ssh vim wget
yum update

关闭selinux

vim /etc/selinux/config
SELINUX=disable

关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service
reboot
yum install  make mod_perl php gcc httpd php-pclzip 
No package mod_perl available
No package php-pclzip

不急等会再安装一次

安装mariadb数据库

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install mod_perl php-pclzip    #上面的那两个包已经可以安装上了
yum -y install mariadb-server mariadb    #安装mariadb数据库
systemctl start mariadb.service    #启动数据库
systemctl enable mariadb.service    #设置自己启动
/usr/bin/mysql_secure_installation    #设置数据库密码第一个直接按回车,后面会提示让你设置数据库用户root的密码

更新php

rpm -Uvh http://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum repolist all
yum search yum-config-manager
yum install yum-utils
yum-config-manager --enable remi
yum-config-manager --enable remi-php71
yum update php*

继续安装各种包

yum install php-mbstring php-gd php-xml php-pecl-memcached php-mysql php-soap -y
yum -y install perl-XML-Simple perl-Compress-Zlib perl-DBI perl-DBD-MySQL perl-Net-IP perl-SOAP-Lite mod_perl perl-Digest-SHA1 perl-Test-Simple
systemctl enable httpd    设置httpd开机启动
systemctl start httpd

启动apache

安装perl相关的包

yum install mod_perl perl-CPAN perl-Archive-Zip  perl-Net-IP perl-XML-Simple perl-SOAP-Lite.noarch perl-ExtUtils-Embed perl-XML-Entities
yum install perl-XML-SAX perl-Apache-DBI perl-Apache2-SOAP
yum install httpd-devel
#cpan
>install YAML
>install ModPerl::MM
>install Apache2::SOAP
>install Apache::DBI

安装git

yum install git
cd /home/ocs/
 git clone https://github.com/OCSInventory-NG/OCSInventory-Server.git OCSInventory-Server
cd OCSInventory-Server
git clone https://github.com/OCSInventory-NG/OCSInventory-ocsreports.git ocsreports

安装OCSInventory  现在是2.3.1版本

./setup.sh

其中一个地方需要输入路经

Where to copy Administration Server static files for PHP Web Console
[/usr/share/ocsinventory-reports]?/var/www/html/

其它一路回车就行

Enjoy OCS Inventory NG ;-) 出现
systemctl restart httpd.service

登陆

SECURITY ALERT!
Your install.php exists in your installation directory (by default : /usr/share/ocsinventory-reports/ocsreports).
The default SQL login/password is set on your database: ocsweb

此处错误

OCS的WIKI页面有相关办法

下面说一个棘手的问题

点击OCSInventory  Plugins页面出现错误的解决办法

当我们点到Plugins这个页面时会出现以下提示,这是zip模块没有安装

Please install the following modules in order to get this feature working :

- ZipArchive

安装比较麻烦

下面提供一种zip模块的安装办法

安装zip模块依赖于libzip 而yum安装的libzip版太低无法和zip兼容所以

yum remove libzip #移除libzip yum安装的是0.10版太低了,现在都1.3版了
cd /home/ocs
wget https://libzip.org/download/libzip-1.3.0.tar.gz
wget http://pecl.php.net/get/zip-1.15.1.tgz
tar -zxvf libzip-1.3.0.tar.gz
cd libzip-1.3.0
./configure

提示configure:error:ZLIB version too old please install at least v1.1.2

实际上是zlib-devel模块没有安装

yum install zlib-devel
cd libzip-1.3.0
./configure
make && make install
cd ..
tar -zxvf zip-1.15.1
yum install php-devel
phpize
./configure --with-php-config=/usr/bin/php-config#此处写你自己的php-config目录
make && make install

提示

/usr/local/include/zip.h:59:21: fatal error:zipconf.h:No such file or directory

找到zip.h 和zipconf.h两个文件

修改zip.h文件

vim zip.h
#incloud <zipconf.h> 改为
#incloud </usr/local/lib/libzip/include/zipconf.h>#zipconf.h的路经
make && make install

修改php.ini

vim /etc/php.ini
extension = /usr/lib64/php/modules/zip.so
zlib.output_compression=On

重启httpd

systemctl restart httpd.service

到此不再有错误提示

时间: 2024-08-28 08:45:37

Centos 7 安装OCSInventory NG 2.3.1全记录的相关文章

centos yum安装ftp 及解决vsftp错误500 OOPS: cannot change directory:/home/**

centos yum安装ftp 及解决vsftp错误500 OOPS: cannot changedirectory:/home/**   1.查看服务器有没有安装ftp包 rpm -qa |grep vsftp 2.yum  安装 yum -y install vsftpd 3.启动vsftp的服务 service vsftpd start 4.关闭防火墙 service iptables stop 5.测试匿名访问 修改配置文件 vsftpd.conf [[email protected]

Centos下安装memcached+memcached教程

Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动网站的速度.Memcached基于一个存储键/值对的hashmap.其守护进程(daemon )是用C写的,但是客户端可以用任何语言来编写,并通过memcached协议与守护进程通信. Memcache是一个高性能的分布式的内存对象缓存系统,通过在内存里维护一个统一的巨大的hash表,它能够用来存储各种格式的数据.简单的说就是将

CentOS Docker 安装

CentOS Docker 安装 Docker支持以下的CentOS版本: CentOS 7 (64-bit) CentOS 6.5 (64-bit) 或更高的版本 前提条件 目前,CentOS 仅发行版本中的内核支持 Docker. Docker 运行在 CentOS 7 上,要求系统为64位.系统内核版本为 3.10 以上. Docker 运行在 CentOS-6.5 或更高的版本的 CentOS 上,要求系统为64位.系统内核版本为 2.6.32-431 或者更高版本. 使用 yum 安装

CentOS下安装Filezilla软件

CentOS下安装Filezilla软件 说到Centos大家都是非常熟悉了,当然Filezilla也是日常中应用的软件,但是在linux下安装怎么操作呢.安装Filezilla有多个方式,但用户应该最喜欢用的就是下载安装包,然后执行安装.安装Filezilla前需要,下载安装包,然后需要安装编译器,以上工作准备好后,还需要解压,所以比较零碎,所以我就没选择通过安装包进行过安装,在此我通过rpm进行安装,首选是下载所需文件,然后进行yum安装.具体见习: 首选是安装Rpm,在centos下执行以

Centos 6安装Cacti监控网络流量

Centos 6安装Cacti监控网络流量 1.操作系统的安装,这个就不用写教程了吧(略)我个人用的是CentOS6.5最小化安装装好系统以后关闭防火墙和selinux#service iptables stop     /*关闭防火墙服务*/#chkconfig iptables off    /*永久性关闭*/ #vim /etc/sysconfig/selinux   /*把SELINUX=enforcing改为SELINUX=disabled*/ 2.安装cacti依赖的软件 #yum

CentOS 7 安装、配置、使用 PostgreSQL 9.5

学习CentOS下安装使用PostgreSQL [安装过程] 1.添加RPM    yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm2.安装PostgreSQL 9.5 yum install postgresql95-server postgresql95-contrib 3.初始化数据库    /usr/pgsql-

CentOS 7安装Docker及常用命令

CentOS 7安装Docker及常用命令   yum install docker #安装docker systemctl start docker.service #启动docker systemctl enable docker.service #docker开机启动 docker -v #查看docker版本 docker info #查看docker具体信息 docker pull centos #下载centos image docker images #显示已有image dock

Centos 7 安装 Visual stdio Code

最近微软正式发布了.net code 和asp.net code.尝试了下在linux下.net code和asp.net code使用. 具体怎么使用.net code 和asp.net code 请大家阅读大内老A写的“通过几个Hello World感受.NET Core全新的开发体验". 这里主要写在Centos 7 安装 Visual stdio Code. 环境参数: 操作系统版本:CentOS-7-x86_64-1511 软件版本:visual stdio code 1.2 操作步骤

CentOS 7安装Splunk

CentOS 7安装Splunk 导读 Splunk是探索和搜索数据的最有力工具,从收集和分析应用程序.Web服务器.数据库和服务器平台的实时可视化海量数据流,分析出IT企业产生的海量数据,安全系统或任何商业应用,给你一个总的见解获得结果的最佳运营绩效和业务. 没有官方的安装必须条件,但为服务器安装防火墙和网络配置之前,我推荐一个合适的域名.该软件只支持64位服务器架构,在这篇文章中,我指导你如何在CentOS 7服务器安装Splunk的企业版.让我们用一个一个步骤的安装. 1.创建一个Splu