Linux: edit crontab with nano instead of vi
by Ali on Apr.15, 2015, under Linux
Everyone hates vi… I sure do. If you can’t or don’t want to permanently change your crontab editor use this:
env EDITOR=nano crontab -e
Linux: VMware Tools on Red Hat or CentOS Prerequisites
by Ali on Apr.06, 2015, under Linux
This should do it:
yum install perl gcc make kernel-headers kernel-devel audit binutils glibc-headers
If vmware tools install cannot find your linux headers, throw these in too and try again:
yum install kernel-headers-`uname -r` kernel-devel-`uname -r`
VMware: System logs are stored on non-persistent storage error during ESXi installation
by Ali on May.20, 2014, under VMware
I am not sure what your circumstances were, but I was using a Mac to RDP to a Windows server to install nested ESXi servers under VMware Workstation.
The culprit was Mac’s way of sending F keys to VMware after a keyboard grab and it switches screens on you. Instead of install page you get the diagnostic message that can be ignored completely. This is not an error, just a warning.
To send the right key to VMware go to your Mac System Preferences, Keyboard and check “Use all F1, F2, yada yada yada”. Then use the Command key + F11 combo. Do not hold any other key. Repeat with other combinations when needed.
Debian: MySQL stops working after upgrade from Lenny to Squeeze
by Ali on Jan.22, 2013, under Debian, Linux, SQL
MySQL installation gets upgraded during your OS upgrade as well… therefore a few different things could cause the server to not start. I’d start troubleshooting this way:
Incompatible configuration: simply backup your /etc/mysql/my.cnf and copy a new one from /etc/mysql/my.cnf.dpkg-dist and start the server.
cp /etc/mysql/my.cnf /etc/mysql/my.cnf.bak
cp /etc/mysql/my.cnf.dpkg-dist /etc/mysql/my.cnf
/etc/init.d/mysql restart
Missing loopback interface: MySQL binds to your loopback interface by default and would not start if it is missing. Check yours and add if necessary:
nano /etc/network/interfaces
and add “lo” to lines with “auto”. If your interface line is “auto eth0” change it to read “auto lo eth0”. Also add “iface lo inet loopback” to the file if it is missing. Save config and restart the server.
2nd last resort: install MySQL: Install it again, see what happens.
aptitude install mysql-server-5.1
Last resort: completely purge the install and install again:
aptitude remove --purge mysql-server
aptitude install mysql-server
and if none of the above worked keep googling… good luck!
Misc: Circumventing DNS based web filtering and redirection services like opendns.com.
by Ali on Oct.16, 2012, under Misc
DNS based web filtering services block access to unauthorized website by manipulating name resolution for the particular site. Meaning that when a URL is accessed, the filtering service returns an incorrect result that is usually a page showing you are not allowed to access that website. This filtering could affect all IP based protocols such as HTTP, FTP, etc. To circumvent such services you can find the IP address of website and add to your host file. Host file contains the mappings of IP addresses to host names and prevent having the name resolved through DNS servers. Sometimes it can be obtained by using the IP in address bar as well. If you are unable to find the IP because you are behind the web filtering service, you can use a DNS Lookup service, type the URL and find the IP.
To add the IP’s to allowed list in hosts file:
Location of hosts file in Linux: /etc/hosts
Location of hosts file in Windows: C:\Windows\System32\drivers\etc\hosts
Open the file in editor of your choice and add the IP as shown below:
204.152.204.166 www.4chan.org
You can add as many sites as you please but Each entry should be kept on an individual line. Save the file, restart your browser to flush DNS and you’re good to go.