Difference between revisions of "Knowledge:Linux Debian"

From OpenKM Documentation
Jump to: navigation, search
m (Download and install application)
m (Download and install application)
 
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{TOCright}} __TOC__
 
{{TOCright}} __TOC__
 +
 +
== Increase ulimit ==
 +
 +
Edit '''/etc/pam.d/su''' and uncomment the following line:
 +
 +
  #session    required  pam_limits.so
 +
 +
to
 +
 +
  session    required  pam_limits.so
 +
 +
Now edit '''/etc/security/limits.conf''' and add the following lines to the end of the file (before the line # End of file)
 +
 +
  *      soft  nofile  6084                                                   
 +
  *      hard  nofile  6084
 +
 +
Now reboot the machine and run ulimit -n and see the open files limits are now updated. enjoy!!
  
 
== User and service ==
 
== User and service ==
 
   $ sudo adduser --disabled-password openkm
 
   $ sudo adduser --disabled-password openkm
  $ sudo adduser openkm admin
 
 
   $ sudo vim /etc/init.d/tomcat
 
   $ sudo vim /etc/init.d/tomcat
  
Script from http://wiki.openkm.com/index.php/Configure_Tomcat_service
+
Script from [[Configure Tomcat service linux]].
  
 
   $ sudo chmod 755 /etc/init.d/tomcat
 
   $ sudo chmod 755 /etc/init.d/tomcat
Line 14: Line 30:
 
Install basic packages:
 
Install basic packages:
  
   $ sudo aptitude install apache2 rdiff-backup ghostscript msttcorefonts imagemagick
+
   $ sudo apt-get install apache2 rsync rdiff-backup ghostscript msttcorefonts
   $ sudo aptitude install libreoffice clamav unzip python-software-properties
+
   $ sudo apt-get install imagemagick clamav unzip python-software-properties
  
Install Java JDK (Ubuntu 12.04 - Precise Pangolin):
+
Install Java JDK (Ubuntu):
  
 
   $ sudo add-apt-repository ppa:webupd8team/java
 
   $ sudo add-apt-repository ppa:webupd8team/java
 
   $ sudo apt-get update
 
   $ sudo apt-get update
   $ sudo apt-get install oracle-java6-installer
+
   $ sudo apt-get install oracle-java7-installer
 +
 
 +
Install Java JDK (Debian):
 +
 
 +
  $ sudo su -
 +
  $ echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
 +
  $ echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
 +
  $ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
 +
  $ apt-get update
 +
  $ apt-get install oracle-java7-installer
 +
 
 +
Install LibreOffice:
 +
 
 +
  $ sudo apt-get install libreoffice
  
Uninstall OpenJDK packages:
+
Uninstall OpenJDK packages (optional):
  
 
   $ dpkg -l | grep openjdk
 
   $ dpkg -l | grep openjdk
Line 33: Line 62:
 
Descargar y descomprimir la aplicación (password eMpg8eIjY5):
 
Descargar y descomprimir la aplicación (password eMpg8eIjY5):
  
   $ wget http://openkm.com/download/okm/Tomcat-7.0.27.zip
+
   $ wget http://download.openkm.com/okm/Tomcat-7.0.27.zip
   $ wget http://openkm.com/download/okm/OpenKM-6.2.14.zip
+
   $ wget http://download.openkm.com/okm/OpenKM-6.2.27.zip
 +
  $ wget http://download.openkm.com/okm/OpenKM-6.4.14.zip
  
 
== MySQL support ==
 
== MySQL support ==
 
First of all, installation:
 
First of all, installation:
  
   $ sudo aptitude install mysql-server
+
   $ sudo apt-get install mysql-server
  
 
Check if your MySQL installation has InnoDB engin enabled:
 
Check if your MySQL installation has InnoDB engin enabled:
Line 46: Line 76:
 
   mysql> show engines;
 
   mysql> show engines;
  
Edit /etc/mysql/my.cnf and under [mysqld] section in your ini file, add:
+
Edit '''/etc/mysql/my.cnf''' and under [mysqld] section in your ini file, add:
  
 
   default-storage-engine = innodb
 
   default-storage-engine = innodb
Line 56: Line 86:
 
   mysql> CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
 
   mysql> CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
 
   mysql> GRANT ALL ON okmdb.* TO openkm@localhost WITH GRANT OPTION;
 
   mysql> GRANT ALL ON okmdb.* TO openkm@localhost WITH GRANT OPTION;
 +
 +
== Apache ==
 +
Enable proxy AJP:
 +
 +
  $ sudo a2enmod proxy_ajp
 +
 +
Create the configuration file '''/etc/apache2/sites-available/openkm.conf''':
 +
 +
<source lang="apache">
 +
<VirtualHost *>
 +
    ServerName openkm.your-domain.com
 +
    RedirectMatch ^/$ /OpenKM
 +
    <Location /OpenKM>
 +
        ProxyPass ajp://127.0.0.1:8009/OpenKM
 +
        ProxyPassReverse http://openkm.your-domain.com/OpenKM
 +
    </Location>
 +
    ErrorLog /var/log/apache2/openkm-error.log
 +
    CustomLog /var/log/apache2/openkm-access.log combined
 +
</VirtualHost>
 +
</source>
 +
 +
Enable configuration:
 +
 +
  $ sudo a2ensite openkm.conf
 +
 +
Finally restart Apache:
 +
 +
  $ sudo /etc/init.d/apache2 restart
 +
 +
== LibreOffice ==
 +
Para instalar la última versión de LibreOffice en Ubuntu:
 +
 +
<source lang="bash">
 +
$ apt-add-repository ppa:libreoffice/libreoffice-4-1
 +
$ apt-get update
 +
$ apt-get upgrade
 +
$ apt-get install libreoffice
 +
</source>
 +
 +
En Debian:
 +
 +
<source lang="bash">
 +
$ echo "deb http://ftp.debian.org/debian/ wheezy-backports main contrib" >> /etc/apt/sources.list
 +
$ apt-get update
 +
$ apt-get -t wheezy-backports install libreoffice
 +
$ apt-get autoremove
 +
</source>
  
 
== Extensiones ==
 
== Extensiones ==
Line 75: Line 152:
 
Haciendo uso de inxi podemos sacar un resumen de la configuración del servidor:
 
Haciendo uso de inxi podemos sacar un resumen de la configuración del servidor:
  
   $ sudo aptitude install gawk pciutils
+
   $ sudo apt-get install gawk pciutils
 
   $ wget -Nc smxi.org/inxi
 
   $ wget -Nc smxi.org/inxi
 
   $ chmod +x inxi
 
   $ chmod +x inxi
Line 81: Line 158:
  
 
== Altas administrativas ==
 
== Altas administrativas ==
Ir a [http://update.openkm.com/admin/license_list.php OpenKM Licenses] y asociar el nombre del cliente al UUID de la instalación.
+
* Ir a [http://update.openkm.com/admin/license_list.php OpenKM Licenses] y asociar el nombre del cliente al UUID de la instalación.
 +
 
 +
* Dar de alta en [http://okm07.openkmcloud.com/OpenKM/index.jsp?uuid=33889b2e-309a-4fff-8450-40eb215753d0 hoja de registro de clientes].
 +
 
 +
== Problemas ==
 +
Si da warning por el tema de los locales, hacer lo siguiente:
 +
 
 +
  $ export LANGUAGE=en_GB.UTF-8
 +
  $ export LANG=en_GB.UTF-8
 +
  $ export LC_ALL=en_GB.UTF-8
 +
  $ sudo locale-gen en_GB.UTF-8
 +
  $ sudo dpkg-reconfigure locales
 +
 
 +
Puedes leer más sobre el tema en [http://perlgeek.de/en/article/set-up-a-clean-utf8-environment How to set up a clean UTF-8 environment in Linux].

Latest revision as of 09:07, 28 July 2014

Increase ulimit

Edit /etc/pam.d/su and uncomment the following line:

 #session    required   pam_limits.so

to

 session    required   pam_limits.so

Now edit /etc/security/limits.conf and add the following lines to the end of the file (before the line # End of file)

 *       soft  nofile   6084                                                     
 *       hard  nofile   6084

Now reboot the machine and run ulimit -n and see the open files limits are now updated. enjoy!!

User and service

 $ sudo adduser --disabled-password openkm
 $ sudo vim /etc/init.d/tomcat

Script from Configure Tomcat service linux.

 $ sudo chmod 755 /etc/init.d/tomcat
 $ sudo update-rc.d tomcat defaults

Required packages

Install basic packages:

 $ sudo apt-get install apache2 rsync rdiff-backup ghostscript msttcorefonts
 $ sudo apt-get install imagemagick clamav unzip python-software-properties

Install Java JDK (Ubuntu):

 $ sudo add-apt-repository ppa:webupd8team/java
 $ sudo apt-get update
 $ sudo apt-get install oracle-java7-installer

Install Java JDK (Debian):

 $ sudo su -
 $ echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
 $ echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
 $ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
 $ apt-get update
 $ apt-get install oracle-java7-installer

Install LibreOffice:

 $ sudo apt-get install libreoffice

Uninstall OpenJDK packages (optional):

 $ dpkg -l | grep openjdk
 $ dpkg -l | grep icedtea
 $ sudo apt-get purge openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib
 $ sudo apt-get autoremove

Download and install application

Descargar y descomprimir la aplicación (password eMpg8eIjY5):

 $ wget http://download.openkm.com/okm/Tomcat-7.0.27.zip
 $ wget http://download.openkm.com/okm/OpenKM-6.2.27.zip
 $ wget http://download.openkm.com/okm/OpenKM-6.4.14.zip

MySQL support

First of all, installation:

 $ sudo apt-get install mysql-server

Check if your MySQL installation has InnoDB engin enabled:

 $ mysql -h localhost -u root -p
 mysql> show engines;

Edit /etc/mysql/my.cnf and under [mysqld] section in your ini file, add:

 default-storage-engine = innodb

Now create databases and user:

 $ mysql -h localhost -u root -p
 mysql> CREATE USER openkm@localhost IDENTIFIED BY '*secret*';
 mysql> CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
 mysql> GRANT ALL ON okmdb.* TO openkm@localhost WITH GRANT OPTION;

Apache

Enable proxy AJP:

 $ sudo a2enmod proxy_ajp

Create the configuration file /etc/apache2/sites-available/openkm.conf:

<VirtualHost *>
    ServerName openkm.your-domain.com
    RedirectMatch ^/$ /OpenKM
    <Location /OpenKM>
        ProxyPass ajp://127.0.0.1:8009/OpenKM
        ProxyPassReverse http://openkm.your-domain.com/OpenKM
    </Location>
    ErrorLog /var/log/apache2/openkm-error.log
    CustomLog /var/log/apache2/openkm-access.log combined
</VirtualHost>

Enable configuration:

 $ sudo a2ensite openkm.conf

Finally restart Apache:

 $ sudo /etc/init.d/apache2 restart

LibreOffice

Para instalar la última versión de LibreOffice en Ubuntu:

$ apt-add-repository ppa:libreoffice/libreoffice-4-1
$ apt-get update
$ apt-get upgrade
$ apt-get install libreoffice

En Debian:

$ echo "deb http://ftp.debian.org/debian/ wheezy-backports main contrib" >> /etc/apt/sources.list
$ apt-get update
$ apt-get -t wheezy-backports install libreoffice
$ apt-get autoremove

Extensiones

INSERT INTO OKM_EXTENSION (EXT_UUID, EXT_NAME) VALUES ('25af39c0-580f-431c-8852-0b6430b4dc1d', 'Stapling');
INSERT INTO OKM_EXTENSION (EXT_UUID, EXT_NAME) VALUES ('54743940-0761-11e0-81e0-0800200c9a66', 'Stamp');
INSERT INTO OKM_EXTENSION (EXT_UUID, EXT_NAME) VALUES ('05838826-bf84-4259-8c73-227e03e91ad4', 'Google Docs');
INSERT INTO OKM_EXTENSION (EXT_UUID, EXT_NAME) VALUES ('808e7a42-2e73-470c-ba23-e4c9d5c3a0f4', 'Live Edit');
INSERT INTO OKM_EXTENSION (EXT_UUID, EXT_NAME) VALUES ('87f250d5-526d-4d8a-96ee-1e5be7910bd8', 'HTML Editor');

INSERT INTO OKM_PROFILE_MSC_EXTENSION (PEX_ID, PEX_EXTENSION) values (1, '25af39c0-580f-431c-8852-0b6430b4dc1d');
INSERT INTO OKM_PROFILE_MSC_EXTENSION (PEX_ID, PEX_EXTENSION) values (1, '54743940-0761-11e0-81e0-0800200c9a66');
INSERT INTO OKM_PROFILE_MSC_EXTENSION (PEX_ID, PEX_EXTENSION) values (1, '05838826-bf84-4259-8c73-227e03e91ad4');
INSERT INTO OKM_PROFILE_MSC_EXTENSION (PEX_ID, PEX_EXTENSION) values (1, '808e7a42-2e73-470c-ba23-e4c9d5c3a0f4');
INSERT INTO OKM_PROFILE_MSC_EXTENSION (PEX_ID, PEX_EXTENSION) values (1, '87f250d5-526d-4d8a-96ee-1e5be7910bd8');

Server report

Haciendo uso de inxi podemos sacar un resumen de la configuración del servidor:

 $ sudo apt-get install gawk pciutils
 $ wget -Nc smxi.org/inxi
 $ chmod +x inxi
 $ sudo ./inxi -F

Altas administrativas

  • Ir a OpenKM Licenses y asociar el nombre del cliente al UUID de la instalación.

Problemas

Si da warning por el tema de los locales, hacer lo siguiente:

 $ export LANGUAGE=en_GB.UTF-8
 $ export LANG=en_GB.UTF-8
 $ export LC_ALL=en_GB.UTF-8
 $ sudo locale-gen en_GB.UTF-8
 $ sudo dpkg-reconfigure locales

Puedes leer más sobre el tema en How to set up a clean UTF-8 environment in Linux.