I’ve had to look this tip up a number of times, so here it is.
Say you are running PowerShell on a Windows server, however it does not automatically load all available modules and you need one for a specific script you’ve got. Load all available PowerShell modules on a Windows server by running this command:
Get-Module -ListAvailable | Import-Module
From the “Hey, Scripting Guy! Blog.” Thank you!
Per github wiki for node.js, Fedora 19 will have node.js included. However, to obtain node.js in Fedora 18, do the following:
sudo yum --enablerepo=updates-testing install nodejs npm
On one of my web servers I use the “-Xrs” parameter in the JAVA_OPTIONS on a Solaris server. This tells the JVM to ignore any system shutdown requests. This prevents the JVM from shutting down in the event there is a system panic which may not otherwise cause a system crash. See the JVM parameters page for Solaris for more details.
Sometimes when attempting to grep through the files in a directory, there are so many files in the directory that grep returns an error indicating the argument list is too long. Fix this by using xargs.
find ./ -print | xargs grep -l <your_string>
ls -1 | wc -l
Running an Oracle ODI installer on a CentOS vm, I encountered an error of the type:
checking for hardnofiles = 4096; found hardnofiles = 1024 Failed
checking for softnofiles = 4096; softnofiles = 1024 Failed
The fix was to edit my/etc/security/limits.conf file:
* soft nofile 16384
* hard nofile 65536
The default CentOS 5.6 firewall configuration does not allow Apache httpd traffic on port 80. In order to open the port for utilization, a change must be made to the firewall configuration.
iptables -I INPUT -p tcp -m tcp ––dport 80 -j ACCEPT
To open a hole for VNCServer (running on display 20):
iptables -I INPUT -p tcp -m tcp ––dport 5920 -j ACCEPT
To open a hole for VNCServer (running on display 20) web base interface:
iptables -I INPUT -p tcp -m tcp ––dport 5820 -j ACCEPT
To display the openings you’ve created in your firewall:
iptables -L INPUT -n ––line-numbers
To remove a line entry from your iptables file (for example, entry #3):
iptables -D INPUT 3
There are two dashes in front of parameters such as “––line-numbers” and “––dport.”
The iptables service must be saved, and restarted before changes take effect.
service iptables save
service iptables restart