Administration
Find Out Hard Disk Specs on Linux
Find your drives SDA is the primary hdparm Command Open the terminal and type the following OR
Why Backup your MySql Databases with Cron
There are a few reasons to install a cron job to create full database dumps versus copying the /var/lib/mysql data. The MySQL service may have a lock on the database file(s) when it attempts to replicate the data file, causing it to fail; if the backup on the data files does succeed, the InnoDB log … Read more
Install Zabbix agent on CentOS
Link to install zabbix server on centOS 6- http://www.unixmen.com/install-zabbix-monitoring-tool-centos-6-5/ Zabbix Documentation – https://www.zabbix.com/documentation/3.4/manual/installation/install_from_packages/rhel_centos Install on CentOS 7 – http://www.unixmen.com/how-to-install-zabbix-server-on-centos-7/ Install Epel Configure the ZabbixZone package repository and GPG key using command: Install the agent Modify Zabbix Agent Configuration Open zabbix_agentd.conf and make below necessary changes (Add your Zabbix Server IP and add Zabbix Agent hostname) and … Read more
Zip files and exclude directories
Zip and exclude one directory Change to the directory… 2 directories
Reset CentOS Root Password
To reset the root password for CentOS 6: Boot Computer and Interrupt while booting at GRUB stage hitting ‘arrow‘ keys or “space bar“. Type ‘a‘ to modify kernel argument. Anytime you can cancel typing ‘ESC‘ key. Append 1 at the end of “rhgb quiet” and press “Enter” key to boot into single user mode. Type … Read more
Use Find on Linux to find a file name
How to search a directory for a specific filename.
Install ClamAV on CentOS 7
Install ClamAV and set up scheduled scans. Install Epel: Install ClmAV Copy a the clamd.conf template, in case you don’t have a configuration file yet: Change the file and Comment out “Example” Change this… To this… Configure SELinux for ClamAV. Check if selinux in on: Write this command to get it working with SELinux if … Read more
Display timestamp using HISTTIMEFORMAT for History Command
Usually, when you run the history command, you get the following: Run the following to get a timestamp
Find php spam script for cpanel/exim server
Edit php.ini and search for “mail.log”, check whether this option is enabled or not, if not uncomment it and specify log file name. File must be writable or owned by apache user.