Pages

Wednesday, August 10, 2016

Tutorial: Installing a LAMP Web Server on Amazon Linux

Tutorial: Installing a LAMP Web Server on Amazon Linux

The following procedures help you install the Apache web server with PHP and MySQL support on your Amazon Linux instance (sometimes called a LAMP web server or LAMP stack). You can use this server to host a static website or deploy a dynamic PHP application that reads and writes information to a database.
Prerequisites
This tutorial assumes that you have already launched an instance with a public DNS name that is reachable from the Internet. For more information, see Step 1: Launch an Instance. You must also have configured your security group to allow SSH (port 22), HTTP (port 80), and HTTPS (port 443) connections. For more information about these prerequisites, see Setting Up with Amazon EC2.
Important
If you are trying to set up a LAMP web server on an Ubuntu instance, this tutorial will not work for you. These procedures are intended for use with Amazon Linux. For more information about other distributions, see their specific documentation. For information about LAMP web servers on Ubuntu, see the Ubuntu community documentation ApacheMySQLPHP topic.
To install and start the LAMP web server on Amazon Linux
  1. To ensure that all of your software packages are up to date, perform a quick software update on your instance. This process may take a few minutes, but it is important to make sure you have the latest security updates and bug fixes.
    Note
    The -y option installs the updates without asking for confirmation. If you would like to examine the updates before installing, you can omit this option.
    [ec2-user ~]$ sudo yum update -y
  2. Now that your instance is current, you can install the Apache web server, MySQL, and PHP software packages. Use the yum install command to install multiple software packages and all related dependencies at the same time.
    [ec2-user ~]$ sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
  3. Start the Apache web server.
    [ec2-user ~]$ sudo service httpd start
    Starting httpd:                                            [  OK  ]
  4. Use the chkconfig command to configure the Apache web server to start at each system boot.
    [ec2-user ~]$ sudo chkconfig httpd on
    Tip
    The chkconfig command does not provide any confirmation message when you successfully enable a service. You can verify that httpd is on by running the following command.
    [ec2-user ~]$ chkconfig --list httpd
    httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
    Here, httpd is on in runlevels 2, 3, 4, and 5 (which is what you want to see).
  5. Test your web server. In a web browser, enter the public DNS address (or the public IP address) of your instance; you should see the Apache test page. You can get the public DNS for your instance using the Amazon EC2 console (check the Public DNS column; if this column is hidden, choose Show/Hide and select Public DNS).
    Tip
    If you are unable to see the Apache test page, check that the security group you are using contains a rule to allow HTTP (port 80) traffic. For information about adding an HTTP rule to your security group, see Adding Rules to a Security Group.
    Important
    If you are not using Amazon Linux, you may also need to configure the firewall on your instance to allow these connections. For more information about how to configure the firewall, see the documentation for your specific distribution.
    Apache test page
    Note
    This test page appears only when there is no content in /var/www/html. When you add content to the document root, your content appears at the public DNS address of your instance instead of this test page.
Apache httpd serves files that are kept in a directory called the Apache document root. The Amazon Linux Apache document root is /var/www/html, which is owned by root by default.
[ec2-user ~]$ ls -l /var/www
total 16
drwxr-xr-x 2 root root 4096 Jul 12 01:00 cgi-bin
drwxr-xr-x 3 root root 4096 Aug  7 00:02 error
drwxr-xr-x 2 root root 4096 Jan  6  2012 html
drwxr-xr-x 3 root root 4096 Aug  7 00:02 icons
To allow ec2-user to manipulate files in this directory, you need to modify the ownership and permissions of the directory. There are many ways to accomplish this task; in this tutorial, you add a www group to your instance, and you give that group ownership of the /var/www directory and add write permissions for the group. Any members of that group will then be able to add, delete, and modify files for the web server.
To set file permissions
  1. Add the www group to your instance.
    [ec2-user ~]$ sudo groupadd www
  2. Add your user (in this case, ec2-user) to the www group.
    [ec2-user ~]$ sudo usermod -a -G www ec2-user
    Important
    You need to log out and log back in to pick up the new group. You can use the exit command, or close the terminal window.
  3. Log out and then log back in again, and verify your membership in the www group.
    1. Log out.
      [ec2-user ~]$ exit
    2. Reconnect to your instance, and then run the following command to verify your membership in the wwwgroup.
      [ec2-user ~]$ groups
      ec2-user wheel www
  4. Change the group ownership of /var/www and its contents to the www group.
    [ec2-user ~]$ sudo chown -R root:www /var/www
  5. Change the directory permissions of /var/www and its subdirectories to add group write permissions and to set the group ID on future subdirectories.
    [ec2-user ~]$ sudo chmod 2775 /var/www
    [ec2-user ~]$ find /var/www -type d -exec sudo chmod 2775 {} \;
  6. Recursively change the file permissions of /var/www and its subdirectories to add group write permissions.
    [ec2-user ~]$ find /var/www -type f -exec sudo chmod 0664 {} \;
Now ec2-user (and any future members of the www group) can add, delete, and edit files in the Apache document root. Now you are ready to add content, such as a static website or a PHP application.
(Optional) Secure your web server
A web server running the HTTP protocol provides no transport security for the data that it sends or receives. When you connect to an HTTP server using a web browser, the URLs that you enter, the content of web pages that you receive, and the contents (including passwords) of any HTML forms that you submit are all visible to eavesdroppers anywhere along the network pathway. The best practice for securing your web server is to install support for HTTPS (HTTP Secure), which protects your data with SSL/TLS encryption.
For information about enabling HTTPS on your server, see Tutorial: Configure Apache Web Server on Amazon Linux to use SSL/TLS.
To test your LAMP web server
If your server is installed and running, and your file permissions are set correctly, your ec2-user account should be able to create a simple PHP file in the /var/www/html directory that will be available from the Internet.
  1. Create a simple PHP file in the Apache document root.
    [ec2-user ~]$ echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
    Tip
    If you get a "Permission denied" error when trying to run this command, try logging out and logging back in again to pick up the proper group permissions that you configured in To set file permissions.
  2. In a web browser, enter the URL of the file you just created. This URL is the public DNS address of your instance followed by a forward slash and the file name. For example:
    http://my.public.dns.amazonaws.com/phpinfo.php
    You should see the PHP information page:
    Note
    If you do not see this page, verify that the /var/www/html/phpinfo.php file was created properly in the previous step. You can also verify that all of the required packages were installed with the following command (the package versions in the second column do not need to match this example output):
    [ec2-user ~]$ sudo yum list installed httpd24 php56 mysql55-server php56-mysqlnd
    Loaded plugins: priorities, update-motd, upgrade-helper
    959 packages excluded due to repository priority protections
    Installed Packages
    httpd24.x86_64                          2.4.16-1.62.amzn1                    @amzn-main
    mysql55-server.x86_64                   5.5.45-1.9.amzn1                     @amzn-main
    php56.x86_64                            5.6.13-1.118.amzn1                   @amzn-main
    php56-mysqlnd.x86_64                    5.6.13-1.118.amzn1                   @amzn-main
    If any of the required packages are not listed in your output, install them with the sudo yum installpackage command.
  3. Delete the phpinfo.php file. Although this can be useful information to you, it should not be broadcast to the Internet for security reasons.
    [ec2-user ~]$ rm /var/www/html/phpinfo.php
To secure the MySQL server
The default installation of the MySQL server has several features that are great for testing and development, but they should be disabled or removed for production servers. The mysql_secure_installation command walks you through the process of setting a root password and removing the insecure features from your installation. Even if you are not planning on using the MySQL server, performing this procedure is a good idea.
  1. Start the MySQL server.
    [ec2-user ~]$ sudo service mysqld start
    Initializing MySQL database:  Installing MySQL system tables...
    OK
    Filling help tables...
    OK
    
    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
    
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    ...
    
    Starting mysqld:                                           [  OK  ]
    
  2. Run mysql_secure_installation.
    [ec2-user ~]$ sudo mysql_secure_installation
    1. When prompted, enter a password for the root account.
      1. Enter the current root password. By default, the root account does not have a password set, so press Enter.
      2. Type Y to set a password, and enter a secure password twice. For more information about creating a secure password, see http://www.pctools.com/guides/password/. Make sure to store this password in a safe place.
        Note
        Setting a root password for MySQL is only the most basic measure for securing your database. When you build or install a database-driven application, you typically create a database service user for that application and avoid using the root account for anything but database administration.
    2. Type Y to remove the anonymous user accounts.
    3. Type Y to disable remote root login.
    4. Type Y to remove the test database.
    5. Type Y to reload the privilege tables and save your changes.
  3. (Optional) Stop the MySQL server if you do not plan to use it right away. You can restart the server when you need it again.
    [ec2-user ~]$ sudo service mysqld stop
    Stopping mysqld:                                           [  OK  ]
  4. (Optional) If you want the MySQL server to start at every boot, enter the following command.
    [ec2-user ~]$ sudo chkconfig mysqld on
You should now have a fully functional LAMP web server. If you add content to the Apache document root at/var/www/html, you should be able to view that content at the public DNS address for your instance.
(Optional) Install phpMyAdmin
phpMyAdmin is a web-based database management tool that you can use to view and edit the MySQL databases on your EC2 instance. Follow the steps below to install and configure phpMyAdmin on your Amazon Linux instance.
Important
We do not recommend using phpMyAdmin to access a LAMP server unless you have enabled SSL/TLS in Apache; otherwise, your database administrator password and other data will be transmitted insecurely across the Internet. For information about configuring a secure web server on an EC2 instance, seeTutorial: Configure Apache Web Server on Amazon Linux to use SSL/TLS.
  1. Enable the Extra Packages for Enterprise Linux (EPEL) repository from the Fedora project on your instance.
    [ec2-user ~]$ sudo yum-config-manager --enable epel
  2. Install the phpMyAdmin package.
    [ec2-user ~]$ sudo yum install -y phpMyAdmin
    Note
    Answer y to import the GPG key for the EPEL repository when prompted.
  3. Configure your phpMyAdmin installation to allow access from your local machine. By default, phpMyAdmin only allows access from the server that it is running on, which is not very useful because Amazon Linux does not include a web browser.
    1. Find your local IP address by visiting a service such as whatismyip.com.
    2. Edit the /etc/httpd/conf.d/phpMyAdmin.conf file and replace the server IP address (127.0.0.1) with your local IP address with the following command, replacing your_ip_address with the local IP address that you identified in the previous step.
      [ec2-user ~]$ sudo sed -i -e 's/127.0.0.1/your_ip_address/g' /etc/httpd/conf.d/phpMyAdmin.conf
  4. Restart the Apache web server to pick up the new configuration.
    [ec2-user ~]$ sudo service httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]
  5. Restart the MySQL server to pick up the new configuration.
    [ec2-user ~]$ sudo service mysqld restart
    Stopping mysqld:                                           [  OK  ]
    Starting mysqld:                                           [  OK  ]
  6. In a web browser, enter the URL of your phpMyAdmin installation. This URL is the public DNS address of your instance followed by a forward slash and phpmyadmin. For example:
    http://my.public.dns.amazonaws.com/phpmyadmin
    You should see the phpMyAdmin login page:
    Note
    If you get a 403 Forbidden error, verify that you have set the correct IP address in the/etc/httpd/conf.d/phpMyAdmin.conf file. You can see what IP address the Apache server is actually getting your requests from by viewing the Apache access log with the following command:
    [ec2-user ~]$ sudo tail -n 1 /var/log/httpd/access_log | awk '{ print $1 }'
    205.251.233.48
    Repeat Step 3.b, replacing the incorrect address that you previously entered with the address returned here; for example:
    [ec2-user ~]$ sudo sed -i -e 's/previous_ip_address/205.251.233.48/g' /etc/httpd/conf.d/phpMyAdmin.conf
    After you've replaced the IP address, restart the httpd service with Step 4.
  7. Log into your phpMyAdmin installation with the root user name and the MySQL root password you created earlier. For more information about using phpMyAdmin, see the phpMyAdmin User Guide.

Related Topics

For more information on transferring files to your instance or installing a WordPress blog on your web server, see the following topics:
For more information about the commands and software used in this topic, see the following web pages:
If you are interested in registering a domain name for your web server, or transferring an existing domain name to this host, see Creating and Migrating Domains and Subdomains to Amazon Route 53 in the Amazon Route 53 Developer Guide.

Thursday, July 14, 2016

How to easily take down any Gym

This is my last try to help... this keeps getting downvoted, so I'm guessing some higher level players don't want others to know this (or they don't like their gyms being taken)
I'll make it really brief:
Watch the yellow screen flash!!! That's it. Forget everything else; ignore the animation, just watch for the flash, swipe to dodge, then quick attack. You will take no or very little damage.
The end. It's that easy.
Other notes:
  1. The first time an opponent appears, it attacks twice. So dodge twice first: flash dodge flash dodge, then attack.
  2. If the server glitches/lags, you can take damage
  3. You can safely get in one quick attack before the next flash - sometimes you can get two (flash dodge, attack, attack, flash dodge, attack, attack...repeat).
  4. You are vulnerable after using a special attack because you can't immediately dodge - don't use them unless you need to.
  5. You're up against the clock. If your 800CP is against a 1400CP, you can avoid taking damage, but you may not be able to whittle down their health in time.
  6. You can cut through Pokemon within +/- 200CP of your attacker like butter (without losing health)
  7. You get a lot of xp at no cost for taking down high level gyms, and it's fun! (although it does take a while)
  8. It is way more fun than spamming quick attack and it'll save you a TON of revive and health potions.
  9. Bonus: you can really annoy the 'super-gyms' when you take them down by yourself!
Edit: To clarify, the safest/easiest way is to only attack once after dodging. Then wait for another flash and repeat. Like this: flash - dodge - attack (one tap)..... flash - dodge - attack (one tap)..... repeat After a while, you'll figure out where you can sneak in two taps before dodging and that you can dodge right or left.
Edit2: FYI, this was removed by the mods after it hit 3700 in two hours and then was reinstated a few hours later. Enjoy.

Monday, June 13, 2016

OEM Agent Clean Upload


export AGENT_HOME=/app/oracle/product/gc10.2/agent10g/



$AGENT_HOME/bin/emctl stop agent



rm -r $AGENT_HOME/sysman/emd/state/*

rm -r $AGENT_HOME/sysman/emd/upload/*

rm $AGENT_HOME/sysman/emd/lastupld.xml

rm $AGENT_HOME/sysman/emd/agntstmp.txt

rm $AGENT_HOME/sysman/emd/protocol.ini






$AGENT_HOME/bin/emctl secure agent


$AGENT_HOME/bin/emctl start agent


$AGENT_HOME/bin/emctl clearstate agent



$AGENT_HOME/bin/emctl upload agent



how to set putty logfile using putty command line

http://stackoverflow.com/questions/21831161/how-to-set-putty-logfile-using-putty-command-line


Solved by windows reg update the putty store the configuration in the registry: The path to the key is: HKEY_CURRENT_USER \Software \SimonTatham \PuTTY \Sessions \Default%20Settings
1- create a reg file for example "settings.reg" content:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]
"LogFileName"="C:\\..path..\\mylogfile.log"
"LogType"=dword:00000002
in my batch file, i added this line before executing putty.exe
 `reg import settings.reg`
 `putty -x -t -ssh -2 -l root 10.56.56.35 -m commands.txt`

Tuesday, May 17, 2016

Creating a Physical Standby Database 11gR2

Creating a Physical Standby Database

This tutorial shows you how to create a physical standby database. The steps described configure the standby database for maximum performance mode, which is the default data protection mode. This tutorial shows you how to:
  • Use the DUPLICATE FROM ACTIVE DATABASE RMAN command
  • Enable Maximum Performance standby mode
  • Verify that data is getting to the Physical standby
  • Examine views to monitor Primary and Physical Standby Databases using SQL*Plus
NOTE: This OBE represents a Data Guard configuration where orcl is the primary database and standby1 is the physical standby database SID. For simplicity, in this OBE, both the primary and standby databases are running on a single server.
Approximately 1 hour

Topics

This tutorial covers the following topics:
 Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)
Note: Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the screenshot associated with that step. You can hide an individual screenshot by clicking it.

Overview

Oracle Database 11g RMAN introduces the FROM ACTIVE DATABASE capability to the DUPLICATE FOR STANDBY command. This alleviates the previous need for interim storage on both the Primary and Standby systems, and the limitation of single stream network traffic.
Now when taking the backup of the Primary database you can simultaneously create and restore the standby database over the network in parallel streams. Apart from some simple Oracle Net setup, and creating a couple of directories and an interim password file, the whole standby creation can be done in one RMAN script.
RMAN will automatically copy the server parameter file to the standby host, start the auxiliary instance with the server parameter file, restore a backup control file, and copy all necessary database files and archived redo logs over the network to the standby host.

Prerequisites

Before starting this tutorial, you should:
1.Install Oracle Database 11g.
2.Create a directory named wkdir. Download and unzip physstdby.zip into the wkdir directory.

Preparing the Primary Database for Standby Database Creation

In this practice, you verify that the primary database is configured correctly to support a physical standby database.
You only need to perform these preparatory tasks once. After you complete these steps, the database is prepared to serve as the primary database for one or more standby databases. You should perform the following steps:
1.
Determine if FORCE LOGGING is enabled. If it is not enabled, enable FORCE LOGGING mode. This statement may take some time to complete, because it waits for all unlogged direct write I/O to finish. Use SQL*Plus to execute the following commands:
SELECT force_logging FROM v$database;
ALTER DATABASE FORCE LOGGING;

2.
Configure redo transport authentication.
Data Guard uses Oracle Net sessions to transport redo data and control messages between the members of a Data Guard configuration. These redo transport sessions are authenticated using either the Secure Sockets Layer (SSL) protocol or a remote login password file.
In this OBE, we will be using a remote login password file which will be created in a subsequent step.

3.
Configure the primary database to receive redo data, by adding the standby logfiles to the primary. You can use thecr_sby_redologs.sql script, after validating the directory paths reflect your environment.
It is highly recommended that you have one more standby redo log group than you have online redo log groups as the primary database. The files must be the same size or larger than the primary database’s online redo logs.

4.
Set primary database initialization parameters
On the primary database, you define initialization parameters that control redo transport services while the database is in the primary role. These include:
DB_NAMESpecifies the database name. Must be orcl.
DB_UNIQUE_NAMESpecify a unique name for each database. Does not change even if DG roles change. Must be orcl.
CONTROL_FILESSpecifies the local path name for the control files on the primary database.
LOG_ARCHIVE_CONFIGUses the DG_CONFIG attribute to list the DB_UNIQUE_NAME of the primary and standby databases.
LOG_ARCHIVE_DEST_1Defaults to archive destination for the local archived redo log files.
LOG_ARCHIVE_DEST_2Valid only for the primary role, this destination transmits redo data to the remote physical standby destination standby1.
REMOTE_LOGIN_PASSWORDFILEMust be EXCLUSIVE or SHARED if a remote login password file is used (default =EXCLUSIVE)
LOG_ARCHIVE_DEST_STATE_nMust be ENABLE (default)
Verify your settings for DB_NAME and DB_UNIQUE_NAME.
Use the set_log_params.sql script to set the LOG_ARCHIVE_CONFIG and LOG_ARCHIVE_DEST_2 parameters.

5.
Issue the following statements to determine your database's archival state, and then put the primary database in ARCHIVELOG mode to enable automatic archiving.

In this practice, you configure the network environment and create a physical standby database.
NOTE: In this OBE, you configure the network for a single server environment. If you are configuring an environment on two different servers, you would need to configure Oracle network services on both servers accordingly.
A
B.
C.

A. Create an Oracle Net service name for your physical standby database.

1.Your Data Guard configuration will use Oracle Net service names to reference different databases. Add a service name for your physical standby database. This can be achieved by appending the entry provided in tns_entry.txt to your existing$ORACLE_HOME/network/admin/tnsnames.ora file as shown below.

Note: If you are familiar with Oracle Net services use the netmgr utility to configure the new service entry.
Note: It is likely that you already have a service name defined for you primary database as illustrated above. If not, be sure to add a service name entry for that database as well.
B. Configure an entry for your standby database in the listener.ora file.
1.In the following section you will use RMAN to create your standby database. To achieve this you will need to add a database service entry to your listener.ora file. This can be achieved by appending the entry provided in sid_entry.txt to your existing$ORACLE_HOME/network/admin/listener.ora file as shown below.

Note: If you are familiar with Oracle Net services use the netmgr utility to configure the new service entry.
C. Creating the standby database.
1.Stop and re-start the Oracle network listener using the lsnrctl stop and lsnrctl start commands.


2.Change directory to $ORACLE_HOME/dbs and copy the remote login password file (orapworcl) from the primary database system to the $ORACLE_HOME/dbs directory on the standby database system, renaming it to orapwstandby1.
Note: The password file must be re-copied each time the SYSDBA or SYSOPER privilege is granted or revoked and whenever the login password of a user with these privileges is changed. You may need FTP, or some other remote file transfer mechanism, if you are using different servers.

3.In the $ORACLE_HOME/dbs directory of the standby system, create an initialization parameter file named initstandby1.oracontaining a single parameter: DB_NAME=<physical standby SID> (i.e. standby1)


4.On the standby system, change to the /u01/app/oracle/admin directory. Create a directory with a name that matches your physical standby SID (i.e. standby1). Change to the newly created directory (i.e. standby1) and create an adump directory.


5.On the standby system, create a directory with a name that matches your physical standby SID (i.e. standby1) in$ORACLE_BASE/oradata for the data files.

Note: Depending on how you configured your existing primary database you may need to also create a similar directory in your fast recovery area (i.e. $ORACLE_BASE/flash_recovery_area)
6.On the standby system, set the ORACLE_SID environment variable to your physical standby SID (i.e. standby1) and start the instance in NOMOUNT mode with the text initialization parameter file created earlier.


7.
On the primary system, ensure the ORACLE_SID environment variable is set to your primary database SID (i.e. orcl). Verify that your current directory contains the cr_phys_sby1.txt RMAN script.


8.On the primary system, invoke RMAN and connect as SYSDBA to the target database. Connect as SYSDBA to the auxiliary database. Enter <your password> for SYS.


9.Execute the cr_phys_sby1.txt script from RMAN on the primary system. When this script finishes you will have a new standby database that was created over the network without any interim storage.


10.Perform a log switch on the primary database and redo will start being sent to the standby.



11.On the standby system, ensure the ORACLE_SID environment variable is set to your physical standby SID (i.e. standby1) and start the managed recovery process.


Verify that the Physical Standby Database is Performing Correctly

Once you create the physical standby database and set up redo transport services, you may want to verify database modifications are being successfully transmitted from the primary database to the standby database. To see that redo data is being received on the standby database, you should first identify the existing archived redo log files on the standby database, force a log switch and archive a few online redo log files on the primary database, and then check the standby database again. The following steps show how to perform these tasks.
1.
On the standby database, identify the existing archived redo log files by querying the V$ARCHIVED_LOG view.
You can use the query_archived_log.sql file.
Note: Depending on your machine performance, you may see that both archived redo logs have been applied at the time that you query the view.

2.
On the primary database, issue a number of ALTER SYSTEM SWITCH LOGFILE statements to archive a number of redo log files.

3.
On the standby database, re-query the V$ARCHIVED_LOG view to verify the redo data was received and applied on the standby database.
At the completion of this step, the physical standby database is running and provides the maximum performance level of data protection.

Clean Up

The cleanup.sh script has been provided to stop and remove the physical standby database created in this OBE. Please note that other Data Guard OBE's use the physical standby database created in this tutorial so it is advised that you complete these before executing this clean up procedure.
1.
Execute the cleanup.sh script to stop and remove the physical standby database.

In this tutorial, you learned how to:
Prepare the Primary Database for Standby Database Creation
Create the Physical Standby Database over the network
Verify that the Physical Standby Database is Performing Correctly

 Place the cursor over this icon to hide all screenshots.

 

 

 

The listener supports no services

rp0428 wrote:
Try adding a SID_LIST_LISTENER to your listener.ora file
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = XXXXXX)
(ORACLE_HOME = D:\app\User\product\11.1.0\db_1)
(SID_NAME = XXXXXX)
)
) 
My listener know is
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = PROD)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = PROD)
    )
   )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.7.2)(PORT = 1521))
  )

ADR_BASE_LISTENER = /u01/app/oracle
 
Status
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                21-MAY-2013 20:03:28
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/www/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.7.2)(PORT=1521)))
Services Summary...
Service "PROD" has 1 instance(s).
  Instance "PROD", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully