Home · Articles · Discussion Forum · News Categories January 30 2012 01:49:35
Navigation
Home
Articles
FAQ
Discussion Forum
News Categories
Contact Me
Search
Welcome portal web
Users Online
Guests Online: 1
No Members Online

Registered Members: 3
Unactivated Members: 8
Newest Member: momnary
Welcome
Welcome to SMA MULTI-SOLUTIONS WEB PORTAL SITE
Install Java jdk on Debian
LINUXs

For DebianEtch/Backports, Sun Java is now a package in non-free. Either install the Java development kit:

#apt-get install sun-java6-jdk

or the Java runtime environment

#apt-get install sun-java6-jre

sun-java6-plugin could be installed to active JVM in your Web browser like iceweasel

See: http://www.olivierberger.com/weblog/index.php/2008/05/18/103-declaration-d-impot (in french)

 

Sun Java 1.5

For DebianEtch, you will find Java 5 instead:

#apt-get install sun-java5-jdk

or the Java runtime environment

#apt-get install sun-java5-jre

 

Manual method (not recommended)

1) Go to the [J2RE] download page

2) Select the Linux self-extracting file

3) Save it to a suitable location (eg /tmp)

4) Move it to the path you want to run it from (eg. /usr/local )

#mv j2re* / usr/local/

and change to this directory:

#cd / usr/local

5) Run it - as root

#sh j2re-1_4_1_01-linux-i586.bin

6) This will prompt you for a licence agreement. Accept it

7) It will then create a folder j2re1.4.1_01/

8) Then, in your Mozilla plugin directory (eg / usr/local/mozilla/plugins) , symlink libjavaplugin_oji.so to the appropriate folder in the j2re folder created above

# cd /usr/local/mozilla/plugins
# ln -s /usr/local/j2re1.4.1_01/plugin/i386/ns610/libjavaplugin_oji.so libjavaplugin_oji.so

9) Restart mozilla and test the install - eg go to http://news.bbc.co.uk

 

Other way, without plug-in browser installation

1) Download the latest JRE from http://java.sun.com

2) Install java-package and fakeroot

 apt-get install java-package fakeroot

3) Build a deb of the JRE using

 fakeroot make-jpkg <downloadedfilename>

4) Install the newly created .deb using

 dpkg -i <deb filename>

5) Install the debian-specific java bits

 [apt-get] install sun-j2re<yourversion>debian

By far the most time-consuming part of the process is going to be downloading the JRE and then waiting for the .deb to build. As long as you're not using dialup you should be able to have everything done in well under 30 mins.

 

Configure your default Java version

Sun recommends you update the alternatives system to have Sun's tools as the defult:

#update-java-alternatives -s java-6-sun

Or for java 5:

#update-java-alternatives -s java-1.5.0-sun

vi /etc/apt/sources.list
deb ftp://ftp.debian.org/debian/ etch main contrib

#apt-get update
#apt-get install java-package

* Installation Java
   - If you use amd64 achitecture you must have this file jdk-1_5_0_03-linux-
 amd64.bin you can download.

    +To turn this into a Debian package you should run:
    #apt-get install fakeroot java-package

    This command will first prompt for confirmation, then :
      Ask you for your name
      Ask you for your email address
      Display a license agreement:
      Press Space to scroll down, or q to quit.
      Type "yes" to indicate you agree with the terms.
     (The name, and email address, you give will be inserted into the ebian
      package information - and not sent to Sun.)

     Log as normal user
     $fakeroot make-jpkg jdk-1_5_0_03-linux-amd64.bin

     Log as root
     #dpkg -i  sun-j2sdk1.5_1.5.0+update03_amd64.deb

     Test it work or not
     #java --version

     JAVA_HOME
     #JAVA_HOME=/usr/lib/j2sdk1.5-sun
     #export JAVA_HOME
     #JAVA_HOME=/usr/lib/java
     #export JAVA_HOME

    dpkg -l |grep -i java


    JAVA_HOME=/opt/jdk1.5.0_15/bin

     #

     fakeroot make-jpkg jdk-1_5_0_12-linux-i586.bin

     dpkg -i  sun-j2sdk1.5_1.5.0+update12_i386.deb

     JAVA_HOME=/usr/lib/jvm/java-6-sun
The JavaScript Source: Forms: Upload Filter
Software
<!-- TWO STEPS TO INSTALL UPLOAD FILTER:

  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document  -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  ArjoGod, Shauna Merritt -->
<!-- Modified By:  Ronnie T. Moore, Editor -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
extArray = new Array(".gif", ".jpg", ".png");
function LimitAttach(form, file) {
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) { allowSubmit = true; break; }
}
if (allowSubmit) form.submit();
else
alert("Please only upload files that end in types:  "
+ (extArray.join("  ")) + "\nPlease select a new "
+ "file to upload and submit again.");
}
//  End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->

<BODY>

<center>
Please upload only images that end in:  
<script>
document.write(extArray.join("  "));
</script>
<p>

<form method=post name=upform action="/cgi-bin/some-script.cgi" enctype="multipart/form-data">
<input type=file name=uploadfile>
<p>
<input type=button name="Submit" value="Submit" onclick="LimitAttach(this.form, this.form.uploadfile.value)">
</form>
</center>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  1.55 KB -->
Install Samba with Debian
What is Samba?

Samba is a suite of Unix applications that speak the SMB (Server Message Block) protocol. Many operating systems, including Windows and OS/2, use SMB to perform client-server networking. By supporting this protocol, Samba allows Unix servers to get in on the action, communicating with the same networking protocol as Microsoft Windows products.

Samba Debian Package

This package contains all the components necessary to turn your Debian GNU/Linux box into a powerful file and printer server.

Currently, the Samba Debian packages consist of the following:

samba - LanManager-like file and printer server for Unix.
samba-common - Samba common files used by both the server and the client.
smbclient - LanManager-like simple client for Unix.
swat - Samba Web Administration Tool
samba-doc - Samba documentation.
smbfs - Mount and umount commands for the smbfs (kernels 2.2.x and above).
libpam-smbpass - pluggable authentication module for SMB password database
libsmbclient - Shared library that allows applications to talk to SMB servers
libsmbclient-dev - libsmbclient shared libraries
winbind: Service to resolve user and group information from Windows NT servers
python2.3-samba: Python bindings that allow access to various aspects of Samba

It is possible to install a subset of these packages depending on your particular needs. For example, to access other SMB servers you should only need the smbclient and samba-common packages.

Install Samba in Debian

#apt-get install samba samba-client

Now it will ask you some basic question about the samba configuration like

workgroup or domain name you want,other questions enter the correct information which one suits for your need.

Preparing directories and users

Create directories for Samba to use with Windows

#mkdir samba

Now we need to create users to access this directiory

#useradd ruchi

Now create a password for this user

#smbpasswd -a ruchi

configure samba configuration file

Samba configuration file located at /etc/samba/smb.conf

In this file main section is Global where you can define all parameters and the example as follows

[global]

workgroup = debian
netbios name = debianserver
server string = %h server (Samba %v)
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0

Now you need to configure the share directory(ex:-samba) for users below is the example.

[SAMBA]

path=/samba
browseable=yes
writeable=yes
valid users = ruchi
admin users = debain

If you want to check your configuration file is correct you need to run the following command

#testparm

Now you need to restart the samba to take the new changes effect

#/etc/init.d/samba restart

If you want more configuration option check man page of smb.conf

Testing your samba configuration

You want to test your samba configuration for users ruchi run the following command

#smbclient -L //debianserver -U ruchi

Configuring the Windows workstation

authenticate each workstation

logon to the Windows workstation as any user with administrative priviliges

[Windows 2000] Start -> Settings -> Control Panel -> System -> Network Identification -> Properties -> Member of -> Domain -> type the domain name as specified in the 'workgroup' section of smb.conf -> ok

enter the root username and password for the Samba file server

if you simply wish to transfer existing users from a workstation, then if a user exists on the Samba file server and on the workstation, at this point you could log them into the Samba file server and their profile from the workstation would be copied to the Samba file server when they log out

References

http://www.samba.org

Download samba form here

Install apache 2 + php5 + mysql server
SoftwareInstall apache 2 + php5 + mysql server

Install apache 2 + php5 + mysql server

###Install apache2
 #apt-get install apache2
 #apt-get install apache2-mpm-prefork
 
 ###Install PHP5 support for Apache2
 If you want to install PHP5 from debian packages you need to enter the one of the source list in your /etc/apt/sources.list file

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

or

deb http://people.debian.org/~dexter php5 sarge
deb-src http://people.debian.org/~dexter php5 sarge

Now you need to save your file and run the following command to take our new changes effect

#apt-get update

Now you need to install PHP5 required packages for apache

#apt-get install php5 libapache2-mod-php5 php5-curl php5-gd

that's it PHP5 for apache2 installed now you need to do the following

#cd /etc/apache2/mods-enabled/

#ln -s /etc/apache2/mods-available/php5.load

#ln -s /etc/apache2/mods-available/php5.conf

Now you need to restart your apache server using the following command

#/etc/init.d/apache2 restart
 
###Install mysql server  aptitude remove mysql-server-5.0
###remove all mysql : apt-get --purge remove mysql*

apt-get install -f mysql-server
#apt-get remove mysql-server
#/etc/init.d/mysql restart
#/etc/init.d/mysql stop
 

###Also grab the php5 mysql
apt-get install php5-mysql
apt-get remove php5-mysql


###install phpmyadmin
apt-get install phpmyadmin

###remove##########
#apt-get remove apache2
#apt-get remove php5 libapache2-mod-php5 php5-curl php5-gd
==================

create vitural host Apache with JBOSS
Softwareedit httpd.conf
uncomments the module below:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so

============

NameVirtualHost www.iload.com:*
<VirtualHost www.iload.com:*>
    ServerAlias www.iload.com:81
    Options Indexes +FollowSymLinks
        ProxyPreserveHost On
        DocumentRoot D:/apps/jboss-4.0.2/docs
    ServerName  www.iload.com:81
    LogFormat combined
    ProxyPass / http://sophea:8080/Iload/
    ProxyPassReverse / http://sophea:8080/Iload/

</VirtualHost>

edit file : C:\WINDOWS\system32\drivers\etc\hosts

============
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost
127.0.0.1       sma.com
192.168.10.14    www.iload.com
192.168.10.14    www.googleMap.com
============
PHP: MYSQL Database Backup Email Attachment Solution
LINUXs?php


    // location of your temp directory
    $tmpDir = "/tmp/";
    // username for MySQL
    $user = "root";
    // password for MySQl
    $password = "root";
    // database name to backup
    $dbName = "intranet_mapring";
    // the zip file emailed to you will have this prefixed
    $prefix = "db_";
    
    // email settings...
    $to = "sophea.mak@mapring.com";
    $from = "sophea.mak@mapring.com";
    $subject = "db - backup";
    $sqlFile = $tmpDir.$prefix.date('Y_m_d').".sql";
    $attachment = $tmpDir.$prefix.date('Y_m_d').".tgz";

    $creatBackup = "mysqldump -u ".$user." --password=".$password." ".$dbName." > ".$sqlFile;
    $createZip = "tar cvzf $attachment $sqlFile";
    exec($creatBackup);
    exec($createZip);
        
        //you need to have this class.
        require("class.phpmailer.php");
        $mail = new PHPMailer();
        $mail->FromName = "sophea.mak@mapring.com";
        $mail->AddAddress("sophea.mak@mapring.com");
        
        $mail->AddAttachment($attachment);
        $mail->IsHTML(true);
        //set up the subject/body
        $mail->Subject = "Nightly DB Backup!";
        $mail->Body = "Backup to ".date("D M Y h:iA").".";
        if (!$mail->Send()){
        //if the message did not work we echo out why
        echo "Message could not be sent.";
        echo "Mailer error: ". $mail->ErrorInfo;
        echo "";
    unlink($sqlFile);
    unlink($attachment);

?>
>>crontab -e
50 13 * * * wget -q -O /dev/null http://localhost/auto_db_backup.php

Reporting Application
SoftwareBidding project from the Rent A coder : http://www.rentacoder.com/RentACoder/misc/BidRequests/ShowBidRequest.asp?lngBidRequestId=1048724&txtForceRefresh=112620084452848729


Reporting Application : web sample has made :


http://multi-solu.net46.net/test_logsys/client.php This link to manage the page : customer


http://multi-solu.net46.net/test_logsys/test.php   : This link just extract the field and ready format for report (example) . I go deep when I am sure with this extract from the syslog file.



Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Shoutbox
Name:

Message:
Help

Anong gamot ang pamparegla venapro hemorrhoids tre
12/12/2011 14:16
zoijdnvmuj.tpmv, <a href="http://venaproshop
.com/">Buy venapro</a>, CyqQNMy, [url=http://venaproshop.c
om/]Venapro[/url], mPusCSR, http://venaproshop.com/ Venapro, DWUaAWR


setywety
12/12/2011 14:15
http://ecceside.hotbox.ru

wstywe
12/12/2011 14:14
http://nuadetitre.hotbox.
ru


wstywe
12/12/2011 14:12
http://nuadetitre.hotbox.
ru


Crendendami
12/12/2011 14:10
xk9 <a href="http://www.everlat
er.com">uggs sale</a> ij5 http://ugg-sale-clearance
-free-shipping-.wallinsid
e.com/post-844823.html


wsetyw
12/12/2011 14:09
http://yscosdetens.hotbox
.ru


wsetyw
12/12/2011 14:08
http://yscosdetens.hotbox
.ru


ewtywty
12/12/2011 14:06
http://wellbumbhaste.hotb
ox.ru


ewtywty
12/12/2011 14:06
http://wellbumbhaste.hotb
ox.ru


ewtywty
12/12/2011 14:04
http://wellbumbhaste.hotb
ox.ru


Shoutbox Archive