Solaris下访问windows共享资源

     今在做实验过程中,发现上传软件太费时而且解压起来也繁琐,还要占用很大的空间,就在windows上创建了共享资源,在linux下使用mount挂载上来,直接解压在windows上面,用完了直接将解压的文件删除即可,这样节省了上传时间和占用虚拟机磁盘空间。然后突发奇想的,在solaris下面,它如何访问windows的共享资源呢?打开solaris虚拟机找了找,mount命令不支持cifs和smbfs文件的挂载,并且也没有smbmount命令。接着使用google搜索,发现了”Sharity 3”软件,可以解决在solaris下访问windows共享资源的软件,其原理就是Linux下面的使用mount挂载cifs文件系统。

sharity软件的官方网站:http://www.obdev.at/products/sharity/download.html.它支持多种平台。这里使用的x86平台的软件包,安装过程如下:

这里的目的是solaris能访问windows共享资源即可,所以呢,一路回车即可。至于此软件的一些其他内容有兴趣的朋友可以研究下,运行setup安装。

[root@sol10 sharity.3.9.solaris-i86pc]# ls
License.txt   Liesmich.txt  Lizenz.txt    Readme.txt    files         manual        setup         uninstall
[root@sol10 sharity.3.9.solaris-i86pc]# ./setup
---------------------------------------------------------------------------

    Type 1 and press Enter for an installation in English language.

    Tippen Sie 2 und dann Enter um in deutscher Sprache zu installieren.

---------------------------------------------------------------------------
Default answer: 1

---------------------------------------------------------------------------
WELCOME TO SHARITY 3 INSTALLATION

This is the install script for Sharity 3. The script will first ask a
couple of questions, then give a summary of your choices and give you a
chance to start over again.

The installation will not begin before the questionnaire is complete. You can
type ^C at any time during the questionnaire to abort the installation.

Please press Enter to start.
---------------------------------------------------------------------------

---------------------------------------------------------------------------
INSTALLATION DIRECTORY

Where do you want to install Sharity? We recommend locations like
/usr/local/sharity3 or /opt/sharity3.
---------------------------------------------------------------------------
Default answer: /usr/local/sharity3

---------------------------------------------------------------------------
SYMLINKS FOR BINARIES?

Sharity comes with binaries which should be in your search path. This can be
accomplished either by adding /usr/local/sharity3/bin
to your search path or by making symlinks from an existing bin directory
to Sharity's binaries.

If you want to create the symlinks, please specify your preferred binary
directory where the symlinks should be created (e.g. /usr/local/bin):
---------------------------------------------------------------------------
Default answer: <none>

---------------------------------------------------------------------------
NETWORK BROWSING DIRECTORY

Sharity provides a network browser similar to the Windows Network
Neighborhood. Where do you want to mount this browser? If you don't want
the browser, answer none (without the quotes).
---------------------------------------------------------------------------
Default answer: /CIFS

---------------------------------------------------------------------------
WORKGROUP OR DOMAIN

Sharity works best if it knows your Windows workgroup or domain. If you know
your workgroup or domain name (fully qualified DNS domain name, if possible),
please enter it below. Otherwise leave it blank. You can always change this
setting later in the Sharity GUI or in the file
/usr/local/sharity3/var/user.cfg.
---------------------------------------------------------------------------
Default answer: <none>

---------------------------------------------------------------------------
WINS SERVER

If your network uses a WINS server (Netbios name server), Sharity should know
about it. If you don't know what a WINS server is, please leave it blank. You
can always set it through the Sharity GUI or in the file
/usr/local/sharity3/var/user.cfg.

If you know your WINS server IP-address, please enter it here. Remember:
we need an IP address (or a DNS name), not a Netbios name of the computer.
---------------------------------------------------------------------------
Default answer: <none>

---------------------------------------------------------------------------
SUMMARY

Summary of your choices:
Installation root directory: "/usr/local/sharity3"
     Upgrade or new install: install
Link binaries to directory: ""
  Network browser directory: "/CIFS"
        Workgroup or Domain: ""
                WINS server: ""

Are these values OK? [Y/n]
---------------------------------------------------------------------------
Default answer: yes

Copying files...
Editing and creating customized files...
Fixing permissions and ownership...
Starting Sharity service...
Starting Sharity daemon:
odcfgparse/info: Reading file "/usr/local/sharity3/etc/config/cifs.cfg"
odcfgparse/info: Reading file "/usr/local/sharity3/etc/config/main.cfg"
odcfgparse/info: Reading file "var/local.cfg"
odcfgparse/info: Reading file "var/user.cfg"
Warning: The master pass phrase for your key chain has been chosen
randomly by the system. Please use "sharity keychain setpass" to
set your own master pass phrase. The master pass phrase is needed
after an upgrade or restore from backup!
done.

---------------------------------------------------------------------------
You must choose a master pass phrase to protect your keychain. The keychain
contains passwords and other secret data. You need this pass phrase after
an upgrade or a restore from backup. Please choose something which can not
be guessed easily (no dictionary words) and which you can remember, although
you don't need it regularly. If you can't decide now, type ^C and use

/usr/local/sharity3/bin/sharity keychain setpass

or the GUI application

/usr/local/sharity3/bin/sharitygui

later to set your pass phrase.
---------------------------------------------------------------------------
New master pass phrase:
Type again to verify:
Pass phrase successfully changed.

---------------------------------------------------------------------------
COMPLETED

The installation has finished. You should start the GUI application now.
It can be found at the path

    /usr/local/sharity3/bin/sharitygui

The GUI application asks for passwords when required and can be used to
configure Sharity. You must run it under the same account which uses the
Sharity mounts in order to get login dialogs for the correct account.

If you don't have a license key yet, please visit
http://www.obdev.at/products/sharity/.
---------------------------------------------------------------------------

安装完成后,会提示运行sharitygui图形界面进行操作。

windows下的共享信息如下所示:

image

image

image

点击mounts选项栏,如图:

image

里面的/CIFS是在安装过程中创建的,不予理会它,点击mount选项,会弹出如下对话:

image

在url栏中,输入windows的IP以及挂载目录,点击mount,会弹出一下对话框:

image

输入用户名以及密码,点击login就会挂载上来。

image

image

image

OK,至此挂载成功。

以上挂载与卸载也可以使用命令行实现,使用sharity命令,如下所示:

sharity命令的用法:

image

挂载:

首先登录到windows上面:

image

接着挂载:

image

然后就可以执行读写操作了:

image

卸载:

image

最后,退出windows会话:

image

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值