I am trying to setup a JProfiler Agent on Remote AWS Linux.
I followed the steps from #### Method 2: Add agentpath to JAVA_OPTS.
But I get the following error:
The file is on drive. I can navigate to it.
What did I do?
I downloaded the JProfiler10.0.4 as targz for Linux.
Unzip the archive
Executed the command nano ~/.bashrc
I modified the content in this way.
Executed the command source ~/.bashrc
I get the error.
Do you have any idea what I am doing wrong?
Thank you
It looks like you're actually trying to set JAVA_OPTS.
Todo that you have assign it to JAVA_OPTS and then export it. In your .bashrc, replace -agentpath:"$jpPath" with this:
export JAVA_OPTS="-agentpath:$jpPath"
#crea1 is right, but I would really not use the method of modifying JAVA_OPTS. It's better to pass the -agentpath VM parameter to the VM that you are trying to profile by modifying the start script.
Related
I have a problem with node and SSL. solution is using --use-openssl-ca option when running node. but I should always run my app with that option.
Is there a configuration file for node.js which I set that option in it?
Answering your question. yes you can attach configuration file for nodejs but there is no global config file.
NODE_OPTIONS='--require "./my path/file.js"'
but this will not make the command line shorter.
if you are willing to add it for one specific project.
then use package.json add a starter script there.
if you want it to be in the current bash. do this (Linux) :
export NODE_OPTIONS=--use-openssl-ca
in windows set NODE_OPTIONS=--use-openssl-ca
if you want default in every bash.
echo 'export NODE_OPTIONS=--use-openssl-ca' >> ~/.bashrc
I am a newb to Linux and AWS and I'm trying to figure out what should be a simple task. I have an instance of Amazon Linux running in EC2 and I'm trying to write a script that will start some new instances (same AMI). The script (called my_script) is as follows:
#!/bin/sh
ec2-describe-instances
ec2-run-instances ami-b66ed3de -t t2.micro -k my-key-pair -g my_security_group
Whenever I try to run it, I get the error message:
./my_script: line 3: ec2-describe-instances: command not found
./my_script: line 4: ec2-run-instances: command not found
These commands work when I manually enter them in command line but not when I try to make a script containing them. I have tried fiddling around with the first line that says which interpreter to use, to no avail. Any input is appreciated. Thanks
Sometimes using commands in a script will not work, because the script is not run in the same environment as your current login. Try including the full paths to ec2-describe-instances and ec2-run-instances.
To find the full path, I believe you use the 'which' command in the command line.
I faced the same issue. I solved the issue by exporting the home directory at the beginning of the script. In my case, I added the following.
export HOME=/root
I Installed Ubuntu 14-04 LTS. I tried to install software's using Terminal.Each time Software Installation successful but after installation it always diSlays one command which is '-System-Product-Name:~$ '.I applied many this like my computer name etc.But not yet success.
I am new in Linux platform.Anyone aware solution for the same please help me.Thanks In advance
Add the following line to .bashrc file in your /home/your-username folder
export PS1="\[\e[0;32m\]\u#\h:\e[m\] \[\e[1;34m\]\w$\e[0m "
execute the command
source .bashrc
Then read
http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html
System-Product-Name is the default hostname.
To change it, you can run sudo nano /etc/hostname, modify it with something like yourname-desktop
everyone.
I had a basic question want to consult, about the environment variable setting.
After closed my one existed terminal which could execute compile(make) and do customed(mksdboot) command, i can't do mksdboot command anymore(I had execute a predefined setting environment variable shell script i.e. $ . ./arndale_envsetup.sh again) in the new terminal.
Cause i am a beginner in Linux, i am not very clearly about the environment variable setting rules.
i had tried to 'su' or 'sudo' to execute mksdboot, but no luck:(
ps. I had another project needs to compile in my PC(i didn't export PATH to .bashrc, only execute export PATH when i open a new terminal every time), may it efforts the original project's environment variable?
thanks.
[UPDATED]
i tried using $source ./arndale_envsetup.sh, relative commands worked finally.
but i still did't figure out the reason between work or not work. >"<
The command
history
will list what your previous commands where.
This might give you a pointer what set the path in the way you needed it.
You could also try to see where you command is via
locate mksdboot
im following this guide to install OpenVPN on my FreeNAS system.
http://joepaetzel.wordpress.com/2013/09/22/openvpn-on-freenas-9-1/
I have ran in to the issues detailed below when trying to create the CA.cert.
[root#freenas] /mnt/NAS/openvpn# chmod -R 755 easy-rsa/2.0/*
[root#freenas] /mnt/NAS/openvpn# cd easy-rsa/2.0
[root#freenas] /mnt/NAS/openvpn/easy-rsa/2.0# sh
#./clean-all
Please source the vars script first (i.e. "source ./vars")
Make sure you have edited it to reflect your configuration.
# . ./vars
NOTE: If you run ./clean-all, I will be doing a rm -rf on /mnt/NAS/openvpn/easyrsa/2.0/keys
# ./build-ca
Please edit the vars script to reflect your configuration,
then source it with "source ./vars".
Next, to start with a fresh PKI configuration and to delete any
previous certificates and keys, run "./clean-all".
Finally, you can run this tool (pkitool) to build certificates/keys.
I have tried creating the keys directory manually as i have read this has worked for others but still no luck. Being new to BSD I've hit a road block and looking for some advice.
Any ideas?
cheers guys
UPDATE:
When trying to source ./vars i get the following output
[root#freenas] /mnt/NAS/openvpn/easy-rsa/2.0# source ./vars
export: Command not found.
export: Command not found.
export: Command not found.
export: Command not found.
EASY_RSA: Undefined variable.
export: Command not found.
EASY_RSA: Undefined variable.
FreeNAS's default shell is not sh, and therefore doesn't support the 'export' command. The ./vars script needs the export command to set environment variables it then needs.
So before you call ./vars (don't call source) call:
sh
This is clearly stated in the site: http://joepaetzel.wordpress.com/2013/09/22/openvpn-on-freenas-9-1/
Not sure about the original issue, i think nrathaus has covered that well.
demonLaMagra - If you want to check if openvpn in running use this command:
service openvpn status
Sorry I couldn't comment on the last answer because of being a new new user, otherwise I would have.