April 17th, 2013
You can change default editor in Debian Linux with the following command:
update-alternatives –config editor
This will bring up the following screen asking you to select the editor (number on the Selection field):
There are 9 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status
————————————————————
* 0 /usr/bin/joe 70 auto mode
1 /bin/nano 40 manual mode
2 /usr/bin/jmacs 50 manual mode
3 /usr/bin/joe 70 manual mode
4 /usr/bin/jpico 50 manual mode
5 /usr/bin/jstar 50 manual mode
6 /usr/bin/mcedit 25 manual mode
7 /usr/bin/rjoe 25 manual mode
8 /usr/bin/vim.basic 30 manual mode
9 /usr/bin/vim.tiny 10 manual mode
Press
…
Read the rest of this entry »
March 27th, 2013
Windows 2012 Server Datacenter or Standard edition has very nice and clean interface and for folks who are more used to an old-style configuration like Windows 2008 Server offers, it’s quite hard to find out how to change locale settings. Actually, it’s quite easy – login as Administrator and run the Power shell. Then in the Power shell command line type:
intl.cpl <enter>
and there you go. Easy, right?… Read the rest of this entry »
March 19th, 2013
Today, when cloud servers are so popular always remember to wipe out your server data when you are deleting your VPS node or returning a dedicated server.
If you are running Debian it’s easy to install a secure-delete utility with the following utilities:
srm – securely delete an existing file
smem – securely delete traces of a file from ram
sfill – wipe all the space marked as empty on your hard drive
sswap – wipe all the data from you swap space.
To install secure-delete tools, run the following command with ROOT privileges:
apt-get install secure-delete
To safely shred … Read the rest of this entry »
January 31st, 2013
Puppet agent error message:
Could not retrieve hostname: getaddrinfo: Name or service not known
Could not retrieve hostname: getaddrinfo: Name or service not known
dnsdomainname: Name or service not known
/usr/lib/ruby/1.8/puppet/defaults.rb:190: undefined method `downcase' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/1.8/puppet.rb:100:in `require'
from /usr/lib/ruby/1.8/puppet.rb:100
from /usr/lib/ruby/1.8/puppet/application.rb:278:in `require'
from /usr/lib/ruby/1.8/puppet/application.rb:278:in `initialize'
from /usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `new'
from /usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `execute'
from /usr/bin/puppet:4
You fix the above error message by editing /etc/hosts file and make sure your server domain name resolves to your public interface IP (or 127.0.0.1). Then run once again “puppet agent –test“… Read the rest of this entry »
January 3rd, 2013
This guide applies to most of the Linux operating systems with installed openssl utilities (installed usually by default).
From the command line enter the following command to generate a new user and add the password hash to file .htpasswd in the current directory:
printf “User1:$(openssl passwd -apr1 Passwd56374b)\n” >> .htpasswd
Where User1 is the username, Passwd56374b is the password you prefer. This is it.… Read the rest of this entry »
January 2nd, 2013
You may be also banging your head against the wall and experiencing the same problem I was experiencing earlier today. I tried updated server configuration via “puppet agent –test” utility and received the following error message:
err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
So finally it turned out that NTP was not running on the client server OS and the time was set back in 2010 year! After setting up ntp daemon … Read the rest of this entry »
December 17th, 2012
I had a problem with granting correct MySQL user permissions to our in-house monitoring script. The problem was with MySQL user permissions that checked how many seconds behind the master is our MySQL slave server.
MySQL permissions you will need to set-up for the new user on the slave server are PROCESS and REPLICATION, it should work to execute “show slave status” command:
GRANT PROCESS, REPLICATION CLIENT ON dbname.* TO ‘monitoring’@’192.178.2.2’ IDENTIFIED BY ‘PWD_HERE’;
…
Read the rest of this entry »
December 3rd, 2012
I have no idea why I am posting how-to disable IPv6 on your Linux workstation or server – IPv6 is the only future, but here it goes:
Ubuntu:
Add /etc/sysctl.conf file with the following new lines and execute “sysctl -p” from ROOT shell:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Debian:
Execute the following command from ROOT shell, then reboot the server:
echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf
Centos, Fedora and Redhat Linux:
Add the following lines to /etc/sysctl.conf, then execute “sysctl -p” from ROOT shell:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
Or … Read the rest of this entry »
November 27th, 2012
For better NFS security you should use firewall, however many folks experience a lot of problems if they are running NFS behind the firewall. Below, we have compiled the required ports (default) that you need to open in your firewall to let NFS traffic pass:
You can check out “listening” ports with rpcinfo -p command:
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 14758 status
100024 1 tcp 29024 status
100021 1 udp 55776 nlockmgr
100021 3 udp 55776 nlockmgr
100021 4 udp 55776 nlockmgr
100021 1 tcp 11796 nlockmgr
100021
…
Read the rest of this entry »
October 11th, 2012
I experienced problems with adding Puppet Labs apt repository to my Debian 6.0 /etc/apt/sources.list for automated Puppet installs using apt-get. The gpg was not imported and to solve the problem, I had to import Puppet Labs apt gpg key. manually:
apt-key adv –recv-key –keyserver pool.sks-keyservers.net 4BD6EC30
… Read the rest of this entry »