Jump to Navigation

214 - Reverse mapping on ssh

If you connect a server with ssh, you get an error message sometimes.

# ssh 206.133.170.124

reverse mapping checking getaddrinfo for 192.168.1.200.my.example.net failed - POSSIBLE BREAK-IN ATTEMPT!
Last login: Wed Jan 25 09:20:51 2012 from 118.126.98.216.my.serve01.net

213 - Editor on Linux

Some Linux Based OS does not comes with your favorites editor. And maybe in some case the default editor is not the one you are used to.
For example, you need to update the crontab:

# crontab -e

pico or nano, (for example) opens up.

If you personally have a preference for VI and you wanted to change it to the editor you are used to.

To update the default editor you simply need to execute:

Linux:

212 - yum corrupted

You get the following error after execute yum command. Probably yum is corruped.

Error :

Traceback (most recent call last):
  File "/usr/bin/yum", line 28, in ?
    import yummain
  File "/usr/share/yum-cli/yummain.py", line 30, in ?
    from yum import _
ImportError: cannot import name _

Solution :

Update the yum forcefully. You can get the latest yum from net.

211 - iCalendar, CalDAV

iCalendar is a computer file format which allows Internet users to send meeting requests and tasks to other Internet users, via email,
or sharing files with an extension of .ics. Recipients of the iCalendar data file (with supporting software, such as an email client
or calendar application) can respond to the sender easily or counter propose another meeting date/time.

210 - Top-Level Domain (TLD)

A root name server is a name server for the Domain Name System's root zone. It directly answers requests for records in the root zone
and answers other requests returning a list of the designated authoritative name servers for the appropriate top-level domain (TLD).

The newest DNS root zoon on.

# dig @a.root-servers.net ns

Linux:
Cloud:

209 - Bash [: too many arguments

If you run the following script, you got an error sometimes.

if [ -e /tmp/* ]; then
   echo "files exist"
else
   echo "No file exists"
fi

This is using -e (existing a file check) that is working fine on individual files. This code works fine if the result is one file;
but if you have more files returned,  it fails with the following error:

line x: [: too many arguments

Linux:

208 - Changing the Number of RHEL 6 (CentOS 6)Desktop Workspaces

By default, RHEL 6 configures two workspaces.

To increase the number of available workspaces :

1. Right click with the mouse on the workspace control in the panel.

2. Select Preferences.

3. Simply increase the Number of workspaces value to the desired number.

The name of each workspace may be changed by double clicking on the default name in the list
(Workspace 1, Workspace 2 etc) and typing in a new name.

207 - portreserve ( to reserver port# in Linux Server )

The portreserve program aims to help services with well-known ports that lie in the portmap range. 
It prevents portmap from a real service's port by occupying it itself, until the real service tells it to release the
port (generally in the init script).

1. Install the package for RedHat / CentOS 6

# yum search portreserve

# yum install portreserve

206 - Meaning $$ in PHP

<?PHP
$a_string = "This is a test.";
$a_var = "a_string";

echo $$a_var;
?>

Output :

This is a test.

 

205 - PHP Meaning -> & =>

  • -> To create a new object, use the new statement to instantiate a class.
<?php
class foo
{
    function do_foo()
    {
        echo "Execute do_foo function in class foo";
    }
}

$bar = new foo;
$bar->do_foo();
?>

You can execute a method in a class object.

PHP:

Pages

Subscribe to LAMP, Database and Cloud Technical Information RSS


Main menu 2

by Dr. Radut