debian

Why commands with ssh2_exec do not end?

雨燕双飞 提交于 2019-12-13 07:17:55
问题 I have a problem running a command on my server remotely with ssh2_exec. When I use wget or unzip, the command should execute but I get no result or only a few files. What I need to know is how I can be sure that my ssh2_exec script will execute fully before proceeding to the rest of my PHP code. $stream =ssh2_exec($connection, 'cd /home; wget http://domain.com/myfile.zip; unzip myfile.zip; rm myfile.zip'); Thanks in advance! EDIT : I have found script, how get result of commands ? <?php $ip

install node.js on debian

喜夏-厌秋 提交于 2019-12-13 04:42:09
问题 How to install node.js on Debian Wheezy Have followed instructions but it doesn't work https://github.com/joyent/node/wiki/Installation # wget http://nodejs.org/dist/v0.10.24/node-v0.10.24-linux-x64.tar.gz # tar -zxf node-v0.10.24-linux-x64.tar.gz && cd node-v0.10.24-linux-x64 # ./configure && make && make install The first two lines turn out well, but when running the third line this error is returned -bash: ./configure: No such file or directory node.js dir root@dyntest-amd-6000-8gb ~/node

Command works in interactive shell but not shell script

拈花ヽ惹草 提交于 2019-12-13 04:28:19
问题 I wrote a script that would generate the appropriate arguments to javac to compile my project in an effort to grow more proficient at shell scripting. The weird this is.. The script works perfectly, but if the script runs javac with those parameters it doesn't work, and if I run the exact same command in the interactive shell it does. Everything is outputted with absolute paths, so I'm pretty much at a loss here. Example directory structure: src/File.java src/File.png src/dir/File2.java jars

Reading specifed file line and creating new directories from words that have been taking of that file

时光怂恿深爱的人放手 提交于 2019-12-13 03:56:44
问题 for file in $* head -n 1 $file | while read folder do mkdir $directory $folder done Hello guys, I'm having problem with my script. What I want to do is: read first line from my specifed file and create new directories in my specifed directory from words that i have taken from that file. I'm getting errors like this: ./scriptas: line 2: syntax error near unexpected token `head' ./scriptas: line 2: `head -n 1 $file | while read folder' And my second question: how do I add a second variable from

IPTABLES error “iptables: No chain/target/match by that name”

一曲冷凌霜 提交于 2019-12-13 03:48:50
问题 iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080 When I try to run this command, I run into the error: iptables: No chain/target/match by that name My iptables version is v1.4.14. Running debain on linux kernel 3.8.11. iptables -L outputs: Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere ACCEPT icmp -- anywhere anywhere ACCEPT udp -- anywhere 224.0.0.251

Minimize window with python

久未见 提交于 2019-12-13 03:41:37
问题 Is is possible to minimize an active window using a python script? For example, I have open a Firefox browser and in a terminal window I run a python script that will minimize the browser for a few seconds. I need this for Debian. 回答1: Yes you can. Here is how I did it. SPECS: Raspberry pi 3, OS: Raspbian, Version: 9 (Stretch) Python 3.5.3, gi package version: 3.22, Wnck version: 3.20.1 You will need to use the Wnck module from gi.repository import gi gi.require_version('Wnck','3.0') from gi

Add Poppler to Path in Debian

℡╲_俬逩灬. 提交于 2019-12-13 02:39:25
问题 I have just installed poppler on my debian server using the command: sudo apt-get install poppler-utils However, when I execute the command: pdftocairo --help The function cannot be found, so I assume this program has not automatically linked into my PATH variable. My issue is that I am not very experienced with Linux and I don't know how to find out where poppler installed, nor how to create a link file to Poppler from an existing included PATH location. Any help would be appreciated,

How i say the interpreter version for wsgi apache

爷,独闯天下 提交于 2019-12-13 02:25:43
问题 In debian recently change de default version of python from 2.5 to 2.6 but i need 2.5, how i can configure apache and/or wsgi script to say it use pythons2.5 and not python default? 回答1: You must install mod_wsgi package binary compiled against Python 2.5, or compile mod_wsgi from source code yourself against the Python 2.5 version. See notes about --with-python option in: http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide#Configuring_The_Source_Code 回答2: You'll need to recompile

GitLab on Wheezy, error while installing Gems, libmysqlclient-dev probably missing but unistallable

一世执手 提交于 2019-12-13 01:27:12
问题 So, while I was installing GitLab following the official tutorial I got an error on the Gems installation. Gem files will remain installed in /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11 for inspection. Results logged to /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/ext/mysql2/gem_make.out An error occurred while installing mysql2 (0.3.11), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling. Looking online they

Command Line Calls in Adobe Flash

安稳与你 提交于 2019-12-13 01:25:09
问题 Is there a way to make a call to the command line, (On Debian) from ActionScript in Adobe Flash? For example, execute files: python update.py Steps for this on Windows would also be appreciated! 回答1: If you are using Adobe Air version 2.0.x on Linux, you can use the NativeProcess() class (assuming your update.py is flagged as executable (a+x): var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); var file:File = File.applicationDirectory.resolvePath("update