I am trying to migrate from SVN to Git with history data and someone suggests me to use SubGit for this.
I downloaded the zip file and found that there is subgit.bat available in the bin folder after extracting it.
I don't know how to run subgit and ensure subgit installed on my windows system or not because it's throwing me subgit: Command not found
SubGit doesn't require any special installation, you can just unzip it and start to use, the bin/subgit.bat is actually SubGit start script. For convenience sake, it may worth to add the path to SubGit 'bin' folder to PATH environment variable so that subgit can start without issuing the full path every time.
The 'Command not found' error means that Windows cannot find the 'subgit' command -- it happens when there is no program called 'subgit' neither in PATH, nor in current directory. To resolve it either use full path to the 'subgit.bat' file to start the program (like, c:\subgit\bin\subgit.bat) or add SubGit bin directory path to PATH.
Related
I installed MongoDB and tried to run it on terminal. It just shows up 'mongo' is not recognized as an internal or external command, operable program or batch file.
I have set the path to bin folder inside Environment variables too. One thing I noticed is I might have a missing file inside bin folder and that is mongo. Because I have mongod and mongos file inside the bin folder. I tried to uninstall and reinstall the program and it was still not working.
I have no idea it's what that I'm missing. Please help out
Finally I have found the solution,
Mongo shell no longer ships with server binaries. We can download it from MongoDB Shell Download
Then we should extract the contents of the bin from the downloaded zip file to the bin file of the MongoDB folder and run mongosh instead of mongo on the terminal
I am trying to install allure in MAC not able to it.
I am getting the error "-bash: allure: command not found".
I have downloaded allure-commandline-2.9.0.tgz and allure-commandline-2.9.0.zip from the below link: https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/2.9.0/
I tried with both but it is not working.
Steps I have followed:
download the .tgz or .zip file.
unzip/untar the file.
set /allure-2.9.0/bin dir to the PATH variable.
Restart the terminal.
trying to run allure --version command.
But I am getting the error "-bash: allure: command not found".
Your installation folder of the tool is not /allure-2.9.0/bin
A good practise is to create a "bin" folder inside your user-account: "~/bin" and include this to the $PATH environment. From now on you can link or copy your extracted tool from e.g. ~/Downloads/allure-2.9.0/bin to ~/bin
You don't have to extend the PATH variable for each new tool.
i have to install a plugin on a red hat server where nagios is already configured.
the plugin to be installed is inode_checker which i got from this link
how to install inode checker in nagios
but when i opened this link i could find a shell script here.
now i am not sure whether i have to place the shell script directly on the server in the location /usr/local/nagios/libexec/ or is there any other way to do it since the other plugins available in this location seems to be different and i am not able to open them.
what am i doing wrong here?please advise.
Yes, this is a bash script so simply download and place it in the folder where you have other scripts sitting. Make sure to make it executable like
chmod +x scriptname
Then you should be able to use it in nagios by creating a Command object. You can find the location of the folder where your scripts are located by looking at the resources.cfg file which should hold something like below:
$USER1$=/usr/lib64/nagios/plugins
Hope this helps.
I have an install target in my Makefile and wish to run some commands that install shared libraries(requires root permissions) and some that install config files into $HOME/.config
Usually I'd just tell the user to run sudo make install, however that results in the config file being installed to /root/.config instead of the actual users config directory.
How do I work around this issue?
Thanks alot.
You can just change the owner and permissions of the config files, although a Makefile that installs per user configuration files, is not a good idea because it would ideally need to find out how many users exist on the system to install the files for each user.
If you use the install command, you could even do
install -v -m644 -o$(USERNAME) -g$(USERGROUP) $(FILE) $(USERHOME)/.config/$(FILE)
A better approach would be to let the program install the default config files from a system wide directory when it doesn't find them, for example
/usr/share/my-application/default-config/config.conf
and then the program would search for the files in the appropriate directoy and copy them to the $HOME directory of the user that is currently running the program, that if the files are modifiable by the user, otherwise you just access them from their system-wide location.
I think it is a good question.
I found it also confusing. I installed tomcat few minutes ago (after a while) and I notice they are two different "webapps" places.
at /usr/share/tomcat6/webapps/default_root/
at /var/lib/tomcat6/webapps/ROOT/
The content of both are the same but none of them are symlinks.
When I started tomcat it says:
Quote:
This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat6/webapps/ROOT/index.html
Tomcat6 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat6 and CATALINA_BASE in /var/lib/tomcat6
So, based in this information, the /usr/share/... folder was kept for backward compatibility, right?
But according to what you posted libs are being read from the CATALINA_HOME instead of CATALINA_BASE.
Perhaps they still keep that default reference to prevent other systems to stop working after updating?
Good observation!
UPDATE:
I read this at: /usr/share/tomcat6/bin/catalina.sh :
Quote:
# CATALINA_HOME May point at your Catalina "build" directory.
#
# CATALINA_BASE (Optional) Base directory for resolving dynamic portions
# of a Catalina installation. If not present, resolves to
# the same directory that CATALINA_HOME points to.
When we read at: /etc/init.d/tomcat6 :
(at the beginning)
CATALINA_HOME=/usr/share/$NAME
(then...)
# Directory for per-instance configuration files and webapps
CATALINA_BASE=/var/lib/$NAME
However, If you try to start TOMCAT manually (as I did long time ago) with:
sudo /usr/share/tomcat6/bin/startup.sh
It displays:
Quote:
Using CATALINA_BASE: /usr/share/tomcat6
Using CATALINA_HOME: /usr/share/tomcat6
Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
Using JRE_HOME: /usr
touch: cannot touch `/usr/share/tomcat6/logs/catalina.out': No such file or directory
/usr/share/tomcat6/bin/catalina.sh: 357: cannot create /usr/share/tomcat6/logs/catalina.out: Directory nonexistent
So, why here CATALINA_BASE is set to the same as CATALINA_HOME?
/usr/share/tomcat6/logs/ do not exist, but exists in /var/lib/tomcat6/logs/
I see that my logs are writing into /var/lib/... when starting Tomcat from the init.d script. So its better starting it from there.
I'm not an expert on Tomcat but I was having this same problem and I was able to restart the server with the command:
sudo /etc/init.d/tomcat6 restart
CATALINA_HOME -- tells "org.apache.catalina.startup.Bootstrap" where to look for required /lib /bin and other -- which are dependencies to run the server . It is basically your Tomcat installation home directory.
CATALINA_BASE -- expects a certain directory structure to scan for (once started). For example /conf to find server.xml and web.xml which is specific to a web application. as long as you have got that directory structure and content, CATALINA_BASE can be any directory.
I've seen that.
The proper and cute way is to create a "setenv.sh" script into your CATALINA_HOME/bin folder(in your case "/usr/share/tomcat6/bin/setenv.sh").
The contents of your setenv.sh:
#!/bin/sh
export CATALINA_BASE=/new/catalinabase/path
So there is no need to modify catalina.sh by yourself. If setenv.sh is present in bin directory, catalina.sh will execute it automatically.
I can't tell you why CATALINA_HOME and CATALINA_BASE are the same in startup.sh (resp. catalina.sh) - that's really strange.
Of course you can start Tomcat via the init.d script. But sometimes you may want to start it via startup.sh/catalina.sh (e.g. for debugging).
So as a workaround/hack you can correct the problem by adding the following line at the beginning of /usr/share/tomcat6/bin/catalina.sh
export CATALINA_BASE=/var/lib/tomcat6
I could do this by executing this command,
$ service tomcat6 start
which reinitialized my CATALINA_* path and starts the tomcat instance
chmod +x startup.sh
chmod +x shutdown.sh
chmod +x catalina.sh
chmod +x setclasspath.sh
chmod +x bootstrap.jar
chmod +x tomcat-jni.jar
hope it will be work.