Unilab no Linux

De UniWiki
Revisão de 10h29min de 25 de maio de 2012 por Romuloberri (Discussão | contribs)
Ir para: navegação, pesquisa

Atualmente é possível rodar o Banco de dados do Unilab no Linux.

Também é possível ter os executáveis e arquivos do Unilab no servidor Linux.

MySQL no Linux

Para o Unilab funcionar corretamente, o MySQL no Linux deve ser configurado para:

  • Trabalhar com a engine INNODB por padrão.
  • Ter 3 tablespaces de 4GB no mínimo.
  • Incluir na seção mysqld a opção lower_case_table_names = 1 isso faz com que o banco rode no linux de forma case insensitive, isto descarta a necessidade de converter nomes de tabelas para maiúsculo.
  • Utilizar o charset latin1 por padrão.
  • Tunar os parâmetros de tamanho de cache, memória, tabelas temporárias, para o INNODB. Afinal, geralmente o mysql do linux vem tunado para servidor web (MyISAM).

Exemplo de alterações para o my.cnf do Ubuntu

[client]
default-character-set=latin1
#
[mysqld]
# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=latin1
#
# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB
#
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
#
# isso faz com que o banco rode no linux de forma case insensitive, 
# descartando a necessidade de converter nomes de tabelas para maiúsculo.
lower_case_table_names = 1 
#
# Comentar a linha abaixo para que outras máquinas da rede possam acessar o mysql.
#bind-address		= 127.0.0.1
#
table_cache            = 256
query_cache_size        = 0
#
#
#*** INNODB Specific options ***
#
#
# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb
#
# Additional memory pool that is used by InnoDB to store metadata
# information.  If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS.  As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size=10M
#
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=1
#
# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size=2M
#
# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size=1000M
#
# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size=46M
#
# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=8
#
#Paths to individual datafiles and their sizes.
innodb_data_file_path=ibdata1:4000M;ibdata2:4000M;ibdata3:4000M;ibdata4:4000M;

Arquivos do Unilab no Linux

Na página Linux - Instalação Servidores está documentado como compartilhar arquivos com samba.