Recently I ran into another issue with Fedora 33, after the upgrade gcloud
command not working anymore. Turn out it’s a python 3.9 issue, here is a quick fix
export CLOUDSDK_PYTHON=python2
Recently I ran into another issue with Fedora 33, after the upgrade gcloud
command not working anymore. Turn out it’s a python 3.9 issue, here is a quick fix
export CLOUDSDK_PYTHON=python2
I recently ran into this issue with git pull on Fedora 33, here is a quick fix to keep your current key pairs working
vim ~/.ssh/config ## Add the following lines at the top Host * PubkeyAcceptedKeyTypes +rsa-sha2-256,rsa-sha2-512
The following command lines help installing VS code on the latest Fedora using Terminal
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' sudo dnf update sudo dnf install code
wget https://downloads.mongodb.com/compass/mongodb-compass-1.22.1.x86_64.rpm sudo dnf install ./mongodb-compass-1.22.1.x86_64.rpm
sudo vi /etc/yum.repos.d/mongodb.repo [Mongodb] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.2/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc sudo dnf update sudo dnf install mongodb-org sudo systemctl enable mongod.service sudo systemctl start mongod.service mongod --version mongo > use test; switched to db test > db.test.save({'hello':'world'}) WriteResult({ "nInserted" : 1 }) > db.test.find() { "_id" : ObjectId("5f82b166af5d9be8c5bd0449"), "hello" : "world" } >
locate is a very useful command, which can be use from time to time to find files in Linux when we don’t know where that file is.
sudo apt update sudo apt install locate sudo updatedb # need to let sometime for this to finish locate .bashrc # locate can be called from anywhere locate -c "*thingtosearch" # search by regex, show count locate -e "*thingtosearch" # search in real-time, regardless db not updated. locate -i "*thingToSearch" # search and ignore case locate -S # view locate db at 10:56:54 Database /var/cache/locate/locatedb is in the GNU LOCATE02 format. Database was last modified at 2020:10:07 10:38:37.467600124 +0200 Locate database size: 5860142 bytes All Filenames: 464048 File names have a cumulative length of 34300427 bytes. Of those file names, 1317 contain whitespace, 0 contain newline characters, and 32 contain characters with the high bit set. Compression ratio 82.92% (higher is better)
Midori is probably one of the most lightweight browser for Linux, sometimes we just need it to quickly search for text information on Google and this is the browser for that purpose.
sudo apt update sudo apt install midori midori
For this example let’s say we want to open port 8080
iptables -A INPUT -m state --state NEW -p tcp --dport 8080 -j ACCEPT iptables-save
sudo dnf update sudo dnf install postgresql postgresql-server sudo postgresql-setup initdb sudo systemctl enable postgresql sudo systemctl start postgresql sudo -u postgres psql
To change default postgres
user password, create a database and grant all privileges to that user:
postgres=# \password postgres Enter new password: Enter it again: postgres=# create database mydb; CREATE DATABASE postgres=# grant all privileges on database mydb to postgres; GRANT postgres=# SHOW config_file; config_file ----------------------------------------- /etc/postgresql/12/main/postgresql.conf (1 row) postgres=# SHOW hba_file; hba_file ------------------------------------- /etc/postgresql/12/main/pg_hba.conf (1 row) postgres-# \q
To make this change effective, changes in pg_hba.conf
are necessary:
sudo vim /var/lib/pgsql/data/pg_hba.conf # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 # Allow replication connections from localhost, by a user with the # replication privilege. local replication all peer host replication all 127.0.0.1/32 ident host replication all ::1/128 ident service postgresql restart sudo -u postgres psql Password for user postgres: postgres=# \q