tirsdag den 29. august 2017

Change from DHCP to a Static IP Address on Ubuntu Server


Very simple...

nano /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s31f6   # Do a ifconfig to see the network dev..
#iface enp0s31f6 inet dhcp  #you DO NOT want dhcp on a server!!!
iface enp0s31f6 inet static
address 192.168.x.xxx
netmask 255.255.255.x
network 192.168.x.x
broadcast 192.168.x.x
gateway 192.168.x.x
dns-nameservers 192.168.x.x

Source :
https://www.howtogeek.com/howto/ubuntu/change-ubuntu-server-from-dhcp-to-a-static-ip-address/

torsdag den 3. august 2017

Install Cacti on CentOS 7.x for QNAP Nas (SNMP style)

I was asked: How to make SNMP easy and not on a commandline..

I like nmap and snmpwalk before I do a setup for a client.
yum -y install net-snmp net-snmp-utils nmap

#nmap 1x.x.x.0/24 > scan.txt   (You are looking for UDP port 161 (snmp) - so use UDP scan!! )
#cat scan.txt |more

#nmap -sU -p 161 --script=snmp-interfaces 1x.x.x.1  (Looking at the gateway)

Starting Nmap x.xx ( http://nmap.org ) at xxxxxxxxxxxxx CEST
Nmap scan report for gateway (1x.x.x.x.x)
Host is up (0.00013s latency).
PORT    STATE SERVICE
161/udp open  snmp
| snmp-interfaces:
|   pflog0
|     Type: ifPwType  Speed: 0 Kbps
|     Status: up
|     Traffic stats: 2456.21 Mb sent, 0.00 Kb received
|   pfsync0
|     Type: ilan  Speed: 0 Kbps
|     Status: up

|     Traffic stats: 230.30 Kb sent, 0.00 Kb received

Scanning : https://nmap.org/nsedoc/scripts/snmp-interfaces.html
More info about ports:  https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

Why not use Cacti ?  More info : https://www.cacti.net/
"Cacti is a complete network graphing solution designed to harness the power of RRDTool's data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with thousands of devices."

Here I use CentOS 7.x:

#yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd net-snmp-utils php-snmp net-snmp-libs cacti nano mc

NOTE!!!!  It will install MariaDB....

To start MariaDB:
#systemctl enable mariadb
#systemctl start mariadb
#systemctl status mariadb

#mysqladmin -u root password NEWPASSWORD

-You can make a password on : http://passwordsgenerator.net/
and replace NEWPASSWORD.

Create a user called cacti with a password called NEWPASSWORD, enter:

#mysql -u root -p
#Enter password:     Enter : NEWPASSWORD

FAQ:
Q: Why not just do : mysql -u root -p [somepassword] ?
A: What happens if I do : history |grep mysql
A: I got the mysql root password in the lists...

Error : ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
fix :  mysqladmin -u root password NEWPASSWORD

mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'NEWPASSWORD';
mysql> FLUSH privileges;
mysql> \q

Let's find the Cacti SQL file to pass into the DB.

#rpm -ql cacti | grep cacti.sql

Output:
#/usr/share/doc/cacti-1.1.16/cacti.sql

#mysql -u cacti -p --database=cacti < /usr/share/doc/cacti-1.1.16/cacti.sql

If you get the error: ERROR 1046 (3D000) at line 12: No database selected 
fix : just add  --database=cacti in your call.

Configure the new cacti
Backup and Open /etc/cacti/db.php file, enter:
# cp  /etc/cacti/db.php  /etc/cacti/db.org
# nano /etc/cacti/db.php

Default:
$database_type     = 'mysql';
$database_default  = 'cacti';
$database_hostname = 'localhost';
$database_username = 'cacti';
$database_password = 'NEWPASSWORD';
$database_port     = '3306';
$database_ssl      = false;

Config The webserver.
Open /etc/httpd/conf.d/cacti.conf file, enter:

# nano /etc/httpd/conf.d/cacti.conf
##
Alias /cacti    /usr/share/cacti

<Directory /usr/share/cacti/>
        Order Deny,Allow
        Deny from all
        Allow from x.x.x.x/x  (your client IP range)
</Directory>

Another option is create /usr/share/cacti/.htaccess file and password protect the directory.


Now restart your webserver....

# service httpd restart
Redirecting to /bin/systemctl restart  httpd.service

To pull data from our unit we need to change the crontab. Just remove # 

#cat  /etc/cron.d/cacti
*/5 * * * *     cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

Now cacti is ready to install. Try with a webbrowser and type the url:
http://monitor-domaine/cacti/
OR
http://x.x.x.x/cacti/

NOTE!
The default username and password for cacti is admin / admin. Upon first login, you will be force to change the default password.

Error :  Forbidden
            You don't have permission to access /cacti/ on this server.
fix :      Did you do the /cacti/.htaccess or the conf.d/cacti.conf   ?

ERROR: Your Cacti database login account does not have access to the MySQL TimeZone database. Please provide the Cacti database account "select" access to the "time_zone_name" table in the "mysql" database, and populate MySQL's TimeZone information before proceeding.
Discussed on the forum here:   http://forums.cacti.net/viewtopic.php?f=2&t=56815

fix
#mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p --database=mysql
#Enter password:     Enter : NEWPASSWORD

#GRANT SELECT ON mysql. time_zone_name TO 'cacti'@'localhost' IDENTIFIED BY 'NEWPASSWORD';

Next asking the NAS.... You need to enable SNMP before!
info:  http://docs.qnap.com/nas/4.2/SMB/en/index.html?snmp_settings.htm

https://exchange.nagios.org/directory/Plugins/Network-Connections%2C-Stats-and-Bandwidth/Check-QNAP-Disk/details

Plz : Test it with snmpwalk ;-)    To install it : yum -y install net-snmp net-snmp-utils

SNMP for QNAP Turbo NAS TS-869 Pro:

#$IP is QNAP NAS IP-address
#system CPU usage
snmpget -v 2c -c public -O qv 1x.x.x.x 1.3.6.1.4.1.24681.1.2.1.0

#system total memory
snmpget -v 2c -c public -O qv 1x.x.x.x 1.3.6.1.4.1.24681.1.2.2.0

#system free memory
snmpget -v 2c -c public -O qv 1x.x.x.x 1.3.6.1.4.1.24681.1.2.3.0

#Uptime of network portion of system
snmpget -v 2c -c public -O qv 1x.x.x.x 1.3.6.1.4.1.24681.1.2.4.0

#System uptime - fraction longer
snmpget -v 2c -c public -O qv 1x.x.x.x 1.3.6.1.2.1.25.1.1.0

#System temp
snmpget -v 2c -c public -O qv 1x.x.x.x 1.3.6.1.4.1.24681.1.2.6.0

Output :
"0.60 %"
"1985.2 MB"
"2640.4 MB"
49:1:57:15.36
49:1:57:15.38
"44 C/111 F"

onsdag den 2. august 2017

Join us on September 11 -2017 @ Red Hat Forum in Copenhagen



Driving innovation in your digital world
Red Hat Forum in Copenhagen is Denmark's number one premier conference for open innovation technologies. The event brings together senior executives, IT decision makers, customers, partners, developers to discuss cloud innovation, devops and containers.

Join us on September 11 to learn from leading Danish enterprises
as they share success stories of their digital journeys.

Other highlights include:

Keynotes & technical breakout sessions
Network with peers
Discuss open source projects
Meet with technical experts & innovators
Discover fundamental advances in cloud computing

The event is free of charge.
Resource : https://www.redhat.com/en/about/events/red-hat-forum-denmark-2017

Red Hat Forum Denmark 2017 Event 
Locations Copenhagen, Denmark 
September 11, 2017Copenhagen, Denmark
Tivoli Congress Center

Security Patches and Updates Automatically on CentOS

run:
yum update -y && yum install yum-cron -y

Note! When your are done edit the file run :
systemctl start yum-cron.service
systemctl enable  yum-cron.service
systemctl status yum-cron.service

Once the installation is complete, open /etc/yum/yum-cron.conf and locate what you want on your server.

My File :

[commands]
#  What kind of update to use:
# default                            = yum upgrade
# security                           = yum --security upgrade
# security-severity:Critical         = yum --sec-severity=Critical upgrade
# minimal                            = yum --bugfix update-minimal
# minimal-security                   = yum --security update-minimal
# minimal-security-severity:Critical =  --sec-severity=Critical update-minimal
update_cmd = default

# Whether a message should be emitted when updates are available,
# were downloaded, or applied.
update_messages = yes

# Whether updates should be downloaded when they are available.
download_updates = yes


# Whether a message should be emitted when updates are available,
# were downloaded, or applied.
update_messages = yes

# Whether updates should be downloaded when they are available.
download_updates = yes

# Whether updates should be applied when they are available.  Note
# that download_updates must also be yes for the update to be applied.
apply_updates = no

# Maximum amout of time to randomly sleep, in minutes.  The program
# will sleep for a random amount of time between 0 and random_sleep
# minutes before running.  This is useful for e.g. staggering the
# times that multiple systems will access update servers.  If
# random_sleep is 0 or negative, the program will run immediately.
# 6*60 = 360
random_sleep = 360
[emitters]
# Name to use for this system in messages that are emitted.  If
# system_name is None, the hostname will be used.
system_name = None

# How to send messages.  Valid options are stdio and email.  If
# emit_via includes stdio, messages will be sent to stdout; this is useful
# to have cron send the messages.  If emit_via includes email, this
# program will send email itself according to the configured options.
# If emit_via is None or left blank, no messages will be sent.
emit_via = stdio
# The width, in characters, that messages that are emitted should be
# formatted to.
output_width = 80
[email]
# The address to send email messages from.
# NOTE: 'localhost' will be replaced with the value of system_name.
## Forward your root to your mail ;-)
email_from = root@localhost

# List of addresses to send messages to.
email_to = root

# Name of the host to connect to to send email messages.
email_host = localhost

[groups]
# NOTE: This only works when group_command != objects, which is now the default
# List of groups to update
group_list = None

# The types of group packages to install
group_package_types = mandatory, default

[base]
# This section overrides yum.conf
# Use this to filter Yum core messages
# -4: critical
# -3: critical+errors
# -2: critical+errors+warnings (default)
debuglevel = -2
# skip_broken = True
mdpolicy = group:main
# NOTE: This only works when group_command != objects, which is now the default
# List of groups to update
group_list = None
# The types of group packages to install
group_package_types = mandatory, default

[base]
# This section overrides yum.conf
# Use this to filter Yum core messages
# -4: critical
# -3: critical+errors
# -2: critical+errors+warnings (default)
debuglevel = -2
# skip_broken = True
mdpolicy = group:main
# Uncomment to auto-import new gpg keys (dangerous)

fredag den 21. juli 2017

How To Install and Configure Fail2Ban on Ubuntu 16.04LTS

Please Note Before !!:  (you need to be root!!)
When the Apache server is running and is enabled, you can go ahead and install fail2ban
sudo apt-get update ; sudo apt-get install fail2ban
Please note! By default, fail2ban is configured to only ban failed SSH login attempts.
We need to enable some rules that will configure it to check our Apache
logs for patterns that indicate malicious activity.

To enable and protect your Apache:   
#cd /etc/fail2ban/jail.d/ ;  nano defaults-debian.conf
[php-url-fopen]
enabled = true
[apache-modsecurity]
enabled = true
[apache-fakegooglebot]
enabled = true
[apache-botsearch]
enabled = true
[apache-nohome]
enabled = true
[apache-overflows]
enabled = true
[apache-noscript]
enabled = true
[apache-auth]
enabled = true

Please note :
To make modifications, we need to copy this file to /etc/fail2ban/jail.local.
please do, so you are not overwriteing the conf file.:
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

Open the newly copied file so that we can set up what ever log monitoring you want:
cd /etc/fail2ban/ ; sudo nano jail.local
Changes (so you don't ban your self when testing)....  
ignoreip = 127.0.0.1/8   YOU_IP     Your_ISP_Net NAT_IP
When you are done :
sudo service fail2ban restart
sudo fail2ban-client status
sudo iptables -S
update-rc.d fail2ban defaults

You may also Install mod_security
Modsecurity is available in the Debian/Ubuntu repository:
apt-get install libapache2-modsecurity
Verify if the mod_security module was loaded.
apachectl -M | grep --color security

mandag den 17. juli 2017

How To Install and Configure Varnish with Apache on Ubuntu 16.04LTS

About Varnish

Varnish is an HTTP accelerator and a useful tool for speeding up a server, especially during a times when there is high traffic to a site. It works by redirecting visitors to another port or IP on a Webserver. In This case it's Apache running on port 8080 (default is port 80) on the same server!!.
Info : https://varnish-cache.org/faq/index.html
The Setup : (on Ubuntu 16.04 LTS )
sudo apt install varnish  or  sudo apt-get install varnish
 nano /etc/apache2/ports.conf
Change : Listen 127.0.0.1:80 < to > Listen 127.0.0.1:8080
# Save with X -> Next step....
sudo nano /etc/varnish/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
## #The V4 IP on the Web-server
    .host = "10.0.0.4";
###The port where the Webserver listen.
    .port = "8080";
}
# Save with X -> Next step....
nano /etc/systemd/system/multi-user.target.wants/varnish.service
## Find the 6081 and change it to 80  (near "user=vcache -F -a")
###Like this :
[Unit]
Description=Varnish HTTP accelerator
Documentation=https://www.varnish-cache.org/docs/4.1/ man:varnishd
[Service]
Type=simple
LimitNOFILE=131072
LimitMEMLOCK=82000
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :80 -T localhost:6082 -f$
ExecReload=/usr/share/varnish/reload-vcl
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
[Install]
WantedBy=multi-user.target
# Save with X -> Next step....  # Restart httpd service and Varnish...
sudo service varnish restart
systemctl daemon-reload
####TEST########  Note : port 80 and the webserver : 8080
root@WindarPh-China01:/# netstat -tupln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:29130         0.0.0.0:*               LISTEN      1820/mdsd
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1098/varnishd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1092/sshd
tcp        0      0 127.0.0.1:6082          0.0.0.0:*               LISTEN      1098/varnishd
tcp6       0      0 :::80                   :::*                    LISTEN      1098/varnishd
tcp6       0      0 :::8080                 :::*                    LISTEN      1497/apache2
udp        0      0 0.0.0.0:68              0.0.0.0:*                           966/dhclient
####TEST########
 curl 127.0.0.1
####TEST########
varnishtop
### Open a browser and try the webserver's IP ;-)
-Errors....  Is the UFW on? Is the ports open? (The firewall)
-Errors....  What do the log in  /var/log/varnish say ??

tirsdag den 23. maj 2017

Thanks for fish


I stopped at DTU (on a leave).

This blog will not be updated until I'm back @DTU. (if ever!)

-Sorry...

torsdag den 20. oktober 2016

iRODS with Ansible

The story behind : My group ask me if I can do a Ansible install for iRODS.

But what is Ansible ? 
Ansible is an open source, powerful automation software for configuring, managing and deploying software applications on the nodes without any downtime just by using SSH. Today, most of the IT Automation tools runs as a agent in remote host, but ansible just need a SSH connection and Python (2.4 or later) to be installed on the remote nodes to perform it’s action.

Prerequisites
Operating System: RHEL/CentOS/Fedora and Ubuntu/Debian/Linux Mint
Jinja2: A modern, fast and easy to use stand-alone template engine for Python.
PyYAML: A YAML parser and emitter for the Python programming language.
parmiko: A native Python SSHv2 channel library.
httplib2: A comprehensive HTTP client library.
sshpass: A non-interactive ssh password authentication.

Source : http://www.tecmint.com/install-and-configure-ansible-automation-tool-in-linux/

My quick install (centOS) :
sudo rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
yum -y install ansible

####Make the trust###
ssh-keygen -t rsa -b 4096 -C "root@192.168.xxx.147"
ssh-copy-id root@192.168.xxx.148
ssh-copy-id root@192.168.xxx.149

### please note IP is the MAIN note IP###

To do the automate installation we use Ansible from www.ansible.com , Ansible-Tower and some ideas from EUDATs Github.  On a Redhat/Centos 7.x.  
Please note : You can easy re-use the shellscript with Ansible because it only need a ssh-login.

My RPMbuilder and installer: 
We just change the playbook from : https://github.com/aabdulwahed/iRODS/

tirsdag den 11. oktober 2016

Tnx for Leaked Mirai Source Code Jerry Gamblin!

"Source code of Mirai botnet responsible for Krebs On Security DDoS released online
Now anyone can use the IoT-based botnet for their own destructive purposes."
Source :
http://www.zdnet.com/article/source-code-of-mirai-botnet-responsible-for-krebs-on-security-ddos-released-online/

Some days ago I got a tweet from a friend about the source code to a IoT BotNet.
The source can be found on :   https://github.com/jgamblin/Mirai-Source-Code
Backup : http://pastebin.com/raw/8bgjhYQa

The files real file name (google for links!) :
loader.src.zip 
dlr.src.zip  
mirai.src.zip

     Pix. Source : http://blog.malwaremustdie.org/2016/08/mmd-0056-2016-linuxmirai-just.html

Read the full text :
https://raw.githubusercontent.com/jgamblin/Mirai-Source-Code/master/ForumPost.txt

Configuring CNC
Code: apt-get install mysql-server mysql-client
CNC requires database to work. When you install database, go into it and run following commands:
http://pastebin.com/86d0iL9g

This will create database for you. To add your user,
Code: INSERT INTO users VALUES (NULL, 'anna-senpai', 'myawesomepassword', 0, 0, 0, 0, -1, 1, 30, '');
Now, go into file ./mirai/cnc/main.go
Edit these values
Code:
const DatabaseAddr string   = "127.0.0.1"
const DatabaseUser string   = "root"
const DatabasePass string   = "password"
const DatabaseTable string  = "mirai"

To the information for the mysql server you just installed

Setting Up Cross Compilers
Cross compilers are easy, follow the instructions at this link to set up. You must restart your system or reload .bashrc file for these changes to take effect. http://pastebin.com/1rRCc3aD

Source : http://hackforums.net/showthread.php?tid=5420472

mandag den 10. oktober 2016

Thx for a nice RedHat Forum



Thx for a really great RedHat Forum In Copenhagen @Docken.
Lets do it agian nex year ;-) 



                                   
                                              Plz. note  Microsoft.... at Redhat Forum!






tirsdag den 13. september 2016

Donation €4,000,000.00.... That's nice - if ever true ;-)


What a great story!!.....   just saying : don't bullshit a bullshitter ;-)

send from mellisa lewis : xxxx@hotmail.com   (one hotmail and one Yahoo???  Come on!!!)

My Donation €4,000,000.00
My Dear

With warm hearts I offer my friendship, and my greetings to you in the name of our lord God, and I hope this letter meets you in good time, I propose with my free mind and as a person of integrity from God, I know that this message will appear as a surprise to you that we barely know but the grace of God directed me to you and I wish you read this message and be blessed in name of the Lord.

I have a brain tumor, I suffer terribly at the moment. My doctor just informed me that my days are numbered because of my health therefore condemned to certain death. Currently, I have exhausted all my savings for my medical care. But I do have some funds for my charity project, these funds are deposited in a fixed deposit in a local bank here in Benin. purposed for charitable foundation My marital status is such that I'm single because I lost my Husband for over 9 years now and unfortunately we have not had a child together, which I am no one to leave my legacy . Therefore, to release my funds I would like to make a donation so that there is no stiff tax on my money.

To this I would so graceful and in order to help the poor to give what amounts to said legacy worth Four million euros (€4,000,000.00) (Four Million Euro) to enable you to establish a charitable foundation in my memory so that the grace of God be with me until my last home so I can receive an honorable place with the Lord our father. I have no fear because before contacted you, i have for several nights prayed for the Lord God to give me the contact of a trusted person to whom I can entrust this matter and it is the result of why I am doing research that allowed me to contact you through this site.

Know that you can keep half of the money for yourself and the rest will be used to create a charitable foundation in my memory and a federation in the fight against cancer and also build orphanages. I would have the following information: Your name and first name, your exact address and your permanent telephone contact so I can forward them to my lawyer to appear that you perform the procedure under deal. I count on your goodwill and especially on the proper use of these funds have something I do not doubt because I have great confidence in you that God may guide me toward you. My private E-mail: xxxxxxxxx@yahoo.com

Awaiting your prompt reply, receive my cordial and fraternal greetings.

Yours Sincerely
Mrs Mellisa Lewis
My Private email: xxxxxx@yahoo.com

tirsdag den 30. august 2016

Update iRODS from 4.1.x to a 4.2 with YUM (Repo)


There was a note on the google chat for iRODS fans about updating to 4.2 via YUM,Zypper or APT.
-----
renci-irods-unstable/7/x86_64/signature                  |  819 B     00:00
Retrieving key from https://unstable.irods.org/irods-unstable-signing-key.asc
Importing GPG key 0x9086C490:
 Userid     : "iRODS Consortium - Unstable <info@irods.org>"
 Fingerprint: 5909 3cb7 0f18 8588 25ac 778f 5054 912c 9086 c490
 From       : https://unstable.irods.org/irods-unstable-signing-key.asc
Is this ok [y/N]: y
----Just say Y

Dependencies Resolved

================================================================================
 Package                            Arch   Version   Repository            Size
================================================================================
Installing:
 irods-icommands                    x86_64 4.2.0-1   renci-irods-unstable 313 k
     replacing  irods-icat.x86_64 4.1.9-0
 irods-server                       x86_64 4.2.0-1   renci-irods-unstable 1.7 M
     replacing  irods-icat.x86_64 4.1.9-0
Updating:
 irods-database-plugin-postgres     x86_64 4.2.0-1   renci-irods-unstable 895 k
 irods-runtime                      x86_64 4.2.0-1   renci-irods-unstable 3.3 M
Installing for dependencies:
 irods-externals-avro1.7.7-0        x86_64 1.0-1     renci-irods-unstable 1.5 M
 irods-externals-boost1.60.0-0      x86_64 1.0-1     renci-irods-unstable  13 M
 irods-externals-clang-runtime3.8-0 x86_64 1.0-1     renci-irods-unstable 347 k
 irods-externals-jansson2.7-0       x86_64 1.0-1     renci-irods-unstable 159 k
 irods-externals-libarchive3.1.2-0  x86_64 1.0-1     renci-irods-unstable 1.4 M
 irods-externals-zeromq4-14.1.3-0   x86_64 1.0-1     renci-irods-unstable 549 k
Transaction Summary
================================================================================
Install  2 Packages (+6 Dependent packages)
Upgrade  2 Packages

Total download size: 23 M
Is this ok [y/d/N]: Y
-----------------------
The Note says:

This server hosts both APT and YUM repositories for the iRODS Consortium.

Installation

Add this server to your package manager's list of repositories to check for new software.

APT

Install the public key and add the repository:
wget -qO - https://unstable.irods.org/irods-unstable-signing-key.asc 
| sudo apt-key add -
echo "deb [arch=amd64] https://unstable.irods.org/apt/ $(lsb_release -sc) 
main" | sudo tee /etc/apt/sources.list.d/renci-irods-unstable.list
sudo apt-get update

YUM

Install the public key and add the repository:
sudo rpm --import https://unstable.irods.org/irods-unstable-signing-key.asc
wget -qO - https://unstable.irods.org/renci-irods-unstable.yum.repo 
| sudo tee /etc/yum.repos.d/renci-irods-unstable.yum.repo

ZYPPER

Install the public key and add the repository:
sudo rpm --import https://unstable.irods.org/irods-unstable-signing-key.asc
wget -qO - https://unstable.irods.org/renci-irods-unstable.zypp.repo 
| sudo tee /etc/zypp/repos.d/renci-irods-unstable.zypp.repo



tirsdag den 23. august 2016

Doing a FreeIPA for the server


What is FreeIPA : https://www.freeipa.org/page/Main_Page

Turn off SeLinux :    setenforce 0

in the file  :  nano /etc/sysconfig/selinux
SELINUX=permissive
#SELINUX=enforcing

Install with :  
yum -y install ipa-server bind-dyndb-ldap ipa-server-dns
ipa-server-install --setup-dns

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.

This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the Network Time Daemon (ntpd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure DNS (bind)

To accept the default shown in brackets, press the Enter key.

Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: master.example.com.

Server host name [labipa.example.com]:

Please see ; https://www.youtube.com/watch?v=8wc4MO3LXQI

Please note :  If you get the error : "Your system is running out of entropy"
Please install haveged [ http://www.issihosts.com/haveged/ ] or just wait some time.... ;-)

Look at : http://serverfault.com/questions/406038/server-suddenly-running-out-of-entropy



mandag den 22. august 2016

I need to change my passwd on a .pl site?


We got Spammed agian.... with a "we need your password on a .pl site" 
Come on guys!!  It's Amateur Night Agian.....

-------------------------------------------The Mail---------------
Kære bruger ,

Vi har bemærket nogle usædvanlige aktiviteter i din postkasse , og det er midlertidigt låst. Vær venlig at validere din e-mail- adresse ved hjælp af linket nedenfor for at gøre os i stand genaktivere din e-mail- konto . Hvis dette ikke gøres , vil føre til permanent blokering , og du vil være i stand du sende og modtage post .


Tak for dit samarbejde

Hilsen,
Help Desk
Copyright © 2016 Tekniske Universitet, All Rights Reserved.

ENGLISH 


Dear user,

We have noticed some unusual activities in your mail box and it has been temporarily locked. Please kindly validate your email address using the link below to enable us reactivate your email account. Failure to do this will lead to permanent blocking and you will be unable you send and receive mail.

Thank you for your cooperation

Regards,
Help Desk
Copyright © 2016 Tekniske Universitet, All Rights Reserved.

The site the (removed) link pointed at :


torsdag den 4. august 2016

Getting NodeJS 6.x.x to run on CentOS7

On one of the servers we got an error running the new NodeJS script.

How was it installed ?? yum install nodejs -y


[root@server1 ~]# node -v
v0.10.42
-- How to fix???
[root@server1 ~]# rpm -qa |grep node
---cut----------
nodejs-inherits-2.0.0-4.el7.noarch
nodejs-fstream-0.1.24-1.el7.noarch
nodejs-slide-1.1.5-1.el7.noarch
nodejs-tar-0.1.18-1.el7.noarch
nodejs-abbrev-1.0.4-6.el7.noarch
nodejs-mime-1.2.11-1.el7.noarch
nodejs-cryptiles-0.2.2-1.el7.noarch
nodejs-cmd-shim-1.1.0-3.el7.noarch
nodejs-delayed-stream-0.0.5-5.el7.noarch
nodejs-read-1.0.5-1.el7.noarch
nodejs-npmconf-0.1.3-1.el7.noarch
nodejs-ctype-0.5.3-3.el7.noarch
nodejs-json-stringify-safe-5.0.0-1.el7.noarch
nodejs-normalize-package-data-0.2.1-1.el7.noarch
nodejs-minimatch-0.2.12-2.el7.noarch
nodejs-read-installed-0.2.4-1.el7.noarch
nodejs-asn1-0.1.11-3.el7.noarch
---cut----------
rpm -e nodejs-inherits-2.0.0-4.el7.noarch
error: Failed dependencies:
        npm(inherits) >= 2.0.0 is needed by (installed) nodejs-fstream-0.1.24-1.el7.noarch
        npm(inherits) < 2.1 is needed by (installed) nodejs-fstream-0.1.24-1.el7.noarch
        npm(inherits) >= 2.0.0 is needed by (installed) nodejs-block-stream-0.0.7-1.el7.noarch
        npm(inherits) < 2.1 is needed by (installed) nodejs-block-stream-0.0.7-1.el7.noarch
        npm(inherits) >= 2 is needed by (installed) nodejs-tar-0.1.18-1.el7.noarch
---cut----------
 Uninstall all NodeJS and fix the error....
[root@server1 ~]#  rpm -qa |grep node >  awk 'BEGIN{ORS=","}1' > node.txt
Please node : Node.txt is a  full list of NodeJS files...   
Just add "rpm -e " at the beginning of the file and it will uninstall all NodeJS files.
[root@server1 ~]#  echo 'rpm -e' | cat - node.txt | tee node.txt  

-and run your uninstall bash script with  sh ./node.txt

Then do: 
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - ; yum -y install nodejs ; yum install gcc-c++ make


[root@server1 ~]# node -v
v6.3.1

tirsdag den 2. august 2016

Get Julia to run on CentOS 7


What is Julia???
"Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. " 

Info about the language : https://julialang.org/

Install Info from : https://copr.fedorainfracloud.org/coprs/nalimilan/julia/
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm

cd /etc/yum.repos.d
wget https://copr.fedorainfracloud.org/coprs/nalimilan/julia/repo/epel-7/nalimilan-julia-epel-7.repo


The Repo file :
[nalimilan-julia]
name=Copr repo for julia owned by nalimilan
baseurl=https://copr-be.cloud.fedoraproject.org/results/nalimilan/julia/epel-7-$basearch/
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/nalimilan/julia/pubkey.gpg
enabled=1
enabled_metadata=1

Or you can :  (Source : http://julialang.org/downloads/platform.html  )

sudo dnf copr enable nalimilan/julia
or
sudo dnf copr enable nalimilan/julia-nightlies

yum -y install julia

yum -y install mc nano vim libXp openmotif openmotif22 python.x86_64 numpy* ncurses-devel gcc gcc-c++ autoconf automake; yum -y groupinstall "Development Tools"

julia 


That was easy ;-)  Next comes the cluster setup ....

Building iRODS 4.1.9 from source on CentOS7

##  Install from a .gz file ( ftp://ftp.renci.org/pub/irods/releases/4.1.9/  )
yum -y install gcc-c++ make python-devel rpm-build help2man unixODBC fuse-devel curl-devel
yum -y install --enablerepo=centosplus openssl-devel pam-devel bzip2-devel zlib-devel pam-devel openssl-devel libxml2-devel perl-JSON
yum -y install rsync unixODBC-devel epel-release net-tools wget nano mc mlocate ImageMagick python-devel rpm-build help2man
yum -y install bzip2-devel libxml2-devel unixODBC pam-devel openssl-devel wget nano mc tomcat tomcat-webappsl tomcat-admin-webapps
yum -y install tomcat-docs-webapp tomcat-javadoc net-tools postgresql postgresql-serverl postgresql-contrib postgresql-libs
yum -y install postgresql-odbc fuse-libs.x86_64 perl-JSON* python-requests.noarch python-jsonschema python-psutil lsof
yum -y install authd postgresql postgresql-libs postgresql-plperl postgresql-plpython postgresql-server python-jsonschema python-psutil python-requests postgresql-odbc
###NodeJS 6.x install
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - ; yum -y install nodejs ; yum install gcc-c++ make

yum -y groupinstall "Development Tools"
yum -y install python-pip git gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel
##############
git clone https://github.com/DICE-UNC/irods-cloud-browser.git
git clone https://github.com/sunadtudk/irods_2_figshare.git
##############
pip install git+git://github.com/iPlantCollaborativeOpenSource/pycommands.git
pip install --upgrade pip
pip install --upgrade git+git://github.com/irods/python-irodsclient.git
pip install pigshare
#pip install --upgrade pigshare
###############################

#############Build iRODS server###############
wget ftp://ftp.renci.org/pub/irods/releases/4.1.9/irods-4.1.9.tar.gz
tar -zxvf irods-4.1.9.tar.gz
cd irods-4.1.9/packaging/
./build.sh  icat postgres
./build.sh -s resource
./build.sh -s icommands
###############Install###############
cd ~/irods-4.1.9/build/
rpm -ivh irods-icat-4.1.9-64bit-centos7.rpm
rpm -ivh irods-database-plugin-postgres-1.9-centos7.rpm
rpm -ivh irods-dev-4.1.9-64bit-centos7.rpm
rpm -ivh irods-runtime-4.1.9-64bit-centos7.rpm
#rpm -ivh irods-database-plugin-postgres93-1.9-centos7.rpm
#rpm -ivh irods-resource-4.1.9-64bit-centos7.rpm
postgresql-setup initdb
systemctl start postgresql
systemctl enable postgresql
######config iRODS server#######
sudo /var/lib/irods/packaging/setup_irods.sh

# rpm -ivh irods-icommands-4.1.9-64bit-centos7.rpm

Cracking my Technicolor TG788vn open



A look inside my Technicolor TG788vn.




With a RaspBerry  PI you can do funny things ;-)





onsdag den 27. juli 2016

YES!!! I just won a lot of money ;-)

I Got this mail some days ago : 

Attn:
Congratulation!!!
Your name and your e-mail address has won £2,050,000GBP in the VW Motors Email Lottery.
Your winning No. is (VJETTA-UK-VP990003-M4GA).
Contact (Mr. Elvis Bowie) elvis.bowie@yahoo.com.hk. Tel.: +44-703-590-5301 immediately; and forward your winning No.
(VJETTA-UK-VP990003-M4GA) to him to claim your prize.
Congratulation once again.
Thank you. Patricia Wesley.
--------------
Danm....
First clue... (a google search...)
The Winning no. is already in use....  http://www.419scam.org/emails/2015-10/01/00981949.473.htm
From: "Mrs. Patricia Wesley " <pat.vwltt@gmail.com>
Reply-To: info.sipclaims@aol.com
Date: Thu, 01 Oct 2015 10:53:55 +0800

Second clue...
A YhaooMail in Hongkong used by VM motor? Really guys ?

Come on guys!!  It's Amateur Night Agian.....