Linux: mudanças entre as edições
(→Geral) |
(→Geral) |
||
| Linha 4: | Linha 4: | ||
= Geral = | = Geral = | ||
'''Verificar espaço''' | |||
<code>du -shc *</code> | <code>du -shc *</code> | ||
'''Vim ''' | |||
(ctrl v mouse) | (ctrl v mouse) | ||
| Linha 18: | Linha 18: | ||
'''Setar timezone''' | |||
<code> | <code> | ||
| Linha 25: | Linha 25: | ||
'''Tar''' | |||
<code> | <code> | ||
Edição das 15h52min de 9 de novembro de 2021
comandos uteis linux
Geral
Verificar espaço
du -shc *
Vim
(ctrl v mouse)
/.vimrc
set mouse-=a
Setar timezone
sudo timedatectl set-timezone America/Sao_Paulo
Tar
tar -cvf sampleArchive.tar /sampleArchive
tar -xvf sampleArchive.tar
Composer
Download
curl -sS https://getcomposer.org/installer -o composer-setup.php
Instalar
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
Crontab
- ver log: /var/mail/
Find
Dentro do ditetorio
find .
Somente diretorios
-type d
Somente arquivos
-type f
com permissoes diferentes
find / -type f ! -perm 777
Arquivos acessados nas ultimas 12 horas
find . -type f -ctime -0.5 -exec ls -l {} \;
Metabase
Atualização
- Stop metabase
- Download da nova versão e backup anterior
- Copia para pasta
- Start e reinicia
Rocket Chat
Programa de chat empresarial
Certficado SSL
Atualização de certificado ssl https:
- stop ngix
/etc/init.d/nginx stop
- renew certificate
certbot renew
- start
/etc/init.d/nginx start
- delete
sudo certbot delete
sudo certbot delete --cert-name example.com
Atualizar/Manutenção
Documentação:
https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps/
https://snapcraft.io/rocketchat-server
Checar versão do snap:
snap --version
Checar versão programas instalados
snap list
Ver informações
snap info rocketchat-server
How do I manually update to a new release?
While updates happen automatically usually within 6 hours from time of release, you can update manually by issuing this command:
sudo snap refresh rocketchat-server
- opção de escolher canal
--channel=canal/stable
How do I tell if Rocket.Chat is actually running?
You can check on the status of Rocket.Chat with:
sudo service snap.rocketchat-server.rocketchat-server status
To restart Rocket.Chat:
sudo service snap.rocketchat-server.rocketchat-server restart
Chat por departamento
Atribuir departamento ao chat do livechat
<script type="text/javascript">
RocketChat(function() {
this.setDepartment('FILL HERE DEPARTMENT NAME - case sensitive');
});
</script>