Archive for the ‘Uncategorized’ Category

This tutorial will show how to set samba to allow read-only file sharing for your LAN computers as guest (without be prompted for a password).

Because users won’t be prompted for a user/password, this tutorial is meant to be installed in a LAN where all host are to be trusted.

There is many advantages of sharing files in a LAN. For instance, when you have a multimedia box (playing music, movies….) it is great to be able to access the music on that box from any machines in your LAN.

Let’s get started. In the first place, you need to have samba installed.

$sudo apt-get install samba

Because we are going to make samba security insecure, make sure only your local network can access samba service. To do so, open and edit/etc/samba/smb.conf

$sudo vi /etc/samba/smb.conf

and set interfaces to lo and your local network interface. In my case: eth1.

interfaces = lo eth1
bind interfaces only = true

Now, it is time to smoothen samba default security by changing the security variable: security and make sure it is set to share instead ofuser and that guest account is enabled:

security = share
...
...
guest account = nobody

Now, we can create a share to be accessible to guest users:

[Guest Share]
        comment = Guest access share
        path = /path/to/dir/to/share
        browseable = yes
        read only = yes
        guest ok = yes

You can now test that your configuration is good using testparm:

$ testparm

If everything is fine, it is time to reload samba service to have your new configuration taken into account:

$sudo /etc/init.d/samba reload

That’s it, anybody in your LAN can now access your share.

  • Comments Off

run php script on startup

Suse appears to use init scripts to launch apps at start up and you will need to write a custom init script to launch your socket.php script.

At the bare minimum, you could create an executable script in /etc/rc2.d named S99socket containing

#!/bin/sh
/path/to/php /path/to/socket.php &

  • Comments Off

PG Map

  • Comments Off

Netcall Setup

TOT Netcall for Nokia Phone

  • Comments Off

การติดตั้ง Tomcat ซึ่งเป็น Servlets container ต้องมี JAVA ติดตั้งอยู่ด้วย ปรกติ Tomcat ที่อยู่บน repository ของ Debian จะผูกติดกับ gij หรือ GNU interpreter for Java bytecode ซึ่งเป็นของ GNU แต่ส่วนใหญ่แล้วเรามักติดตั้ง Tomcat ควบคู่กับ JAVA ของ SUN

การใช้งานใช้ java บนของ sun บน debian นั้นต้องเพิ่ม repository ใน /etc/apt/sources.list ให้มีในส่วนของ contrib และ non-free ก่อน เช่น (สำหรับผู้ใช้ในประเทศไทยครับ)

Mirror แห่งชาติ ครับ

deb http://mirror.in.th/debian/ etch main contrib non-free
deb-src http://mirror.in.th/debian/ etch main contrib non-free

ของ Linux.thai.net ครับ ตามสะดวก

deb http://linux.thai.net/debian/ etch main contrib non-free
deb-src http://linux.thai.net/debian/ etch main contrib non-free

เสร็จแล้วก็

$ sudo aptitude update

เพื่อเพิ่มชื่อของโปรแกรมต่างๆ หลังจากนั้น ให้ติดตั้ง java ของ sun ครับ

$ sudo aptitude install sun-java5-jdk

รอจน install เรียบร้อยหลังจากนั้น ก็ install Tomcat ต่อครับ

$ sudo aptitude install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps

รอจน install ให้เรียบร้อย หลังจากนั้นให้ตรวจสอบดูว่าตอนนี้เราใช้ Java ของ sun อยู่หรือเปล่า โดยใช้คำสั่งนี้ครับ

$ sudo update-alternatives –config java
There are 2 alternatives which provide `java’.

Selection Alternative
———————————————–
+ 1 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
* 2 /usr/bin/gij-wrapper-4.1

Press enter to keep the default[*], or type selection number: 1
Using `/usr/lib/jvm/java-1.5.0-sun/jre/bin/java’ to provide `java’.

$ sudo update-alternatives –config javac
There are 2 alternatives which provide `javac’.

Selection Alternative
———————————————–
1 /usr/lib/jvm/java-1.5.0-sun/bin/javac
*+ 2 /usr/bin/ecj-bootstrap

Press enter to keep the default[*], or type selection number: 1
Using `/usr/lib/jvm/java-1.5.0-sun/bin/javac’ to provide `javac’.

เพื่อให้โปรแกรมตัวอื่นสามารถรู้จัก JAVA_HOME ครับต้องไปแก้ที่ /etc/profile โดยเพิ่มสิ่งเหล่านี้ลงไปครับ ทุกครังที่รีบูทเครื่อง เราสามารใช้งานตัวแปร JAVA_HOME ได้

JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun"
export JAVA_HOME

ตรวจสอบ java อีกครั้งเพื่อความแน่ใจ หากขึ้นประมาณนี้ถือว่าใช้ได้ครับ

$ java -version
java version “1.5.0_10″
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_10-b03, mixed mode)

ทดสอบดูว่าเราพร้อมจะเขียน JSP แล้วยัง โดยพิมพ์ที่ Web browser ว่า

http://192.168.119.129:8180/
  • Comments Off

text to wav

Requirements
*nix based Operating System
Festival for Linux
PHP 3 or higher
LAME Ain’t an MP3 Encoder (optional)

install
festival festlex-cmu festlex-poslex festvox-kallpc16k libestools1.2 sgml-base

wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97b2.tar.gz
tar zxvf lame-3.97b2.tar.gz
cd lame-3.97
./configure –prefix=/usr
make
make install

  • Comments Off

Time

Mp3

Msn status

  • manon2029@hotmail.com is

Chat with Meeh

Donate

    If you find an article useful, then please make a donation.

หมวดหมู่

UserOnline

Counter

  • Visitors today: 4
  • Visitors yesterday: 46
  • Visitors per day: 1,212
  • Max. visitors per day: 579
  • Total page views: 600,821
  • Page views of this page: 1,212
  • Currently online: 2
  • Max. online: 192
  • Total visitors: 129,239
  • counterStatistics