Friday, December 23, 2011

Apache qos module in Ubutu Linux machine

To install qos module in the apache server, at first you need to down load the qos module from sourceforge.net. The latest version of qos is available in this link: http://sourceforge.net/projects/mod-qos/files/latest/download?source=files

To install that the following should write:
cd /tmp/
wget http://sourceforge.net/projects/mod-qos/files/latest/download?source=files


The file will be downloaded in the tmp folder. The file name would be download?source=files. you should unzip the files.

tar xvfz download?source=files




After this command, new folder will be created. The folder name is mod_qos-9.76. The folder name would be changed with the change of the qos module version.

A tool for building and installing extension modules for the Apache HyperText Transfer Protocol (HTTP) server.

Now we need apxs which a tool for building and installing extension modules for the Apache HyperText Transfer Protocol (HTTP) server. For apxs, we need to install the appropriate dev package and gcc of course, ie:
sudo apt-get install apache2-threaded-dev gcc



We need to change the directory for that

cd mod_qos-9.76/apache2/




To install the qos module , the following command is useful:
sudo apxs2 -i -c mod_qos.c



If everything works fine then you can this in the below:

If everything worked fine you'll get something like this:
----------------------------------------------------------------------
Libraries have been installed in:
/usr/lib/apache2/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 644 /usr/lib/apache2/modules/mod_qos.so



Now qos module is installed in the apache. We need to add two files called qos.load and qos.conf in the /etc/apache2/mods-available/ folder. For that:
cd /etc/apache2/mods-available/
sudo gedit qos.load



Add the command in the textpad and save before close that.
LoadModule qos_module /usr/lib/apache2/modules/mod_qos.so





Next command will be :
sudo gedit qos.conf




In the text pad you should add the texts and save that before close.


## QoS Settings
<IfModule mod_qos.c>
# handles connections from up to 100000 different IPs
QS_ClientEntries 100000
# will allow only 50 connections per IP
QS_SrvMaxConnPerIP 50
# maximum number of active TCP connections is limited to 256
MaxClients 256
# disables keep-alive when 70% of the TCP connections are occupied:
QS_SrvMaxConnClose 180
# minimum request/response speed (deny slow clients blocking the server, ie. slowloris keeping connections open without requesting anything):
QS_SrvMinDataRate 150 1200
# and limit request header and body (carefull, that limits uploads and post requests too):
# LimitRequestFields 30
# QS_LimitRequestBody 102400
</IfModule>



Now you need to enable the module and restart apache:

sudo a2enmod qos
sudo /etc/init.d/apache2 restart




All the things are done. If you want to check the server status just write the following in the web browser address bar:
http://localhost/server-status



If you use real ip, then use your IP-address instead of localhost.

After this command the browser will show like this
Apache Server Status for localhost
Server Version: Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.7 with Suhosin-Patch mod_qos/9.76
Server Built: Nov 3 2011 02:35:16

Current Time: Friday, 23-Dec-2011 08:59:22 EST
Restart Time: Friday, 23-Dec-2011 08:25:51 EST
Parent Server Generation: 0
Server uptime: 33 minutes 30 seconds
Total accesses: 4 - Total Traffic: 1 kB
CPU Usage: u0 s0 cu0 cs0
.00199 requests/sec - 0 B/second - 256 B/request
1 requests currently being processed, 5 idle workers
W_____..........................................................
................................................................
................................................................
................................................................

Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request
0-0 5118 0/0/0 W 0.00 0 0 0.0 0.00 0.00 127.0.0.1 localhost.localdomain GET /server-status HTTP/1.1
1-0 5119 0/4/4 _ 0.00 1932 0 0.0 0.00 0.00 127.0.0.1 localhost.localdomain NULL

Srv Child Server number - generation
PID OS process ID
Acc Number of accesses this connection / this child / this slot
M Mode of operation
CPU CPU usage, number of seconds
SS Seconds since beginning of most recent request
Req Milliseconds required to process most recent request
Conn Kilobytes transferred this connection
Child Megabytes transferred this child
Slot Total megabytes transferred this slot

mod_qos 9.76

localhost.localdomain:0 (base)
connections
free ip entries 255
current connections 1
connection settings
max connections -
max connections with keep-alive 180
max connections per client ip 50
min. data rate (bytes/sec) (min/max/current) 150/1200/154


localhost.localdomain:80 (virtual)
uses base server settings



Apache/2.2.16 (Ubuntu) Server at localhost Port 80




If all the things are okay, then you are done the qos module setup.

Wednesday, October 5, 2011

Unijoy in Ubuntu 10+

১। আপনি Synaptic Package Manager এ Quick Filter বক্সে scim লিখুন। নিচের চিত্রের মত দেখতে পাবেন--



এর পর লিস্ট থেকে নিচের প্যাকেজগুলো Mark করুন ইনস্টল করার জন্যঃ

scim
scim-bridge-agen
scim-bridge-client-qt4
scim-bridge-client-gtk
scim-dev-doc
libscim-dev
scim-gtk2-immodule
scim-m17n
scim-modules-socket
libscim8c2a
im-switch


২। এবার System > Preferences > SCIM input method setup এ ক্লিক করুন। এতে নিচের উইন্ডোটি আসবে যেখানে আপনি প্রথমে FrontEnd -> Global Setup মেনুতে ক্লিক করবেন।

৩। Hotkey হিসেবে Control + space কী Trigger হিসেবে বেছে নিনঃ

৪। এরপর IMEngine -> Global Setup সিলেক্ট করে বাংলা ইনপুট method হিসেবে bn-unijoy এ টিক দিয়ে Enable করুন এবং সেইসাথে SCIM Reload করুন।



৫। সবশেষে টার্মিনাল থেকে im-switch লিখুন, এবং সেখান থেকে Default কিবোর্ড ইনপুট মেথড হিসেবে scim সিলেক্ট করুন এইভাবেঃ


৬। তারপর PC রিস্টার্ট করুন।

৭। পিসি অন করে বাংলা লেখতে হলে controll+ space চাপুন। যে কোন টেক্স এডিটরে আপনি বাংলা লেখতে পারছেন

Monday, July 18, 2011

Webalizer - Apache web server log file analysis Tool

The Webalizer is a fast, free web server log file analysis program. It produces highly detailed, easily configurable usage reports in HTML format, for viewing with a standard web browser.

Install webalizer in ubuntu

sudo apt-get install webalizer
This will complete the installation.

Configuring Webalizer

Enable the apache2 hostname resolution for this you need to edit /etc/apache2/apache2.conf file and

sudo vi /etc/apache2/apache2.conf

HostnameLookups Off

into

HostnameLookups On

By default the package will install a daily cron job which will cause the system to process the logfiles once a day, it will always run after the default Apache logfile rotation, which means that instead of examining the logfile /var/log/apache2/access.log it will use the previous one /var/log/apache2/access.log.1

If you want to change to current apache log file you need to edit /etc/webalizer/webalizer.conf

sudo vi /etc/webalizer/webalizer.conf

change the following parameters

LogFile /var/log/apache2/access.log.1

to

LogFile /var/log/apache2/access.log

OutputDir /home/www/webalizer

Incremental yes

PageType htm*

PageType cgi

PageType php

HideURL *.gif

HideURL *.GIF

HideURL *.jpg

HideURL *.JPG

HideURL *.ra

IgnoreURL /taskbar*

Each parameter in Detail

LogFile /var/log/apache2/access.log

The option LogFile specifies the logfile to use with Webalizer. The default log file is supposed to be the access_log of Apache Web Server, but you can specifies a different one, like the one Squid Proxy Server makes named access.log if you use it in httpd-accelerator mode.

OutputDir /home/www/webalizer

The option OutputDir specifies the location of the output directory to use for the reports of Webalizer. All present and future report files generated by the Webalizer program will be hosted in this directory. It is recommended that you create this directory where your Apache web site resides.

Incremental yes

The option Incremental if set to Yes tells the program only to process partial logs file, and allows you to rotate your log files as much as you want without the loss of access information. It’s recommended to set this option to Yes.

PageType htm* cgi php

The option PageType specifies what file extensions you want Webalizer to consider as a page to count. Each added file extensions must be specified on its own line as shown in the Webalizer configuration file above.

HideURL *.gif *.GIF *.jpg *.JPG *.ra

The option HideURL specifies what kind of items such as graphic files, audio files or other non-html files to hide from the reports page. Each added item must be specified on its own line as shown in the Webalizer configuration file above.

IgnoreURL /taskbar*

The option IgnoreURL specifies URLs to be completely ignored from the generated statistics reports. This option can be used to ignore directories that are not important in our statistics reports. It’s also useful when you want to manage and class which URLs should be monitored and which should be ignored.

After configuring all the required options .Now you need to restart the Apache2 server using

sudo /etc/init.d/apache2 restart

Running Webalizer manually first time

Now it’s time to run the program to generate reports, html and graphics in the default Webalizer directory so that we can see them in our web browser interface. This step is required just the first time you install and use Webalizer, since it’s preferable to use a cron job to automate this task in the future. To run Webalizer manually, to generate reports, use the following command

webalizer

At this stage, we should verify that Webalizer is working on the system. To do that, point your web browser to the following address:

http://my-web-server/webalizer/. The my-web-server is the address where your Apache web server lives, and usage is the directory that host all the Webalizer reports files.

This works well for single sites, but if you have a group of websites all on the same machine you might need to make some changes.

The way that you handle multiple websites on one host is to place all the files beneath a common directory /home/www, such as:

/home/www/

www.domain1.com/logs/ and www.domain1.com/stats

www.domain2.com/logs and www.domain2.com/stats

Here we have two sites www.domain1.com, and www.domain2.com, each has its own logs,stats/ subdirectory where Apache places the logfiles and stat files.

To handle this simply you merely copy the default webalizer.conf file from /etc into each of the log directories:

cp /etc/webalizer.conf /home/www.domain1.com/logs

cp /etc/webalizer.conf /home/www.domain2.com/logs

Now if you make the changes to the configuration file so that each one has:

Logfile access.log

OutputDir ../stats/

You can update the stats by running

cd /home/www/www.domain1.com/logs

webalizer -q

cd /home/www/www.domain2.com/logs

webalizer -q

(The -q flag merely makes the program run quietly).

These two commands can be placed inside a shell script and invoked automatically be a cron job belonging to a user who can write to the stats directory - and you can remove the default job by running

rm /etc/cron.daily/webalizer


link: http://www.ubuntugeek.com/webalizer-apache-web-server-log-file-analysis-tool.html

Friday, June 17, 2011

Apache mod_cache (Ubuntu 10+)

You need to edit the /etc/apache2/mods-available/disk_cache.conf the command will be ---

gedit /etc/apache2/mods-available/disk_cache.conf


Make sure you uncomment the CacheEnable disk / line, so that the minimal configuration looks as follows:
 CacheRoot /var/cache/apache2/mod_disk_cache

# If you enable disk caching, you need to use htcacheclean from the
# apache2-utils package to ensure that the cache does not grow indefinitely.
# See the htcacheclean man page for details.

# There is currently no mechanism in the Debian package to start htcacheclean
# automatically, but it is planned to add such a mechanism in the future.

CacheEnable disk /

CacheDirLevels 5
CacheDirLength 3
</IfModule>

Now we can enable mod_cache and mod_disk_cache:
sudo a2enmod cache
sudo a2enmod disk_cache

To make sure that our cache directory /var/cache/apache2/mod_disk_cache doesn't fill up over time, we have to clean it with the htcacheclean command. That command is part of the apache2-utils package which we install as follows:
sudo apt-get install apache2-utils 

Afterwards, we can start htcacheclean as a daemon like this:

htcacheclean -d30 -n -t -p /var/cache/apache2/mod_disk_cache -l 100M -i

This will clean our cache directory every 30 minutes and make sure that it will not get bigger than 100MB. To learn more about htcacheclean, take a look at
man htcacheclean

Of course, you don't want to start htcacheclean manually each time you reboot the server - therefore we edit /etc/rc.local...
gedit /etc/rc.local

... and add the following line to it, right before the exit 0 line:
[...]
/usr/sbin/htcacheclean -d30 -n -t -p /var/cache/apache2/mod_disk_cache -l 100M -i
[...]

This will start htcacheclean automatically each time you start the server.

Thursday, June 16, 2011

Apache proxy server setup(Ubuntu 10+)

In your apache2 server you have the folder /etc/apache2/sites-available

To edit the default file you should change the file permission
The code will be
sudo chmod 777 /etc/apache2/sites-available/default



You need to add these two lines in the default file and the line should not be in the outside of
<VirtualHost>................</VirtualHost>


ProxyPass        /path  http://www.google.com/
ProxyPassReverse /path http://www.google.com/


after that you should do enable the proxy and proxy_http. The command will be like that

sudo a2enmod proxy
sudo a2enmod proxy_http


Atlast, you should reload the apache server

 sudo /etc/init.d/apache2 reload


The paste the url in the browser :

localhost/path


It will redirect you in google.com site

Tuesday, May 17, 2011

LAMP server in ubuntu 11.04/10.10

For lamp server the code will be

sudo apt-get install lamp-server^


Open your browser and type the following:

http://localhost/




and for the phpmyadmin

sudo apt-get install phpmyadmin


To access MySQL, you can use the following URL:

http://localhost/phpmyadmin

Thursday, May 5, 2011

unijoy in ubuntu

sudo apt-get install ibus-m17n

Friday, April 15, 2011

15 April 2011 3rd thesis meeting

Present:
1) Konrad Tolmar
2)Fredrik Kilander
3) kamal


I need to submit 10 pages report in the next meeting. That will contain :
i) Title--- Measuring impact of QoS on QoE in the mobile application.
ii) Abstract(Draft)
iii)Outline of method
iv) Approach
v) Short summary
What have I done with related work?

I need to improve the collection of related papers. It might be 3 or 2 times than present. So it would be 30.


My main focus will be --
What kind of quality?
How QoS service related with QoE?

My output from the thesis would be

--- Study & report
---Experimental toolkit.

The experience toolkit may inherit from me and use in other research.




I need to setup a server with QoS service. After that I need to setup two server then I need to test how the quality of Experience in the mobile. By changing the parameter of the QoS I need to measure the QoE.

I need also find out how they are related? What are the parameter of the QoS and QoE?


The parameter of QoS:

Jitter, encoding technique, bandwidth, latency

I have to find out more.








Kth theses are available in http://kth.diva-portal.org/smash/search.jsf?rvn=1

The outline of the thesis writing suggested by Fedrick

Abstract
Introduction
Method
Literature Review
Experiment & design
----What do I want to achieve?
--- What can I achieve?



Fedrick also suggested me that I have to search paper for literature review. In that I have to collect all common things in a paper. I might have some thing which are interly related

common thing need to put in a group then I can understand how they are related. I can also check authors other paper, citsheers, Kth library

That's it.
Have a fun.............