Ubuntu: Difference between revisions

2,864 bytes added ,  4 years ago
 
(11 intermediate revisions by the same user not shown)
Line 172:
/mnt/folderonyourcomp / cifs username=aman,password=cisco,domain=yourdomain 0 2
 
===== ffffNFS Mount =====
 
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:
 
Installation
sudo apt-get install nfs-kernel-server
 
*Make a share directory called nfs:
sudo mkdir /var/nfs/general -p
 
*NFS will translate any root operations on the client to the nobody:nogroup credentials as a security measure.
*Therefore change the directory ownership to match those credentials:
sudo chown nobody:nogroup /var/nfs/general
 
*For /home do not change permissions, else it will break down the system.
 
*Configuring the NFS Exports
sudo nano /etc/exports
/var/nfs/general 203.0.113.256(rw,sync,no_subtree_check)
/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
sudo systemctl restart nfs-kernel-server
 
;On Client side:
sudo apt-get install nfs-common
 
*Edit fstab file:
sudo nano /etc/fstab
10.10.1.23030:/home/cores /mnt/cores/ nfs auto,noatime,nolock,bg,nfsvers=3,intr,tcp
 
*Test the mount:
UUID=c6006096-99c2-48c3-b26a-b4bd7556ef06 / ext4 defaults,errors=remount-ro 0 1
sudo mount -a
UUID=c218f4c8-7602-4454-ba2e-e5b1d040ea86 /boot ext2 defaults,noauto 0 2
10.10.1.230:/home/cores /mnt/cores/ nfs auto,noatime,nolock,bg,nfsvers=3,intr,tcp
10.10.2.18:/home/builds /mnt/builds/ nfs auto,noatime,nolock,bg,nfsvers=3,intr,tcp
 
==== Different ways to disable IPv6 for network efficiency====
Line 384 ⟶ 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,037 ⟶ 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,066 ⟶ 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 />