In multi installation environment (of IBM MQ v9.0 on windows), I am trying to create a queue manager and set its installation (crtmqm, setmqm) from command prompt, but getting the error:
Command not executed from the installation named by the -n parameter
How do I perform the following actions:
check what the current installation associated with command
prompt.
change the current installation associated with the
command prompt ( basically running command against a specific
installation, which is not necessarily the primary installation).
To answer your two questions:-
To check the current installation associated with the command prompt use the dspmqver command.
To change the current installation associated with the command prompt use the setmqenv command in one of the following ways:-
To set your installation you can either do so using the installation name, e.g.:-
setmqenv -n Installation2
or the path of the installation, e.g.:-
setmqenv -p c:\mqm8000
which has the same result as changing to the directory of the one you want and then telling it you want to change the environment to self (-s), e.g.
cd \mqm8000
setmqenv -s
If you want to run a command using non-primary installation,then you have to go to the installation(i.e bin) directory of the non-primary installation and then execute it from there.
If you want to set an environment then you have to use setmqenv. Following is the infocenter link which talks more about it
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.ref.adm.doc/q083560_.htm
Related
hi i have to write a command line to uninstall java where it get current version already installed in system ?(suppose one system having jre-6u29 where other having jre-7).But i want single command line to uninstall existing version.please help me.
I have not tested this.
Use with EXTREME caution. It WILL NOT prompt for confirmation, and it WILL NOT let you cancel your action
Open a command prompt using administrator rights, and type in:
wmic product where "name like 'Java%'" call uninstall
What this simple command is doing is:
Find all the products installed on your computer which name starts with "Java"
Uninstalls them without asking for confirmation, nor showing any kind of user interface
In order to make sure that you get any installation of Java replace 'Java%' with '%Java%' (obviously). So the command would be:
wmic product where "name like '%Java%'" call uninstall
So I'm trying to find a command to uninstall apache from windows that I have installed earlier with an NSIS script.
Basically apache is part of a package of aplications we use for our program, and when uninstalling our program we uninstall them all. Already working for postgres, java and ruby, but I'm not finding any command for apache.
I tried the wmic command, but it required user to confirm the action. There isn't any httpd uninstall command?
httpd -k uninstall
simply removes the service.
Thanks
sc delete Apache2.4
Remove service in windows
On Windows 8.1 I had to run cmd.exe as administrator (even though I was logged in as admin). Otherwise I got an error when trying to execute: httpd.exe -k uninstall
Error:
C:\Program Files\Apache\bin>(OS 5)Access is denied. : AH00373: Apache2.4: OpenS
ervice failed
I've had this sort of problem.....
The solve: cmd / powershell run as ADMINISTRATOR! I always forget.
Notice: In powershell, you need to put .\ for example:
.\httpd -k shutdown .\httpd -k stop .\httpd -k uninstall
Result: Removing the apache2.4 service The Apache2.4 service has been removed successfully.
If Apache was installed using NSIS installer it should have left an uninstaller. You should search inside Apache installation directory for executable named unistaller.exe or something like that. NSIS uninstallers support /S flag by default for silent uninstall. So you can run something like "C:\Program Files\<Apache installation dir here>\uninstaller.exe" /S
From NSIS documentation:
3.2.1 Common Options
/NCRC disables the CRC check, unless CRCCheck force was used in the
script. /S runs the installer or uninstaller silently. See section
4.12 for more information. /D sets the default installation directory ($INSTDIR), overriding InstallDir and InstallDirRegKey. It must be the
last parameter used in the command line and must not contain any
quotes, even if the path contains spaces. Only absolute paths are
supported.
Try this :
sc delete Apache2.4
or try this :
C:\Apache24\bin>httpd -k uninstall
hope this will be helpful
I have installed Nagios monitoring tool in linux whose service is running successfully as expected.
Now as per NSClient documentation, the windows part is not getting installed.
The required steps are:
(a) Copy pNSClient.exe, pdh.dll, psapi.dll and counters.defs in any directory on the machine you want to monitor. ie. (c:\nsclient).
(b) Open a dos prompt in the installation directory
(c) Run the following command : >pNSClient.exe /install
(d) Type 'net start nsclient' on the command line or start the service 'Nagios Agent' in the services applet of the control panel.
The installation will create an entry for the service in the registry and create a new key to store parameters. The created key is the following:
HKEY_LOCAL_MACHINE\SOFTWARE\NSClient
The issue is with the installation as per the first step, and the 'net start nsclient' command is not executing on command prompt, its showing service name invalid
Any help regarding this ? M installing this on windows 7.
Only the windows installation part of NSClient is remaining yet the linux part is properly installed along with the 'check_nt' plugin.
Thanks in advance !!
NSClient is antiquated and deprecated. You should be using NSClient++ (AKA nscp), which has an actual installer, along with excellent documentation.
Alternatively, if you are dealing with more than a few dozen Windows hosts, and are using Active Directory, you might want to consider Nagios-WSC. Whether or not it will suit your needs depends on what sort of checks you are hoping to do, though.
That documentation might be out of date. Try using the following doc to install NSClient++. The doc is for Nagios XI, but the agent instructions should be the same.
http://assets.nagios.com/downloads/nagiosxi/docs/Installing_The_XI_Windows_Agent.pdf
Otherwise, you could also try:
net start nsclient++
just an advice - forget about manual installs )
install choco
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
restart powershell session and
install nsclient++
choco install nscp
I had run the MacPorts installer (2.0.3) for my OS X Leopard (10.5.8) which finished "successfully". Unfortunately the port command was not available so I looked in the MacPorts Guide which says that the installer should have run a so-called "postflight" script that sets the necessary environment variables. I tried to run the postflight script manually (which I downloaded from here), but the execution fails with the following output:
Detected the bash shell.
Your shell already has the right PATH environment variable for use with
MacPorts!
Your shell already has the right MANPATH environment variable for use with
MacPorts!
Your shell already has the right DISPLAY environment variable for use with
MacPorts!
Adding [default] tag to sources.conf if needed...
couldn't read file "/Contents/Resources/upgrade_sources_conf_default.tcl": no
such file or directory
Updating port image format...
couldn't read file "/Contents/Resources/images_to_archives.tcl": no such file or
directory
Synchronizing the MacPorts installation with the project's rsync server...
-bash: __PREFIX__/bin/port: No such file or directory
An attempt to synchronize your recent MacPorts installation with the project's
rsync server failed!
Please run 'sudo port -d selfupdate' manually to find out the cause of the
error.
You have succesfully installed the MacPorts system, launch a terminal and try it
out!
Read the port(1) manual page and http://guide.macports.org for help,
http://www.macports.org/contact.php if you need to get in touch with The
MacPorts Project.
Any ideas?
First invoke the port command directly:
$ /opt/local/bin/port help
If that comes back with something reasonable (like the help text) then it's just that your $PATH isn't being used by your current shell. Try logging off and back on again to resolve that in the short term (this will test that your .bashrc file is correctly configured) or you could just modify the PATH environment variable directly (which doesn't test .bashrc):
$ export PATH=$PATH:/opt/local/bin
You downloaded the postflight script but it alone cannot access the accessory scripts in Contents/ because those are located into the install package.
Those missing Tcl scripts are for upgrading from an older install, the log says PATH was already correctly configured but the macports bin directory could have the wrong position in PATH variables, for instance being at the end of PATH.
If you are doing a fresh install you can just only need PATH and MANPATH -you want man pages provided by macports before system's ones- as per [1]
[1] http://guide.macports.org/#installing.shell.postflight
I am trying to install mongodb on my local computer. I have windows 7 and 64 bit. I am following these instructions which are given on mongo's website:
64-bit binaries:
Download and extract the 64-bit .zip.
Unzip the downloaded binary package to the location of your choice. You may want to
rename mongo-xxxxxxx to just "mongo" for convenience.
Create a data directory:
By default MongoDB will store data in \data\db, but it won't
automatically create that folder, so we do so here:
C:\> mkdir \data
C:\> mkdir \data\db
Or you can do this from the Windows Explorer, of course.
If you prefer to place datafiles elsewhere, use the --dbpath command line parameter
when starting mongod.exe. Run and connect to the server
The important binaries for a first run are:
mongod.exe - the database server. Try mongod --help to see startup options.
mongo.exe - the administrative shell
To run the database, click mongod.exe in Explorer, or run it from a CMD window.
C:\> cd \mongodb\bin
C:\mongodb\bin> mongod
Note: It is also possible to run the server as a Windows Service. But we can do that
later.
When i follow these steps i get the following error:
'C:\' is not recognized as an internal or external command, operable program or batch
file.
I am not sure what is going wrong i have followed the direction exactly. I extracted the zip file on my c drive as mongodb. I then created the folder data on my c drive and the folder db inside the data folder. I start the windows cmd line and do as they suggest and i get the above error. Can anyone help please. Thank you.
Don't type the C:\>, that's the command prompt.
For example, just type:
cd \mongodb\bin
and then press enter.
you may want to use this powershell that dowloads mongodb and installs it as windows service...
https://gist.github.com/serdarb/5102848