Posted by admin on September 8, 2009 – 5:25 pm
Filed under WEB-DEV-LOG
Tagged as
time out problems kept brining down the site. Playing with settings fixed it.
/usr/local/etc/php-fpm.conf
<value name=”max_requests”>0</value>
fixed it but now memory leaks are a problem
<value name=”max_requests”>1000</value>
seems to work now to see for how long.
Posted by admin on September 8, 2009 – 4:23 pm
Filed under nginx
Tagged as
Rewrite rules
location /blog {
if (!-e $request_filename) {
rewrite ^/blog/(.*)$ /blog/index.php?q=$1 last;
}
}
location / {
error_page 404 = //blog/index.php?q=$uri;
}
Posted by admin on September 8, 2009 – 4:12 pm
Filed under BSD, phpBB, server side
Tagged as
Posted by admin on September 8, 2009 – 3:29 pm
Filed under WEB-DEV-LOG
Tagged as
Posted by admin on September 8, 2009 – 3:25 pm
Filed under WEB-DEV-LOG
Tagged as
Purchase NameFREEBSD/CELERON-D-01-HTN (fb7199103.aspadmin.net-71.6.199.103)
Purchase Date2009 May 21
Monthly: $50
Setup: $0
Posted by admin on September 8, 2009 – 2:31 pm
Filed under BSD
Tagged as
Error after update
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/20060613/mcrypt.so’ – Shared object “libltdl.so.4″ not found, required by “mcrypt.so” in Unknown on line 0
/usr/local/lib/libltdl.so.7
/usr/local/lib/libltdl.so
make a sym link from libltdl.so.4 –> libltdl.so
libltdl.so is a link to libltdl.so.7
ln -s /usr/local/lib/libltdl.so /usr/local/lib/libltdl.so.4
Starting php_fpm.
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/20060613/wddx.so’ – /usr/local/lib/php/20060613/wddx.so: Undefined symbol "ps_globals" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/20060613/sqlite.so’ – Cannot open "/usr/local/lib/php/20060613/sqlite.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/20060613/mcrypt.so’ – Shared object "libltdl.so.4" not found, required by "mcrypt.so" in Unknown on line 0
The following line has been added to your /usr/local/etc/php/extensions.ini
configuration file to automatically load the installed extension:
extension=sqlite.so
php5-mcrypt-5.2.10
php5-wddx-5.2.10
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/20060613/mcrypt.so’ – Shared object "libltdl.so.4" not found, required by "mcrypt.so" in Unknown on line 0
/usr/local/lib/libltdl.so.7
/usr/local/lib/libltdl.so
Posted by admin on September 8, 2009 – 6:46 am
Filed under WEB-DEV-LOG
Tagged as
While building Apache port I was presented with a menu from which I selected certain build options. However, certain option giving out error as follows:
===> apache-2.2.8 mod_mem_cache requires WITH_THREADS.
*** Error code 1
All I wanted to do is disable mod_mem_cache and build Apache again. Unfortunately, it is not allowing me to clear out configuration option. How do I remove all selected options and allow me to start over again?
There are many ways to clear out configuration options under FreeBSD. make command offers various options to revisit CONFIG menu to add, remove, or change options after a port has been built.
make rmconfig option
The simplest one is type command make rmconfig. First login as root; go into the directory containing the port and type:
# cd /usr/ports/www/apache22
# make rmconfig
Output:
===> Removing user-configured options for apache-2.2.8
Use ‘make config’ to modify settings
Another option is type make config.
# make config
# make install clean
To display OPTIONS config for port, enter:
# make showconfig
See the man page ports for more information:
$ man ports
FROM HERE
Posted by admin on September 8, 2009 – 5:05 am
Filed under BSD
Tagged as
Example:
Server’s primary IP: 192.168.1.5
Additional IP’s to add: 192.168.1.10, 192.168.1.15, and 192.168.1.20
Boot-time configuration:
Add it to /etc/rc.conf first (so you don’t forget). In this example, we have a Realtek card called rl0:
ifconfig_rl0=”inet 192.168.1.5 netmask 255.255.255.0″
ifconfig_rl0_alias0=”inet 192.168.1.10 netmask 255.255.255.0″
ifconfig_rl0_alias1=”inet 192.168.1.15 netmask 255.255.255.0″
ifconfig_rl0_alias2=”inet 192.168.1.20 netmask 255.255.255.0″
UBER-IMPORTANT NOTE: Start with the number 0 (zero) any time that you make IP alias configurations in /etc/rc.conf.
This is BAD form:
ifconfig_rl0=”inet 192.168.1.5 netmask 255.255.255.0″
ifconfig_rl0_alias1=”inet 192.168.1.10 netmask 255.255.255.0″
ifconfig_rl0_alias2=”inet 192.168.1.15 netmask 255.255.255.0″
ifconfig_rl0_alias3=”inet 192.168.1.20 netmask 255.255.255.0″
If you do it the wrong way (which means starting alias with anything but alias0), only the primary comes up. Keep that in mind.
Bringing up the new IP’s:
You can do things the extraordinarily dangerous way:
# /etc/rc.network restart
Or, you can follow the recommended steps:
# ifconfig rl0 alias 192.168.1.10 netmask 255.255.255.0
# ifconfig rl0 alias 192.168.1.15 netmask 255.255.255.0
# ifconfig rl0 alias 192.168.1.20 netmask 255.255.255.0
Test your work:
Any good system administrator knows to test things once their configured. Make sure to ping your new IP’s from a source on your network and outside your network (if possible/applicable).
Posted by admin on September 8, 2009 – 3:36 am
Filed under WEB-DEV-LOG
Tagged as
Often times systems slow down because different users are running various processes which take up much of the CPU power. To find which user is consuming the most processing power on a linux system, run the command:
“tempvar=`ps ancux | grep -v “0.0 0.0″ | sort -r -k 3 | head -2 | tail -1 | sed s/\ \ //g | cut -d ‘ ‘ -f 2`; echo “UID:$tempvar”; grep -E “\:$tempvar\:.*:” /etc/passwd”
Without the parenthesis, the above command will grep (filter) the processes of a ps process report, remove the processes using 0.0 (nothing or next to nothing) of the cpu, and sort the remaining list into order from highest to lowest. It will then use head -2 to grab the first line, tail -1 to filter the contents that is not necessary to be displayed, sed to remove the excess spacing, and cut to grab the UID which is then searched for as a temporary variable within /etc/passwd.
The output of this command with be the user ID of the highest processor consuming user at that point in time on the server.