I do not understand the uses for the commands ssh or git-clone in the rhc tool. If I try to connect via ssh I have to use a client like PuTTY and if I like to clone a project I have to use the GitBash on Windows. My question is, when I use the commands above?
You can use those commands if you have an ssh client, or git client that is accessible via your command line in windows. So if you can open up your cmd prompt, and type "ssh" or "git" and it works, then you can use the rhc ssh, and rhc git-clone commands. Mostly they are useful for Unix, Linux, and OS X, but with some configuration you should be able to do it from windows also.
Related
I've trying to write a script to stop Apache and MySQL services in Bitnami WAMP. If we do manually, we have to open C:\WAMP\manager-windows.exe and stop the services like this:
However, when I go into command prompt and run the command "httpd -k start", the apache server starts running and I can access my web app but if I open manager-windows.exe again it doesn't reflect the change. I've been also trying to stop the Apache service using command prompt commands "httpd -k stop" but that is somehow conflicting with Apache web server when it is started through the manager-windows.exe.
Bitnami Engineer here,
You can use the servicerun.bat script we include in the installation directory to start/stop all the services at once.
servicerun.bat START
If you only want to start/stop Apache or MySQL using the command prompt, you can use the scripts we include at installdir/apache2/scripts/servicerun.bat or installdir/mysql/scripts/servicerun.bat
I have downloaded Genymotion and installed it with Oracle Virtualbox 5.0.10 on Windows 10/64bit.
I keep getting the errors:
Virtualization engine not found.
Cannot rename this connection. A connection with the name you specified already exists. Specify a different name.
I've tried uninstall/reinstall, deleted unused network adapters in device manager. I'm at loss.
Thank you all in advance for any help/idea.
You must go the VirtualMachine preferences under File in the menu. Then choose the Network setting, then Host-only Networks.
You can use the - button to delete all of the Ethernet Adapters that you have there.
Then create a new one and use the following settings:
IPv4 Address : 192.168.1.201
IPv4 network mask : 255.255.255.0
Then in the DHCP server tab:
Address: 192.168.1.100
mask: 255.255.255.0
Lower address: 192.168.1.101
Upper address : 192.168.1.199
Check to see which Ethernet adapter # you have now set up - this might be important later on.
Click OK for all the open boxes or save whatever you have.
Then try and run genyMotion again.
This worked for me.
There is one more thing you may have to do if this still doesnt work.
Go to Network and sharing centre . Change adapter settings and disable all the Ethernet connections EXCEPT for the Ethernet adapter you have just created.
I hope that helps
Daniel
For Ubuntu
Almost every GNU/Linux system comes with an installer package for Oracle VM VirtualBox.
Browse for the Oracle VM VirtualBox installer in your directories.
If you do not have the installer or if you need to install a specific version, download and install VirtualBox for Linux hosts from the Download VirtualBox page.
When installing VirtualBox, in the Custom setup window, make sure VirtualBox Networking is enabled.
Go to the Genymotion download page and download the Linux package corresponding to your system.
Run the following commands:
chmod +x <Genymotion installer path>/genymotion-<version>_<arch>.bin
cd <Genymotion installer path>
./genymotion-<version>_<arch>.bin -d <Genymotion installer path>
Run Genymotion using the following command:
cd <Genymotion installer path>
./genymotion
I am having issues with setting up Open shift and getting the following error after connecting to my server domain:
Command:
User$ rhc setup --server=app-domain.rhcloud.com
Result:
The server has rejected your connection attempt with an older SSL protocol.
Pass --ssl-version=sslv3 on the command line to connect to this server.
I am not sure what this is telling me to do. I tried using the instruction literally and it does not recognize the command.
Any ideas?
You should not pass rhc setup the --server flag unless you are running your own OpenShift Origin or OpenShift Enterprise broker. For OpenShift Online, just run the rhc setup command with no other options and it will setup fine. If that command messed up your express.conf file (which it should not have) you just need to delete your ~/.openshift/express.conf file then run rhc setup again without any flags. Basically you tried to point rhc to your gear as an OpenShift Online broker, which will not work.
I ended up answering this on another forum post:
The only way that this worked for me was to actually create a SSH key locally with ssh-keygen -p without rhc setup and "not" giving it a password. I then went back to OpenShift clicked add a key and pasted the contents of my rsa file.
There is obviously some kind of bug with authentication on Openshift or the installation is not right.
It would be good to find out what is going on and why does it work if I do it, this way.
I currently have an html file on a remote unix server that I ssh to. I have been using SFTP to constantly transfer it to my local machine to view it after my edits, but I am tired of this.
What is the best program/method for Mac users to have a browser window view of the html file that is stored in a remote unix server? Or is there an ssh client that can easily edit html files?
It is possible, but with some playing around on the server.
Once you have ssh'ed into the server, install a web server in that box.
Say the file is named index.html, you should make it available at the URL http://localhost:8000/index.htmlor port number can be anything.
The simplest method I can think of starting a web server at that location is
cd /directory/where/html/is/present
python -m SimpleHTTPServer 8000 # For python 2
python3 -m http.server 8000 # For python 3
This works provided python is installed on the server. It should not be that hard to install it as python is available from almost every package manager in every flavor of linux.
Now that html is available at python
http://localhost:8000/index.html
on that machine.
But we have not yet configured the browser in such way.
To do that you need to ssh into the server again, but with a -D option this time
ssh servername -D 7000
-D specifies application level tunneling when connecting via ssh
Then in Firefox, preferences/options -> Advanced -> Networks -> Connection Settings -> Choose Manual Proxy configuration
SOCKS HOST should be localhost , port no 7000.
Then the html should be directly available at
http://localhost:8000/index.html
in your Firefox browser.
This feature is only available in the Firefox browser.
You can mount the remote directory with sshfs which gives you easy access to all the files.
E.g.:
sshfs user#server:/directoryToMount /localDirectory
it's possible to use vagrant to setup a environment for php development with some tools like PHP_CodeSniffer, PHP Mess Detector, etc, and then use sublime text plugin sublime-phpcs in the host machine to use this tools from vagrant?
I wanted to avoid install all this tools in my Host machine(mac os) but still use the sublime text with the plugin to develop in the host machine.
Thanks!
Technically you could probably point the sublime-phpcs plugin to an executable bash script which could run PHP on the VM through SSH. Something like this lets you run your VM's PHP:
ssh -i '/path/to/vagrant.pem' vagrant#vmip php
Where vagrant.pem is the SSH key that comes with vagrant.
It would also need to convert the local file path into a path that the VM could actually reach locally as well - either that or perform a reverse SSH connection back to the host.
In the end it's probably going to be very complicated and you might just be better off installing PHP locally.