Vagrant installing Java6SDK from Oracle - vagrant

Just recently downloaded Oracle JavaSDK 6 (6u45).
Would want to know how to do a shell provision to install the .bin file provided by Oracle. I know there are better alternatives (online repository) but those consumes times and I'm limited to use JavaSDK 6 since the server I'm replicating requires me to use Java6.
Any hint how this can be done via shell provisioning?

Have a look at the installation instruction of Oracle. I would write shell script that follows this instruction. This shell script should be called by vagrant during the provision

Related

Command not found in bas

I'm so sorry because I know this is a dumb question, but I've been trying to figure this out for about 2 hours and I can't figure it out. I've created a bash file that uses some other programs (tcpdump, tshark). The bash runs as it should but on every line that I use tshark, tcpdump, etc. it says "command not found".
I'm using Cygwin on my Windows 7 VM. All of the files are in the same folder and I I've tried adding the locations of the other programs to the PATH variable. I tried commands such as export PATH=$PATH:filelocation but when I do $PATH those results aren't showing. How can I get these commands to be recognized?
Thank you.
current errors
Cygwin is not a Linux distro, therefore, you don't have all the functionality like you would if you had a Linux installation.
You could try one of the following.
1) Use Virtualbox to make a VM of some Linux distro and use bash there. You could use Ubuntu server, which has no GUI.
2) Use this site to find packages that will add functionality to Cygwin.
3)Upgrade to Windows 10 and have a native (sort of) bash to use.

Unable to create vagrant file (homestead.yaml) on windows

I'm gonna to use vagrant on my windows desktop to develop Laravel project. I have followed all the steps to do that. But it has been failed to create homestead.yaml using bash init.sh command.
Below is the error :
Fakhreddin#Lenovo-PC3 /cygdrive/d/laravel-vagrant/homestead
$ bash init.sh
cp: unwritable ‘/home/Fakhreddin/.homestead/Homestead.yaml’ (mode 0500, r-x------); try anyway?
I'm using Cygwin for simulating Unix terminal in the Windows.
(Copy of the comment I wrote above)
Never used Cygwin in my life, but what I would try is to run it as Administrator and re-try.
Otherwise, you may want to consider changing console client. For example, if you install Git, you should be able to use Unix commands via standard Windows console.
I would seriously point the fault at Cygwin, or its settings. I am a member of a team in which all of us run Homestead on Windows 7, with no problems at all. The difference is, we use native Windows command line.

Check if a python script is running on remote machine

I am running a python script on say machine A. Is there any way to know if the python script is running or not from another machine B from command line? I tried getting the process list from the task manager. But it does not show any information regarding this script though it is running( it only showed cmd through which the script is executing ).
This will be a three step process. Step 1 is only required because you are Windows. If you're Mac or Linux, they already come with Step 1 completed for you. Otherwise, this is completely cross-platform capable.
1) You need to remotely connect from Machine A to Machine B. One extremely popular way of doing this is SSH, which can be installed on Machine A and Machine B. The recommended way to do this is with FreeSSHd, which has been very well documented here: https://serverfault.com/questions/8411/what-is-a-good-ssh-server-to-use-on-windows
2) Install the paramiko SSH library for Python. This will allow you to connect to another machine, and execute any arbitrary command line command. On windows, you just need to install the binaries for paramiko and pycrypto/openssl. This also is well documented on SO here: installing paramiko on Windows
3) Decide how you want to harvest the process list. There are several ways which are well documented here: https://stackoverflow.com/questions/53489/how-do-you-list-all-processes-on-the-command-line-in-windows

How do I run a Ruby script remotely on Linux machine

I am connected to a Linux server from my Windows machine using putty. I need to create a ruby file and execute the same. Should I create the Ruby file on my machine or on Linux server? Please advise.
Best workflow in this case would be to write the rb script in whatever environment you want ... many people like developing locally on their own machine (which has advantages), and many prefer developing it remotely on another machine.
Basically write it the same way as you would write any ruby file on your favorite text editor using your favorite method.
Then you upload the rile to the remote machine -- you can use software like WinSCP and then run the script using ssh:
$ ssh (server address)
$ ruby (path to wherever you put the script)
It doesn't matter where you compose the script.
You can either compose it locally or remotely
When you're composing it localy you can do it with your well known GUI-Editor Tools like Notepad or so, but you'll have to upload the file to the server to use it there.
When you're composing it remotely you'll have to use CLI-Editors like nano or ViM for it, but you're able to run it instantly without uploading it
And you can run the script on the remote machine as usual
$ ruby path/to/you/script.rb
assuming ruby is already installed
If you want to execute the ruby file on server you have to create it on the server.

pdflib # aws ec2

Is it possible to install an .so extension for PHP 64 Bit in the "Amazon Cloud"? I cannot do so in the instance itself since we are using several instances which are randomly booted and shut down by Amazon.
I cannot find anything concerning this in the configuration console.
Would be glad if somebody had an answer.
Thank you and best regards
Yvon
Try to use the CloudInit packages for example in the recent Ubuntu AMIs. You basically specify a shell script, put it in the instance user-data and this script gets executed on instance startup. In this shell script, you can install your .so extension.

Resources