BlogEngine.NET is a .NET web app that can run on Windows (obviously) and Linux! and the app is maintained that way ensuring case sensitivity... sweeeeet!

You can use XML to store your data... which is very good and fast... and if you want to use mysql, or MSSQL, or SQLite or VistaDB... the choice is yours.... all are maintained to ensure stablity.

More...

Every new request to a web app will cause a Semaphore to be created... the problem is that it does not release the created semaphore. I have tried just about every combination of option suggested and none kills the semephore created.

 

This is how I resolved the issue.

More...

How to install vtiger on CentOS VPS

vTiger is an awsome CRM package that is free... The features are very useful for just about any sort of business. 

The features are toooo many to detail... so check them out here....

More...

OSSEC is an Open Source Host-based Intrusion Detection System. It performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.

These instructions will download the ossec archive, unzip it, install/update the app, and then remove the files...

More...

Installing MONO on CentOS with Plesk

These instructions are for a new installation and the result will be that you can run .NET web sites on your Linux BOX!

More...

Here are some pointers to make sure that your new VPS will be secure enough to not have heart failure every other day.

1. Disable root Logins

2. SSH Secure - Encrypt Data and use Private Key to Login

3. Install OSSEC

4. Install APF (Advance Policy Firewall)

More...

Here is a great way to keep your subversion up to date using Yum.

 

More...

Limit Plesk Memory Usage

Force Plesk to use less memory by adding an options file.

vi /usr/local/psa/admin/conf/httpsd.custom.include

Add the following lines to the file:

MinSpareServers 1
MaxSpareServers 1
StartServers 1
MaxClients 5

PHP install Xcache

go to directory

cd /usr/src

Ensure you have the packages to build from source:

yum install php-devel
yum groupinstall 'Development Tools'
yum groupinstall 'Development Libraries'

Download the latest:

wget http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.gz

UNzip:

tar xvfz xcache-1.3.0.tar.gz

Enter Directory:

cd xcache-1.3.0

This is a possible change you would need to make if the "make" command provides an error on "timelib_structs.h":

nano /usr/include/php/ext/date/lib/timelib_structs.h
change #include <timelib_config.h> to #include "timelib_config.h" (or
vice versa)
or #include "/usr/include/php/ext/date/lib/timelib_config.h"

phpize
./configure --enable-xcache
make
make install

cp xcache.ini /etc/php.d

nano cp xcache.ini /etc/php.d

[xcache-common]
zend_extension = /usr/lib64/php/modules/xcache.so

[xcache.admin]
xcache.admin.enable_auth = On
xcache.admin.user = "admin"
xcache.admin.pass = md5($your_password)


[xcache]
xcache.shm_scheme =        "mmap"
xcache.size  =               16M
; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count =                 4
; just a hash hints, you can always store count(items) > slots
xcache.slots =                8K
; ttl of the cache item, 0=forever
xcache.ttl   =                 0
; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval =           0

; same as aboves but for variable cache
xcache.var_size  =            16M
xcache.var_count =             4
xcache.var_slots =            8K
xcache.var_ttl   =             0
xcache.var_maxttl   =          0
xcache.var_gc_interval =     300

xcache.test =                Off
; N/A for /dev/zero
xcache.readonly_protection = On
xcache.mmap_path =    "/dev/zero"

xcache.coredump_directory =   ""

; per request settings
xcache.cacher =               On
xcache.stat   =               On
xcache.optimizer =           Off

[xcache.coverager]
; per request settings
; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)
xcache.coverager =          On

; ini only settings
; make sure it's readable (care open_basedir) by coverage viewer script
; requires xcache.coverager=On
xcache.coveragedump_directory = ""

make sure that the folder /tmp/xcache is writable by php

if you like copy the xcache admin folder to the domain that has PHP enabled

create a phptest file

echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php

cp -pR /var/opt/xcache-1.3.0/admin /var/www/vhosts/domain.com/subdomains/name/httpdocs

php -v

PHP 5.1.6 (cli) (built: Apr  7 2009 08:00:18)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with the ionCube PHP Loader v3.1.28, Copyright (c) 2002-2007, by ionCube Ltd., and
    with XCache v1.3.0, Copyright (c) 2005-2009, by mOo

References:

Apache Log viewing

 

tail -f /var/log/httpd/error_log

Resolutions:

  •  
    • [crit] (28)No space left on device: Failed to create mutex
      • ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'; /etc/init.d/httpd restart;ipcs -ls;
      • ipcs|grep apache|awk '{print $2}'|xargs -I {} ipcrm -s {}; /etc/init.d/httpd restart;ipcs -ls;

to see semaphore settings:

ipcs -ls

All four semaphore parameters can be changed in the proc file system without reboot:

echo 250 32000 250 128 > /proc/sys/kernel/sem

Alternatively, you can use sysctl(8) to change it:

sysctl -w kernel.sem="250 32000 250 128"

To make the change permanent, add or change the following line in the file /etc/sysctl.conf. This file is used during the boot process.

echo "kernel.sem=250 32000 250 128" >> /etc/sysctl.conf

to change user as root:  

su root

or

su

this will keep you in the same directory that you are in currently

to log in as root in root

su root -l

su -

to change the password of the user that you are currently using:

passwd

List the contents of a Directory :

ls -l

Copy Files:

cp -fRv <filename> <destination path>

Reference:

ss64

to Create an Archive:

tar -czvf <filename> <path to content>

Check who belongs to which groups

nano /etc/group

Check Service running

chconfig --list

Create md5 Hash for string:

echo -n "sourceforconversion" | md5sum

Find a process by name:

ps aux | grep <processname>

Check processes Running:

top -c

 

Kill a process by name:

killall <processname>

PLESK reconfigure your domain:

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<domain name>

Apache httpd.conf Settings

SettingExplanation
<Location /svn> means that the Subversion repositories are available from the URL http://MyServer/svn/
DAV svn tells Apache which module will be responsible to serve that URL - in this case the Subversion module.
SVNListParentPath on For Subversion version 1.3 and higher, this directive enables listing all the available repositories under SVNParentPath.
SVNParentPath D:\SVN tells Subversion to look for repositories below D:\SVN
SVNIndexXSLT "/svnindex.xsl" Used to make the browsing with a web browser prettier.
AuthType Basic is to activate basic authentication, i.e. Username/password
AuthName "Subversion repositories" is used as an information whenever an authentication dialog pops up to tell the user what the authentication is for
AuthUserFile passwd specifies which password file to use for authentication
AuthzSVNAccessFile Location of the Access file for paths inside a Subversion repository
Require valid-user specifies that only users who entered a correct username/password are allowed to access the URL

vhost.conf

 #svn.naughtystrawberry.com -- vhost.conf file
#using client certificate authentication
# <Directory "subversion host root path">
#    SSLRequire %{SSL_CLIENT_VERIFY} eq "SUCCESS"
#  </Directory>
#This is already in Httpd
#LoadModule dav_module modules/mod_dav.so
 
LoadModule dav_svn_module modules/mod_dav_svn.so
 
LoadModule authz_svn_module modules/mod_authz_svn.so lt;Location />
  DAV svn
  SVNListParentPath on
  SVNParentPath /var/www/subversion
  
  # to force SSL Access only
  #SSLRequireSSL
 
 
 # SVNIndexXSLT "/repos-web/view/repos.xsl"
SVNPath /var/www/subversion/repository/
AuthType Basic
 
AuthName " naughtystrawberry Subversion Repository"
 
AuthUserFile /etc/svn-auth-file
Require valid-user
#for read only to everyone but write access to specific
#<LimitExcept GET PROPFIND OPTIONS REPORT>
#Require valid-user
#</LimitExcept>
</Location>

Next we have to actually create the password file that you specified in the previous step. Initially you'll use the -cm arguments. This creates the file and also encrypts the password with MD5. If you need to add users make sure you simply use the -m flag, and not the -c after the initial creation.

 

htpasswd -cm /etc/svn-auth-file yourusername

New password:
Re-type new password:
Adding password for user yourusername

/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=

To add a user :

htpasswd -m /etc/svn-auth-file <username>

Create a repository:

svnadmin create /var/www/subversion/<new repository name>

This will then create a directory structure under /var/www/subversion/<new repository name>:

drwxr-xr-x 2 root root 4096 Sep 26 10:50 conf
drwxr-xr-x 2 root root 4096 Jul 26 08:01 dav
drwxr-sr-x 5 root root 4096 Sep 26 10:51 db
-r--r--r-- 1 root root    2 Jul 26 08:01 format
drwxr-xr-x 2 root root 4096 Sep 26 10:50 hooks
drwxr-xr-x 2 root root 4096 Sep 26 10:50 locks
-rw-r--r-- 1 root root  229 Jul 26 08:01 README.txt

 

Then ensure access control:

nano /var/www/subversion/<new repository name>/conf/svnserver.conf

# access control for non authenticated users
# better to set it to none (anon-access = none)
anon-access = none
# access control for authenticated users
# will need set it to "read" or "write" (auth-access = read)
auth-access = write

http://wiki.centos.org/HowTos/Subversion