not systemctl, I want service command with enable option 🥲
I search about this, but not found yet
Related
I'm just now setting up MobaXTerm on my local computer and I'm looking to see what is the best way to port over all my environment variables I have on my windows host over to MobaXTerm. The whole goal of this exercise is that I plan to not use command prompt/git bash but instead just use MobaXterm.
For example, if I go to my Command Prompt and type in 'python', I can type Python code in the command line. Now when I do this in MobaXTerm, it says that I don't have it installed. This extends to more applications so I would rather not try and manually install git,python, etc. in my MobaXTerm manually.
I've extracted a list of all environment variables on my Windows host by typing in 'set > paths.txt' in the command prompt, but I want my MobaXTerm command line to reference these when I am using the terminal there. What is the best way to do this? Is it setting it up in a .csrhc?
Edit: I tried changing the settings in MobaXterm to use the Windows PATH environment, and even when I restarted my computer I still haven't gotten it to work
In the "Terminal tab settings" section, so you will find this option in the "Terminal" tab.
Go to MobaXterm global settings window, then click on the "Terminal" tab and check the "Use Windows PATH environment". Note that if you are using a session, you will have to do the same in this session: edit your session, then go to the "Terminal settings" tab and check the "Use Windows PATH" option.
I had the same issues while trying to use git. It looks like MobaXterm keeps using his own executables located %USERPROFILE%\Documents\MobaXterm\slash\etc, and even recreates them when you delete them.
You can still force MobaXterm to use windows PATH configurated executables by launching cmd /c yourcommand, in my case cmd /c git push. It will run windows CMD command using your PATH environment variable.
You have to check "Use Windows PATH" on the "Terminal settings" of your MobaXterm session settings in order to works.
I'm trying to serve a stock jenkins installation (on Amazon Linux AMI) thru myjenkinsinstance:8080/jenkins (rather than myjenkinsinstance:8080), and then proxy this with e.g. Nginx (over HTTP).
This question has been 'answered' before, but the solution doesn't seem to be relevant anymore.
#admins I would prefer to comment on that thread (specifically this 'answer'), rather than opening a duplicate, but I am not allowed to, per my 'reputation' score (as my comment would not be a solution at all, but further request for help).
From the closest thing to an answer I've seen:
Go to Jenkins Home Directory ( I have mine in C:\Jenkins)
Edit jenkins.xml
Add this --prefix=/jenkins to the end of the argument as show below and restart the jenkins service ALL worked OK for me !
Example : <arguments>-Xrs-Xmx256mDhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080 --prefix=/jenkins</arguments>
Open Url http://localhost:8080/jenkins this should bring up the home page of jenkins
there is no 'jenkins.xml' in the $JENKINS_HOME directory, but there is a config.xml
there is no <arguments/> entry in the config.xml
there seems to be no other configuration for the initial installation
There's also a 'Jenkins Location > Jenkins URL' setting in the "Configure System" settings (myjenkinsinstance/configure), but modifying this seems to have no noticeable affect.
The end goal would be to automate this installation via e.g. CloudFormation (as part of the EC2's UserData).
Any suggestions would be greatly appreciated.
On your linux system, you need to find the jenkins default config file located at
/etc/default/jenkins
and then add the following arguments according to your requirements. This is a rough idea.
JENKINS_ARGS="--webroot=/var/cache/jenkins/war --prefix=/jenkins
--httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT"
This should work most likely. If it doesnt, pls update your answer with the current arguments present. This works fine for Debian/Ubuntu.
Also you are running jenkins on your windows machine or linux?
So my 'solution' was to use sed and insert some lines into /etc/nginx/nginx.conf and /etc/init.d/jenkins.
e.g.
sed -i '/^ location \/ {/aproxy_pass http://127.0.0.1:8080/;' /etc/nginx/nginx.conf
sed -i '/^PARAMS=/ s/"$/ --prefix=\/jenkins"/' /etc/init.d/jenkins
I highly doubt this is anything near a 'best practice', but it seems to work for now (what happens were I to update with yum... I'm not sure, but the plan is to back the instance with an Elastic Filesystem, which hopefully will allow us to consider the jenkins instance ephemeral, anyway).
I installed nginx with phusion using the passenger-install-nginx-module installer.
This worked. After installing and visiting my domain, I see the Welcome to nginx page.
However, the service nginx {start|stop|restart} commands don't work.
After a quick google search, I found this: https://askubuntu.com/questions/257108/trying-to-start-nginx-on-vps-i-get-nginx-unrecognized-service
which I executed and found that the script gets executed (e.g. prints Stopping nginx:, but it doesn't actually stop the server, because I can still see the webpage and no status is printed such as [ OK ].
How can I get the service commands for nginx to work.
When attempting to push to GitHub from RStudio, I get the following errors.
error: unable to read askpass response from 'rpostback-askpass'
fatal: could not read Username for 'https://github.com':
No such device or address
RStudio has my origin as
https://github.com/rmscriven/other.git
when it actually should be
https://github.com/rmscriven/saber.git
RStudio will not allow me to change the origin from the version control system. Here is what it shows:
Is it possible to change my GitHub origin url from RStudio?
Thanks to the pro tip provided by #krlmlr in the comments,
Use an empty target directory. Look for "clone URL" on your GitHub project page, perhaps choose the SSH variant.
I clicked "clone url" on GitHub once, nothing. Then again, nothing. And once again for good measure, nothing. So I went to the terminal, read the man git help file, and decided to change my password and reconfigure. These are the lines I ran, and it was successful.
git config --global user.name <myuser.name>
git config --global user.email <myuser.email>
git clone https://github.com/rmscriven/saber.git
git pull
Then I went to RStudio and it allowed me to clone my repository, and change the URL of my version control setting. Here's a colorful pic
New project -> Version Control -> Git -> Create Project
Next, magic happened, and I had a copy of my package which I very carefully removed to prepare to push the development tarball to GitHub. Rock on.
#krlmlr, I thank you for nudging me in the right direction. Now I feel like I'm actually doing it the right way. :)
And for fun, try saying 'rpostback-askpass' ten times fast.
I had the same problem and for me these two simple steps worked great:
Add the SSH key from RStudio to my github account.
Change the origin URL and use the -u flag for push/pull once (solution found here).
For 1., in RStudio go to Tools → Global Options... → Git/SVN → view public key, and copy the key. In your browser of choice, logged in on Github, click Edit Profile → SSH keys and paste the copied key here.
For 2., back in RStudio, click Tools → Shell… , then enter:
git remote add origin https://github.com/myname/test.git
git config remote.origin.url git#github.com:myname/test.git
git pull -u origin master
git push -u origin master
Of course, change "myname" to your username and "test.git" to the name of your project. (Or even "github.com" to the URL of your institute's github or similar.)
After doing this once, the Push/Pull buttons in RStudio should work and you don't need the shell anymore!
I've been running into this issue on multiple computers now, with a remote that doesn't support SSH and thus can't leverage password-less login.
The problem in this case is that by default, git ask for the password interactively, and RStudio can't display this graphically. The trick is to use git's credential storage system.
For instance on Mac OS X:
git config --global credential.helper osxkeychain
On Linux one could use the gnome-keyring integration.
I'm trying to install RabbitMQ management plugin but get the following in the console:
Error: {cannot_write_enabled_plugins_file,"/etc/rabbitmq/enabled_plugins",
eacces}
I use Ubuntu 12. On this page is told that The management plugin is included in the RabbitMQ distribution. To enable it, use rabbitmq-plugins:
rabbitmq-plugins enable rabbitmq_management
but the result you see above
sudo rabbitmq-plugins enable rabbitmq_management?
P.S.: looks like a question for https://serverfault.com/
If you have provided 777 permissions to the file and still you are not able to enable it, try changing umask to 0022 for user
sudo chfn -o umask=0022 <username>
worked for me!
chown rabbitmq.rabbitmq /etc/rabbitmq/*
Switch to rabbitmq user and then enable plugin like below:
$su - rabbitmq
$rabbitmq-plugins enable rabbitmq_management