Monday, September 19, 2022
How to use multiple SSH key for same user by adding to ssh agent
Generate you ssh public key
Friday, September 16, 2022
Installing PHP 7.4 on macOS Sierra without brew?
sudo port install php74
sudo port install php74-cgi php74-gd php74-curl php74-intl php74-iconv php74-gettext php74-mbstring php74-imap php74-mcrypt php74-xmlrpc php74-mysql php74-openssl php74-sockets php74-zip php74-tidy php74-opcache php74-xsl php74-sqlite
sudo port select php php74
Thursday, September 15, 2022
How to remove directory in Linux
To permanently remove a directory in Linux, use either rmdir or rm command:
- For empty directories, use
rmdir [dirname]
orrm -d [dirname]
- For non-empty directories, use
rm -r [dirname]
Before you remove a directory, you need to know the name of it. To discover files and directories, use the ls command, and to know the current directory you are in, use the pwd command.
The options you use together with these commands are also important to determine how they work. Here’s a quick recap of rm command options:
Command and Option | Description |
rm -d | Remove an empty directory using the rm command. |
rm -r | Remove a non-empty directory and its content. |
rm -f | Ignore any prompt when deleting a write-protected file. |
rm -rf | Ignore any prompt when deleting a write-protected non-empty folder. |
rm -i | Output a prompt before deleting every file. |
rm -I | Output a prompt only once before deleting more than three files. |
rm * | Wildcard that represents multiple characters. |
rm ? | Wildcard that represents a single character. |
rmdir -p | Remove an empty subdirectory and its parent directory. |
rmdir -v | Print the information that the specified directory was deleted. |
/usr/bin/env: 'php': No such file or directory CentOS Stream
sudo ln -s /usr/bin/php* /usr/bin/php
*= your current php version
Convert from CentOS Linux 8 to CentOS Stream 8
dnf --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos
dnf distro-sync
Monday, September 12, 2022
Reset MySQL Root Password on Red Hat Enterprise Linux 8
sudo systemctl stop mysqld
sudo systemctl set-environment MYSQLD_OPTS=”--skip-grant-tables”
sudo systemctl start mysqld
sudo mysql -u root
mysql> FLUSH PRIVILEGES;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewRootPassw0rd!';
mysql> FLUSH PRIVILEGES;
mysql> QUIT;
sudo systemctl stop mysqld
sudo systemctl unset-environment MYSQLD_OPTS
sudo systemctl start mysqld
sudo mysql -u root -p
mysql> QUIT;
sudo mysql -u root -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'ChangeRootPassw0rd!';
mysql> ALTER USER 'shola'@'localhost' IDENTIFIED BY 'ChangeSholaPassw0rd!';
mysql> FLUSH PRIVILEGES;
mysql> QUIT;
Now login again with new root password !!
Sunday, September 11, 2022
Make PPK to Pem using Mac terminal
sudo port install putty
or
or
brew install putty
This will also install puttygen. To get puttygen to output a .PEM file:
puttygen privatekey.ppk -O private-openssh -o privatekey.pem
Once you have the key, open a terminal window and:
This will also install puttygen. To get puttygen to output a .PEM file:
puttygen privatekey.ppk -O private-openssh -o privatekey.pem
Once you have the key, open a terminal window and:
ssh -i privatekey.pem user@my.server.com
The private key must have tight security settings otherwise SSH complains. Make sure only the user can read the key.
The private key must have tight security settings otherwise SSH complains. Make sure only the user can read the key.
chmod go-rw privatekey.pem
Subscribe to:
Posts (Atom)
How to get Ranking of the Students in Excel using RANK Function
=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...
-
Put the following code in a TXT file and save as "file.cmd" then run the cmd file as administrator. @echo off title Activate Micr...
-
We can install PowerMTA on the server. rpm -ivh /home/PowerMTA-4.0r6.x86_64.rpm You will see the output like this Preparing... #############...
-
# $Id: config 2015-03-24 16:00:00 Jack $ # Sample PowerMTA configuration file # PowerMTA Multiple Virtual PMTA config file sample # # E-mai...