2012年2月14日 星期二

如何在Windows上安裝OpenNMS

這是一篇如何在Windows上安裝OpenNMS的文章,原文內容在以下網址:



1. Install the JDK
Download the Java 6 (1.6), Java 5 (1.5) or higher Java SE JDK from?java.sun.com?and install it. The JDK, not just a JRE, is required by the web UI, since JSP pages are dynamically compiled. You need the version labeled "Java SE" (for "standard edition"), not EE, ME, or FX.

2. Install JICMP
For OpenNMS 1.3.6 or greater Install?JICMP.
For 64-bit installations: Note that the OpenNMS installer includes 32-bit JICMP. Download 64-bit JICMP fromSourceForge. Between Step 8 and Step 9 of the OpenNMS installation wizard below, copy the 64-bit jicmp.dll and msvc runtime dll to OpenNMS\lib, overwriting the 32-bit files.

3. Install PostgreSQL
a.)Download the Installer
Download the one-click PostgreSQL for Windows installer.
http://www.postgresql.org/download/windows

b.)Run the PostgreSQL Installer
Run the installer. For the most part, the defaults should be just fine. You should not need to run the Stack Builder for OpenNMS, although if you intend to use PostgreSQL for other things, it lets you install replication, web, and ODBC tools.
Note: the PostgreSQL Windows installer has a bug, it does not enable the PL/PGSQL language by default, even if you check the box which tells it to. See the instructions below for adding it.

c.)Initialize the Database
Create a Database in PostgreSQL_Root\data
If for some reason you don't have a default database initialized from the installer, you can create it yourself:
* open a command prompt (Start -> Run -> cmd) and change to the bin directory of your PostgreSQL install (by default,?C:\Program Files\PostgreSQL\X.X\bin)
* Initialize the database with the following command:
* initdb -E UTF-8 -U postgres ..\data

d.)Adding PL/PGSQL to the postgres database
Add PL/PGSQL Language
When you initialize the database manually, it does not add PL/PGSQL automatically, so you will need to do so yourself. The easiest way to do this is with the pgAdmin tool which is provided with the PostgreSQL binaries.
1. start PostgreSQL: from the Start bar, go to the "PostgreSQL X.X" menu and run "Start service"
2. run pgAdmin: from the Start bar, go to the "PostgreSQL X.X" menu and run "pgAdmin III"
3. connect to the database: double-click on "PostgreSQL Database Server X.X (localhost:5432)"
4. browse to the postgres database (Databases -> postgres)
5. go to File --> Options and activate the Languages option under the Display tab (click "OK")
6. click the "Refresh" button to be sure everything is being displayed
7. Navigate back to the "postgres" database, you should now see a "Languages" item in the tree
8. Right-click on "Languages" and select "New Language..."
9. Select "plpgsql" from the "Name" drop-down, and click "OK" (accepting the defaults)
10. exit pgAdmin

4. Install OpenNMS
If you did not start PostgreSQL already, start it by going to the "PostgreSQL X.X" menu in the Start bar, and click "Start service".
Then, all you need to do is download the latest?standalone-'opennms-installer-X.X.X.zip'?from the?opennmssection on?the OpenNMS download page. Once it is downloaded to your hard drive, you should be able to just double-click setup32.exe or setup64.exe it in Explorer, and it will start installation. Note that the setupXX.exe you run should match your JVM's arch, so if you're running a 32-bit JVM on 64-bit Windows, install using setup32.exe.
Follow the instructions?and you should have a complete OpenNMS installation!

5. Run OpenNMS
OpenNMS can be run from the command-line, using opennms. bat in your?$OPENNMS_HOME\bin?directory. Assuming you installed OpenNMS to?C:\Program Files\OpenNMS, you would open a command-prompt, and cd to?C:\Program Files\OpenNMS\bin. Then run:
 opennms.bat start
...and OpenNMS should start. Open your browser and point it at?http://localhost:8980/opennms?and log in as "admin" with the password "admin".

2012年2月7日 星期二

解決Windows 2003用BackExec備份產生VSS錯誤問題


我的來源端是一台Windows2003,當成File Server來使用。最近兩個月,使用Backexec做備份時,常常備份到一半就Failed,原因都指向VSS


這個問題試過幾種方式都無解,直到同事找到Windows 940349這個Patch才解決這個問題。

參考以下微軟網站:
http://support.microsoft.com/kb/940349