在没有 GUI 的服务器上运行 Smalltalk?
我有一个相当明显的问题 - 我想在生产服务器上运行 Smalltalk,而不使用图形界面。 VW 或 Pharo(甚至 Squeak)有可能做到这一点吗?
我有一个没有 X 的 VPS 托管,并且希望在 Smalltalk 上运行一些网站,同时使用成熟的 Smalltalk env(包括 GUI)在本地开发它们。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
是的,可以以“无头”方式部署 Pharo。只需发送 -headless 即可。示例:
通常部署一个运行 Seaside 的 PharoCore 映像,处于无头模式并运行 RFBServer(远程缓冲服务器),它实际上是一个 VNC 服务器。然后,您可以通过 VNC 客户端连接到该映像,并且可以像在本地一样浏览和使用 Smalltalk 映像。
我建议您阅读
http://miguel .leugim.com.mx/index.php/2009/09/18/deploying-seaside-applications/
或者新的海边书。
干杯
Yes, it is possible to deploy Pharo in a "headless" way. Just send the -headless and that's all. Example:
It is common to deploy a PharoCore image running Seaside, with in headless mode and running RFBServer (remote buffer server) which is actually a VNC server. Then, you can connect to that image trough a VNC client and you can browse and use the Smalltalk image as if it were locally.
I suggest you to read
http://miguel.leugim.com.mx/index.php/2009/09/18/deploying-seaside-applications/
Or the new seaside book.
Cheers
正如不同编程语言的部署如何? :
Smalltalk:
部署 Squeak 或 Pharo Web 应用程序使用 Seaside 和 Apache httpd 在文档章节 使用 Apache 部署。
As answered in How is the Deployment in different Programming Languages?:
Smalltalk:
Deploying a Squeak or Pharo web application using Seaside and Apache httpd is described in the documentation, chapter Deployment with Apache.
不要忘记,还有专门为服务器上的无头操作而设计的 Smalltalk 环境,例如:
Pharo 的具体设计目标之一是将开发环境与核心映像分离,以便更容易部署,但我不知道这项工作已经取得了多大的进展,也不知道它是否还包括完全删除 GUI。
我不确定 VisualWorks,但如果他们有无头模式,我不会感到惊讶。
在左边的字段中,有些人认为 Ruby 是“Unix 服务器的 Smalltalk”。当然,Ruby 是一种与 Smalltalk 截然不同且不太美观的语言。
您是否尝试过在 Seaside 邮件列表?他们必须一直处理这些事情。例如,Avi Bryant 的公司 Smallthought Systems 运行 DabbleDB 和 流行 Squeak。
Don't forget that there are also Smalltalk environments that are specifically designed for headless operation on a server, e.g.:
One of the specific design goals of Pharo is to divorce the development environment from the core image, for easier deployment, however I don't know how far this effort has come nor whether it also includes removing the GUI entirely.
I'm not sure about VisualWorks, but I wouldn't be surprised if they had a headless mode.
A little bit further out in left field, some people consider Ruby to be "Smalltalk for the Unix server". Although, of course Ruby is a much different and much less beautiful language than Smalltalk.
Have you tried asking on the Seaside mailing lists? They must deal with this stuff all the time. Avi Bryant's company Smallthought Systems, for example, runs both DabbleDB and trendly off Squeak.
如果我在 VPS 上有 root 访问权限,我会亲自安装 Xvnc,它不会在服务器上增加太多的臃肿程度,而且使用 GUI 管理 Squeak 和 Pharo 会容易得多。
您可以通过让 Squeak 占据整个屏幕来在其自己的 Xvnc 显示中启动每个 Squeak 实例,而无需依赖窗口管理器。
您只需要最少的 X 支持文件。在无头 Ubuntu 上,
apt-get installightvncserver
仅提取 19.8 Mb 的软件包。与 RFBServer 不同的是,它只适用于任何 Squeak/Pharo 图像。我是这样做的:
为每个虚拟机启动一个 Xvnc 会话。您可以根据需要拥有任意数量的显示器。显示
:0
在 VNC 端口 5900 上运行,显示:1
在 5901 上运行,依此类推。在显示器上 statrt Xvnc
:0
然后在该显示器上启动 Squeak
屏幕大小调整 Squeak
关于安全性的说明
fullscreen.st
是一个简单的 Smalltalk 启动脚本,可根据 默认 Xvnc 接受没有密码的连接,因此我建议您至少采取以下预防措施之一。-rfbauth
参数来设置 Xvnc 密码身份验证。If I had root access on the VPS I would personally install Xvnc it doesn't add too much bloat on the server and it's much easier to manage Squeak and Pharo with a GUI.
You can launch each Squeak instance in it's own Xvnc display without relying on a Window Manager by having Squeak take up the whole screen.
You need only minimal X support files. On an headless Ubuntu
apt-get install tightvncserver
pulls only 19.8 Mb of packages. And unlike RFBServer it will just work with any Squeak/Pharo image.Here's how I do this:
For each VM launch an Xvnc session. You can have as many displays as you need. Display
:0
runs on the VNC port 5900, display:1
on 5901 and so on.To statrt Xvnc on display
:0
Then launch Squeak on that display
fullscreen.st
is a simple Smalltalk statup script that adjusts Squeak to the size of the screenA note on security
By default Xvnc accept connections without a password so I suggest you take at least one of the following precautions.
-rfbauth
argument to setup Xvnc password authentication.关于大众汽车,有一系列带有部署说明的截屏视频
http://www.cincomsmalltalk.com/userblogs/cincom/blogView?content= Smalltalk_daily_deployment
About VW there series of screencasts with deployment notes
http://www.cincomsmalltalk.com/userblogs/cincom/blogView?content=smalltalk_daily_deployment