zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Nginx and Apache2

January 18, 2011 by Igor Drobot Leave a Comment

I decided to put a nginX (pronounced as ‘Engine X’) as my primary webserver to reduce the server load and improve performance.

Nginx can only handle static content (CSS, simple HTML, and static files) l have to proxy incoming dynamic requests to another server, in my case Apache2 with PHP5 as suExec/ Fcgid.

[Read more…]

Filed Under: Debian, Linux Tagged With: apache2, load, Nginx, Performance, Proxy

HDD temperature

January 13, 2011 by Igor Drobot Leave a Comment

Important hardware monitoring – check HDD temperature:

Install (Debian /Ubuntu way):

1
aptitude install hddtemp

aptitude install hddtemp

Check it:

1
2
3
4
hddtemp /dev/sda1
# Output:
# /dev/sda1: ST31500341AS: 42°C
# /dev/sdb1: ST31500341AS: 38°C

hddtemp /dev/sda1 # Output: # /dev/sda1: ST31500341AS: 42°C # /dev/sdb1: ST31500341AS: 38°C

1
2
3
hddtemp -n /dev/sda1
Output:
# 42

hddtemp -n /dev/sda1 Output: # 42

Filed Under: Bash, Linux, Monitoring Tagged With: hddtemp, Monitoring

Simple Python HTTP-Server

January 13, 2011 by Igor Drobot Leave a Comment


Sometimes I have to share some files over HTTP and I have no time to install apache or lighty. Everyone who has python can use SimpleHTTPServer module which can be started from command line.
Every request to your files will be logged to the terminal.

Start web server in some directory which should be shared:

1
2
[root@hexa-core webserver]# python -m SimpleHTTPServer 88
Serving HTTP on 0.0.0.0 port 88 ...

[root@hexa-core webserver]# python -m SimpleHTTPServer 88 Serving HTTP on 0.0.0.0 port 88 ...

You can change the port!

Logs:

1
pD4B88C85.dip.t-dialin.net - - [13/Jan/2011 21:57:01] "GET / HTTP/1.1" 200

pD4B88C85.dip.t-dialin.net - - [13/Jan/2011 21:57:01] "GET / HTTP/1.1" 200

Filed Under: Bash, Linux Tagged With: Python Webserver, SimpleHTTPServer

Show MySQL restore progress

January 13, 2011 by Igor Drobot Leave a Comment

Sometimes if I work with really huge MySQL databases, I miss the progress bar of the restore progress.
I found a little solution to see the progress Bar

Description:
pv allows a user to see the progress of data through a pipeline, by giving information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA.

1
2
pv database.sql | mysql -D databasename -pyourpassword
948.4MB 0:00:03 [22.7MB/s] [=====>               ] 21% ETA 0:00:11

pv database.sql | mysql -D databasename -pyourpassword 948.4MB 0:00:03 [22.7MB/s] [=====> ] 21% ETA 0:00:11

Filed Under: Linux, MySQL Tagged With: database restore, MySQL

Accessing data on guest lvm

January 10, 2011 by Igor Drobot Leave a Comment

for my KVM guests I use only LVM disks, I find it easy to use and administer.
Every time you running out of space you can resize your lvn volume.
Bus some days ago I moved some virtual servers to another physical Dom0(Host) and was a little bit confused – how to move lvm – DD was not the best idea.

There is always another way, here is my:
Very important! Shut-down virtual machine.
[Read more…]

Filed Under: Debian, Linux Tagged With: Filesystem, LVM, restore data

  • « Previous Page
  • 1
  • …
  • 43
  • 44
  • 45
  • 46
  • 47
  • …
  • 62
  • Next Page »
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok