前面我有篇文章有说道在我们本地做开发调试的过程中常用到的一个映射工具nat123,简单的文章介绍可以参见【nat123内网地址公网映射实现】 ,这里我来说说如何在Centos6.5下对nat123的安装使用!

(一)安转环境准备工作

①环境部署之安装bison环境;如提示已存在时,忽略;如提示是否继续时输入y回车继续!

#yum  install bison

1.jpg

②环境部署之安装gettext环境;如提示已存在时,忽略;如提示是否继续时输入y回车继续!

#yum  install  gettext

2.jpg

③mono环境安装包下载(在线下载mono2.8或更高版本安装包)

#wget  http://origin-download.mono-project.com/sources/mono/mono-2.8.1.tar.bz2
#wget  
#tar  jvxf  mono-2.8.1.tar.bz2     ——解压本地
#tar  jvxf  monodevelop-2.8.1.tar.bz2     ——解压本地 
--安装mono环境
#cd  /mnt/mono-2.8     ——进入mono-2.8.1的解压目录
#./configure --prefix=/usr              ——如提示少什么,就先安装什么,再来执行这一句,直到无报错提示(在这里要注意是否缺失g++的包:yum install gcc gcc-c++)
#make
#make  install
--安装monodev环境
#cd /monodevelop-2.8.1     ——进入monodevelop-2.8.1的解压目录
#./configure --prefix=/usr              ——如提示少什么,就先安装什么,再来执行这一句,直到无报错提示
#make
#make  install

安装成功之后我们可以通过#mono -V查看mono的版本信息如下图:

3.jpg

(二)nat123客户端安装

①下载安转软件nat123并解压

#wget  http://www.nat123.com/down/nat123linux.tar.gz    ——下载安装包。过程可能有转跳提示,忽略它
#tar  -zxvf  nat123linux.tar.gz

②安装screen;本地已经有,或安装提示已存在,可忽略!

yum  install  screen

③客户端启动

[root@localhost nat]# screen  -S  nat123   ——创建一个客户端运行进程。注意是大写的S字母
[root@localhost nat]# mono  nat123linux.sh  ——运行客户端,并按提示依次输入自己的帐号和密码 
**********nat123 for linux***************
initing...
init sucess
loading login...
Thank you for using nat123linux(V3.150510)
please enter your nat123 username(enter x to exit):
d*****    --nat123用户名
please enter your nat123 password(enter x to exit):
******    ---用户密码
logging,please wait!正在登陆,请稍候...
login success!登陆成功,映射服务后台运行中....
**********nat123 for linux***************
**********Thank you for using nat123
16-8-29 下05时05分39秒:nat123linux(V3.150510) service is running...
welcome for dapengniao!
remote manage nat or dns please visit http://www.nat123.com/
enter x to exit, Press Ctrl+a d(Hold Ctrl, in turn according to the A, D) to hide nat123 to backgroup
---运行成功正常后,按住Ctrl键,并依次先按A,再按D,退出当前窗口,提示显示为detached分开任务,不会关闭当前进程

[detached]

在Linux下就没有像win下那么方便的窗体控制程序了,所以我们需要配置映射或者什么的就需要到web站点去做了!

(三)对nat映射的配置

我们到nat123网站登录,在用户中心的——》端口映射中添加和管理我们的端口映射,简单截图如下:

4.jpg

那么到这里简单的nat123在Centos下的安装和使用就完成了,最后,感谢你的翻阅,如有疑问可以留言交流讨论,谢谢,更多博客内容可留意个人网站 http://www.cuiyongzhi.com/。