MySQL Import File / Database Command

To import a MySQL database from a file, you can use the mysql command-line client. Assuming that you have a MySQL dump file (which is a text file containing SQL statements that recreate the database), you can use the following command to import the file: mysql -u username -p database_name < file.sql Replace username with … Read more

Ubuntu Linux Find JDK Version

To find the version of the Java Development Kit (JDK) installed on Ubuntu Linux, you can use the following command in a terminal: java -version This will output information about the Java Runtime Environment (JRE) installed on your system, including the version number. If you have the JDK installed, the version number will be included … Read more

E: Archive directory /var/cache/apt/archives/partial is missing Error and Solution

The “E: Archive directory /var/cache/apt/archives/partial is missing” error usually indicates that the apt-get package manager is unable to locate the directory where it stores the downloaded package files. This can happen if the directory is deleted or if there is a permission issue preventing apt-get from accessing the directory. Here is how to resolve this … Read more

BIND DNS: Disable Dynamic Updates

To disable dynamic updates in BIND DNS, follow these steps: Open the named.conf file in a text editor. The location of the file may vary depending on your system configuration, but it is typically located in /etc/named.conf. Find the section of the named.conf file that contains the configuration for the zone that you want to … Read more

RHEL / CentOS Xcache: /usr/include/php/ext/date/lib/timelib_structs.h:24:28: error: timelib_config.h: No such file or directory Error and Soultion

The error message you are seeing is typically caused by a missing file called “timelib_config.h”, which is required by the timelib library used by Xcache. Here’s how to fix the error: Install the required dependencies: sudo yum install gcc make automake autoconf httpd-devel php-devel php-pear libmcrypt-devel libpng-devel libjpeg-devel freetype-devel libXpm-devel gmp-devel libxml2-devel openssl-devel libicu-devel libtidy-devel … Read more

Mac OS X Disable Unnecessary Services

On a Mac running macOS, you can disable unnecessary services to improve system performance and security. Here are the steps to disable some of the unnecessary services on a Mac: Open the “System Preferences” app by clicking on the Apple icon in the menu bar and selecting “System Preferences”. Click on “Sharing”. Uncheck the checkboxes … Read more

Linux Log All SCSI Events To Syslog

In Linux, you can use the udev subsystem to log all SCSI events to the system log using syslog. Here are the steps to set up logging of SCSI events to syslog: Create a new file called /etc/udev/rules.d/99-scsi-log.rules with the following contents: ACTION==”add|remove”, SUBSYSTEM==”scsi”, RUN+=”/bin/logger -t udev -p user.info ‘SCSI $env{ACTION} for $env{DEVTYPE} $env{ID_MODEL_FROM_DATABASE} ($env{DEVNAME})'” … Read more

Linux: Create /tmp And Mount as Partition File With the noexec, nosuid, And nodev

The /tmp directory in Linux is used for temporary files and is typically stored on the root file system. However, for security reasons, it is recommended to create a separate partition for /tmp and mount it with the noexec, nosuid, and nodev options to prevent the execution of binaries, privilege escalation, and device access. Here … Read more