Actualizar ocsinventory 2.6 hacia 2.7 y php 7.3 hacia 7.4 Debian Buster
Actualizando ocsinventory 2.6 hacia 2.7
Revisar que no hayan plugins en la siguiente carpeta
ls /etc/ocsinventory-server/plugins
creamos una copia de respaldo de nuestra instalacion actual
cp /etc/apache2/conf-available/z-ocsinventory-server.conf
/etc/apache2/conf-available/zz-ocsinventory-restapi.conf
/etc/apache2/conf-available/ocsinventory-reports.conf /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php /carpeta/respaldo
mysqldump -u root ocs > ocs_20200610.sql
descomprimimos el archivo de instalacion
tar xvzf OCSNG_UNIX_SERVER_2.7.tar.gz
Instalando.
cd OCSNG_UNIX_SERVER_2.7
sh setup.sh
borramos el archivo de instalacion web
rm /usr/share/ocsinventory-reports/ocsreports/install.php
Restauramos las configuraciones
cp ocsinventory-reports.conf zz-ocsinventory-restapi.conf z-ocsinventory-server.conf /etc/apache2/conf-available/
cp dbconfig.inc.php /usr/share/ocsinventory-reports/ocsreports/
agregamos las siguientes variables al archivo
vi /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
define("SSL_KEY","");
define("SSL_CERT","");
define("CA_CERT","");
define("SERVER_PORT","3306");
define("ENABLE_SSL","0");
define("SSL_CERT","");
define("CA_CERT","");
define("SERVER_PORT","3306");
define("ENABLE_SSL","0");
systemctl restart apache2
Actualizar php 7.3 hacia 7.4
agregamos el respositorio de la siguiente manera
vi /etc/apt/sources.list
deb https://packages.sury.org/php/ buster main
actualizamos
apt update
apt upgrade
instalamos php7.4 y sus modulos
apt install php7.4 libapache2-mod-php7.4 php7.4-mbstring php7.4-mysql php7.4-xml
apt install php7.4-cli php7.4-common php7.4-json php7.4-mbstring
apt install php7.4-mysql php7.4-opcache php7.4-readline php7.4-xml php7.4-curl php7.4-gd
apt install php7.4-mysql php7.4-opcache php7.4-readline php7.4-xml php7.4-curl php7.4-gd
configuramos apache2
a2dismod php7.3
a2enmod php7.4
systemctl restart apache2
a2enmod php7.4
systemctl restart apache2
podemos hacer un archivo phpinfo.php para verificar nuestra version en la web.
vi /usr/share/ocsinventory-reports/ocsreports/phpinfo.php
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
ingresamos a nuestro sitio de ocs
http://sitio/ocsreports/phpinfo.php
Finalmente ingresamos a nuestro sitio web y actualizamos la base de datos.
Comentarios