Jan 06

转自:http://forum.ubuntu.org.cn/viewtopic.php?t=246980

1.编译安装 Wine
参照教程:
http://chunchu.org/linux/2012/12/12/3618.html

2.安装winetricks
2.1下载winetricks:

wget http://www.kegel.com/wine/winetricks
sudo apt-get install cabextract
chmod +x winetricks
./winetricks 

2.2安装所需的dll:

./winetricks

选择安装msxml3、gdiplus、riched20、riched30、ie6、vcrun6、vcrun2005sp1。

或者直接输入代码安装:

sh winetricks msxml3 gdiplus riched20 riched30 ie6 vcrun6 vcrun2005

3.安装QQ2008
3.1下载QQ2008:
http://download.tech.qq.com/soft/17/21/42698/index.shtml

3.2配置winecfg:
应用程序指向你安装的QQ2008目录中的QQ.exe。
选中QQ在函数库里面添加mfc42.dll,msvcp60.dll,riched20.dll,riched32.dll编辑为原装。
环境XP以上。

3.3注册flash:
复制Flash.ocx到 /home/你的用户名/.wine/drive_c/windows/system32/Macromed/Flash下
要是没有Macromed/Flash,自己建。
输入代码:

env WINEPREFIX="/home/你的用户名/.wine" wine regsvr32 "C:windowssystem32MacromedFlashFlash.ocx" 

4.安装QQ2008
4.1输入代码:

wine QQ2008.exe

4.2新建桌面快捷方式
在桌面新建个文件把下面代码复制进去,另存为QQ2008.desktop。icon的路径上面的是我安装了Linux for QQ的版本的,没安装的大哥们,就随便做张图,标识,自己知道就行了。

#!/usr/bin/env xdg-open
   [Desktop Entry]
   Name=QQ2009
   Exec=env WINEPREFIX="/home/你的用户名/.wine" wine "C:\Program Files\Tencent\QQ\bin\QQ.exe"
   Type=Application
   StartupWMClass=Wine
   Path=/home/你的用户名/.wine/dosdevices/c:/Program Files/Tencent/QQ
   Icon=/usr/share/tencent/qq/qq.png

需要重新编辑代码只需要输入:

gedit QQ2008.desktop

4.3复制字体
登录QQ2008看看是不是文字是方框,要是的话就把simsun.ttc复制到./wine/drive_c/windows/fonts文件夹。

4.4修改注册表文件
编辑代码:

REGEDIT4

[HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionFontLink]
"FontLinkControl"=dword:00004000
"FontLinkDefaultChar"=dword:00003000

[HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionFontLinkSystemLink]
"Lucida Sans Unicode"=hex(7):4d,53,47,4f,54,48,49,43,2e,54,54,43,00,4d,53,55,
 49,00,47,6f,74,68,69,63,00,00
"Microsoft Sans Serif"=hex(7):53,69,6d,53,75,6e,2e,54,54,43,00,53,69,6d,53,75,
  6e,00,00
"SimSun"=hex(7):67,75,6c,69,6d,2e,74,74,63,00,67,75,6c,69,6d,00,00
"Tahoma"=hex(7):53,69,6d,53,75,6e,2e,54,54,43,00,53,69,6d,53,75,6e,00,00

[HKEY_CURRENT_USERSoftwareWineX11 Driver]
"ClientSideAntiAliasWithCore"="Y"
"ClientSideAntiAliasWithRender"="Y"
"ClientSideWithRender"="Y"

[HKEY_CURRENT_USERControl PanelDesktop]
"FontSmoothing"="2"
"FontSmoothingType"=dword:00000002
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001

另存为GB18030 ***.reg。
在终端输入代码:

wine regedit ***.reg

附件:
QQ2008正式版:http://softdl.tech.qq.com/soft/21/QQ2008.zip
Flash.ocx:http://storage.chunchu.net/Picture/flash.tar.gz

最后放上我的运行图片,基本的聊天功能是可以满足的,只是聊天窗口上面有一条黑线,不管怎么说要比那坑爹的Linux for QQ好太多了。

Dec 12

转自:http://blog.yam.com/lijohnson/article/25390911
原标题:《在64位元環境下編譯安裝wine 32bit/64bit》

安装这个方法来编译安装Wine成功率太高了,几乎没有失败过,以前安装网上的其他方法十有八九不能成功,主要原因是编译环境不全,文中的托管在source code上的脚本太有用了,建议试试。

Ubuntu升上9.10後,wine就變得怪怪的,安裝時只能裝套件管理程式的wine 1.2,卻無法安裝主要的wine,從軟體中心安裝也會出現相依性錯誤,只裝1.2的話,運行部份程式又會出錯,最後只好自己手動編譯wine了。

1.下載source code
http://sourceforge.net/projects/wine/files/Source/下載原始碼,目前最新為1.1.33,下載完畢後,直接按右鍵解壓縮。

2.編譯/安裝 for 32bit wine
(1).前置作業

wget http://winezeug.googlecode.com/svn/trunk/install-wine-deps.sh
sudo sh install-wine-deps.sh

此為安裝編譯32位元wine所需的環境套件。

(2).編譯/安裝

./configure
make depend
make
sudo make install

其中make大概要半個小時左右。

(3).運行
wine “檔案名稱”,例如:wine notepad。

(4).移除

sudo make uninstall wine

3.編譯/安裝 for 64bit wine
(1).編譯/安裝

./configure --enable-win64
make depend
make
sudo make install

make同樣會花很久的時間。

(2).運行/移除
同32位元說明。

雖然最後我的問題還是沒有解決,但還是把花了一個早上研究的結果給紀錄一下。另外要說明的是,若是安裝64位元的wine,將只能執行64位元的win程式,若執行32位元的會出現錯誤訊息。

4.相關連結
WineOn64bit – The Official Wine Wiki http://wiki.winehq.org/WineOn64bit
Wine64 – The Official Wine Wiki http://wiki.winehq.org/Wine64
WineHQ http://www.winehq.org/

Dec 12

转自:http://eliteleisure.blog.sohu.com/170648018.html

本方法适用于XP与Ubuntu双系统重新安装XP后修复Grub引导的情况,也适用于在XP下无光驱通过加载Ubuntu LiveCD修复Grub引导的情况,而我自己则是属于那种无光驱无U盘启动的情况。

相信安装过Ubuntu 10.10的朋友都有LiveCD的安装光盘,我们今天就用Ubuntu 10.10的LiveCD的来修复grub2的引导。启动Ubuntu 10.10光盘,选择LiveCD模式,进入之后选择进入终端,先在终端输入如下命令:

sudo fdisk -l (注意是小写的L,不是数字的1,此步用于确定电脑中安装 Ubuntu 10.10的所在分区的位置,输入以后会输出类似如下信息,找到ID为83的那行,记住/dev/sdaX的情况,比如本人的电脑是/dev /sda7,以下就以此为例,你自己的请加以更改)

root@Magtron:/boot/grub# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e95f2

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3661    29400064    7  HPFS/NTFS
/dev/sda2            3661        7308    29297664   83  Linux
/dev/sda3            7308       60802   429685761    5  Extended
/dev/sda5            7308        7430      975872   82  Linux swap / Solaris
/dev/sda6            7430       12171    38083584   83  Linux
/dev/sda7           12171       15818    29296640    b  W95 FAT32
/dev/sda8           15819       60802   361326592   83  Linux

然后再输入:

sudo -i (此步用于得到root权限,无需输入密码,方便以下操作)
mount /dev/sda7 /mnt
mount /dev/sda6 /mnt/boot (如果没 /boot 单独分区这步跳过)
grub-install --root-directory=/mnt/ /dev/sda

和前面一样,要装入第二硬盘的把sda改为sdb。

修复后却无法引导Windows了。可以用下面的方法解决:

进入Ubuntu系统,打开终端,重建Grub列表

sudo update-grub

如果想修改启动顺序,可以修改/boot/grub目录下的grub.cfg文件。

Aug 20

以前一直想使用两个一模一样的硬盘组件磁盘阵列来备份重要资料,尽管主板支持简单的Raid 0和1两种,我只需要使用Raid 1,但是如果系统出现问题需要从磁盘阵列中恢复资料就很麻烦,所以我还是决定在两块磁盘中各放一份,这样的话可以便于将硬盘拆下来挂在其他主机上。Google了一下,Rsync软件能够满足实际的要求,来实现文件夹的同步更新。

以下内容转自:http://y.jmeye.com/index.php?aid=543

1.1 软件简介

Rsync是一个远程数据同步工具,可通过LAN/WAN快速同步多台主机间的文件。Rsync本来是用以取代rcp的一个工具,它当前由rsync.samba.org维护。Rsync使用所谓的“Rsync演算法”来使本地和远程两个主机之间的文件达到同步,这个算法只传送两个文件的不同部分,而不是每次都整份传送,因此速度相当快。运行Rsync server的机器也叫backup server,一个Rsync server可同时备份多个client的数据;也可以多个Rsync server备份一个client的数据。

Rsync可以搭配rsh或ssh甚至使用daemon模式。Rsync server会打开一个873的服务通道(port),等待对方Rsync连接。连接时,Rsync server会检查口令是否相符,若通过口令查核,则可以开始进行文件传输。第一次连通完成时,会把整份文件传输一次,下一次就只传送二个文件之间不同的部份。

Rsync支持大多数的类Unix系统,无论是Linux、Solaris还是BSD上都经过了良好的测试。此外,它在windows平台下也有相应的版本,比较知名的有cwRsync和Sync2NAS。

1.2 基本特点

Rsync的基本特点如下:
1.可以镜像保存整个目录树和文件系统;
2.可以很容易做到保持原来文件的权限、时间、软硬链接等;
3.无须特殊权限即可安装;
4.优化的流程,文件传输效率高;
5.可以使用rcp、ssh等方式来传输文件,当然也可以通过直接的socket连接;
6.支持匿名传输。

1.3 命令语法

rsync的命令格式可以为以下六种:

rsync [OPTION]… SRC DEST
rsync [OPTION]… SRC [USER@]HOST:DEST
rsync [OPTION]… [USER@]HOST:SRC DEST
rsync [OPTION]… [USER@]HOST::SRC DEST
rsync [OPTION]… SRC [USER@]HOST::DEST
rsync [OPTION]… rsync://[USER@]HOST[:PORT]/SRC [DEST]

对应于以上六种命令格式,rsync有六种不同的工作模式:
1)拷贝本地文件。当SRC和DES路径信息都不包含有单个冒号”:”分隔符时就启动这种工作模式。
2)使用一个远程shell程序(如rsh、ssh)来实现将本地机器的内容拷贝到远程机器。当DST路径地址包含单个冒号”:”分隔符时启动该模式。
3)使用一个远程shell程序(如rsh、ssh)来实现将远程机器的内容拷贝到本地机器。当SRC地址路径包含单个冒号”:”分隔符时启动该模式。
4)从远程rsync服务器中拷贝文件到本地机。当SRC路径信息包含”::”分隔符时启动该模式。
5)从本地机器拷贝文件到远程rsync服务器中。当DST路径信息包含”::”分隔符时启动该模式。
6)列远程机的文件列表。这类似于rsync传输,不过只要在命令中省略掉本地机信息即可。

1 同步本机文件测试

rsync –help

你可以看到很多参数,选择自己觉得需要的参数即可。

先测试一下本机同步:

rsync -vzrtopgu –progress /Data/scripts/ /tmp/back_srcipt/

会看到文件在传输,再运行一次,就知道没有运行复制,因为文件没有修改过

增加文件测试:

touch /Data/scripts/test.txt

再运行上面的脚本就可以看到把这个新文件传输过去了,没有复制别的文件。

2 服务器间同步文件

要在服务器间rsync传输文件,需要有一个是开着rsync的服务,而这一服务需要一个配置文件,说明当前运行的用户名和用户组,这个用户名和用户组讲在改变文件权限和相关内容的时候有用,否则有时候会出现提示权限问题。配置文件也说明了模块,模块化管理服务的安全性,每个模块的名称都是自己定义的,可以添加用户名密码验证,也可以验证IP,设置目录是否可写等。

vi /etc/rsyncd.conf

uid=root
gid=root
#这里指定的用户名和用户组是root,权限过高了,出于安全考虑可以用别的

[web_aslibra]
# 这里是认证的模块名,在client端需要指定
path = /Data/webapps/www.aslibra.com/
# 需要做镜像的目录
comment = test
ignore errors
# 可以忽略一些无关的IO错误
read only = yes
# 只读,如果是no,则可以从client发送文件到此服务器
list = no
# 不允许列文件
auth users = aslibra
# 认证的用户名,如果没有这行,则表明是匿名
secrets file = /etc/rsyncd.pass
# 认证文件名

[web_aslibra_public]
path = /Data/webapps/www.aslibra.com/
ignore errors
read only = yes
list = no

[web_aslibra_write]
path = /Data/webapps/www.aslibra.com/
ignore errors
read only = no
hosts allow = 192.168.1.2
list = no

服务启动方式:

/Data/apps/rsync/bin/rsync –daemon

第一个模块,用户验证方式,需要指定用户名密码:

在/etc/下新建一文件rsyncd.pass

#vi /etc/rsyncd.pass
aslibra:aslibra.com

一行一个用户,用户名:密码

修改rsyncd.pass权限

chmod 600 /etc/rsyncd.pass

此步省略会导致rsync无法启动

客户端也需要有密码文件,当然路径可以不一样

rsync -rvlHpogDtS –progress –password-file=/etc/rsyncd.pass [email protected]::web_aslibra /tmp/aslibra.com/

我有时候总是验证不对,不知道是否两个服务器间版本有差异的问题

第二个模块是没有验证的情况,都可读

rsync -rvlHpogDtS –progress [email protected]::web_aslibra_public /tmp/aslibra.com/

第三个是验证ip,而且可写

发送文件很简单,把后面两个参数反过来就可以,拿上一个例子

rsync -rvlHpogDtS –progress /tmp/aslibra.com/ [email protected]::web_aslibra_public

这样会提示出错,因为web_aslibra_public是只读的

rsync -rvlHpogDtS –progress /tmp/aslibra.com/ [email protected]::web_aslibra_write

这样就可以了,但要看从哪个IP来的了,否则也失败

下面是摘录的一些详细的参数说明:

rsyncd.conf参数
uid
该选项指定当该模块传输文件时守护进程应该具有的uid,配合gid选项使用可以确定哪些可以访问怎么样的文件权限,默认值是”nobody”。
gid
该选项指定当该模块传输文件时守护进程应该具有的gid。默认值为”nobody”。
exlude
用来指定多个由空格隔开的多个模式列表,并将其添加到exclude列表中。这等同于在客户端命令中使用–exclude来指定模式,不过配置文件中指定的exlude模式不会传递给客户端,而仅仅应用于服务器。一个模块只能指定一个exlude选项,但是可以在模式前面使用”-”和”+”来指定是exclude还是include。
但是需要注意的一点是该选项有一定的安全性问题,客户很有可能绕过exlude列表,如果希望确保特定的文件不能被访问,那就最好结合uid/gid选项一起使用。
exlude from
指定一个包含exclude模式的定义的文件名,服务器从该文件中读取exlude列表定义。
include
用来指定多个由空格隔开的多个rsync并应该exlude的模式列表。这等同于在客户端命令中使用–include来指定模式,结合include和exlude可以定义复杂的exlude/include规则。一个模块只能指定一个include选项,但是可以在模式前面使用”-”和”+”来指定是exclude还是include。
include from
指定一个包含include模式的定义的文件名,服务器从该文件中读取include列表定义。
auth users
该选项指定由空格或逗号分隔的用户名列表,只有这些用户才允许连接该模块。这里的用户和系统用户没有任何关系。如果”auth users”被设置,那么客户端发出对该模块的连接请求以后会被rsync请求challenged进行验证身份这里使用的challenge/response认证协议。用户的名和密码以明文方式存放在”secrets file”选项指定的文件中。默认情况下无需密码就可以连接模块(也就是匿名方式)。
secrets file
该选项指定一个包含定义用户名:密码对的文件。只有在”auth users”被定义时,该文件才有作用。文件每行包含一个username:passwd对。一般来说密码最好不要超过8个字符。没有默认的secures file名,需要限式指定一个。(例如:/etc/rsyncd.secrets)
strict modes
该选项指定是否监测密码文件的权限,如果该选项值为true那么密码文件只能被rsync服务器运行身份的用户访问,其他任何用户不可以访问该文件。默认值为true。
hosts allow
该选项指定哪些IP的客户允许连接该模块。客户模式定义可以是以下形式:
o xxx.xxx.xxx.xxx,客户主机只有完全匹配该IP才允许访问。例如:192.167.0.1
o a.b.c.d/n,属于该网络的客户都允许连接该模块。例如:192.168.0.0/24
o a.b.c.d/e.f.g.h,属于该网络的客户都允许连接该模块。例如:192.168.0.0/255.255.255.0
o 一个主机名,客户主机只有拥有该主机名才允许访问,例如:backup.linuxaid.com.cn。
o *.linuxaid.com.cn,所有属于该域的主机都允许。
默认是允许所有主机连接。
hosts deny
指定不允许连接rsync服务器的机器,可以使用hosts allow的定义方式来进行定义。默认是没有hosts deny定义

ignore errors
指定rsyncd在判断是否运行传输时的删除操作时忽略server上的IP错误,一般来说rsync在出现IO错误时将将跳过–delete操作,以防止因为暂时的资源不足或其它IO错误导致的严重问题。
ignore nonreadable
指定rysnc服务器完全忽略那些用户没有访问权限的文件。这对于在需要备份的目录中有些文件是不应该被备份者得到的情况是有意义的

客户端同步命令
v, –verbose 详细模式输出
-q, –quiet 精简输出模式
-c, –checksum 打开校验开关,强制对文件传输进行校验
-a, –archive 归档模式,表示以递归方式传输文件,并保持所有文件属性,等于-rlptgoD
-r, –recursive 对子目录以递归模式处理
-R, –relative 使用相对路径信息

rsync foo/bar/foo.c remote:/tmp/

则在/tmp目录下创建foo.c文件,而如果使用-R参数:

rsync -R foo/bar/foo.c remote:/tmp/

则会创建文件/tmp/foo/bar/foo.c,也就是会保持完全路径信息。

-b, –backup 创建备份,也就是对于目的已经存在有同样的文件名时,将老的文件重新命名为~filename。可以使用–suffix选项来指定不同的备份文件前缀。
–backup-dir 将备份文件(如~filename)存放在在目录下。
-suffix=SUFFIX 定义备份文件前缀
-u, –update 仅仅进行更新,也就是跳过所有已经存在于DST,并且文件时间晚于要备份的文件。(不覆盖更新的文件)
-l, –links 保留软链结
-L, –copy-links 想对待常规文件一样处理软链结
–copy-unsafe-links 仅仅拷贝指向SRC路径目录树以外的链结
–safe-links 忽略指向SRC路径目录树以外的链结
-H, –hard-links 保留硬链结
-p, –perms 保持文件权限
-o, –owner 保持文件属主信息
-g, –group 保持文件属组信息
-D, –devices 保持设备文件信息
-t, –times 保持文件时间信息
-S, –sparse 对稀疏文件进行特殊处理以节省DST的空间
-n, –dry-run现实哪些文件将被传输
-W, –whole-file 拷贝文件,不进行增量检测
-x, –one-file-system 不要跨越文件系统边界
-B, –block-size=SIZE 检验算法使用的块尺寸,默认是700字节
-e, –rsh=COMMAND 指定替代rsh的shell程序
–rsync-path=PATH 指定远程服务器上的rsync命令所在路径信息
-C, –cvs-exclude 使用和CVS一样的方法自动忽略文件,用来排除那些不希望传输的文件
–existing 仅仅更新那些已经存在于DST的文件,而不备份那些新创建的文件
–delete 删除那些DST中SRC没有的文件
–delete-excluded 同样删除接收端那些被该选项指定排除的文件
–delete-after 传输结束以后再删除
–ignore-errors 及时出现IO错误也进行删除
–max-delete=NUM 最多删除NUM个文件
–partial 保留那些因故没有完全传输的文件,以是加快随后的再次传输
–force 强制删除目录,即使不为空
–numeric-ids 不将数字的用户和组ID匹配为用户名和组名
–timeout=TIME IP超时时间,单位为秒
-I, –ignore-times 不跳过那些有同样的时间和长度的文件
–size-only 当决定是否要备份文件时,仅仅察看文件大小而不考虑文件时间
–modify-window=NUM 决定文件是否时间相同时使用的时间戳窗口,默认为0
-T –temp-dir=DIR 在DIR中创建临时文件
–compare-dest=DIR 同样比较DIR中的文件来决定是否需要备份
-P 等同于 –partial
–progress 显示备份过程
-z, –compress 对备份的文件在传输时进行压缩处理
–exclude=PATTERN 指定排除不需要传输的文件模式
–include=PATTERN 指定不排除而需要传输的文件模式
–exclude-from=FILE 排除FILE中指定模式的文件
–include-from=FILE 不排除FILE指定模式匹配的文件
–version 打印版本信息
–address 绑定到特定的地址
–config=FILE 指定其他的配置文件,不使用默认的rsyncd.conf文件
–port=PORT 指定其他的rsync服务端口
–blocking-io 对远程shell使用阻塞IO
-stats 给出某些文件的传输状态
–progress 在传输时现实传输过程
–log-format=formAT 指定日志文件格式
–password-file=FILE 从FILE中得到密码
–bwlimit=KBPS 限制I/O带宽,KBytes per second
-h, –help 显示帮助信息

Jun 24

1. / – Root
Every single file and directory starts from the root directory.
Only root user has write privilege under this directory.
Please note that /root is root user’s home directory, which is not same as /.

2. /bin – User Binaries
Contains binary executables.
Common linux commands you need to use in single-user modes are located under this directory.
Commands used by all the users of the system are located here.
For example: ps, ls, ping, grep, cp.

3. /sbin – System Binaries
Just like /bin, /sbin also contains binary executables.
But, the linux commands located under this directory are used typically by system aministrator, for system maintenance purpose.
For example: iptables, reboot, fdisk, ifconfig, swapon

4. /etc – Configuration Files
Contains configuration files required by all programs.
This also contains startup and shutdown shell scripts used to start/stop individual programs.
For example: /etc/resolv.conf, /etc/logrotate.conf

5. /dev – Device Files
Contains device files.
These include terminal devices, usb, or any device attached to the system.
For example: /dev/tty1, /dev/usbmon0

6. /proc – Process Information
Contains information about system process.
This is a pseudo filesystem contains information about running process. For example: /proc/{pid} directory contains information about the process with that particular pid.
This is a virtual filesystem with text information about system resources. For example: /proc/uptime

7. /var – Variable Files
var stands for variable files.
Content of the files that are expected to grow can be found under this directory.
This includes — system log files (/var/log); packages and database files (/var/lib); emails (/var/mail); print queues (/var/spool); lock files (/var/lock); temp files needed across reboots (/var/tmp);

8. /tmp – Temporary Files
Directory that contains temporary files created by system and users.
Files under this directory are deleted when system is rebooted.

9. /usr – User Programs
Contains binaries, libraries, documentation, and source-code for second level programs.
/usr/bin contains binary files for user programs. If you can’t find a user binary under /bin, look under /usr/bin. For example: at, awk, cc, less, scp
/usr/sbin contains binary files for system administrators. If you can’t find a system binary under /sbin, look under /usr/sbin. For example: atd, cron, sshd, useradd, userdel
/usr/lib contains libraries for /usr/bin and /usr/sbin
/usr/local contains users programs that you install from source. For example, when you install apache from source, it goes under /usr/local/apache2

10. /home – Home Directories
Home directories for all users to store their personal files.
For example: /home/john, /home/nikita

11. /boot – Boot Loader Files
Contains boot loader related files.
Kernel initrd, vmlinux, grub files are located under /boot
For example: initrd.img-2.6.32-24-generic, vmlinuz-2.6.32-24-generic

12. /lib – System Libraries
Contains library files that supports the binaries located under /bin and /sbin
Library filenames are either ld* or lib*.so.*
For example: ld-2.11.1.so, libncurses.so.5.7

13. /opt – Optional add-on Applications
opt stands for optional.
Contains add-on applications from individual vendors.
add-on applications should be installed under either /opt/ or /opt/ sub-directory.

14. /mnt – Mount Directory
Temporary mount directory where sysadmins can mount filesystems.

15. /media – Removable Media Devices
Temporary mount directory for removable devices.
For examples, /media/cdrom for CD-ROM; /media/floppy for floppy drives; /media/cdrecorder for CD writer

16. /srv – Service Data
srv stands for service.
Contains server specific services related data.
For example, /srv/cvs contains CVS related data.

转自:http://www.thegeekstuff.com/2010/09/linux-file-system-structure/