3月 232011
 

HOWTO : Home made NAS server with Ubuntu 8.04.1 – Part VII
[HOWTO] 用Ubuntu 8.04.1搭建NAS服务器 – Part VII

Some personal NAS in the market comes with iTune music server. However, iTune is not an Open Source software.
市场上一些家用NAS带有iTune音乐服务。不过iTune不是开源软件。

Sockos is an Open Source personal music server that written in Java. She requires Sun’s Java Runtime. IcedTea is not compatible so far.
Sockos是一个java编写的开源个人音乐服务。要求sun的jre支持。目前还不能兼容IcedTea。

Sockos is a cross platform software and requires no installation. She can run on a standalone personal computer or on a server. For running on personal computer with GUI, please refer to her official site.
Sockos是跨平台的,不需要安装。可以独立运行在个人PC机或服务器上。如果运行在有GUI界面的个人机上,请指向它的官方站点。

The client computer requires no mp3 player to play the music but may need Flash (optional). Flex player requires no installation of music player on the clinet computer. Other formats, such as WMV, OGG and Flac, require pre-installed music players that fit for the special formats.
客户机上播放音乐,不需要mp3播放器,可能需要Flash。客户机上的Flex player不需要安装。其他的格式,如WMV, OGG and Flac,需要预先安装相应的播放器。

The advantage of Sockos is that you can listen to your mp3 files at anytime and anywhere under the condition that fast internet connection is available. The disadvantage is that you should have at least IEEE 802.11g (54M) Wifi connection for smooth operation. GPRS and HSDPA do not work properly in my testing.
使用Sockos的优点是,在有快速互联网连接时,你可以在任何时间任何地点听你的mp3文件。缺点是,你至少要有EEE 802.11g (54M) Wifi,才能有平滑的操作。经过测试,GPRS和 HSDPA无法正常运行。

I am going to talk about running Sockos in Ubuntu Server 8.04.1 (without GUI).
下面说一下在Ubuntu Server 8.04.1 (without GUI)运行Sockos。

Step 1 :

Install the Sun Java and runtime in the Ubuntu server (NAS).
在Ubuntu server (你的NAS)安装Sun Java和运行库。
sudo apt-get install sun-java6-bin sun-java6-fonts sun-java6-jre sun-java6-plugin

Download the Sockos from the official site. Extact it on your home directory of your Ubuntu server. If your server (NAS) is detached the keyboard and monitor, plug in them now.
从官方网站下载Sockos。在Ubuntu server你的home目录中解开压缩。如果你的服务器上没有连接键盘和显示器,现在接上。

wget http://sockso.pu-gh.com/downloads/sockso-latest.zip
unzip sockso-latest.zip
cd sockos-1.0.9

Step 2 :

Create a directory at /var for storing the database files.
在/var中创建目录保存数据库文件。
sudo mkdir /var/sockos
chmod -R 0755 /var/sockos

Step 3 :

Run the server as user (such as samiux) at the physcial server at tty1 (Ctrl+Alt+F1) at /home/samiux/sockos-1.0.9.
用户(如samiux)在服务器上的控制台tty1(Ctrl+Alt+F1) 终端控制台,进入目录/home/samiux/sockos-1.0.9

sudo sh linux.sh –nogui –datadir /var/suckso

A directory namely “covers” and files “database.lck”, “database.log”, “database.properties” and “database.script” will be created on /var/sockso.
在目录/var/sockso下创建了子目录covers和文件database.lck”, “database.log”, “database.properties” and “database.script”。

A console will be prompted and telling you that your IP address and the port 4444 to be used for the music server.
控制台会提示你,你的ip地址4444端口为音乐服务占用。

Step 4 :

Now, create the paths for the mp3 that located in the music server (your NAS – Ubuntu Server).
现在,在音乐服务器(你的NAS – Ubuntu Server)上创建存放mp3文件的路径。

For example, if some mp3 files are storing at 3 locations, such as :
/home/samiux/music, /home/john/mp3 and /home/mary/songs.
例如,如果一些mp3文件分别存放在3个地方,如:/home/samiux/music, /home/john/mp3 and /home/mary/songs

At the console (at the server), type the following commands :
在服务器控制台上,输入下面的命令:
coladd /home/samiux/music
coladd /home/john/mp3
coladd /home/mary/songs

collist to list all the paths that you just created. You can delete the path by coldel command.
collist命令,列出你创建的所有路径。coldel命令,可以删除路径。

Step 5 :

You can create a user, e.g. samiux by the following command or create at the web interface.
你可以用命令行或者在web界面,创建一个用户,如:samiux
useradd samiux 9876543210 [email protected]

(where 9876543210 is password and the other is your email address)
(9876543210是口令,后面的是email地址)

Your Sockos Music Server is ready but you should not exit the console; otherwise, it will terminate the Sockos. Leave it alone and press Ctrl+Alt+F2. You can revisit to the console again by pressing Ctrl+Alt+F1. Type “help” for assistance at the console.
你的Sockos音乐服务已经就绪了,但是你不能推出控制台,如果退出,Sockos也会停止。不去管他,切换到tty2(Ctrl+Alt+F2切换),需要回到tty1时(Ctrl+Alt+F1切换)。有关控制台的帮助信息,使用help命令。

Step 6 :

Go to your personal computer (client) and open a browser, e.g. Firefox and type the following on the address.
在你的pC机上打开浏览器,如Firefox,输入网址:
http://192.168.0.15:4444

(where 192.168.0.15 is your NAS address behind a router, 4444 is the port that Sockos to be used)
(192.168.0.15是你在路由器后面的NAS地址,端口4444是Sockos使用的服务端口)

Warning
警告

If you want to share your music files with others over the internet, you should beware the copyright law in the music industry or you may in serious trouble – lawsuit. You have been warned.
如果你想要通过互联网分享音乐文件,你要小心音乐工业的版权法,否则你会遇到大麻烦-法律诉讼。你已经看到并理解这个警告。

Enjoy your loving music at anywhere and anytime!!!

 回复

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>