Operating Systems & Environments
Undo previous commands Linux
# Get all yum commands previously run
yum history list all
# Get the details of the command
yum history info [entry number]
# Undo each command top-down
yum history undo [entry number]
How to Install Apache on CentOS 7
Install Apache:
- First, clean-up yum:
sudo yum clean all
- As a matter of best practice we’ll update our packages:
sudo yum -y update
- Installing Apache is as simple as running just one command:
sudo yum -y install httpd
Allow Apache Through the Firewall
CentOS at Hyper-V does not connect to the internet
1. Make sure you uncheck Secure Boot in the firmware section
2. I had to force the network adapter to release and renew the IP Address to get it to pull an address from DHCP. Used the commands
sudo dhclient -r
then ran
sudo dhclient
to request an address. After I did that I was up and running and could ping anything in my network.
How to Disable/Enable Windows File Compression
This tutorial shows you how to disable or enable the File Compression feature in Microsoft Windows.
1- Disable the File Compression feature .
- Select the "Start" button, then type "CMD".
- Right-click "Command Prompt", then choose "Run as administrator" (If prompted for a password, enter credentials for an account that has administrator rights.)
- Type the following then press "Enter".
fsutil behavior set disablecompression 1
2- Enable the File Compression feature .
Fix Folder Names in Outlook
Folder names are incorrect or displayed in an incorrect language in Outlook
Open CMD (Command Prompt) on windows
change the path to this directory
C:\Program Files (x86)\Microsoft Office\root\Office16, by writing
cd C:\Program Files (x86)\Microsoft Office\root\Office16
write this command
Outlook.exe /ResetFolderNames
How to Display the List of All Jobs in Cron / Crontab
How to view the Crontab list of jobs
crontab -l
crontab -u username -l
Example with user testuser:
crontab -u testuser -l
First view all the daily cron jobs:
Backup and Restore Database SSH
in this wiki we have Backing up and restoring Database from local server and external server,
Backup Database
Backup from local server
mysqldump -u{username} -p{passoword} {database} | gzip > {path}/backup_filename_$(date +%F).sql.gz
Backup from external server
mysqldump -P {port} -h {host} -u{username} -p{passoword} {database} | gzip > {path}/backup_file_name_$(date +%F).sql.gz
Backup specific tables
mysqldump -u{username} -p{passoword} {database} table1 table2 > {path}/table1_table2.sql
Compress & Extract
To compress one file or folder to a tar file:
tar -cvf xxx.tar file
To extract a tar file:
tar -xvf file.tar
To compress one file or folder to a tar.gz file:
tar -cvzf xxx.tar.gz file
To extract a tar.gz file:
tar -xvzf file.tar.gz
To compress one file or folder to a tar.bz2 file:
tar -cvjf xxx.tar.bz2 file
To extract a tar.bz2 file:
tar -xvjf file.tar.bz2