那位大侠可以介绍一下如何装moshell?
爱立信moshell的安装
我要回答
问题答案
答:
1、moshell在windows下安装的方法:
Installation for Windows (using Cygwin)
Note Go directly to step 13, MoShell Installation, if you have already installed and configured
Cygwin previously.
Prerequisite: Java Run-Time Environment 1.2.2 or higher must be installed on the workstation.
Java 1.3.1_15 or 1.3.1_16 is recommended because it uses the least amount of memory and
supports all features on MoShell.
When running on Windows, Moshell uses a unix emulator known as Cygwin.
2.4.1 Getting and installing cygwin
1. Go to the website http://www.cygwin.com/
2. Click on Install Now
3. Save the setup.exe file, then execute it.
4. Choose Install from internet, click Next
5. Root Directory C:cygwin (It is not recommended to choose a different directory, especially
if it contains spaces)
IMPORTANT: Default Text File Type should be set to UNIX (NOT DOS !!! otherwise ftp
transfers get corrupted). Then click Next.
6. Select Internet Connection: put the proxy settings (generally use IE5 settings works with
ESOE PCs). Click Next.
7. Select Packages: Add the following packages:
• under Archive select unzip
• under Interpreters select perl
• under Net select inetutils, openssh, and openssl
• under Shells select rxvt
• optional: under Editors select vim (if you want to be able to edit files with vi)
8. Click Next, install will start
9. In the directory C:Cygwin ,double-click on the file cygwin.bat. This will startup the
Cygwin window and create some files. Now close the Cygwin window.
Open an editor and edit the file cygwin.bat
Delete the line: bash --login -i. At the end of the file add the following (replace
xxxx with your user id):
set USER=xxxx
set HOME=/home/xxxx
set SHELL=/bin/bash
rxvt -sl 65000 -e /bin/bash --login -i
IMPORTANT: Make sure that there are no spaces at the end of the lines otherwise the
windows environment variables don’t get set correctly and your .Xdefaults file will not be
read (meaning that rxvt looks horrible!).
10. Open the file C:Cygwinetcprofile in a text editor and add the following 6 lines at the
end of the file (replace xxx with your user id!):
export USER=xxxx
export HOME=/home/xxxx
export SHELL=/bin/bash
mkdir -p $HOME
cd $HOME
source $HOME/.bashrc
11. Edit the file C:/Cygwin/etc/passwd in a text editor and make sure that there is a row with
your username and home directory. If the home directory (found towards the end of the
line) looks like /cygdrive/h then replace this with /home/youruserid (replace youruserid
with your user id!!). This is needed for ssh to function properly.
12. Start a Cygwin Terminal window by clicking on the icon in start menu or on desktop, then
run the following commands:
Create the following 3 files in your /home/youruserid directory: .bashrc, .inputrc, and
.Xdefaults This can be done with the commands:
touch .bashrc
touch .inputrc
touch .Xdefaults
13. Go to the directory C:Cygwinhomeyouruserid (from windows explorer) and open the
following 3 files in a text editor:
In the .bashrc file, put the following lines:
unset PROMPT_COMMAND
export PS1="[ 33[1m][w]\$[ 33[0m] "
alias ls=’ls -FX’
set -o notify
set -o ignoreeof
shopt -s cdspell
shopt -s cdable_vars
shopt -s checkhash
shopt -s checkwinsize
shopt -s sourcepath
shopt -s histappend
export PATH=$PATH:/home/yourid/moshell
The last line appends the moshell directory to your $PATH. This will enable you to call
moshell from any directory.
In the .inputrc file, put the following lines:
set bell-style visible
set convert-meta Off
set output-meta On
set input-meta On
set completion-ignore-case on
set completion-query-items 150
set mark-directories on
set visible-stats On
set show-all-if-ambiguous On
set expand-tilde On
"e[D": backward-char
"e[C": forward-char
"e[A": history-search-backward
"e[B": history-search-forward
"e[7~": beginning-of-line
"e[8~": end-of-line
"e[1~": beginning-of-line
"e[4~": end-of-line
"e[3~": delete-char
"e[2~": menu-complete
"M-[2~": paste-from-clipboard # Insert
"M-q": menu-complete
"C-d": delete-char
"C-l": clear-screen
"C-xdf": dump-functions
"C-xdv": dump-variables
"C-xdm": dump-macros
(Type man bash if you want to get more information about what these lines do)
In the .Xdefaults file, put the following lines:
Rxvt*background: Black
Rxvt*foreground: White
Rxvt*saveLines: 65535
Rxvt*termName: xterm
Rxvt*geometry: 143x64+0+0
Rxvt*loginShell: true
Rxvt*font: "Lucida Console-11"
Rxvt*cutchars: ‘"’&()*,;<=>? []{|}
These are just examples of terminal properties, you can change them to fit your needs.
Type man rxvt to view all available properties.
14. Open a new cygwin terminal window. The window should be black with white text and
the prompt should like this: [~]$
If not, then go through the last 4 steps again and make sure you haven’t missed out
anything.
15. Moshell installation
Follows these steps if you already have a working Cygwin environment.
• Put the moshellxxx.zip file in c:cygwintmp
• Open the cygwin shell and go the /tmp directory. Run the following:
unzip -o moshellxxx.zip
bash moshell_install
Moshell contains an automated upgrade engine. When prompted to enter the directory
where you want to install moshell, it is recommended to enter the same directory as the
previous revision of moshell. The automated upgrade engine will take care of copying all
your custom files (jar/xml files, site files, etc.) across to the new revision. For your safety
the old revision gets moved to a different location so you can still access it if needed.
When prompted to enter the Java directory, choose either of:
• /cygdrive/c/Progra~1/javasoft/jre/whichEverVersion/bin/java
• /cygdrive/c/WINNT/system32/java
16. Running moshell for the first time
If you have set the PATH variable correctly in your ~/.bashrc file, you should be able to
run moshell from any directory. E.g:
moshell <ip-address>
If this is the first time moshell is installed on this PC, then it will download a number of jar
files from the node. No progress indicator will be shown so just be patient as it will take
a few minutes. Progress can be seen by doing ls -l in the commonjars and jarxml
directories.
Known Limitation: CTRL-C may not work all the time. In this case, it is possible to do instead:
CTRL-Z, then kill %1.
More info about Cygwin installation issues can be found at: http://cygwin.com/faq/
faq0.html
Uninstall instructions for cygwin can be found at http://cygwin.com/faq/faq.setup.
html#faq.setup.uninstall-all
2、moshell在VISTA下安装的方法
详见以下帖子《moshell在VISTA下安装的方法》
1、moshell在windows下安装的方法:
Installation for Windows (using Cygwin)
Note Go directly to step 13, MoShell Installation, if you have already installed and configured
Cygwin previously.
Prerequisite: Java Run-Time Environment 1.2.2 or higher must be installed on the workstation.
Java 1.3.1_15 or 1.3.1_16 is recommended because it uses the least amount of memory and
supports all features on MoShell.
When running on Windows, Moshell uses a unix emulator known as Cygwin.
2.4.1 Getting and installing cygwin
1. Go to the website http://www.cygwin.com/
2. Click on Install Now
3. Save the setup.exe file, then execute it.
4. Choose Install from internet, click Next
5. Root Directory C:cygwin (It is not recommended to choose a different directory, especially
if it contains spaces)
IMPORTANT: Default Text File Type should be set to UNIX (NOT DOS !!! otherwise ftp
transfers get corrupted). Then click Next.
6. Select Internet Connection: put the proxy settings (generally use IE5 settings works with
ESOE PCs). Click Next.
7. Select Packages: Add the following packages:
• under Archive select unzip
• under Interpreters select perl
• under Net select inetutils, openssh, and openssl
• under Shells select rxvt
• optional: under Editors select vim (if you want to be able to edit files with vi)
8. Click Next, install will start
9. In the directory C:Cygwin ,double-click on the file cygwin.bat. This will startup the
Cygwin window and create some files. Now close the Cygwin window.
Open an editor and edit the file cygwin.bat
Delete the line: bash --login -i. At the end of the file add the following (replace
xxxx with your user id):
set USER=xxxx
set HOME=/home/xxxx
set SHELL=/bin/bash
rxvt -sl 65000 -e /bin/bash --login -i
IMPORTANT: Make sure that there are no spaces at the end of the lines otherwise the
windows environment variables don’t get set correctly and your .Xdefaults file will not be
read (meaning that rxvt looks horrible!).
10. Open the file C:Cygwinetcprofile in a text editor and add the following 6 lines at the
end of the file (replace xxx with your user id!):
export USER=xxxx
export HOME=/home/xxxx
export SHELL=/bin/bash
mkdir -p $HOME
cd $HOME
source $HOME/.bashrc
11. Edit the file C:/Cygwin/etc/passwd in a text editor and make sure that there is a row with
your username and home directory. If the home directory (found towards the end of the
line) looks like /cygdrive/h then replace this with /home/youruserid (replace youruserid
with your user id!!). This is needed for ssh to function properly.
12. Start a Cygwin Terminal window by clicking on the icon in start menu or on desktop, then
run the following commands:
Create the following 3 files in your /home/youruserid directory: .bashrc, .inputrc, and
.Xdefaults This can be done with the commands:
touch .bashrc
touch .inputrc
touch .Xdefaults
13. Go to the directory C:Cygwinhomeyouruserid (from windows explorer) and open the
following 3 files in a text editor:
In the .bashrc file, put the following lines:
unset PROMPT_COMMAND
export PS1="[ 33[1m][w]\$[ 33[0m] "
alias ls=’ls -FX’
set -o notify
set -o ignoreeof
shopt -s cdspell
shopt -s cdable_vars
shopt -s checkhash
shopt -s checkwinsize
shopt -s sourcepath
shopt -s histappend
export PATH=$PATH:/home/yourid/moshell
The last line appends the moshell directory to your $PATH. This will enable you to call
moshell from any directory.
In the .inputrc file, put the following lines:
set bell-style visible
set convert-meta Off
set output-meta On
set input-meta On
set completion-ignore-case on
set completion-query-items 150
set mark-directories on
set visible-stats On
set show-all-if-ambiguous On
set expand-tilde On
"e[D": backward-char
"e[C": forward-char
"e[A": history-search-backward
"e[B": history-search-forward
"e[7~": beginning-of-line
"e[8~": end-of-line
"e[1~": beginning-of-line
"e[4~": end-of-line
"e[3~": delete-char
"e[2~": menu-complete
"M-[2~": paste-from-clipboard # Insert
"M-q": menu-complete
"C-d": delete-char
"C-l": clear-screen
"C-xdf": dump-functions
"C-xdv": dump-variables
"C-xdm": dump-macros
(Type man bash if you want to get more information about what these lines do)
In the .Xdefaults file, put the following lines:
Rxvt*background: Black
Rxvt*foreground: White
Rxvt*saveLines: 65535
Rxvt*termName: xterm
Rxvt*geometry: 143x64+0+0
Rxvt*loginShell: true
Rxvt*font: "Lucida Console-11"
Rxvt*cutchars: ‘"’&()*,;<=>? []{|}
These are just examples of terminal properties, you can change them to fit your needs.
Type man rxvt to view all available properties.
14. Open a new cygwin terminal window. The window should be black with white text and
the prompt should like this: [~]$
If not, then go through the last 4 steps again and make sure you haven’t missed out
anything.
15. Moshell installation
Follows these steps if you already have a working Cygwin environment.
• Put the moshellxxx.zip file in c:cygwintmp
• Open the cygwin shell and go the /tmp directory. Run the following:
unzip -o moshellxxx.zip
bash moshell_install
Moshell contains an automated upgrade engine. When prompted to enter the directory
where you want to install moshell, it is recommended to enter the same directory as the
previous revision of moshell. The automated upgrade engine will take care of copying all
your custom files (jar/xml files, site files, etc.) across to the new revision. For your safety
the old revision gets moved to a different location so you can still access it if needed.
When prompted to enter the Java directory, choose either of:
• /cygdrive/c/Progra~1/javasoft/jre/whichEverVersion/bin/java
• /cygdrive/c/WINNT/system32/java
16. Running moshell for the first time
If you have set the PATH variable correctly in your ~/.bashrc file, you should be able to
run moshell from any directory. E.g:
moshell <ip-address>
If this is the first time moshell is installed on this PC, then it will download a number of jar
files from the node. No progress indicator will be shown so just be patient as it will take
a few minutes. Progress can be seen by doing ls -l in the commonjars and jarxml
directories.
Known Limitation: CTRL-C may not work all the time. In this case, it is possible to do instead:
CTRL-Z, then kill %1.
More info about Cygwin installation issues can be found at: http://cygwin.com/faq/
faq0.html
Uninstall instructions for cygwin can be found at http://cygwin.com/faq/faq.setup.
html#faq.setup.uninstall-all
2、moshell在VISTA下安装的方法
详见以下帖子《moshell在VISTA下安装的方法》
回答者:wangyuan072 回答时间:2009-05-31 09:43
补充:
对上述windows安装的中文解释
WINDOWS XP下CYGWIN+MOSHELL安装详解:
1、首先安装JAVA, j2re-1_4_2_11-windows-i586-p.exe。
2、安装cygwin,解压cygwin_setup.zip,运行setup.exe,安装时需要注意Select Packages需要增加安装Archive下的unzip,Editors下的vim,Interpreters下的perl,Net下的inetutils、openssh和openssl,Shells下的rxvt。
3、cygwin相关设置
安装完成后双击打开C:Cygwincygwin.bat,然后Logout关闭程序。编辑Cygwin目录下cygwin.bat文件,删除bash --login -i.增加如下内容:
set USER=userid
set HOME=/home/userid
set SHELL=/bin/bash
rxvt -sl 65000 -e /bin/bash --login -i
注:#userid是自己定义的用户名称,文件编辑时推荐使用Uedit,打开时不要转换为DOS格式,并且加入的每行后面不能带有任何包括空格在内的字符,保持文件原格式存储!
修改Cygwinetcprofile文件,在文件最后增加如下内容:
export USER=userid
export HOME=/home/userid
export SHELL=/bin/bash
mkdir -p $HOME
cd $HOME
source $HOME/.bashrc
注:#userid是自己定义的用户名称,文件编辑时推荐使用Uedit,打开时不要转换为DOS格式,并且加入的每行后面不能带有任何包括空格在内的字符,保持文件原格式存储!
打开Cygwin在/home/userid目录内创建3个文件 .bashrc .inputrc .Xdefaults.命令如下:
touch .bashrc
touch .inputrc
touch .Xdefaults
创建后编辑这3个文件,在文件结尾后分别加上如下内容:
文件".bashrc"加入
unset PROMPT_COMMAND
export PS1="[ 33[1m ][w]\$[ 33[0m ] "
set -o notify
set -o ignoreeof
shopt -s cdspell
shopt -s cdable_vars
shopt -s checkhash
shopt -s checkwinsize
shopt -s sourcepath
shopt -s histappend
export PATH=$PATH:/home/userid/moshell
文件".inputrc"加入
set bell-style visible
set convert-meta Off
set meta-flag on
set output-meta On
set input-meta On
set completion-ignore-case on
set completion-query-items 150
set mark-directories on
set visible-stats On
set show-all-if-ambiguous On
set expand-tilde On
"e[D": backward-char
"e[C": forward-char
"e[A": history-search-backward
"e[B": history-search-forward
"e[7~": beginning-of-line
"e[8~": end-of-line
"e[1~": beginning-of-line
"e[4~": end-of-line
"e[3~": delete-char
"e[2~": menu-complete
"M-[2~": paste-from-clipboard # Insert
"M-q": menu-complete
"C-d": delete-char
"C-l": clear-screen
"C-xdf": dump-functions
"C-xdv": dump-variables
"C-xdm": dump-macros
文件".Xdefaults"加入
Rxvt*background: Black
Rxvt*foreground: White
Rxvt*saveLines: 65535
Rxvt*termName: xterm
Rxvt*geometry: 144x64+0+0
Rxvt*loginShell: true
Rxvt*font: "Lucida Console-11"
Rxvt*cutchars: `"'&()*,;<=>? []{|}
注:.bashrc文件内#userid是自己定义的用户名称,.Xdefaults是显示界面定义文件,你可以根据自己的爱好修改,这3个文件编辑时推荐使用Uedit,打开时不要转换为DOS格式,并且加入的每行后面不能带有任何包括空格在内的字符,保持文件原格式存储!
重新打开Cygwin后会显示[~]$
4、Moshell安装
将moshell7.0y.zip拷贝至/cygwin/home/userid/目录并解压,执行moshell_install
提示“Please choose the type of installation.”时选择 0
提示“Please enter the following absolute pathes(auto-completion using<TAB>):”时输入 ~
提示“Path to Java = /cygdrive/c/windows/system32/java . OK ? [y/n]”时选择 y
提示“Path to perl (used by mobatch)=/usr/bin/perl . OK ?[y/n]”时选择 y
提示“Please enter path to Java (must be1.2.2 or higher): ”时输入/cygdrive/c/windows/system32/java
提示“Please enter path to perl:”时输入/usr/bin/perl
安装完成后运行 moshell 正常显示为脱机状态,输入h可得到命令帮助,输入q退出软件,安装完成。
对上述windows安装的中文解释
WINDOWS XP下CYGWIN+MOSHELL安装详解:
1、首先安装JAVA, j2re-1_4_2_11-windows-i586-p.exe。
2、安装cygwin,解压cygwin_setup.zip,运行setup.exe,安装时需要注意Select Packages需要增加安装Archive下的unzip,Editors下的vim,Interpreters下的perl,Net下的inetutils、openssh和openssl,Shells下的rxvt。
3、cygwin相关设置
安装完成后双击打开C:Cygwincygwin.bat,然后Logout关闭程序。编辑Cygwin目录下cygwin.bat文件,删除bash --login -i.增加如下内容:
set USER=userid
set HOME=/home/userid
set SHELL=/bin/bash
rxvt -sl 65000 -e /bin/bash --login -i
注:#userid是自己定义的用户名称,文件编辑时推荐使用Uedit,打开时不要转换为DOS格式,并且加入的每行后面不能带有任何包括空格在内的字符,保持文件原格式存储!
修改Cygwinetcprofile文件,在文件最后增加如下内容:
export USER=userid
export HOME=/home/userid
export SHELL=/bin/bash
mkdir -p $HOME
cd $HOME
source $HOME/.bashrc
注:#userid是自己定义的用户名称,文件编辑时推荐使用Uedit,打开时不要转换为DOS格式,并且加入的每行后面不能带有任何包括空格在内的字符,保持文件原格式存储!
打开Cygwin在/home/userid目录内创建3个文件 .bashrc .inputrc .Xdefaults.命令如下:
touch .bashrc
touch .inputrc
touch .Xdefaults
创建后编辑这3个文件,在文件结尾后分别加上如下内容:
文件".bashrc"加入
unset PROMPT_COMMAND
export PS1="[ 33[
set -o notify
set -o ignoreeof
shopt -s cdspell
shopt -s cdable_vars
shopt -s checkhash
shopt -s checkwinsize
shopt -s sourcepath
shopt -s histappend
export PATH=$PATH:/home/userid/moshell
文件".inputrc"加入
set bell-style visible
set convert-meta Off
set meta-flag on
set output-meta On
set input-meta On
set completion-ignore-case on
set completion-query-items 150
set mark-directories on
set visible-stats On
set show-all-if-ambiguous On
set expand-tilde On
"e[D": backward-char
"e[C": forward-char
"e[A": history-search-backward
"e[B": history-search-forward
"e[7~": beginning-of-line
"e[8~": end-of-line
"e[1~": beginning-of-line
"e[4~": end-of-line
"e[3~": delete-char
"e[2~": menu-complete
"M-[2~": paste-from-clipboard # Insert
"M-q": menu-complete
"C-d": delete-char
"C-l": clear-screen
"C-xdf": dump-functions
"C-xdv": dump-variables
"C-xdm": dump-macros
文件".Xdefaults"加入
Rxvt*background: Black
Rxvt*foreground: White
Rxvt*saveLines: 65535
Rxvt*termName: xterm
Rxvt*geometry: 144x64+0+0
Rxvt*loginShell: true
Rxvt*font: "Lucida Console-11"
Rxvt*cutchars: `"'&()*,;<=>? []{|}
注:.bashrc文件内#userid是自己定义的用户名称,.Xdefaults是显示界面定义文件,你可以根据自己的爱好修改,这3个文件编辑时推荐使用Uedit,打开时不要转换为DOS格式,并且加入的每行后面不能带有任何包括空格在内的字符,保持文件原格式存储!
重新打开Cygwin后会显示[~]$
4、Moshell安装
将moshell7.0y.zip拷贝至/cygwin/home/userid/目录并解压,执行moshell_install
提示“Please choose the type of installation.”时选择 0
提示“Please enter the following absolute pathes(auto-completion using<TAB>):”时输入 ~
提示“Path to Java = /cygdrive/c/windows/system32/java . OK ? [y/n]”时选择 y
提示“Path to perl (used by mobatch)=/usr/bin/perl . OK ?[y/n]”时选择 y
提示“Please enter path to Java (must be
提示“Please enter path to perl:”时输入/usr/bin/perl
安装完成后运行 moshell 正常显示为脱机状态,输入h可得到命令帮助,输入q退出软件,安装完成。
回答者:wangyuan072 回答时间:2009-05-31 09:45


