HowTo: Use Auto Config Proxy PAC File For Specific Domain

A Proxy PAC (Proxy Auto-Configuration) file is used to configure proxy settings for a web browser. If you want to use a PAC file to configure proxy settings for a specific domain, you can use the following steps: Create a PAC file: function FindProxyForURL(url, host) { if (shExpMatch(host, “*.example.com”)) { return “PROXY proxy.example.com:8080”; } return … Read more

Ubuntu Linux: Disable Apparmor For Specific Profile / Service Such As Mysqld Server

To disable AppArmor for a specific profile, such as the MySQL server, on Ubuntu Linux, you can use the following steps: Stop the service that is protected by the profile you want to disable: sudo service mysqld stop Disable the AppArmor profile for the service: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld Start the service again: sudo service … Read more

CentOS / RHEL: Install vnStat Network Traffic Monitor To Keep a Log Of Daily Traffic

To install vnStat, a network traffic monitor, on CentOS or RHEL, you can use the following steps: Install the vnstat package: sudo yum install vnstat Start the vnstat daemon and enable it to start automatically at boot time: sudo systemctl start vnstat sudo systemctl enable vnstat Create a database for the desired network interfaces: sudo … Read more

HowTo: Linux Rename a RAID Array From md0 to md2

To rename a Linux RAID array from md0 to md2, you can follow these steps: Stop the RAID array: sudo mdadm –stop /dev/md0 Create a new RAID array with the desired name: sudo mdadm –create /dev/md2 –level=<RAID_level> –raid-devices=<number_of_devices> <devices> Replace <RAID_level> with the RAID level (e.g., 0, 1, 5, 6, etc.), <number_of_devices> with the number … Read more

CentOS/RHEL 6: Shutdown Command

The shutdown command is used to shut down a CentOS 6 or RHEL 6 system. Here are a few examples of how to use the shutdown command: To shut down the system immediately: sudo shutdown -h now To shut down the system after a specified delay: sudo shutdown -h +<delay> Replace <delay> with the number … Read more