Saturday, 11 December 2021

Installing ubuntu over virtual media - disable integrity check

See this: https://askubuntu.com/questions/1313247/disable-integrity-check-on-ubuntu-server-20-04-1-iso


This will save u up to 40mins :-)

Monday, 22 November 2021

My server got hacked!

 i opened my ssh port to do work remotely and in less than 24hrs, it got hacked.

i think the hacker got hold of my root password and setup a mining client on it.

it consumes the entire network and cpu ..


had to shut down.. he ran some kind of xmrig (c3pool) 


I traced the ip he used to 54.36.15.99




But it look like it is some kind of mesh node coz the c3pool is in china?


anyway, not going to waste my time...lesson learn use strong password and don't expose ssh port on default ports


Good reference: https://www.securitynewspaper.com/2020/05/01/how-to-check-if-your-linux-server-is-hacked-or-not/

Saturday, 9 October 2021

Convert from proxmox to esxi

 https://edywerder.ch/proxmox-to-vmware/


for vm on zfs .. the disk is on /dev/zvol/data1/

Saturday, 3 July 2021

Replacing failed drive in my proxmox zfs

Check the pool status:

 


Make the drive unavailable:


Replace the drive physically and get the new drive id:

Replace the drive in the pool

Check the drive status (re-silvering):











Saturday, 26 June 2021

Unconvert a template back to VM in Promox

 1. open the conf file for the vm found under /etc/pve/qemu-server and delete the line 'template: 1'.


2. Rename the disk using zfs


root@mars:/dev/data1# zfs list

NAME                    USED  AVAIL     REFER  MOUNTPOINT

data1                  2.45T  11.1G      192K  /data1

data1/base-106-disk-0   203G   198G     16.6G  -

data1/base-108-disk-0   203G   169G     45.1G  -

data1/base-109-disk-0   203G   177G     37.6G  -

data1/base-110-disk-0   203G   122G     92.2G  -

data1/base-111-disk-0   203G   120G     94.5G  -

data1/vm-100-disk-0     102G  78.7G     34.0G  -

data1/vm-100-disk-1     406G   228G      189G  -

data1/vm-101-disk-0     102G  64.0G     48.7G  -

data1/vm-102-disk-0     102G   109G     4.15G  -

data1/vm-103-disk-0     102G  36.4G     76.3G  -

data1/vm-104-disk-0     102G  82.2G     30.4G  -

data1/vm-105-disk-0     203G   201G     13.0G  -

data1/vm-107-disk-0     203G   174G     40.4G  -

data1/vm-112-disk-0    40.6G  43.5G     8.23G  -

data1/vm-113-disk-0    65.0G  42.7G     33.4G  -

data1/vm-114-disk-0    65.0G  67.1G     8.96G  -

root@mars:/dev/data1# zfs rename data1/base-108-disk-0 data1/vm-108-disk-0



Reference:

https://forum.proxmox.com/threads/accidentally-converted-vm-to-template.36058/

https://forum.proxmox.com/threads/undo-convert-to-template.35386/

Sunday, 13 June 2021

Migrate Redhat from ESXi to Promox issues

 I tried these steps: https://homelab-vignettes.blogspot.com/2021/03/migrate-virtualbox-to-proxmox.html

But got this error:




I followed:

https://geek.cm/2018/02/moving-from-vmware-to-proxmox/

https://blogs.serioustek.net/post/2019/05/08/home-lab-migrating-from-esx-to-proxmox



Reference: https://unix.stackexchange.com/questions/467019/error-booting-linux-root-and-swap-does-not-exist

When the above happens, boot to rescue mode (choose 2nd option in bootup screen).

And then login using root and run the following command:

dracut --regenerate-all -f



Once done, sync and reboot:




You should change network settings once you have bootup.



Wednesday, 26 May 2021

Migrate files manually into nextcloud

 Can I move files direct to Nextcloud? - 🚧 Installation - Nextcloud community


root@truenas[/mnt/tank/cloud/unica]# scp root@192.168.0.53:/mnt/tank/cloud/ncadmin/files/db2_dmdb_export.tar.gz .

The authenticity of host '192.168.0.53 (192.168.0.53)' can't be established.

ECDSA key fingerprint is SHA256:kZ7V5MCM/lJTi528a8RaXC9RoH2J6Lqq7Cz4bQfgZKU.

No matching host key fingerprint found in DNS.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.0.53' (ECDSA) to the list of known hosts.

root@192.168.0.53's password:

db2_dmdb_export.tar.gz                                                                                                           100%  828MB  29.7MB/s   00:27

root@truenas[/mnt/tank/cloud/unica]# ls -l

total 839037

-rw-r--r--  1 root  www  868609712 May 26 23:04 db2_dmdb_export.tar.gz

root@truenas[/mnt/tank/cloud/unica]# ls -l

total 848293

drwxr-xr-x  2 www   www          2 May 26 23:05 cache

-rw-r--r--  1 root  www  868609712 May 26 23:04 db2_dmdb_export.tar.gz

drwxr-xr-x  6 www   www         10 May 26 23:05 files

root@truenas[/mnt/tank/cloud/unica]# cd files

root@truenas[/mnt/tank/cloud/unica/files]# ls -l

total 10202

drwxr-xr-x  2 www  www        6 May 26 23:05 Documents

-rw-r--r--  1 www  www  3963036 May 26 23:05 Nextcloud intro.mp4

-rw-r--r--  1 www  www  5753008 May 26 23:05 Nextcloud Manual.pdf

-rw-r--r--  1 www  www    50598 May 26 23:05 Nextcloud.png

drwxr-xr-x  2 www  www       11 May 26 23:05 Photos

-rw-r--r--  1 www  www   976625 May 26 23:05 Reasons to use Nextcloud.pdf

drwxr-xr-x  2 www  www        2 May 26 23:05 Talk

drwxr-xr-x  2 www  www       13 May 26 23:05 Templates

root@truenas[/mnt/tank/cloud/unica/files]# cd ..

root@truenas[/mnt/tank/cloud/unica]# ls -l

total 848293

drwxr-xr-x  2 www   www          2 May 26 23:05 cache

-rw-r--r--  1 root  www  868609712 May 26 23:04 db2_dmdb_export.tar.gz

drwxr-xr-x  6 www   www         10 May 26 23:05 files

root@truenas[/mnt/tank/cloud/unica]# mv db2* files

root@truenas[/mnt/tank/cloud/unica]# cd files

root@truenas[/mnt/tank/cloud/unica/files]# ls -l

total 858478

-rw-r--r--  1 root  www  868609712 May 26 23:04 db2_dmdb_export.tar.gz

drwxr-xr-x  2 www   www          6 May 26 23:05 Documents

-rw-r--r--  1 www   www    3963036 May 26 23:05 Nextcloud intro.mp4

-rw-r--r--  1 www   www    5753008 May 26 23:05 Nextcloud Manual.pdf

-rw-r--r--  1 www   www      50598 May 26 23:05 Nextcloud.png

drwxr-xr-x  2 www   www         11 May 26 23:05 Photos

-rw-r--r--  1 www   www     976625 May 26 23:05 Reasons to use Nextcloud.pdf

drwxr-xr-x  2 www   www          2 May 26 23:05 Talk

drwxr-xr-x  2 www   www         13 May 26 23:05 Templates

root@truenas[/mnt/tank/cloud/unica/files]# pwd

/mnt/tank/cloud/unica/files

root@truenas[/mnt/tank/cloud/unica/files]# chown www:www db2*

root@truenas[/mnt/tank/cloud/unica/files]# ls -l

total 858478

-rw-r--r--  1 www  www  868609712 May 26 23:04 db2_dmdb_export.tar.gz

drwxr-xr-x  2 www  www          6 May 26 23:05 Documents

-rw-r--r--  1 www  www    3963036 May 26 23:05 Nextcloud intro.mp4

-rw-r--r--  1 www  www    5753008 May 26 23:05 Nextcloud Manual.pdf

-rw-r--r--  1 www  www      50598 May 26 23:05 Nextcloud.png

drwxr-xr-x  2 www  www         11 May 26 23:05 Photos

-rw-r--r--  1 www  www     976625 May 26 23:05 Reasons to use Nextcloud.pdf

drwxr-xr-x  2 www  www          2 May 26 23:05 Talk

drwxr-xr-x  2 www  www         13 May 26 23:05 Templates

root@truenas[/mnt/tank/cloud/unica/files]# su -m www -c 'php /usr/local/www/nextcloud/occ  files:scan --all'

zsh:1: command not found: php

root@truenas[/mnt/tank/cloud/unica/files]# id

uid=0(root) gid=0(wheel) groups=0(wheel)

root@truenas[/mnt/tank/cloud/unica/files]# iocage console nextcloud

Last login: Wed May 26 22:56:21 on pts/1

FreeBSD 12.2-RELEASE-p6 facd5d71c97(HEAD) TRUENAS


Welcome to FreeBSD!


Release Notes, Errata: https://www.FreeBSD.org/releases/

Security Advisories:   https://www.FreeBSD.org/security/

FreeBSD Handbook:      https://www.FreeBSD.org/handbook/

FreeBSD FAQ:           https://www.FreeBSD.org/faq/

Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/

FreeBSD Forums:        https://forums.FreeBSD.org/


Documents installed with the system are in the /usr/local/share/doc/freebsd/

directory, or can be installed later with:  pkg install en-freebsd-doc

For other languages, replace "en" with a language code like de or fr.


Show the version of FreeBSD installed:  freebsd-version ; uname -a

Please include that output and any error messages when posting questions.

Introduction to manual pages:  man man

FreeBSD directory layout:      man hier


Edit /etc/motd to change this login announcement.

root@nextcloud:~ # su -m www -c 'php /usr/local/www/nextcloud/occ  files:scan --all'


su -m www -c 'php /usr/local/www/nextcloud/occ  files:scan --all'

root@nextcloud:~ # su -m www -c 'php /usr/local/www/nextcloud/occ  files:scan --all'
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see https://www.php.net/manual/en/book.pcntl.php
Starting scan for user 1 out of 5 (irfan)
Home storage for user irfan not writable
Make sure you're running the scan command only as the user the web server runs as
Starting scan for user 2 out of 5 (masrudyn)
Starting scan for user 3 out of 5 (ncadmin)
Starting scan for user 4 out of 5 (rayhan)
Home storage for user rayhan not writable
Make sure you're running the scan command only as the user the web server runs as
Starting scan for user 5 out of 5 (unica)
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 28      | 91    | 00:00:00     |
+---------+-------+--------------+

Saturday, 1 May 2021

Flashing H310 into IT mode

 I think this is best how-to :-)


https://techstat.net/dell-h310-mini-flash-to-it-mode-for-freenas/


Thursday, 15 April 2021

Installing Nexus for respository

 How To Install Latest Sonatype Nexus 3 on Linux (Redhat/Centos/ec2) (devopscube.com)


Download the software here: Download (sonatype.com)

Force kill a VM in EXSi

2 commands refer: Unable to Power off a Virtual Machine in an ESXi host (1014165) (vmware.com)


Using the ESXi esxcli command to power off a virtual machine

The esxcli command can be used locally or remotely to power off a virtual machine running on ESXi 5.x or later.

  1. Get a list of running virtual machines, identified by World ID, UUID, Display Name, and path to the .vmx configuration file by running this command:

    esxcli vm process list
     
  2. Power off the virtual machine from the list by running this command:

    esxcli vm process kill --type= [soft,hard,force] --world-id= WorldNumber

    Notes:
    • Three power-off methods are available. Soft is the most graceful, hard performs an immediate shutdown, and force should be used as a last resort.
  3. Repeat Step 2 and validate that the virtual machine is no longer running.

 


[root@ESXi01:~] esxcli vm process list

pfSense

   World ID: 1051128

   Process ID: 0

   VMX Cartel ID: 1051127

   UUID: 56 4d df ac 10 5b db 2f-ac b1 35 b6 0e 8f 27 94

   Display Name: pfSense

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/pfSense/pfSens                                                                                                                                                             e.vmx


okd4-control-plane-1

   World ID: 1051325

   Process ID: 0

   VMX Cartel ID: 1051319

   UUID: 56 4d d7 00 05 94 43 e6-20 49 b7 0d cd 1f d4 91

   Display Name: okd4-control-plane-1

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-control-p                                                                                                                                                             lane-1/okd4-control-plane-1.vmx


okd4-control-plane-2

   World ID: 1051326

   Process ID: 0

   VMX Cartel ID: 1051320

   UUID: 56 4d 47 7f ff 36 07 68-9b 88 17 5a f7 53 d5 80

   Display Name: okd4-control-plane-2

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-control-p                                                                                                                                                             lane-2/okd4-control-plane-2.vmx


okd4-services

   World ID: 1051330

   Process ID: 0

   VMX Cartel ID: 1051317

   UUID: 56 4d 98 40 1a ac 88 ff-f0 4d e8 84 29 31 04 1c

   Display Name: okd4-services

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-services/                                                                                                                                                             okd4-services.vmx


okd4-control-plane-3

   World ID: 1051331

   Process ID: 0

   VMX Cartel ID: 1051318

   UUID: 56 4d 48 7c 89 01 58 9a-12 44 bf 54 a0 4a 61 2d

   Display Name: okd4-control-plane-3

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-control-p                                                                                                                                                             lane-3/okd4-control-plane-3.vmx


okd4-compute-1

   World ID: 1051332

   Process ID: 0

   VMX Cartel ID: 1051321

   UUID: 56 4d 61 ba 77 36 bb 6f-ec 88 25 ee 69 be 0c 22

   Display Name: okd4-compute-1

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-compute-1                                                                                                                                                             /okd4-compute-1.vmx


database

   World ID: 1051551

   Process ID: 0

   VMX Cartel ID: 1051550

   UUID: 56 4d 57 81 ce 26 3c d9-26 18 b8 1f 79 f7 d1 a3

   Display Name: database

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/database/datab                                                                                                                                                             ase.vmx


okd4-compute-2

   World ID: 1155186

   Process ID: 0

   VMX Cartel ID: 1155185

   UUID: 56 4d 1a 5c ce ef ea d0-8d eb 37 8a bb d6 1b 9f

   Display Name: okd4-compute-2

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-compute-2                                                                                                                                                             /okd4-compute-2.vmx

[root@ESXi01:~] esxcli vm process list

pfSense

   World ID: 1051128

   Process ID: 0

   VMX Cartel ID: 1051127

   UUID: 56 4d df ac 10 5b db 2f-ac b1 35 b6 0e 8f 27 94

   Display Name: pfSense

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/pfSense/pfSense.vmx


okd4-control-plane-1

   World ID: 1051325

   Process ID: 0

   VMX Cartel ID: 1051319

   UUID: 56 4d d7 00 05 94 43 e6-20 49 b7 0d cd 1f d4 91

   Display Name: okd4-control-plane-1

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-control-plane-1/okd4-control-plane-1.vmx


okd4-control-plane-2

   World ID: 1051326

   Process ID: 0

   VMX Cartel ID: 1051320

   UUID: 56 4d 47 7f ff 36 07 68-9b 88 17 5a f7 53 d5 80

   Display Name: okd4-control-plane-2

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-control-plane-2/okd4-control-plane-2.vmx


okd4-services

   World ID: 1051330

   Process ID: 0

   VMX Cartel ID: 1051317

   UUID: 56 4d 98 40 1a ac 88 ff-f0 4d e8 84 29 31 04 1c

   Display Name: okd4-services

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-services/okd4-services.vmx


okd4-control-plane-3

   World ID: 1051331

   Process ID: 0

   VMX Cartel ID: 1051318

   UUID: 56 4d 48 7c 89 01 58 9a-12 44 bf 54 a0 4a 61 2d

   Display Name: okd4-control-plane-3

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-control-plane-3/okd4-control-plane-3.vmx


okd4-compute-1

   World ID: 1051332

   Process ID: 0

   VMX Cartel ID: 1051321

   UUID: 56 4d 61 ba 77 36 bb 6f-ec 88 25 ee 69 be 0c 22

   Display Name: okd4-compute-1

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-compute-1/okd4-compute-1.vmx


database

   World ID: 1051551

   Process ID: 0

   VMX Cartel ID: 1051550

   UUID: 56 4d 57 81 ce 26 3c d9-26 18 b8 1f 79 f7 d1 a3

   Display Name: database

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/database/database.vmx


okd4-compute-2

   World ID: 1155186

   Process ID: 0

   VMX Cartel ID: 1155185

   UUID: 56 4d 1a 5c ce ef ea d0-8d eb 37 8a bb d6 1b 9f

   Display Name: okd4-compute-2

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-compute-2/okd4-compute-2.vmx

[root@ESXi01:~] esxcli vm process kill --type=force --world-id=1051551

[root@ESXi01:~] esxcli vm process list

pfSense

   World ID: 1051128

   Process ID: 0

   VMX Cartel ID: 1051127

   UUID: 56 4d df ac 10 5b db 2f-ac b1 35 b6 0e 8f 27 94

   Display Name: pfSense

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/pfSense/pfSense.vmx


okd4-control-plane-1

   World ID: 1051325

   Process ID: 0

   VMX Cartel ID: 1051319

   UUID: 56 4d d7 00 05 94 43 e6-20 49 b7 0d cd 1f d4 91

   Display Name: okd4-control-plane-1

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-control-plane-1/okd4-control-plane-1.vmx


okd4-control-plane-2

   World ID: 1051326

   Process ID: 0

   VMX Cartel ID: 1051320

   UUID: 56 4d 47 7f ff 36 07 68-9b 88 17 5a f7 53 d5 80

   Display Name: okd4-control-plane-2

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-control-plane-2/okd4-control-plane-2.vmx


okd4-services

   World ID: 1051330

   Process ID: 0

   VMX Cartel ID: 1051317

   UUID: 56 4d 98 40 1a ac 88 ff-f0 4d e8 84 29 31 04 1c

   Display Name: okd4-services

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-services/okd4-services.vmx


okd4-control-plane-3

   World ID: 1051331

   Process ID: 0

   VMX Cartel ID: 1051318

   UUID: 56 4d 48 7c 89 01 58 9a-12 44 bf 54 a0 4a 61 2d

   Display Name: okd4-control-plane-3

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-control-plane-3/okd4-control-plane-3.vmx


okd4-compute-1

   World ID: 1051332

   Process ID: 0

   VMX Cartel ID: 1051321

   UUID: 56 4d 61 ba 77 36 bb 6f-ec 88 25 ee 69 be 0c 22

   Display Name: okd4-compute-1

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-compute-1/okd4-compute-1.vmx


okd4-compute-2

   World ID: 1155186

   Process ID: 0

   VMX Cartel ID: 1155185

   UUID: 56 4d 1a 5c ce ef ea d0-8d eb 37 8a bb d6 1b 9f

   Display Name: okd4-compute-2

   Config File: /vmfs/volumes/5f1c7304-77d00f04-ad0f-1c697a6ba3e5/okd4-compute-2/okd4-compute-2.vmx


Configure Jenkins Agent

 Firstly, there are alot of confusing articles out there.

Here is what worked for me:

Configure ssh between the server: http://www.linuxproblem.org/art_9.html

First log in on A as user a and generate a pair of authentication keys. Do not enter a passphrase:

a@A:~> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/a/.ssh/id_rsa): 
Created directory '/home/a/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/a/.ssh/id_rsa.
Your public key has been saved in /home/a/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A

Now use ssh to create a directory ~/.ssh as user b on B. (The directory may already exist, which is fine):

a@A:~> ssh b@B mkdir -p .ssh
b@B's password: 

Finally append a's new public key to b@B:.ssh/authorized_keys and enter b's password one last time:

a@A:~> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
b@B's password: 

From now on you can log into B as b from A as a without password:

a@A:~> ssh b@B

A note from one of our readers: Depending on your version of SSH you might also have to do the following changes:

  • Put the public key in .ssh/authorized_keys2
  • Change the permissions of .ssh to 700
  • Change the permissions of .ssh/authorized_keys2 to 640


You need add entries to known_hosts as well.

After that, configure the agent, paste the private key from server A in the credentials in Step 5 from this: https://acloudguru.com/blog/engineering/adding-a-jenkins-agent-node

That's all!

Tuesday, 13 April 2021

Public key for jenkins-2.287-1.1.noarch.rpm is not installed

 

Reference: https://www.jenkins.io/blog/2020/07/27/repository-signing-keys-changing/


[root@database ~]# dnf install jenkins java-devel

Last metadata expiration check: 0:23:34 ago on Wed 14 Apr 2021 01:23:29 AM +08.

Dependencies resolved.

======================================================================================================================================================================================================================

 Package                                                     Architecture                              Version                                                     Repository                                    Size

======================================================================================================================================================================================================================

Installing:

 java-1.8.0-openjdk-devel                                    x86_64                                    1:1.8.0.282.b08-2.el8_3                                     appstream                                    9.8 M

 jenkins                                                     noarch                                    2.287-1.1                                                   jenkins                                       71 M

Installing dependencies:

 java-1.8.0-openjdk                                          x86_64                                    1:1.8.0.282.b08-2.el8_3                                     appstream                                    333 k

 ttmkfdir                                                    x86_64                                    3.0.9-54.el8                                                appstream                                     62 k

 xorg-x11-fonts-Type1                                        noarch                                    7.5-19.el8                                                  appstream                                    522 k


Transaction Summary

======================================================================================================================================================================================================================

Install  5 Packages


Total download size: 81 M

Installed size: 113 M

Is this ok [y/N]: y

Downloading Packages:

(1/5): ttmkfdir-3.0.9-54.el8.x86_64.rpm                                                                                                                                               1.7 MB/s |  62 kB     00:00

(2/5): java-1.8.0-openjdk-1.8.0.282.b08-2.el8_3.x86_64.rpm                                                                                                                            2.1 MB/s | 333 kB     00:00

(3/5): xorg-x11-fonts-Type1-7.5-19.el8.noarch.rpm                                                                                                                                     3.7 MB/s | 522 kB     00:00

(4/5): java-1.8.0-openjdk-devel-1.8.0.282.b08-2.el8_3.x86_64.rpm                                                                                                                      9.6 MB/s | 9.8 MB     00:01

(5/5): jenkins-2.287-1.1.noarch.rpm                                                                                                                                                   2.3 MB/s |  71 MB     00:30

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Total                                                                                                                                                                                 2.6 MB/s |  81 MB     00:31

warning: /var/cache/dnf/jenkins-93d3f0abc3d47743/packages/jenkins-2.287-1.1.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 45f2c3d5: NOKEY

Public key for jenkins-2.287-1.1.noarch.rpm is not installed

The downloaded packages were saved in cache until the next successful transaction.

You can remove cached packages by executing 'dnf clean packages'.

Error: GPG check FAILED

[root@database ~]# systemctl start jenkins

Failed to start jenkins.service: Unit jenkins.service not found.

[root@database ~]# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

[root@database ~]# systemctl start jenkins

Failed to start jenkins.service: Unit jenkins.service not found.

[root@database ~]# dnf install jenkins java-devel

Last metadata expiration check: 1:38:12 ago on Wed 14 Apr 2021 01:23:29 AM +08.

Dependencies resolved.

======================================================================================================================================================================================================================

 Package                                                     Architecture                              Version                                                     Repository                                    Size

======================================================================================================================================================================================================================

Installing:

 java-1.8.0-openjdk-devel                                    x86_64                                    1:1.8.0.282.b08-2.el8_3                                     appstream                                    9.8 M

 jenkins                                                     noarch                                    2.287-1.1                                                   jenkins                                       71 M

Installing dependencies:

 java-1.8.0-openjdk                                          x86_64                                    1:1.8.0.282.b08-2.el8_3                                     appstream                                    333 k

 ttmkfdir                                                    x86_64                                    3.0.9-54.el8                                                appstream                                     62 k

 xorg-x11-fonts-Type1                                        noarch                                    7.5-19.el8                                                  appstream                                    522 k


Transaction Summary

======================================================================================================================================================================================================================

Install  5 Packages


Total size: 81 M

Installed size: 113 M

Is this ok [y/N]: y

Downloading Packages:

[SKIPPED] java-1.8.0-openjdk-1.8.0.282.b08-2.el8_3.x86_64.rpm: Already downloaded

[SKIPPED] java-1.8.0-openjdk-devel-1.8.0.282.b08-2.el8_3.x86_64.rpm: Already downloaded

[SKIPPED] ttmkfdir-3.0.9-54.el8.x86_64.rpm: Already downloaded

[SKIPPED] xorg-x11-fonts-Type1-7.5-19.el8.noarch.rpm: Already downloaded

[SKIPPED] jenkins-2.287-1.1.noarch.rpm: Already downloaded

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

  Preparing        :                                                                                                                                                                                              1/1

  Installing       : ttmkfdir-3.0.9-54.el8.x86_64                                                                                                                                                                 1/5

  Installing       : xorg-x11-fonts-Type1-7.5-19.el8.noarch                                                                                                                                                       2/5

  Running scriptlet: xorg-x11-fonts-Type1-7.5-19.el8.noarch                                                                                                                                                       2/5

  Installing       : java-1.8.0-openjdk-1:1.8.0.282.b08-2.el8_3.x86_64                                                                                                                                            3/5

  Running scriptlet: java-1.8.0-openjdk-1:1.8.0.282.b08-2.el8_3.x86_64                                                                                                                                            3/5

  Installing       : java-1.8.0-openjdk-devel-1:1.8.0.282.b08-2.el8_3.x86_64                                                                                                                                      4/5

  Running scriptlet: java-1.8.0-openjdk-devel-1:1.8.0.282.b08-2.el8_3.x86_64                                                                                                                                      4/5

  Running scriptlet: jenkins-2.287-1.1.noarch                                                                                                                                                                     5/5

  Installing       : jenkins-2.287-1.1.noarch                                                                                                                                                                     5/5

  Running scriptlet: jenkins-2.287-1.1.noarch                                                                                                                                                                     5/5

  Running scriptlet: java-1.8.0-openjdk-1:1.8.0.282.b08-2.el8_3.x86_64                                                                                                                                            5/5

  Running scriptlet: java-1.8.0-openjdk-devel-1:1.8.0.282.b08-2.el8_3.x86_64                                                                                                                                      5/5

  Running scriptlet: jenkins-2.287-1.1.noarch                                                                                                                                                                     5/5

  Verifying        : java-1.8.0-openjdk-1:1.8.0.282.b08-2.el8_3.x86_64                                                                                                                                            1/5

  Verifying        : java-1.8.0-openjdk-devel-1:1.8.0.282.b08-2.el8_3.x86_64                                                                                                                                      2/5

  Verifying        : ttmkfdir-3.0.9-54.el8.x86_64                                                                                                                                                                 3/5

  Verifying        : xorg-x11-fonts-Type1-7.5-19.el8.noarch                                                                                                                                                       4/5

  Verifying        : jenkins-2.287-1.1.noarch                                                                                                                                                                     5/5

Installed products updated.


Installed:

  java-1.8.0-openjdk-1:1.8.0.282.b08-2.el8_3.x86_64   java-1.8.0-openjdk-devel-1:1.8.0.282.b08-2.el8_3.x86_64   jenkins-2.287-1.1.noarch   ttmkfdir-3.0.9-54.el8.x86_64   xorg-x11-fonts-Type1-7.5-19.el8.noarch


Complete!

[root@database ~]# systemctl start jenkins





[root@database ~]# systemctl status jenkins
● jenkins.service - LSB: Jenkins Automation Server
   Loaded: loaded (/etc/rc.d/init.d/jenkins; generated)
   Active: active (running) since Wed 2021-04-14 03:01:55 +08; 22min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3803953 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)
    Tasks: 38 (limit: 49477)
   Memory: 986.4M
   CGroup: /system.slice/jenkins.service
           └─3803979 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --web>

Apr 14 03:01:54 database.localdomain systemd[1]: Starting LSB: Jenkins Automation Server...
Apr 14 03:01:54 database.localdomain runuser[3803960]: pam_unix(runuser:session): session opened for user jenkins by (uid=0)
Apr 14 03:01:55 database.localdomain runuser[3803960]: pam_unix(runuser:session): session closed for user jenkins
Apr 14 03:01:55 database.localdomain jenkins[3803953]: Starting Jenkins [  OK  ]
Apr 14 03:01:55 database.localdomain systemd[1]: Started LSB: Jenkins Automation Server.

Friday, 9 April 2021

CICD: Jenkins

 Getting started with the Guided Tour (jenkins.io)

Installing Jenkins



sudo wget -O /etc/yum.repos.d/jenkins.repo \
    http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo dnf upgrade
sudo dnf install jenkins java-devel


Start Jenkins

You can start the Jenkins service with the command:

sudo systemctl start jenkins

You can check the status of the Jenkins service using the command:

sudo systemctl status jenkins

If everything has been set up correctly, you should see an output like this:

Loaded: loaded (/etc/rc.d/init.d/jenkins; generated)
Active: active (running) since Tue 2018-11-13 16:19:01 +03; 4min 57s ago

If you have a firewall installed, you must add Jenkins as an exception. You must change YOURPORT in the script below to the port you want to use. Port 8080 is the most common.

YOURPORT=8080
PERM="--permanent"
SERV="$PERM --service=jenkins"

firewall-cmd $PERM --new-service=jenkins
firewall-cmd $SERV --set-short="Jenkins ports"
firewall-cmd $SERV --set-description="Jenkins port exceptions"
firewall-cmd $SERV --add-port=$YOURPORT/tcp
firewall-cmd $PERM --add-service=jenkins
firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --reload


CICD: Nexus?

 Planning to learn Jenkins, Nexus and Bitbucket :-)

https://blog.sonatype.com/how-to-use-nexus-repository-and-helm-for-ci/cd

https://medium.com/@abhisheknanarkar/configure-nexus-repository-with-ci-cd-ab5b8ee61f6b


https://medium.com/@abhisheknanarkar/nexus-repository-manager-53fc29bfa592

Saturday, 3 April 2021

Stuck in Dell R710 System Services

 Enter into idract (ctrl-e) and then choose cancel system services 

Monday, 1 March 2021

Migrate VirtualBox to Proxmox

1. Export from VirtualBox

2. tar xvf unica12.ova

3. qemu-img convert -f vmdk myvm-disk1.vmdk -O qcow2 myvm-disk1.qcow2

4.  vi to open the OVF file and understand some of the basic settings which are required for the VM. Open the OVF file and look for the following XML tags:

OperatingSystemSection

VirtualHardwareSection

Network

StorageControllers


5. Create a VM with the above settings and dummy disk

6. Copy the converted disks in 3 to the directory of the vm:

Example:   /var/lib/vz/images/101


7. Startup the VM

Friday, 22 January 2021

HUGO for HGST Drives

 Finally found a site to down the utils: ftp://ftp.abacus.cz/distribuce/HGST/Hugo


Hugo readme.txt - FTP Directory Listing



On how to use it: https://forums.servethehome.com/index.php?threads/hgst-hc520-512e-to-4kn.29373/


Another good site for utilities:
http://files.hddguru.com/download/Software/

ftp.abacus.cz › distribuce › HGST

Thursday, 21 January 2021

SeaChestLite

 Found this utility for analysing drives:

https://www.seagate.com/sg/en/support/software/seachest/#downloads


Thanks to this post:

https://www.truenas.com/community/threads/how-to-convert-512e-to-4kn-using-fast-format-seagate-exos-x16-drive.84094/


Not sure if it works for other brands, but worth a try:

root@pve:~/SeaChestLite/Lin64# ./SeaChest_Lite_101_1183_64 --scan

==========================================================================================

 SeaChest_Lite - Seagate drive utilities - NVMe Enabled

 Copyright (c) 2014-2018 Seagate Technology LLC and/or its Affiliates, All Rights Reserved

 SeaChest_Lite Version: 1.0.1-1_18_3 X86_64

 Build Date: Oct 18 2018

 Today: Fri Jan 22 15:13:48 2021

==========================================================================================

Vendor   Handle       Model Number            Serial Number          FwRev

ATA      /dev/sg0     ST9160412ASG            5VG049NQ               0002SDM1

HGST     /dev/sg1     HUH721008AL5201         1DH80A6Z               B928

iDRAC    /dev/sg10    LCDRIVE                                        0323

IBM      /dev/sg2     HUH721008AL4200         000000007SG1P9US       A38K

HGST     /dev/sg3     HUS728T8TAL5200         VAHR84UL               RS01

HGST     /dev/sg4     HUS728T8TAL5201         VAHXN8JL               B41C

SEAGATE  /dev/sg5     STMPSKD1CLAR8000        ZA19GTCK               UN0B

SEAGATE  /dev/sg6     STMPSKD1CLAR8000        ZA193W9X               UN0B

U2120706 /dev/sg7     FLASH DISK                                    1.00

iDRAC    /dev/sg8     Virtual CD                                     0323

iDRAC    /dev/sg9     Virtual Floppy                                 0323


root@pve:~/SeaChestLite/Lin64# sg_map

/dev/sg0  /dev/sda

/dev/sg1  /dev/sdb

/dev/sg2  /dev/sdc

/dev/sg3  /dev/sdd

/dev/sg4  /dev/sde

/dev/sg5  /dev/sdf

/dev/sg6  /dev/sdg

/dev/sg7  /dev/sdh

/dev/sg8  /dev/sr0

/dev/sg9  /dev/sdi

/dev/sg10  /dev/sdj

root@pve:~/SeaChestLite/Lin64# ./SeaChest_Lite_101_1183_64 -d /dev/sg2  --showSupportedSectorSizes

==========================================================================================

 SeaChest_Lite - Seagate drive utilities - NVMe Enabled

 Copyright (c) 2014-2018 Seagate Technology LLC and/or its Affiliates, All Rights Reserved

 SeaChest_Lite Version: 1.0.1-1_18_3 X86_64

 Build Date: Oct 18 2018

 Today: Fri Jan 22 15:18:00 2021

==========================================================================================


/dev/sg2 - HUH721008AL4200 - 000000007SG1P9US - SCSI

Device does not support changing sector size or does not report available sector sizes


Sunday, 17 January 2021

Flash H310 to IT mode

 I followed so many blog posts but most of the commands hanged.


I realised that my card may have a newer FW:


Just running this command is enough:

s2fp19.exe -o -f 2118it.bin


Blog posts reference:

https://techmattr.wordpress.com/2016/04/11/updated-sas-hba-crossflashing-or-flashing-to-it-mode-dell-perc-h200-and-h310/

Saturday, 16 January 2021

Remote installation - Virtual Media is detached

 If you get this error, go to your IDRAC console and enable Virtual Media (set to attached) under System > Console/Media > Virtual Media



Once that is done, you can choose Virtual CD to perform installation:



Thursday, 7 January 2021

OnlyOffice with Nextcloud

 Since I am running Nextcloud as a jail, i need to run OnlyOffice as a standalone document server.


Here's a good guide: https://www.linuxbabe.com/ubuntu/integrate-nextcloud-onlyoffice#:~:text=Log%20into%20Nextcloud%20web%20interface,Download%20and%20enable%20it.