Instalar OCS Inventory en Ubuntu 18
Instalar OCS Inventory en Ubuntu 18
Instalar OCS Inventory en Ubuntu 18
Inventory en ubuntu
18.04
Como Instalar OCS Inventory en ubunto 18.04
Instalación de OCS Inventory NG Server en Ubuntu 18.04
Instalación de OCS Inventory NG Server en Ubuntu 18.04
Se realiza instalación de las dependencias necesarias para la ejecución del servicio,
para realizar la instalación de los paquetes necesarios se debe contar con ingreso
como usuario root.
1. Se instala Apache
# apt install apache2 apache2-doc
4. Se instala MySQL
Step 1 — Installing MySQL
$ sudo apt install mysql-server
This will install MySQL, but will not prompt you to set a password or
make any other configuration changes. Because this leaves your
installation of MySQL insecure, we will address this next.
Step 2 — Configuring MySQL
For fresh installations, you'll want to run the included security script. This changes some of
the less secure default options for things like remote root logins and sample users. On older
versions of MySQL, you needed to initialize the data directory manually as well, but this is
done automatically now.
Run the security script:
$ sudo mysql_secure_installation
This will take you through a series of prompts where you can make some changes to your
MySQL installation’s security options. The first prompt will ask whether you’d like to set up
the Validate Password Plugin, which can be used to test the strength of your MySQL
password. Regardless of your choice, the next prompt will be to set a password for the
MySQL root user. Enter and then confirm a secure password of your choice.
From there, you can press Y and then ENTER to accept the defaults for all the subsequent
questions. This will remove some anonymous users and the test database, disable remote
root logins, and load these new rules so that MySQL immediately respects the changes you
have made.
In order to use a password to connect to MySQL as root, you will need to switch its
authentication method from auth_socket to mysql_native_password. To do this, open up
the MySQL prompt from your terminal:
$ sudo mysql
Next, check which authentication method each of your MySQL user accounts
use with the following command:
mysql> SELECT user,authentication_string,plugin,host FROM mysql.user;
+------------------+-------------------------------------------+---------
-----------+-----------+
| user | authentication_string | plugin
| host |
+------------------+-------------------------------------------+---------
-----------+-----------+
| root | |
auth_socket | localhost |
| mysql.session |*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
mysql_native_password| localhost |
| mysql.sys |*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
mysql_native_password| localhost |
| debian-sys-maint|*CC744277A401A7D25BE1CA89AFF17BF607F876FF |
mysql_native_password| localhost |
+------------------+-------------------------------------------+---------
-----------+-----------+
4 rows in set (0.00 sec)
n this example, you can see that the root user does in fact authenticate using
the auth_socket plugin. To configure the root account to authenticate with a password, run
the following ALTER USER command. Be sure to change password to a strong password of your
choosing, and note that this command will change the root password you set in Step 2:
Mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH
mysql_native_password BY 'password';
Then, run FLUSH PRIVILEGES which tells the server to reload the grant tables and put your
new changes into effect:
+-----------------+------------------------------------------+-----------
-----------+----------+
| user | authentication_string | plugin
| host |
+-----------------+------------------------------------------+-----------
-----------+----------+
| root | *3636DACC8616D997782ADD0839F92C1571D6D78 |
mysql_native_password| localhost|
| mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHER |
mysql_native_password| localhost|
| mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHER |
mysql_native_password| localhost|
| debian-sys-maint| *CC744277A401A7D25BE1CA89AFF17BF607F876F |
mysql_native_password| localhost|
+-----------------+------------------------------------------+-----------
-----------+----------+
4 rows in set (0.00 sec)
You can see in this example output that the root MySQL user now authenticates
using a password. Once you confirm this on your own server, you can exit the
MySQL shell:
mysql> exit
6. Se instala PHP # apt install php php-mysql php-gd php-soap php-mbstring php-
curl php-xml
7. Se modifica /etc/php/7.2/cli/php.ini
Línea 671 post_max_size = 200M
Línea 824 upload_max_filesize = 200M
8. Se instala Perl
apt install libxml-simple-perl libcompress-zlib-perl libdbi-perl
libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl
libarchive-zip-perl make build-essential
cpan install XML::Entities
<Perl>
$ENV{PLACK_ENV} = 'production';
$ENV{MOJO_HOME} = '/usr/local/share/perl/5.26.1';
$ENV{MOJO_MODE} = 'deployment';
$ENV{OCS_DB_HOST} = 'localhost';
$ENV{OCS_DB_PORT} = '3306';
$ENV{OCS_DB_LOCAL} = 'ocsweb';
$ENV{OCS_DB_USER} = 'root';
$ENV{OCS_DB_PWD} =contraseña