[Lua实战]Skynet-1.如何启动(linux环境启动)[开箱可用]

在这里插入图片描述

最近用到了lua,想了解下云风大神的skynet,在网上看了半天也没入门…整理下自己启动example的流程

云风-skynet

1.依赖环境:可登录&联网的linux(Centos7)系统(可以是虚拟机)

我这边用的Vmware自己弄了一个本地虚拟机

2.yum安装依赖库

yum -y install git gcc* make git readline-devel autoconf

3.git clone skynet项目

git clone https://github.com/cloudwu/skynet.git

4.编译skynet

cd skynet
make linux

4.1有可能遇到的错误(升级gcc到4.9以上即可解决):

In file included from lstring.c:23:0:
../../skynet-src/atomic.h:25:23: fatal error: stdatomic.h: No such file or directory
 #include <stdatomic.h>
                       ^
compilation terminated.

5.测试运行skynet

服务器

./skynet examples/config

客户端

./3rd/lua/lua examples/client.lua 

6.运行结果

服务器

客户端
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/aaaadong/article/details/128804807