Java Expert....Java/Open Source Addict

Redes Sociales

twitterlinkedinrss feedemail youtube

Mostrando entradas con la etiqueta mac. Mostrar todas las entradas
Mostrando entradas con la etiqueta mac. Mostrar todas las entradas

martes, 7 de septiembre de 2021

Configurar Multicast en MacOS


Estimados amigos,

En este post, voy a mostrarles como configurar Multicast en Mac, lo cual también aplica para Linux, lo cual es muy importante para realizar pruebas de tráfico. En mi caso lo estoy utilizando para testear una configuración de Cluster en Wildfly, sin más empecemos.


Qué es Multicast?.-  Un multicast es un protocolo por la cual la data es transmitida simultáneamente a todos los hosts que son parte de un grupo multicast, se puede hacer la analogía con un canal de radio en donde los que sintonizan una frecuencia en particular reciben la información
 
Configuración.- Por defecto multicast no está habilitado en Mac, para configuarlo y habilitarlo se debe realizar lo siguiente:

1.- Abril un terminal y ejecutar el comando ifconfig -ael cual permitirá revisar si la interface de red soporta multicast.
 
Como podemos apreciar en la última línea aparece la palabra MULTICAST, lo cual significa que la  interfaz de red en0 soporta aquello.

2.-  Revisar si la ruta multicast esta configurada, para lo cual se debe ejecutar el siguiente comando netstat -nr
 
 
Si está configurado en la primera tabla (Routing Tables) aparecerá una IP en el rango de 224.0.0.0 a 239.255.255.255. En el caso de que no esté configurado pasar al paso 3

3.-  Para añadir una dirección IP multicast ejecutar el siguiente comando sudo route -nv add -net 228.0.0.4 -interface en0
 

 
4.-  Verificar si la dirección IP multicast ha sido añadida con el comando netstat -nr
 

 5.-  Finalmente para verficar que la configuración este funcionando correctamente y que la máquina esté habilitado para multicast, se debe ejecutar los comandos   sudo tcpdump -ni en0 host 228.0.0.4 y ping -t 1 -c 2 228.0.0.4 en terminales diferentes.
 



 

lunes, 16 de agosto de 2021

Problems to Install Gradle on Mac using brew


Dear friends, 

In this post, I want to share how to fix the error about Gradle installation using brew. In my case when I  try to install Gradle, I have the following errors:


In the picture above, the suggestion was executing the commands related to git. Because as of Oct 2020 Homebrew no longer creates shallow clones and updates them. However, when I try to execute them, I had the following error:

The problem described is because for some reason the Xcode tools are missing. To continue to fix the problem about Gradle installation, you must do the following:

1. First, execute the xcode-select --install command. The pictures below show the installation process.



 

2.- Once time, these tools had finished. The next step is to execute the commands:

git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow

git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow

 

3.- Later, you must start the Gradle installation, to do this you must execute the brew install gradle command.

 

4.- Finally, execute the gradle -v command, to verify the installation.



miércoles, 24 de octubre de 2018

Install OpenJDK on MAC Computer



Hello friends, in this post I'm going to show how install the OpenJDK on Mac computer using Homebrew Package Manager . This way is very simple, for this we need to do the following:

1.- First install homebrew package manager, the indications how to do this is here.
2.- Next open a console o terminal and execute the brew tap homebrew/cask-versions command to update versions.



3.- Next execute the brew cask install adoptopenjdk8 command to install the openJDK.


4.- After that we must configure the JAVA_HOME environment variable in the .bash_profile file with the value  /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/ and export it.


Don't forget re-open the terminal to update the .bash_profile file.




5.- Finally verify the java version with the java -version command.



viernes, 19 de octubre de 2018

Change Password Postgres.app on Mac


Before I show us how to change the password on Postgres is important say us that I used the Postgres.app  program to install Postgres on Mac. It is a tool  that let us manages the database from easy way. However the default installation doesn't include password.



To change the password  we must do the following steps:
  1. Go to the /Applications/Postgres.app/Contents/Versions/10/bin directory and execute the ./psql --u postgres command.
  2. Next we need to change the password throught the \password command. We need to enter the password twice times.
  3. Next quit the postgres console.

4. After that we need to change the autentication method of trust to md5 in the pg_hba.conf  file  located in /Users//Library/Application Support/Postgres/var-10/pg_hba.conf, where is the username of computer.



       5. Finally we need to restart the Postgres.app, for this we must stop the database and start again.