Showing posts with label to. Show all posts
Showing posts with label to. Show all posts

Saturday, 20 April 2013

Switching Apache MPM Prefork to Apache MPM Worker simply

The drawback to doing everything with processes is that Apache prefork can be a bit of a memory hog, especially under load. Another precompiled flavor of Apache can be installed as an alternative:Apache MPM worker. "Worker" differs from "prefork" in that worker's processes are multithreaded, giving them the ability to service more requests with fewer system resources. This can translate into faster pages served with less RAM and CPU. However, because some Apache modules don't necessarily work well when run under multithreaded Apache, you have to specifically select this version to install on Ubuntu and on other GNU/Linux distros with package management.
Apache comes by default as mpm-prefork.
But you will want to instead use mpm-worker, as it will use less memory and be more efficient.
To use the “worker” MPM with PHP, do the following:
Step 1. Stop the apache2 daemon
sudo /etc/init.d/apache2 stop
Step 2.  Uninstall apache2-mpm-prefork
sudo aptitude remove apache2-mpm-prefork
Step 3.  Install apache2-mpm-worker and apache2-threaded-dev
sudo aptitude install apache2-mpm-worker apache2-threaded-dev
Step 4. Enable CGI and mod_actions (may already be enabled)
sudo a2enmod cgid2sudo a2enmod actions
Step 5.  Create a file in /etc/apache2/conf.d with the following content (I called mine php5-cgi.conf):
<IfModule mod_actions.c>2 Action application/x-httpd-php /cgi-bin/php53</IfModule>
Step 6.  Start the apache2 daemon
sudo /etc/init.d/apache2 start

Another way is this way by PCJonathan











Thursday, 28 March 2013

How To Check Your Temperature Of Your Raspberry Pi in Raspbian

First Login into your pi via local terminal or remote ssh terminal.
Me I’m gonna use Putty to access my Pi.
image
Next you need to install BC which most linux editions have yet the Raspberry does not.
#sudo apt-get install bc
*TIP* – To stay as root without having to sudo everytime use the command

#sudo -i
image
This should show when it’s installed
image
Next we need to download the Temp Check Script. I keep a copy in the Windows Linux Commands Dropbox Folder under the Scripts folder, as these files work fine for me.
To do this we need to type the following:
#wget  https://www.dropbox.com/sh/f9udfyer4ktmjdg/pDocgOCmP5/Scripts/TempCheck.sh
This will download the file to your raspberry pi.
image
Once downloaded all we have to do is run it and it should show us the current temperature of your Raspberry Pi (R-Pi)
To run the script type the following command:
#sh TempCheck.sh
and you should get this the current temperature of your Raspberry Pi:
image
image
Thanks for reading please comment below if you don’t understand anything.