Category: <span>Linux</span>

On December 8, 2020, Red Hat announced a major change to the enterprise Linux ecosystem: Red Hat will begin shifting our work from CentOS Linux to CentOS Stream on December 31, 2021. We and the CentOS Project governing board believe that CentOS Stream represents the best way to further drive Linux innovation. It will give everyone in the broader ecosystem community, including open source developers, hardware and software creators, individual contributors, and systems administrators, a closer connection to the development of the world’s leading enterprise Linux platform.

Now you can have a 100% RHEL no-cost subscription.

No-cost RHEL for customer development teams

We recognized a challenge of the developer program was limiting it to an individual developer. We’re now expanding the Red Hat Developer program to make it easier for a customer’s development teams to join the program and take advantage of its benefits. These development teams can now be added to this program at no additional cost via the customer’s existing subscription, helping to make RHEL more accessible as a development platform for the entire organization. Through this program, RHEL can also be deployed via Red Hat Cloud Access and is accessible on major public clouds including AWS, Google Cloud Platform and Microsoft Azure at no additional costs except for the usual hosting fees charged by your cloud provider of choice.

See details here

Linux

When Red Hat, CentOS’s Linux parent company, announced it was “shifting focus from CentOS Linux, the rebuild of Red Hat Enterprise Linux (RHEL), to CentOS Stream, which tracks just ahead of a current RHEL release.” Many CentOS screamed in protest on social media. CentOS co-founder, Gregory Kurtzer, heard them and announced he’d create his own RHEL clone and CentOS replacement: Rocky Linux

Read more information here

Linux

Red Hat, CentOS’s Linux parent company, announced it was “shifting focus from CentOS Linux, the rebuild of Red Hat Enterprise Linux (RHEL), to CentOS Stream, which tracks just ahead of a current RHEL release.” In other words, CentOS will no longer be a stable point distribution but a rolling release Linux distribution. CentOS users are ticked off.

Read the full article here

Linux

I setup Node-red to use HTTPS and everything works fine. All HTTPS requests go to default port of Node-red.  Today i need to setup a communication with a client that not support HTTPS, just HTTP.

The solution i found was to setup Nginx as reverse proxy.  Nginx receives the HTTP requests and then forward them to Node-red.

On my Nginx server i just add the following lines

server {
listen 80;
location /reddata {
proxy_pass https://<ipaddress>:port/reddata;
}
}

 

 

IoT Linux

Today i upgrade one server to Domino 11.0.1 from Domino 11.0 on linux.  When the server starts the HTTP  the console show the error bellow:

 

[103028:000002-00007F2CD562E740] 06/18/2020 10:40:45 AM JVM: Java Virtual Machine initialized.
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:45 AM HTTP Server: Java Virtual Machine loaded
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: java.lang.reflect.InvocationTargetException
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: at java.lang.reflect.Method.invoke(Method.java:498)
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: at com.ibm.domino.http.bootstrap.BootstrapOSGIClassLoader.loadClassFromBundle(BootstrapOSGIClassLoader.java:136)
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: at com.ibm.domino.http.bootstrap.BootstrapOSGIClassLoader.launchOSGIFramework(BootstrapOSGIClassLoader.java:88)
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: at com.ibm.domino.http.bootstrap.BootstrapOSGIClassLoader.loadClass(BootstrapOSGIClassLoader.java:63)
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: at java.lang.ClassLoader.loadClass(ClassLoader.java:881)
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: at com.ibm.domino.http.bootstrap.BootstrapClassLoader.findClass(BootstrapClassLoader.java:79)
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: Caused by:
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: java.lang.ClassNotFoundException: No class loader available for the bundle: com.ibm.xsp.domino_11.0.0.20191120-0552 [226]
[103028:000002-00007F2CD562E740] 06/18/2020 10:40:50 AM HTTP JVM: at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:579)

 

The solution was to delete all content of the folder /opt/lotus/notes/latest/linux/osgi/shared/eclipse/plugins and run the installer again.

Domino Linux

You need A Fully Qualified Domain Name (FQDN) pointing to a dedicated IP address of the webserver.
This needs to be configured by your DNS administrator or provider.

1 – Install Certbot in Centos 8

sudo curl -O https://dl.eff.org/certbot-auto
chmod 0755 /usr/local/bin/certbot-auto

2 – Configure Nginx server_name on nginx.conf

Edit nginx.conf an change the variable server_name to the same FQDN
of your server for example: server_name www.mysphere.com.br;

3 – Run the certbot command:

Execute sudo /usr/local/bin/certbot-auto –nginx and follow the instructions

Test if your Nginx server using https://<server_name>

IoT Linux web

I am creating a server (Centos 8) to develop a system that will use an application using REACT as a front end to show data from different sensors. I will use NGINX as a webserver and Node-red as a back end. In this first post I describe how to install NGINX.

Install nginx package using the yum command on CentOS 8:

sudo yum update
sudo yum install nginx

Update firewall settings and open TCP port 80 and 443. Run:

sudo firewall-cmd –permanent –zone=public –add-service=https –add-service=http
sudo firewall-cmd –reload

Enable nginx service by running systemctl command so that it starts at server boot time:

sudo systemctl enable nginx

start the service, run:

sudo systemctl start nginx

Commands to start/stop/restart nginx server

Run command as per your needs.

sudo systemctl start nginx  <– start the server ##
sudo systemctl stop nginx  <– stop the server ##
sudo systemctl restart nginx  <– restart the server ##
sudo systemctl reload nginx  <– reload the server ##
sudo systemctl status nginx  <– get status of the server ##

You must open and enable port 80 and 443 using the firewall-cmd command:

sudo firewall-cmd –permanent –zone=public –add-service=http –add-service=https
sudo firewall-cmd –reload
sudo firewall-cmd –list-services –zone=public

Now nginx is installed. Bellow are some important directories (defaults) i

Config directory – /etc/nginx/
Maibn global config file – /etc/nginx/nginx.conf
TCP ports opened by Nginx – 80 (HTTP), 443 (HTTPS)
Default web document root directory – /usr/share/nginx/html
Access log file – /var/log/nginx/access.log
Error log file – /var/log/nginx/error.log

IoT Linux web

Command line tools are always welcome.  Today i need to setup my MAC to work with IBM Cloudant

Install curl on your MAC if you haven’t done it yet.

1 – You need to setup the Cloudant DB using your IBM Cloud account.

2 – Go to service credentials and get your username, password and hostname

Sample:
"username": "xxxx-xxx-xxx-bluemix",
"password": "12345678901234567890",
"host": "xxxx-xxx-xxx-bluemix.cloudant.com"

3 – Test the connection

curl –v –u xxxx-xxx-xxx-bluemix 'https://xxxx-xxx-xxx-bluemix.cloudant.com'

The command will prompt for the password: 12345678901234567890

You will see a lot off lines but pay attention on the line Authorization: Basic. This will be used to setup acurl (authorized curl) to avoid type the password every time you use curl.

* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Server auth using Basic with user ‘xxxx-xxx-xxx-bluemix’
* Using Stream ID: 1 (easy handle 0x7fabd0805800)
> GET / HTTP/2
> Host: xxxx-xxx-xxx-bluemix.cloudant.com
> Authorization: Basic asddadasdDASDdaDadaDSERQERQRQERQEDSGSFDGSFDG==

4 – Edit the .bash_profile or .bashrc file in any text editor. For example, from the command line, issue the following command:
open –e .bash_profile

5 – Add the following line to the file, then save the file.
alias acurl="curl -s --proto '=https' -g -H 'Authorization: Basic asddadasdDASDdaDadaDSERQERQRQERQEDSGSFDGSFDG=='"

6 – On the terminal run : source .bash_profile

7 – Issue a command using the new alias. For example, issue a command to view your account information.
acurl -X GET 'https://xxxx-xxx-xxx-bluemix.cloudant.com'

TIP: The hostname is not friendly you can edit your hosts file and create an alias:

On MAC terminal type: sudo vi /etc/hosts

ping your hostname to get the ip address

add a line like this one bellow:

<ip address>  xxxx-xxx-xxx -bluemix.cloudant.com  keniodb.cloudant.com

Save the hosts file

test the connection

acurl -X GET 'https://keniodb.cloudant.com

 

Linux MAC

To install atop on Centos you need to enable EPEL Repository

## RHEL/CentOS 7 64-Bit ##
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
# rpm -ivh epel-release-7-9.noarch.rpm

Use yum install atop to install on your server.

More information on this link http://www.tecmint.com/how-to-install-atop-to-monitor-logging-activity-of-linux-system-processes/

Linux

Yesterday i start to setup some new servers and need to install several libraries on Centos 7

Yum is the first option and when i start a command like yum install <anylib> i got several erros and yum was locked.

See this short video and solve the problem.

Linux