Ubuntu: Difference between revisions
→Mount VMDK file
(8 intermediate revisions by the same user not shown) | |||
Line 175:
Source: [https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-16-04 digitalocean.com]
{{notice|This section needs to be tested.}}
;On Server side:
Line 195 ⟶ 197:
/home 203.0.113.256(rw,sync,no_root_squash,no_subtree_check)
'''rw:''' This option gives the client computer both read and write access to the volume.▼
'''sync:''' This option forces NFS to write changes to disk before replying. This results in a more stable and consistent environment since the reply reflects the actual state of the remote volume. However, it also reduces the speed of file operations.▼
'''no_subtree_check:''' This option prevents subtree checking, which is a process where the host must check whether the file is actually still available in the exported tree for every request. This can cause many problems when a file is renamed while the client has it opened. In almost all cases, it is better to disable subtree checking.▼
'''no_root_squash:''' By default, NFS translates requests from a root user remotely into a non-privileged user on the server. This was intended as security feature to prevent a root account on the client from using the file system of the host as root. no_root_squash disables this behavior for certain shares.▼
Restart NFS
▲ rw: This option gives the client computer both read and write access to the volume.
▲ sync: This option forces NFS to write changes to disk before replying. This results in a more stable and consistent environment since the reply reflects the actual state of the remote volume. However, it also reduces the speed of file operations.
▲ no_subtree_check: This option prevents subtree checking, which is a process where the host must check whether the file is actually still available in the exported tree for every request. This can cause many problems when a file is renamed while the client has it opened. In almost all cases, it is better to disable subtree checking.
▲ no_root_squash: By default, NFS translates requests from a root user remotely into a non-privileged user on the server. This was intended as security feature to prevent a root account on the client from using the file system of the host as root. no_root_squash disables this behavior for certain shares.
sudo systemctl restart nfs-kernel-server
Line 414 ⟶ 415:
To verify status:
sudo systemctl status networking.service
===== IP Traffic Forwarding =====
Enable IPv4 Forwarding:
# sudo su
# echo "1" > /proc/sys/net/ipv4/ip_forward
Verify:
# cat /proc/sys/net/ipv4/ip_forward
1
Make the change persistent:
# sysctl -a | grep ip_forward
net.ipv4.ip_forward = 1 ==> Copy this line
# vi /etc/sysctl.conf
net.ipv4.ip_forward = 1 ==> Paste it at the end of this file
IPtables rules:
iptables -t nat -A POSTROUTING -o ens192 -j MASQUERADE
iptables -A FORWARD -i ens193 -o ens192 -j ACCEPT
iptables -A FORWARD -i ens193 -o ens192 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables-save
===Software Centre===
Line 1,067 ⟶ 1,091:
echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge
==== FIGlet ====
Source: [http://www.shellhacks.com/en/Creating-ASCII-Text-Banners-from-the-Linux-Command-Line shellhacks.com]
Line 1,096 ⟶ 1,120:
You can alter the complete MOTD message from below files:
/etc/update-motd.d/
==== Mount VMDK file ====
Source: [https://stackoverflow.com/questions/22327728/mounting-vmdk-disk-image stackoverflow.com]
Installation:
sudo apt install libguestfs-tools
Check Disks & partitions
sudo lsblk
Create Mount point:
sudo mkdir /mnt/vmdk
Mount the VMDK Image:
sudo guestmount -a pro_nlb_avi-se-02old-disk1.vmdk -m /dev/sda3 --ro /mnt/vmdk
cd /mnt/vmdk
Unmount the image:
sudo guestunmount /mnt/vmdk
==== Thumbnails for Media ====
Install Thumbnail applications
sudo apt install ffmpegthumbnailer
sudo apt install gstreamer1.0-libav
Clear the cache
rm -r ~/.cache/thumbnails/fail
Or
rm -rf ~/.cache/thumbnails/*
<br />
|