This is only really necessary in the case you don't want DHCP. If you are dealing with an encrypted LUKS server on the internet, you will often want to have a static IP so you know which IP to connect to (or if you have a semi-static IP assigned by DHCP).
SET IP Address by /etc/initramfs-tools/initramfs.conf
Subnet Mask: 255.255.255.0
Yes you have that right, the network service in CentOS 8 no longer exists. So there is no more systemctl restart network
You can restart NetworkManager but it doesn't have the same effect or ifup/ifdown on all interfaces.
To replicate that the best you can do is type the following commands to nmcli
nmcli networking off; nmcli networking on
*Don't forget the semi-colon otherwise you'll........
Most of us know the heredoc method but what if you need a basic query done repeatedly and manually while working from bash? It is a pain to manually type mysql and login each time.
With this command below you can semi-automate those queries:
echo "use somedb; select * from auctions" | mysql -u root --password="yourpassword"
Just modify the above to suit your needs and you can add more queries by adding a sem........
Install Errors on Version 12:
This error happened on QEMU emulator version 2.11.1 pve-qemu-kvm_2.11.1-5
on Proxmox/Debian but installing on QEMU.12 on Centos 6 did not produce the error.
*Update it is not related to the OS or QEMU version. This happened in Centos 6 too after a second install.
What really causes this even though you successfully install........
initiator = client
target = server
These are the first concepts you should understand which is that in iscsi essentially the "initiator" is the client and the "target" is the server.
iSCSI is derived from the old fashioned SCSI that us oldtimers grew to love. The "i" stands for Internet and the SCSI stands for "Small Computers Systems Interface" (SCSI).
iSCSI Target (Server)Setup
targetcli is the pac........
It is not obvious but the rsync --help
rsync --help|grep port
--port=PORT specify double-colon alternate port number
--port does not do anything at all actually for some strange reason it still uses 22
You have to specify a manual ssh command to make it work:
-e 'ssh -........
Say you have a bunch of files like this:
What if you want to mass rename them?
the rename tool can work just like sed
For Debian based distros:
Note "file" is what we search for and "newname" is what we replace it with, so substitute according to your requirements.
rename s/file/newname/ name-file-*.jpg
It's actually fairly straight forward:
load data local infile 'billpayments-payments.csv' into table payments
fields terminated by ','
enclosed by '"'
lines terminated by 'n'
The above assumes that your fields are terminated by a comma (some programs like OpenOffice change this to a semi-colon ;) and that they are enclosed with "
The above will insert the data from billpayments-payments.csv into the table payments.........
This is a great way to use your ftp server space, for example on your web hosting account (althoughI believe many hosts don't allow storage like this), but if you have a VPS/Dedicated Server etc.., this would be perfect. Imagine how easy it is to work with an ftp account that you can just mount as a normal partition or directory in Linux, it would be great for backups etc..
curlftpfs - mount a ftp host as a local directory