建造基于Ubuntu的NAS服务器(ftp samba Apache, PHP MySQL(7)

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
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 samiux.com@gmail.com

(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,输入网址:
: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!!!

linux

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wyfzgs.html