zoukankan      html  css  js  c++  java
  • centos7.6 搭建异星工厂服务器

    步骤

    访问异星工厂的官网下载页面, 找到 headless 版本, 复制下载链接.

    下载服务器文件, 我这里下载的是 0.17.79 版本:

    wget https://factorio.com/get-download/0.17.79/headless/linux64
    

    会下载一个文件名为 linux64的文件解压:

    tar -xvf linux64
    

    进入data目录, 拷贝 server-settings.example.json 为 server-settings.json.

    cd factorio/data
    
    cp server-settings.example.json server-settings.json
    

    编辑

    vim server-settings.json
    

    创建存档, 注意这里可能会报错, 如果报错请看后面的解决方法:

    cd ..
    ./bin/x64/factorio --create ./saves/save1.zip
    

    实用最新存档启动服务器:

    ./bin/x64/factorio --start-server-load-latest
    

    `GLIBC_2.18' not found 的解决方法

    Centos8 应该不会有这个问题, 单腾讯云上只有 centos7.6, 因此没有试过.

    准备好需要的工具:

    yum groupinstall "Development tools"
    yum install glibc-devel.i686 glibc.i686
    

    下载并准备编译, glibc-2.18:

    wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
    tar xvzf glibc-2.18.tar.gz
    cd glibc-2.18
    mkdir glibc-build
    cd glibc-build
    ../configure --prefix='/opt/glibc-2.18'
    

    修改测试脚本:

    vim +179 ../scripts/test-installation.pl
    

    if (/$ld_so_name/) { 改为 if (/Q$ld_so_nameE/) { .

    编译构建:

    make
    make install
    

    创建存档, 注意将目录都改成自己的目录:

    PATH=/opt/glibc-2.18/bin:$PATH LD_LIBRARY_PATH=/opt/glibc-2.18/lib:/usr/lib64 /opt/glibc-2.18/lib/ld-linux-x86-64.so.2  /root/factorio/bin/x64/factorio --create /root/factorio/saves/save1.zip --executable-path /root/factorio/bin/x64/factorio
    

    启动服务器, 注意将目录都改成自己的目录:

    PATH=/opt/glibc-2.18/bin:$PATH LD_LIBRARY_PATH=/opt/glibc-2.18/lib:/usr/lib64 /opt/glibc-2.18/lib/ld-linux-x86-64.so.2  /root/factorio/bin/x64/factorio --start-server-load-latest --executable-path /root/factorio/bin/x64/factorio
    

    参考:

    `GLIBC_2.18' not found
    多人游戏

  • 相关阅读:
    剑指offer——用两个栈实现队列
    根据前序和中序重建二叉树、后序和中序重建二叉树
    归并排序
    排序
    快速排序(java版)
    List
    单链表的基本操作
    集合
    数组
    结构体
  • 原文地址:https://www.cnblogs.com/FJH1994/p/12840059.html
Copyright © 2011-2022 走看看