Importar/Exportar tabela mysql

Exportação

select * from mytable into outfile '/tmp/mytable.csv' fields terminated by ',' enclosed by '"' lines terminated by '\n';

Importação

LOAD DATA LOCAL INFILE '/tmp/mytable.csv' INTO TABLE mytable fields terminated by ',' enclosed by '"' lines terminated by '\n';

Anúncios

Java 7 JDK debian 8.5

Tags

1 – Como root, crie o arquivo “java-8-debian.list”:

#vim /etc/apt/sources.list.d/java-8-debian.list

2 – Adicione o seguinte conteúdo no arquivo:

deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

3 – Agora importe a chave GPG no sistema para validação dos pacotes antes da instalação

#apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886

4 – Execute, como root:

#apt-get update
#apt-get install oracle-java7-installer

5 – Verifique a instalação

#java -version

Exibirá algo como:

java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

Algorithm negotiation failed for SSH Secure Shell Client

ssh

1 – No servidor, Edite o arquivo “/etc/ssh/sshd_config”

# vim /etc/ssh/sshd_config

2 – E adicione o seguinte conteudo:

# Ciphers
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,arcfour
KexAlgorithms diffie-hellman-group1-sha1

 

3 – Reinicie o serviço

#/etc/init.d/ssh restart

3 – Ou Reinicie o servidor

#reboot

 
fonte: https://linuxcluster.wordpress.com/2016/08/15/algorithm-negotiation-failed-for-ssh-secure-shell-client/

Configuração de rede no CentOS

Tags

# vim /etc/sysconfig/network-scripts/ifcfg-eth0

Exemplo via DHCP:

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=dhcp

Exemplo via IP fixo:

DEVICE=eth0
TYPE=Ethernet
IPADDR=192.168.1.198
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
ONBOOT=yes

# vim /etc/resolv.conf
# DNS DO GOOGLE
nameserver 8.8.8.8
nameserver 8.8.4.4

# service network restart
Ou:
# /etc/init.d/network restart