Mostrando postagens com marcador debian. Mostrar todas as postagens
Mostrando postagens com marcador debian. Mostrar todas as postagens

quarta-feira, 20 de fevereiro de 2019

Debian 9 and MongoDB

Debian 9 and MongoDB


This week I upgraded my Mint running under Debian 9.3 (LMDE 3).  

See:

lucio@lucio:~$ cat /etc/debian_version 
9.3


So, I installed Mongo using the default repository. My current version of python 3 is 3.5.3, and I do not want to update python because I'm afraid to break my project - maybe I have to upgrade the pip packages if I did.


Ok... I tried updating python and using it with Mongo 4.0, but the numpy didn't work...and maybe many others too. So, I gave up.


Installing Mongo

lucio@lucio:~$ sudo apt install mongodb



So, this are the versions of my installations.

lucio@lucio:~/desenv/project$ python3 -V
Python 3.5.3

lucio@lucio:~$ mongod --version
db version v3.2.11
git version: 009580ad490190ba33d1c6253ebd8d91808923e4
OpenSSL version: OpenSSL 1.0.2q  20 Nov 2018
allocator: tcmalloc
modules: none
build environment:
    distarch: x86_64
    target_arch: x86_64


It worked fine!

Restoring backups

It's easy restoring backups in Mongo, just use mongorestore - mongorestore <backup path>.

lucio@lucio:~$ mongorestore desenv/project/dump/20190207/



--- 

Installing Mongo 4.0


I will record here the step by step to install Mongo 4.0 in Debian 9.

Make sure you have the curl installed. If not, install it.

lucio@lucio:~$ sudo apt install curl

Install the key of mongodb repository.

lucio@lucio:~$ curl https://www.mongodb.org/static/pgp/server-4.0.asc | sudo apt-key add -

Create the file mongodb-org-4.0.list:

lucio@lucio:~$ sudo vim /etc/apt/sources.list.d/mongodb-org-4.0.list

This will open a new blank file. Paste in the following:

deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main

Save and close the file, then update your package cache:

lucio@lucio:~$ sudo apt update

Install the mongodb-org package to install the server and some supporting tools:

lucio@lucio:~$ sudo apt install mongodb-org

Finally, enable and start the mongod service to get your MongoDB database running:

lucio@lucio:~$ sudo systemctl enable mongod
lucio@lucio:~$ sudo systemctl start mongod

Check if Mongo is running:

lucio@lucio:~$ sudo systemctl status mongod

That's all!!!



sexta-feira, 15 de abril de 2016

Cannot set LC_ALL to default locale: No such file or directory


lucio@workstation:~$ locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=pt_BR.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=pt_BR.UTF-8
LC_NAME=pt_BR.UTF-8
LC_ADDRESS=pt_BR.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_MEASUREMENT=pt_BR.UTF-8
LC_IDENTIFICATION=pt_BR.UTF-8
LC_ALL=

Para corrigir essa mensagem de erro no Debian, execute os seguintes comandos:

$ locale-gen en_US en_US.UTF-8 pt_BR.UTF-8
$ dpkg-reconfigure locales

Após isso, faça o login novamente e execute o comando locale para certificar de que foi o problema foi corrigido.

Até!

sexta-feira, 18 de setembro de 2015

Montar diretório Windows no Linux

Linux: Debian 7

Uma forma de montar um pasta compartilhada do Windows é seguir os seguintes passos:

$ sudo apt-get install cifs-utils

$ sudo mkdir /mnt/pasta

sudo mount -t cifs //ip_da_maquina_windows/pasta_compartilhada /mnt/pasta -o username=usuarioWindows, password=senha,uid=1000,gid=1000,umask=000

Pronto. Dê um ls em /mnt/pasta e veja que já está acessando uma pasta compartilhada do Windows, via linha de comando!


quinta-feira, 2 de julho de 2015

Impressora Kyocera FS-2020D no Debian


Para adicionar a impressora Kyocera FS-2020D no Debian, acesse por um browser o endereço http://localhost:631. Essa é a área de administração do sistema CUPS.

Na guia Administração você terá o botão Adicionar impressora. Clique nesse botão e na próxima tela localize a sua impressora e clique em Continuar.

Na tela que se segue certifique que os campos estão preenchidos corretamente. Acredito que não terá que alterar nada ou nem mesmo adicionar novas informações, apenas clique em Continuar.

Na próxima tela, você terá a caixa de opções com o nome Modelo. Nela, tente localizar a impressora FS-2020D. Caso não encontre, faça o download do zip, relativo aos PPDs dessa impressa, por esse link.

Descompacte esse arquivo e pelo botão Choose File localize o PPD da impressora FS-2020D, no caso escolhi a versão em Português, em na sequência clique em Adicionar impressora.

Na próxima tela, apenas clique no botão Consultar impressora por opções padrão, e pronto, a impressora está instalada.