Friday, December 17, 2010

Software loadbalancer with Subdomain

NameVirtualHost Public IP Address:80


ServerName www.websitename.com
ServerAlias websitename.com
DocumentRoot /var/www/

Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED

Options +FollowSymlinks
RewriteEngine on
Order deny,allow
Allow from all



BalancerMember http://Local IP Address route=node1
BalancerMember http://Local IP Address route=node2
ProxySet stickysession=ROUTEID
ProxySet lbmethod=byrequests


ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/
ProxyPassReverse / http://Local IP Address/
ProxyPassReverse / http://Local IP Address/

SetHandler balancer-manager
Options FollowSymLinks
Order deny,allow
Allow from all


ErrorLog logs/sitename_error
CustomLog logs/sitename_custom "%t Time=%D %h LocalIP=%A FileName=%f FirstLineOfReq=%r RequestedURLWOQueryString=%U CanonicalServerName=%v Referrer=\"%{Referer}i\" Node=%{ROUTEID}C Worker=\"%{BALANCER_WORKER_NAME}e\""




ServerName www.Subdomain.websitename.com
ServerAlias subdomain.websitename.com
DocumentRoot /var/www/

Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED

Options +FollowSymlinks
RewriteEngine on
Order deny,allow
Allow from all



BalancerMember http://Local IP Address/advertiser route=node1
BalancerMember http://Local IP Address/advertiser route=node2
ProxySet stickysession=ROUTEID
ProxySet lbmethod=byrequests


ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/
ProxyPassReverse / http://Local IP Address/advertiser/
ProxyPassReverse / http://Local IP Address/advertiser/

SetHandler balancer-manager
Options FollowSymLinks
Order deny,allow
Allow from all


ErrorLog logs/sitename_error
#CustomLog logs/sitename_custom "%t %T %h %A %r %f %U %{ROUTEID}C %v %V %>s %b \"%{Referer}i\" \"%{BALANCER_WORKER_NAME}e\""
CustomLog logs/sitename_custom "%t Time=%D %h LocalIP=%A FileName=%f FirstLineOfReq=%r RequestedURLWOQueryString=%U CanonicalServerName=%v Referrer=\"%{Referer}i\" Node=%{ROUTEID}C Worker=\"%{BALANCER_WORKER_NAME}e\""




ServerName www.subdomain.websitename.com
ServerAlias subdomain.websitename.com
DocumentRoot /var/www/

Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED


Order deny,allow
Allow from all



BalancerMember http://Local IP Address/corporate route=node1
BalancerMember http://Local IP Address/corporate route=node2
ProxySet stickysession=ROUTEID
ProxySet lbmethod=byrequests


ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/
ProxyPassReverse / http://Local IP Address/corporate/
ProxyPassReverse / http://Local IP Address/corporate/

SetHandler balancer-manager
Order deny,allow
Allow from all


ErrorLog logs/sitename_error
#CustomLog logs/sitename_custom "%t %T %h %A %r %f %U %{ROUTEID}C %v %V %>s %b \"%{Referer}i\" \"%{BALANCER_WORKER_NAME}e\""
CustomLog logs/sitename_custom "%t Time=%D %h LocalIP=%A FileName=%f FirstLineOfReq=%r RequestedURLWOQueryString=%U CanonicalServerName=%v Referrer=\"%{Referer}i\" Node=%{ROUTEID}C Worker=\"%{BALANCER_WORKER_NAME}e\""
Thursday, December 16, 2010

Upgarde PHP via Pleask

http://www.swiftcore.com/en/software/upgrade-php-52x-plesk-default-php-51x.html


Upgrade PHP to 5.2.x from Plesk default PHP 5.1.x
July 31, 2009 - 5:09pm — Yuan Quan

By default Plesk installation, the PHP version is 5.1.x, if you want to upgrade it to 5.2 or even 5.3, please follow these steps:

Login via SSH as root user first.

Upgrading PHP:

wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh
yum update php
Wednesday, October 27, 2010

How to configured roming profile

How to Create a Shared Folder to Store Roaming User Profiles
Before you configure a user account to use a roaming user profile, you must create a shared folder on a Windows NT Server 4.0-based computer in the domain to store the roaming user profiles. This shared folder is often located on a domain controller, but it can also be located on any Windows NT Server 4.0-based computer in the domain.

To create a shared folder to store roaming user profiles:

1. Click Start, point to Programs, and then click Windows NT Explorer.
2. Click the drive on which you want to create a shared folder to store roaming user profiles.
3. On the File menu, point to New, and then click Folder.
4. Type a name for the new folder, and then press ENTER.

NOTE: Typically, the folder that is used to store roaming user profiles is called "Profiles". However, you can assign any name that you want to the folder.
5. Right-click the folder you created in step 3, and then click Sharing.
6. Click Shared As, type the name that you want to assign to the shared folder in the Share Name box, and then click OK.

NOTE: The Profiles folder is commonly shared as "Profiles."
7. Quit Windows NT Explorer.

Back to the top
How to Configure a User Account to Use a Roaming User Profile in a Windows-Based Domain
To configure user accounts in the domain, you can use any Windows NT Server 4.0, Windows 2000 Server, or Windows Server 2003-based computer in the domain or any Windows NT Workstation 4.0, Windows XP Professional, or Windows 2000 Professional-based computer that is running Windows NT Server Administration Tools in the domain. In addition, you must be logged on as either an administrator or as a user that is a member of the Administrators local group or the Account Operators local group in the domain.

To configure a user account to use a roaming user profile:

1. Click Start, point to Programs, point to Administrative Tools (Common), and then click User Manager for Domains or Active Directory Users and Computers for Windows Server 2000 or for Windows Server 2003.
2. Double-click the user account to which you want to assign a roaming profile, and then click Profile.
3. Type the complete path to the shared folder that contains the user's profile in the User Profile Path box, and then click OK.

Use the following format for the user profile path:
\\server_name\shared_folder_name\user_profile_folder_name
For example, if you want to store the user's roaming profile in a folder that has the same name as the user account in a shared folder that is named "Profiles" on a server that is named "Server1," type the following path:
\\Server1\Profiles\%username%
NOTE: Windows NT automatically replaces the %username% variable with the user account name when it creates and accesses the user profile. When you use this variable, you can type the same path for all users.
4. Click OK, and then quit User Manager for Domains or Active Directory Users and Computers.

The next time the user logs on, the user profile folder that you specified in step 3 is created. When the user logs off, the user's profile is copied to the new folder.




http://support.microsoft.com/kb/316353

http://technet.microsoft.com/en-us/library/cc780629%28WS.10%29.aspx

http://support.microsoft.com/kb/312138
Tuesday, June 29, 2010

Mysql slow log analyzer

mk-query-digest command and installation details
mk-query-digest maatkit-6457.tar.gz
tar –zxvf maatkit-6457.tar.gz
perl Makefile.PL
make install
mk-query-digest mysql slow quary log file path
http://www.maatkit.org/doc/mk-query-digest.html#downloading
Friday, April 30, 2010

Change Mantis User Password from mysql

Login mysql
use db;
update mantis_user_table set password=md5('Asd@3se') where username='jconlon';
pasword : Asd@3se
username: jconlon
Wednesday, April 21, 2010

Register an Executable as Windows Service

Register an Executable as Windows Service
Need to register a self programmed executable as a Windows Service, that will:
1) start whenever system request
2) allow it to start if the service it depended on has started (This will be another topic)

What you need is really easy.
1) Go to microsoft to download Windows Resource Toolkits which is found here:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd
2) Run the rktools to unpack it, Default directories it unpacked to is: "C:\\Program Files\Windows Resource Toolkits\Tools"
3) Go Start->Run->cmd, using dos command navigate to the directories specified in step 3.
4) Type in->instsrv (Your service name) (the location of the executables file)

e.g., instsrv MyService "c:\\MyService\\Test.exe"
Tuesday, April 6, 2010

Configured VPN On Windows

Configured vpn server on windows XP and Windows 2000-2003 Server

http://support.microsoft.com/kb/308208

http://www.zdnetasia.com/configure-windows-xp-professional-to-be-a-vpn-server-39050037.htm
Tuesday, February 2, 2010

LiveCycle ES Installation on Linux Server

LiveCycle ES Installation on Linux Server.


1. Hardware requirements for LiveCycle ES.

Please find below the hardware requirements and a link to obtain operating system related information.

1.1 Hardware:
Intel Pentium 3 or AMD x86/64 or equivalent 1GHz processor.
Minimum 1GB RAM
For installation disk space required 343MB minimum

1.2 Operating system:
Red hat Enterprise Linux ES and AS 4.0 (32bit architecture)
http://www.adobe.com/products/livecycle/pdfs/lces_update1_sysreqs.pdf


2. Download the Live Cycle ES from link below:

http://www.adobe.com/products/livecycle/dataservices/

3. Installation and set up process (More information can be obtained from: http://help.adobe.com/en_US/livecycle/8.2/lcds_installation.html):

3.1 Copy the Live Cycle ES (lcds261-lin.bin) to the root directory and run the following commands.

3.2 Lcds261-lin.bin is an executable bin file. Run the below command to start the installation.













3.3 Press enter to continue installation of LCDs.





3.4 Press ENTER till you encounter message “Do you accept the terms of this license agreement?”












3.5 Type “Y“ to accept the License agreement.




3.6 Type the LCDs serial number here to install enterprise version. Note: If serial number is skipped then it will only install a single CPU use license version.





3.7 You can specify path here if you want to install the LCDs in a different folder. It is recommended installing it in the default path. For installing in default path press the enter key.







3.8 Type 1 to install LCDs with tomcat and press enter to start the installation.




3.9 Here a screen will provide you the installation information such as the installation path, its version, etc. Press enter to continue the installation.









3.10 After installation is complete you will see details (refer screen below) to start the service and URL details. By default LCDs take port 8400. Note down the details and press enter to exit the installer.




4. To add the services in start up do the following.

vi /etc/rc.local

/opt/lcds/tomcat/bin/catalina.sh start

You need to open below ports in Linux iptables.
vi /etc/sysconfig/iptables

[0:0] -A INPUT -i eth0 -p tcp -m tcp --sport 8400 -j ACCEPT
[0:0] -A INPUT -i eth0 -p tcp -m tcp --dport 8400 -j ACCEPT
[0:0] -A INPUT -i eth0 -p tcp -m tcp --sport 2040 -j ACCEPT
[0:0] -A INPUT -i eth0 -p tcp -m tcp --dport 2040 -j ACCEPT
[0:0] -A INPUT -i eth0 -p tcp -m tcp --sport 2037 -j ACCEPT
[0:0] -A INPUT -i eth0 -p tcp -m tcp --dport 2037 -j ACCEPT

After finishing the installation open the below link in your favorite browser.

http://server ip address:8400
Required file

saprfc-1.4.1.tar.gz
RFC_49-10003378.SAR
SAPCAR_5-20000899.EXE
sapjco-linuxintel-2.0.12.zip

./SAPCAR_5-20000899.EXE -xvf RFC_49-10003378.SAR

export SAPRFC_DIR=/var/www/html/sap/rfcsdk/

vi /etc/ld.so/conf entry /var/www/html/sap/rfcsdk/lib

make soft link between ln -s /opt/sap/sapjava/librfccm.so librfccm.so ln -s /opt/sap/sapjava/libsapjcorfc.so libsapjcorfc.so


vi /etc/php.ini

extension=saprfc.so

/etc/init.d/httpd restart


https://websmp106.sap-ag.de