[Lua combat] Skynet-1. How to start (start in linux environment) [available out of the box]

Insert image description here

I have been using Lua recently and want to know more about Yunfeng Master’s skynet. I have been looking online for a long time but I still can’t get started... Let me sort out the process of starting the example by myself.

Yunfeng-skynet

1. Dependent environment: Linux (Centos7) system that can be logged in and connected to the Internet (can be a virtual machine)

The Vmware I use here has created a local virtual machine.

2.Yum install dependent libraries

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

3.git clone skynet project

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

4.Compile skynet

cd skynet
make linux

Errors that may be encountered in 4.1 (can be solved by upgrading gcc to 4.9 or above):

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. Test running skynet

server

./skynet examples/config

client

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

6. Running results

server

client
Insert image description here

Guess you like

Origin blog.csdn.net/aaaadong/article/details/128804807