Thứ Sáu, 25 tháng 12, 2009

Mediatomb & MiniDLNA

http://ubuntuforums.org/showthread.php?t=1198689

1) installed MediaTomb via Ubuntu's Software Center

2) open /etc/mediatomb/config.xml in your text editor of choice

3) remove the comment tags around the section and make that section look like this:






4) Under , add 5map from="avi" to="video/mpeg"

5) save and close config.xml and restart mediatomb (`sudo service mediatomb restart` from command line)

----------------------

Command to start MiniDLNA
Go to ~/minidlna_1.0.16.3_static/usr/sbin

./minidlna -d -f ../../etc/minidlna.conf

Thứ Ba, 22 tháng 12, 2009

Que sera sera

When I grew up and go to work,
I asked myself, "What lies ahead?
Will I have salary up day after day?"
Here's what I said to me ...
Que sera sera,
What ever will be, will be
You still got the salary, que sera sera

Chủ Nhật, 6 tháng 12, 2009

Connect to WLST and monitor Servers Status in WebLogic

You can invoke WLST by running “java weblogic.WLST”

I tried this on my WebLogic Server and straight hit error
_________

Exception in thread “main” java.lang.NoClassDefFoundError: weblogic/WLST
_________

I soon realised that jar file which contains class weblogic.WLST is missing from classpath and quick fix is to set environment variable using setWLSEnv.sh (under WL_HOME/server/bin) . For Fusion MiddleWare (FMW) 11g, it should be under $MW_HOME/ wlserver_10.3/ server/ bin


______
set environemnt variable for weblogic server
cd WL_HOME/server/bin
. ./setWLSEnv.sh
______

$ java weblogic.WLST

Initializing WebLogic Scripting Tool (WLST) …

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline>
__________

After connect to WLST,
To monitor Server Status I use this commands:

connect("weblogic","password","t3://ip_address_of_admin_server:7001")
# to get State of AdminServer
state("AdminServer")
# to change server's state to Admin state
suspend("ManagedServer_3", block="true")
# to change server's state from Admin to Running
resume("ManagedServer_3",block="true")
# to shutdown server
shutdown("ManagedServer_3",block="true")
# to star cluster
start('mycluster','Cluster')
# to shutdown cluster
shutdown('mycluster','Cluster')

Connect to NodeManager :

nmConnect('weblogic', 'weblogic_password', 'ip_address_of_wl_server', 'node_managed_port', 'domainName','/domain_directory','ssl')


:) Still dont successfully start server using WLST. If anyone have done it, pls share with me :)

Thứ Tư, 18 tháng 11, 2009

Making Reverse Proxy working

Navigate to OHS Standalone Home/ohs/conf directory. Edit httpd.conf to add following directives in respective sections.

##########################
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so

ProxyRequests Off

#Order deny, allow
#Allow from all

ProxyPass / http://app3:7778/
ProxyPassReverse / http://app3:7778/

Thứ Sáu, 13 tháng 11, 2009

Tuning the default WorkManager on WebLogic Server

Putting Java Option to SetDomainEnv.sh

-Dweblogic.threadpool.MinPoolSize=100

do it like this:

JAVA_OPTIONS="-Dweblogic.threadpool.MinPoolSize=100 ${JAVA_OPTIONS}"
export JAVA_OPTIONS

Stop and Start Server

Thứ Năm, 12 tháng 11, 2009

Config Oracle HTTP Server to run on port 80

I copy this documents from this page:
http://askmeapps.blogspot.com/2008/07/some-steps-to-configure-oracle-http.html

1. Stop Oracle HTTP Server using Application Server Control, or with the following opmn command,
as the oracle user (not root)
# opmnctl stopall

2. Issue the following command as root: Log in as root.
Run the following command in the middle-tier Oracle home:
# cd ORACLE_HOME/Apache/Apache/bin
# chown root .apachectl
# chmod 6750 .apachectl

(Be sure to now leave the root login)

3. Update the Application Server Control Console with the port number:
Edit the following file L as the oracle user (not root)
ORACLE_HOME/Apache/Apache/conf/httpd.conf
Take a backup or httpd.config
cp httpd.conf httpd.conf_old_chg80
vi httpd.conf
replace 7777 with 80
Save and close the file.

4. Restart the HTTP Server, as the oracle user (not root)
# opmnctl startall

5. Ensure that Oracle HTTP Server starts and uses the desired port 80

Thứ Năm, 24 tháng 9, 2009

Start managed Server command

Running in Server 2
./startManagedWebLogic.sh "ManagedServer_2" "http://10.3.243.11:7001"

Running in Server 1
./startManagedWebLogic.sh "ManagedServer_1" "http://10.3.243.11:7001"

Creating and Starting a Managed Server on a Remote Machine

I have tried this guide and create successfully Remote Managed Server!

3 Creating and Starting a Managed Server on a Remote Machine

In some domains, you may want to run a managed server on a machine that is remote from the administration server for the domain. You can do this by performing the following steps:

1.

Create a managed server template by using the pack command. A managed server template, by default, contains only those files that are necessary for creating a managed server on a remote machine.

For more information, see Section 3.1, "Creating a Managed Server Template."
2.

Create a managed server domain directory by copying and unpacking the managed server template on a remote machine.

For more information, see Section 3.2, "Creating a Managed Server on a Remote Machine."
3.

Start the managed server on the remote machine.

For more information, see Section 3.3, "Starting Managed Servers on a Remote Machine."

3.1 Creating a Managed Server Template

You create a managed server template by executing the pack command on an existing domain that includes the definition of one or more managed servers and contains managed server definitions in the config.xml file.

1.

From the command line on the local machine (that is, the machine that contains the administration server and the definition of managed servers), navigate to the MW_HOME\wlserver_10.3\common\bin directory.
2.

Run the following command:

pack -managed=true -domain=domain -template=template.jar -template_name="template_name"

In this command:
*

domain is the full or relative path of the domain from which the template is to be created.
*

template.jar is the full or relative path of the template, and the filename of the template to be created.
*

template_name is a descriptive name for the template, enclosed in quotes.

For example, the following command creates a managed server template named mydomain_managed.jar from a domain named mydomain.

pack -managed=true -domain=C:\oracle\user_projects\domains\mydomain -template=C:\oracle\user_templates\mydomain_managed.jar -template_name="My Managed Server Domain"

3.2 Creating a Managed Server on a Remote Machine

1.

Install WebLogic Server on the machines on which you want to host managed servers for the domain.

Note:
All WebLogic Server instances within a domain must run the same version of the WebLogic Server software. For more information about installing WebLogic Server, see the Oracle WebLogic Server Installation Guide.
2.

Establish a session with the remote machine. You may use any valid method, such as telnet, to do so.

The IP address and port number of the remote machine must match the definition of the managed servers specified in the managed server template.
3.

Copy the managed server template to the remote machine.
4.

On the remote machine, navigate to the WLS_HOME\common\bin directory.
5.

Run the following command:

unpack -domain=domain -template=template.jar

In this command:
*

domain is the full or relative path of the domain to be created.
*

template.jar is the full or relative path of the managed server template that you copied to the machine in step 3.

For example, the following command creates a domain named myManagedDomain.

unpack -domain=C:\oracle\user_projects\domains\myManagedDomain -template=C:\oracle\user_templates\mydomain_managed.jar

3.3 Starting Managed Servers on a Remote Machine

When you create a domain directory for managed servers by using the unpack command, it contains a customized start script for each managed server targeted to the current remote machine.

For example, if you create a domain that contains two managed servers, my_managed_server1 and my_managed_server2, and you target the servers to machine m1, when you create the managed server domain directory on machine m1, four custom start scripts are created: startmy_managed_server1.cmd, startmy_managed_server1.sh, startmy_managed_server2.cmd, and startmy_managed_server2.sh. You can use these scripts to start the corresponding managed servers. Alternatively, you can use the startManagedWebLogic script with the required parameters.

1.

Start the administration server for the domain as described in Starting and Stopping Servers.
2.

On the remote machine, navigate to the directory for the domain that you created in How Do I Create a Managed Server on a Remote Machine.
3.

Start the managed server on the remote machine.
*

On a Windows system, run one of the following commands at the DOS prompt:

startmy_managed_server

startManagedWebLogic my_managed_server admin-url
*

On a UNIX system, run one of the following commands:

./startmy_managed_server.sh

./startManagedWebLogic.sh my_managed_server admin-url

In these commands, my_managed_server is the name of the managed server to be started and admin-url is the listen address (host name or IP address) and port number of the machine hosting the administration server. For your convenience, the startManagedWebLogic_Readme.txt file provides a list of all the managed servers and the admin-url for the domain.

Note:
You can also start managed servers by using the node manager. For more information, see Node Manager Administrator's Guide for Oracle WebLogic Server.

Source: Oracle Documents

Chủ Nhật, 20 tháng 9, 2009

Command used to Remote from my OpenSuse laptop 11.1 to Ubuntu 9.04 desktop

ssh -XC haibang@192.168.1.37 gnome-panel

Remote controlling ubuntu with x2x

Remote controlling ubuntu with x2x

Using x2x with SSH

This method is based on the method described in here, and is simpler and much more secure than other methods commonly described.

In this example we will use the names 'workstation' for the computer you want to use your mouse/keyboard on, and 'laptop' for the one you want to control. We will also assume that the workstation is to the left of the laptop.

First, on the laptop (the machine you want to control), install x2x and the ssh server:

sudo aptitude install x2x openssh-server

Then, start an X11 session (log in) locally on the laptop. Finally, on the workstation (where you want to use the mouse and keyboard from), login through ssh to the same user account on laptop and launch x2x:

ssh -XC user@laptop x2x -east -to :0.0

Type in the password for the user on the laptop when it asks. And that's all: you should be able to move the mouse smoothly from the workstation monitor to the laptop screen and back.

Next, you can create a launcher on the desktop to make it easy to start it up: right click on the desktop, select 'Create Launcher...', and copy the ssh line from above into the 'Command' section.

Troubleshooting

If you get an error when running x2x:

x2x - error: can not open display

Make sure you included the '-X' bit on the ssh command. Next, you need to make sure 'X Forwarding' is enabled. This is enabled in ubuntu by default, but if for some reason it's not, you need to edit /etc/ssh/sshd_config and uncomment the line that says:

X11Forwarding yes

One additional caveat: If you are using a login manager such as gdm, you must enable remote TCP connections to the X server. In Ubuntu 8.04.1 run the command

sudo /usr/sbin/gdmsetup.

Select the Security tab and uncheck the "Deny TCP connections to the Xserver" checkbox.

Or, just edit /etc/gdm/gdm.conf-custom and add DisallowTCP=false under [security] section.

[security]

DisallowTCP=false

Using x2x

You can change '-east' to '-west', '-north' or '-south' to change which side of the workstation opens up to the laptop, depending on your setup.

For more x2x options, consult the man page of x2x(1):

man x2x

Thứ Sáu, 18 tháng 9, 2009

Thứ Ba, 15 tháng 9, 2009

Start X Server on Sun Solaris 10

#/usr/openwin/bin/kdmconfig
# /usr/openwin/sbin/kdmconfig
# /usr/openwin/sbin/kdmconfig

Thứ Ba, 8 tháng 9, 2009

How to Configure Oracle Web Cache to Listen on Port < 1024

10.0 How to Configure Oracle Web Cache to Listen on Port <>

On most Unix platforms, a process without root privilege cannot listen on ports <>

  1. Through the Web Cache Manager, change process identity to the desired running process identity, such as nobody/nobody; change Oracle Web Cache listening port to the desired port, such as 80;
  2. log in as root;
  3. change the owner of the executable 'webcached' to root;


$ chown root /opt/oracle/webcache/bin/webcached

  1. change the group of the executable 'webcached' to the group id of the desired running process identity, such as nobody:


$ chgrp /opt/oracle/webcache/bin/webcached

  1. add set-user-id permission to the executable 'webcached';


$ chmod u+s /opt/oracle/webcache/bin/webcached

  1. exit from root;
  2. start Oracle Web Cache through webcachectl. Oracle Web Cache should be listening on the desired port with the desired process identity (nobody/nobody).


$ /opt/oracle/webcache/bin/webcachectl start

Note that NOT running Oracle Web Cache as root will limit the number of connection handles that Oracle Web Cache can use to the operating system's hard-coded file descriptor limit. See Also: Section 5.0.

Kill Firefox

On Solaris 10:

To find firefox pid:

pgrep -l firefox

To Kill it:

pkill firefox

Trick to Install Jiveforum 4.2.2 on Oracle AS 10.1.3.4

After install Jive Forum, set DB connect, set JiveHome, copy license file. I can access to admin page but cant access to /forum page.
Just go to

/$ORACLE_HOME/j2ee/icb_app4/application-deployments/forum/forum

and change the tag:

jsp-cache-tlds="standard" to jsp-cache-tlds="on"

Thứ Bảy, 1 tháng 8, 2009

How to create RSA securid for an AgenHost on RSA Server

For RSA Server 6.x
To do that you need to:
1. Have a program to authenticate with RSA Server. (I have created a Java program).
2. If dont have a securid file, you have to run your program from your mechine and securid file will be sent from RSA Server back to your machine.
3. If RSA server change its configuration(ex: IP) and you need new securid file for your machine to authenticate with RSA Server.
+ Go to RSA Server and go to Agents Host and delete you machine in the agenhost list.
+ Check sample.properties file (That is a parameter of your program).
+ Copy file sdconf.rec to appropriate place of your machine ( that match with the path in sample.properties file)
+ Insample.properties file: Change path of SDNDSCRT_LOC to SDNDSCRT_LOC=
(Nothing after "=")
+ Run program again and the securid file will be sent to your machine. (My program is a java program and the securid is in the same palce with my AuthUser.java or RSAService.java file)

Thứ Bảy, 11 tháng 4, 2009

Something that can run in Ubuntu 8.10 64bit

Weblogic 10.3 - Tested
Use this file to install: server103_linux32.bin (This file work file with 64bit)
All I do is just run: ./server103_linux32.bin
After that everything run automately

Jboss 5 - Tested

Kết nối CIFS với Alfresco:

Khi tạo một alfresco server trên máy tính có tên là Abc, một thư mục share sẽ tự đông được tạo có tên là Abc_a(a là viết tắt của alfresco)
Làm theo hướng dẫn của alfresco vào thư mục /tomcat/shared/classes/alfresco/extension, uncommented đoạn
Sau đó khởi động lại alfresco và về lại máy tính của mình rồi dùng window explorer vào thư mục share theo đường dẫn sau: \\Abc_a\Alfresco
Khi đó ta có thể vào thư mục của alfresco và thao tác trực tiếp trên file, drag&drop,.., nói chung là như thao tác file bình thường như đối với file trên máy và hình như là có thêm tính năng version tự động nếu trên server đã config chức năng này.

Chú ý: Nếu dùng webdav để vào thì chỉ có thể xem danh sách các file của alfresco, copy file vào thư mục. Tuy nhiên ta không thể mở trực tiếp bằng cách kích đúp chuột vào file.

Đã thử dùng map drive nhưng không được. Không hiểu sao lại có thể vào trực tiếp!

Đường dẫn của các file config trong Alfresco:
/tomcat/webapps/alfresco/WEB-INF/classes/alfresco
Đường dẫn của các file extension trong Alfresco:
/tomcat/shared/classes/alfresco/extension
Chỗ nào hay quên thì in đậm màu đỏ
Lấy từ tài liệu: Alfresco Enterprise Content Management Implenmentation

How To Install Oracle XE in Ubuntu 64 Bit

May 12th, 2008

While you’re thinking by installing 64 bit linux you’re standing in the edge of new technology era, it sucks knowing our 64 bit system is less supported than the old 32 bit system. We have to install 32 bit flash since Adobe didn’t have the 64 bit one. We have to install 32 bit oracle xe since Oracle also didn’t have 64 bit version.

And now I will try explain how to install oracle xe into the 64 bit system, ubuntu way. Of course we couldn’t follow the guide from oracle, since apt-get will detect our system architecture and we won’t get the 32 bit packages list.

Before we start, make sure you have the 32 bit library installed. It’s in reposity, all you have to do is

sudo apt-get install libc6-i386

The next thing to do is download the files needed. It’s libaio_0.3.104-1_i386.deb and oracle-xe-universal_10.2.0.1-1.1_i386.deb. You could use wget for this

wget -c http://oss.oracle.com/debian/dists/unstable/main/binary-i386/libaio_0.3.104-1_i386.deb http://oss.oracle.com/debian/dists/unstable/non-free/binary-i386/oracle-xe-universal_10.2.0.1-1.1_i386.deb.

After your downloads are finished, we continue to the main issue, forcing the package to be installed. You could try to install with usual dpkg -i first to make sure your system is really 64 bit.

sudo dpkg -i libaio_0.3.104-1_i386.deb

You’ll get error,

dpkg: error processing libaio_0.3.104-1_i386.deb (--install):
package architecture (i386) does not match system (amd64)
Errors were encountered while processing:
libaio_0.3.104-1_i386.deb

Added guide from Venka A

sudo apt-get install bc

To force the installation, do these

dpkg -i --force-architecture libaio_0.3.104-1_i386.deb
dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.1_i386.deb

And after the installation is finished, you need to configure it

sudo /etc/init.d/oracle-xe configure

and edit your ~/.bashrc

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_HOME
export ORACLE_SID=XE

export PATH

And, voila, the oracle xe is ready. You could go to http://127.0.0.1:8080/apex from your browser.

References:

Config Alfresco 3 labs to run with oracle


http://mirror.optus.net/sourceforge/a/al/alfresco/
http://www.mirrorservice.org/sites/dl.sourceforge.net/pub/sourceforge/a/al/alfresco/%5Bpage=0%5D

Download old alfresco.

100% Running.

Using driver:
ojdbc14_g.jar , dont use ojdbc14.jar or anything else pls!




hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect


hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect


hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect



not another Dialect!




----------------------------------------------------------------------------------------------------------

db.schema.update=true
db.driver=oracle.jdbc.OracleDriver
db.name=xe
db.url=jdbc:oracle:thin:@localhost:1521:XE
db.username=alfresco
db.password=alfresco
db.pool.initial=5
db.pool.max=10
----------------------------------------------------------------------------------------------------------

Tested in Ubuntu 8.10 and Windows XP!

Sometime I got this error but it is will be ok if u got a more power machine.

08:56:00,062 User:admin ERROR [hibernate.transaction.JDBCTransaction] JDBC commit failed
java.sql.SQLException: ORA-00018: maximum number of sessions exceeded

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:141)
at oracle.jdbc.driver.T4CConnection.doCommit(T4CConnection.java:571)
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:1396)
at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:238)
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:199)
at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:139)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:115)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:575)

at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTran
sactionManager.java:662)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransaction
Manager.java:632)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(Transact
ionAspectSupport.java:314)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy24.validate(Unknown Source)
at org.alfresco.web.app.servlet.AuthenticationHelper.authenticate(AuthenticationHelper.java:227)
at org.alfresco.web.app.servlet.AuthenticationHelper.authenticate(AuthenticationHelper.java:106)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)

Install Jdev 10.1.3.4 on Ubuntu 8.10 64 bit

1. Make some change to ~/jdevinstalled_folder/jdev/bin/jdev.conf

#
# Directive SetJavaHome is not required by default, except for the base
# install, since the launcher will determine the JAVA_HOME. On Windows
# it looks in ..\..\jdk, on UNIX it looks in the PATH by default.
#
#Must be jdk 64 bit
SetJavaHome /home/haibang/jdk1.6.0_12

#
# The Windows launcher will attempt to use client (hotspot) by default,
# unless a VM is specified below with the following directive. On UNIX
# we use whatever is listed first in the $(JAVA_HOME)/jre/lib/jvm.cfg file.
#
#Comment this out
#SetJavaVM hotspot

After that run: ./jdev

If u got blank startpage: check the jdk version , this error happened with jdk1.5
. To fix this, change jdk to 1.6 version or

This is a bug in Sun's JDK that has been fixed in 1.6u10. If like me you are too lazy to update your JDK or can't (JDeveloper 10.1.3.4 is only certified against Java5) then the fix is to simply open the $JDEV_HOME/jdev/bin/jdev script and add the following as the first line:
export AWT_TOOLKIT=MToolkit
Save the file, run JDeveloper again and the UI goodies should be all