sudo apt-get install ssh
apt-get install lighttpd
apt-cache search ftp-server
apt-get install vsftpd
nano /etc/vsftpd.conf
- anonymous_enable = NO
- local_enable=YES
- write_enable=YES
service vsftpd restart
apt-get install chkconfig
chkconfig vsftpd on
apt-get install php5-cgi
in /etc/lighttpd/lighttpd.conf:
server.modules = … "mod_fastcgi",
und am ende der Datei
fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/tmp/php.sock" )))
(s. http://www.df.eu/de/service/df-faq/cloudserver/anleitungen/lighttpd-und-php-installieren-debian-ubuntu/ )
service lighttpd restart
echo "<?php phpinfo(); ?>" > /var/www/test.php
apt-get install python
Python Socket Server
import socket
import logging
print "Hello, World!"
s = socket.socket()
print "sochet %s", s
host = socket.gethostname()
port = 1234
s.bind((host, port))
s.listen(5)
while True:
c, addr = s.accept()
print 'Got connection from', addr
c.send('Thank you for connecting')
c.close()
Python socket Client
import socket
s = socket.socket()
host = socket.gethostname()
port = 1234
s.connect((host, port))
print s.recv(1024)
Keine Kommentare:
Kommentar veröffentlichen