Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

May 122009
 

Set default charset in Apache

Answer:

E.g. set the default charset to UTF-8

Add the following lines to the Apache configuration (httpd.conf)

AddDefaultCharset utf-8

Restart Apache to take effect

apachectl -k graceful

Apr 022009
 

How to enable / disable service during startup in Fedora?

Answer:

Firstly, check if the service can be managed by chkconfig, e.g. Apache httpd

# chkconfig --list httpd

httpd           0:off   1:off   2:off   3:on    4:on    5:on    6:off

To disable the service during normal startup, use

# chkconfig httpd off

To re-enable it, use

# chkconfig httpd on --level 3,4,5

Mar 142009
 

Install APC for PHP on Ubuntu

Answer:

APC is a very fast byte-code caching module for PHP. (It will become part of PHP6 in the future). By installing it, the performance of your PHP codes can be speed up by 200-300%.

To install it under Ubuntu,

# sudo apt-get install php-apc

Then restart Apache,

# sudo /etc/init.d/apache2 restart

See also: Compile/Install APC on RedHat/CentOS/Fedora Linux