Author:
erics , Posted on Thursday, August 31st, 2023 at 11:02:51am
START: Server version: 5.7.43-log MySQL Community Server (GPL)
FINISH: Server version: 8.0.34-log MySQL Community Server (GPL)
mysql -- execute = "SET GLOBAL innodb_fast_shutdown=0;"
service mysqld stop
yum remove mysql mysql - * mysql57 - community - release
yum install https : //dev.mysql.com/get/mysql80-community-release-el6-3.noarch.rpm
yum update
yum install mysql - community - server
cp / etc / my . cnf . rpmsave / etc / my . cnf
service mysqld start
grep 'temporary password' / var / log / mysqld . log | tail - 1
mysql - p
Enter password :
ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'newRootPassword' ;
https://dev.mysql.com/doc/refman/8.0/en/default-privileges.html
Check and veify your my.cnf
ssl entries if you see the following error in the /var/log/mysqld.log
file at startup:
Failed to set up SSL because of the following SSL library error : SSL_CTX_set_default_verify_paths failed
Categories: How-To's , Technology Tags: 5.7 , 8.0 , AWS , AWS Linux , CentOS , howto , mysql , MySQL 5.7 , MySQL 8.0 , tips , upgrade | No comments
Author:
erics , Posted on Friday, July 21st, 2023 at 9:38:26am
I wanted to save the iptables list to disk, but got an error when I tried:
# service iptables save
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
The solution was to install the iptables-services
package:
# yum install iptables-services -y
...
Installed:
iptables-services.x86_64 0:1.8.4-10.amzn2.1.2
Complete!
I was then able to save properly:
root@inbound2:/var/log # service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
Categories: How-To's , Technology Tags: howto , IPTables , Save , service , service iptables save , tips | No comments
Author:
erics , Posted on Friday, June 23rd, 2023 at 4:43:39pm
When trying to mount can XFS filestsen on an AWS instance, I got the error “mount: wrong fs type, bad option, bad superblock on /dev/sdh”
Examine the volume’s UUID with the xfs_db command:
shell> sudo xfs_db -c uuid /dev/nvme2n1
To fix the problem, you have two options…
Temporary Solution
Add nouuid mount option to temporarily ignore the duplicate validation:
shell> sudo mount -t xfs -o nouuid /dev/nvme2n1 /volumes/tmp
Permanent Solution
The xfs_admin command can permanently adjust the UUID for the volume:
shell > sudo xfs_admin - U generate / dev / nvme2n1
Clearing log and setting UUID
writing all SBs
new UUID = 5eb71513 - 2d234 - 4b79 - 9a35 - f22f2974672d
Categories: How-To's , Technology Tags: Bad Superblock , Error , Filesystem , howto , ifs_admin , ifs_db , mount , Mounting , tips , volume , Wrong Fs Type , XFS | No comments
Author:
erics , Posted on Friday, June 23rd, 2023 at 4:31:14pm
When trying to access the serial console on AWS, I got the following error:
Cannot open access to console, the root account is locked
Since I had edited /etc/fstab, the host would not boot.
The only way to fix this problem is to unmount the root volume from the affected instance, mount it on another node, edit the stab file, and reverse the process., ending up with that volume re-attached as root on the problem node
https://unix.stackexchange.com/questions/684169/cannot-open-access-to-console-the-root-account-is-locked
Categories: How-To's , Technology Tags: /etc/fstab , AWS , Console , Error , fstab , howto , Locked , root , tips | No comments
Author:
erics , Posted on Tuesday, May 23rd, 2023 at 8:23:49am
In the macOS Terminal, my mouse scroll wheel would magically start scrolling the command line history instead of the window buffer scroll bar on the right to show window history.
This happened when an SSH session was disconnected or timed out.
The fix is to run the reset
command.
Categories: How-To's , Technology Tags: apple , bash , cli , Command line , Disconnect , History , howto , MacOS , Mouse , Scroll , Shell , ssh , Terminal , Timeout , tips | No comments
Author:
erics , Posted on Friday, May 19th, 2023 at 10:37:58am
I was unable to login from my old iMac running Yosemite to my new iMac running Ventura using RSA keys.
It turns out that RSA key support was disabled in Ventura.
To correct the problem, I added the following two lines to the bottom of BOTH /etc/ssh/ssh_config
and /etc/ssh/sshd_config
on the Ventura side:
HostKeyAlgorithms + ssh - rsa , ssh - dss
PubkeyAcceptedKeyTypes + ssh - rsa , ssh - dss
Be sure to stop and start Remote Login under System Settings -> General -> Sharing
Categories: How-To's , Technology Tags: denied , HostKeyAlgorithms , howto , key , login , MacOS , OSX , Permission , Pubkey , PubkeyAcceptedAlgorithms , PublicKey , RSA , ssh , sshd , tips , Ventura , Yosemite | No comments
Author:
erics , Posted on Tuesday, May 9th, 2023 at 9:55:13am
I have been using RSA SSH keys forever to login to my various AWS EC2 instances.
With macOS Ventura 13.3.1 ssh failed with the “Permission Denied” error. Using ssh -vvv
, I saw that the RSA key was now being rejected.
After much research, I decided to implement new keys on the client (Ventura) side using ed25519, like this:
cd ~ / . ssh
ssh - keygen - t ed25519
cat id_ed25519 . pub
I then placed the new id_ed25519.pub
contents into the ~/.ssh/authorized_keys
files on the target nodes, and everything started working!
Categories: How-To's , Technology Tags: AWS , denied , ed25519 , Error , Generate , howto , key , Linux , MacOS , Permission Denied , public , Public Key , ssh , ssh-keygen , sshd , tips , Ventura | No comments
Author:
erics , Posted on Friday, May 5th, 2023 at 12:59:06pm
I have a new iMac running macOS Ventura 13.3.1.
I tried to rsync some files from another host and got the following error:
rsync - av -- progress -- exclude = Recordings / neptune : / Users / erics / Documents / / var / root / tmp / Documents /
receiving file list . . .
rsync : opendir "/Users/erics/Documents/." failed : Operation not permitted ( 1 )
In order to get rsync to have access to the hard drive in macOS Ventura, you need to add rsync and other programs to the Full Disk Access panel under Privacy & Security in System Settings.
First click on System Settings
Next locate Privacy & Security at the bottom of the same block as General in the left menu bar and click on it
Next, click on Full Disk Access
Then open a Finder window and navigate to the top-level ‘Macintosh HD’ and look for the usr
directory, select it, then select bin
. Finally, drag & drop the rsync command into the Full Disk Access window in true Apple style.
Finish adding all of the below commands and rsync will work
This is the list of files to add via Drag & Drop to the Full Disk Access panel under Privacy & Security:
/ Applications / Utilities / Terminal . app
/ usr / sbin / sshd
/ usr / sbin / smbd
/ usr / bin / ssh - agent
/ usr / bin / rsync
/ usr / libexec / sshd - keygen - wrapper
Categories: How-To's , Technology Tags: apple , howto , Mac , MacOS , Privacy , rysnc , security , ssh , sshd , tips , Ventura | No comments
Author:
erics , Posted on Tuesday, May 2nd, 2023 at 7:14:02am
Born: November 17, 1938, Orillia, Canada
Died: May 1, 2023, Sunnybrook hospital, Toronto, Canada, 84 years old
Categories: Death , Entertainment Tags: death , Gordon , Lightfoot , Rip | No comments
Author:
erics , Posted on Monday, April 17th, 2023 at 9:51:50am
First, use the AWS Console to modify the volume to the desired size, in our example we want to go from 10GB to 25GB for the root filesystem
For a Xen ext4 root volume
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# df -h
Filesystem Size Used Avail Use % Mounted on
/ dev / xvda1 9.8G 9.6G 26M 100 % /
/ dev / xvdf 200G 99G 102G 50 % / volumes / data
# lsblk
NAME MAJ : MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202 : 0 0 10G 0 disk
└─xvda1 202 : 1 0 10G 0 part /
xvdf 202 : 80 0 200G 0 disk / volumes / data
# growpart /dev/xvda 1
CHANGED : disk = / dev / xvda partition = 1 : start = 4096 old : size = 20967390 , end = 20971486 new : size = 52424670 , end = 52428766
# lsblk
lsblk
NAME MAJ : MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202 : 0 0 25G 0 disk
└─xvda1 202 : 1 0 25G 0 part /
xvdf 202 : 80 0 200G 0 disk / volumes / data
# resize2fs /dev/xvda1
resize2fs 1.43.5 ( 04 - Aug - 2017 )
Filesystem at / dev / xvda1 is mounted on / ; on - line resizing required
old_desc_blocks = 1 , new_desc_blocks = 2
The filesystem on / dev / xvda1 is now 6553083 ( 4k ) blocks long .
# df -hT
Filesystem Type Size Used Avail Use % Mounted on
/ dev / xvda1 ext4 25G 9.6G 15G 40 % /
/ dev / xvdf xfs 200G 99G 102G 50 % / volumes / data
For NVMe
First, use lsblk
to see the raw partitions:
# df -hT
Filesystem Type Size Used Avail Use % Mounted on
/ dev / nvme0n1p1 xfs 20G 2.8G 18G 14 % /
# lsblk
NAME MAJ : MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259 : 0 0 40G 0 disk
├─nvme0n1p1 259 : 1 0 20G 0 part /
└─nvme0n1p128 259 : 2 0 1M 0 part
Note how the partition at 259:1 is only 20GB, while the entire disk at 259:0 is 40GB. A partition resize is required in this case.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# sudo growpart /dev/nvme0n1 1
CHANGED : partition = 1 start = 4096 old : size = 41938911 end = 41943007 new : size = 83881951 end = 83886047
# lsblk
NAME MAJ : MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259 : 0 0 40G 0 disk
├─nvme0n1p1 259 : 1 0 40G 0 part /
└─nvme0n1p128 259 : 2 0 1M 0 part
# df -hT
Filesystem Type Size Used Avail Use % Mounted on
/ dev / nvme0n1p1 xfs 20G 2.8G 18G 14 % /
# sudo xfs_growfs -d /
meta - data = / dev / nvme0n1p1 isize = 512 agcount = 11 , agsize = 524159 blks
= sectsz = 512 attr = 2 , projid32bit = 1
= crc = 1 finobt = 1 spinodes = 0
data = bsize = 4096 blocks = 5242363 , imaxpct = 25
= sunit = 0 swidth = 0 blks
naming = version 2 bsize = 4096 ascii - ci = 0 ftype = 1
log = internal bsize = 4096 blocks = 2560 , version = 2
= sectsz = 512 sunit = 0 blks , lazy - count = 1
realtime = none extsz = 4096 blocks = 0 , rtextents = 0
data blocks changed from 5242363 to 10485243
# df -hT
/ dev / nvme0n1p1 xfs 40G 2.8G 38G 7 % /
If the XFS tools are not already installed , you can install them as follows :
sudo yum install xfsprogs
For an EXT4 filesystem, use the resize2fs
command instead:
sudo resize2fs / dev / nvme0n1p1
For more information, please visit the AWS Docs: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html
Categories: How-To's , Technology Tags: Amazon , Amazon Linux 2 , AWS , df , df -hT , Disk , EBS , Expand , Filesystem , Grow , howto , Linux , Linux2 , lsblk , NVMe , partition , Resize , tips , volume , XFS | No comments