apache in docker to serve local website

2015-01-05 2 min read Fedora Vurtualization

I have some backup’s of website on my laptop, which I occasionally want to view. Now, I could have setup apache to serve them directly with VirtualHost or alias but wanted a better solution. So, docker comes to rescue.

First, I installed fedora-dockerfiles and then made some modifications, here they are :

sudo yum install fedora-dockerfiles

After this is done, go to /usr/share/fedora-dockerfiles/apache and make some modification to Dockerfile.  After the modifications, the file looks like this

Continue reading

Sandbox Firefox – First step to security

2014-03-19 2 min read Fedora Firefox

First we will setup cgroup to limit cpu and memory usage, so here we go:

Add the configuration in /etc/cgconfig.conf

#------start cgconfig----------------
#new group
group firefox {
    perm {
        task {
#user your login id and group here, so that you can control this group
        uid = amitag;
        gid = amitag;
        }
        admin {
# same as above, set to your login id and group.
           uid = amitag;
           gid = amitag;
        }
    }
# set the limits for cpu.. by default there are 1024 shares of cpu with no other groups,
# so share of 102 would be around 10% .
    cpu{
        cpu.shares="102";
    }
# limit the cpus to be used to only 0-1
    cpuset{
        cpuset.cpus=0-1;
        cpuset.mems=0;
    }
# limit the maximum memory to 700Mb.
    memory {
        memory.limit_in_bytes="700M";
        memory.max_usage_in_bytes="0";
    }
}
#------end cgconfig----------------

 

Continue reading

cgroups – use to control your cpu and memory

2014-01-06 2 min read Fedora Firefox Learning

cgroups is a kernel feature and with userspace utilities, we can use the feature to control the cpu and memory for per process. So, lets first install the required tools.

sudo yum install libcgroup-tools

Now, we need to enable the service.

sudo systemctl enable cgconfig.service
sudo systemctl enable cgred.service

cgconfig.service is to enable configuration for cgroups and
cgred.service is to enable configuration for cgroups for processes depending on the name.

Continue reading

Firefox troubleshooting

2013-03-11 1 min read Firefox

Here are few quick tips on getting to see what could be wrong with firefox.

Config entries – about:config

Support Information – about:support

Details on config entries – http://kb.mozillazine.org/About:config_entries

Reset firefox profile – https://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-most-problems

Firefox profiles – https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data

 

Continue reading

Taking screenshot in firefox.

2013-02-03 1 min read Firefox

Couple of days back, I was trying to take screenshot with Firefox. As usual I started out with searching for plugins which could take a screen shot for the whole page and not just the visible portion of the page. Installed couple of them, some did not work. Finally I found something called Development Bar.

So, here is a simple way to take a screenshot. Press “Shift+F12”. This will bring up a bar in the bottom of the firefox window. To take a screenshot, type:

Continue reading

lightweight pdf viewer – zathura.

2013-01-28 1 min read Fedora

Zathura is a lightweight viewer for pdf which works on plugins. Here is shor description :

Zathura is a highly configurable and functional PDF viewer based on the Poppler
rendering library and the GTK+ toolkit. The idea behind zathura is an
application that provides a minimalist and space saving interface as well as
an easy usage that mainly focuses on keyboard interaction.

But the viewer will not work unless you install the plugins to display the correct plugin. So, if you want to use it for any real purposes then you will have to install the appropriate plugin as well, so here is what you need to do:

Continue reading
Older posts