开始
首先,你需要一个装有Debian系操作系统(如Debian、Ubuntu、Raspbian、Armbian等)的设备(电脑、瘦客户机、树莓派、玩客云等等……)。
在瘦客户机、电脑等安装Debian的方法可以参考本人的这篇教程。
安装前的准备
安装必要软件
Klipper相关的软件需要Python等软件才能运行,且需要git来同步最新的Klipper等软件源代码,所以需要使用sudo apt install build-essential python3 python3-pip git
来安装必要的软件。
安装好pip后,运行pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
更换pip的源。
也可以将链接替换为下列链接中的其中之一:
# 豆瓣源
https://pypi.doubanio.com/simple
# 腾讯源
https://mirrors.cloud.tencent.com/pypi/simple
# 阿里源
https://mirrors.aliyun.com/pypi/simple
如果使用树莓派,请删除
/etc/pip.conf
文件中的所有内容,否则可能会导致换源后下载依旧缓慢!
安装
在本教程中,我们使用KIAUH脚本来安装Klipper、Moonraker、Fluidd三件套。
首先,使用git clone https://github.com/dw-0/kiauh
下载KIAUH脚本。如果所在地的GitHub速度缓慢,可使用git clone https://gitee.com/miroky/kiauh
。
如果无法保证稳定访问GitHub,则强烈推荐使用gitee源安装,以保证后续更新等稳定性。
安装
Klipper
运行kiauh.sh
,出现如下界面(可以看到所有软件都显示为Not Installed):
选择
1) [Install]后
,出现如下界面:选择
1) [Klipper]
来安装Klipper。首先是选择Python版本的界面,因Python 2早已停止维护,不建议使用Python 2环境安装,直接选择Python 3环境安装即可。
/=======================================================\
| Please select your preferred Python version. |
| The recommended version is Python 3.x. |
|-------------------------------------------------------|
| 1) [Python 3.x] (recommended) |
| 2) [Python 2.7] (legacy) |
|-------------------------------------------------------|
| B) « Back |
\=======================================================/
###### Select Python version:
下一步会询问安装Klipper的实例数量,连接几台打印机就安装几个实例,如果只连接一台打印机,只需安装一个即可。
这里以一台打印机为例,按回车继续。
###### Initializing Klipper installation ...
/=======================================================\
| Please select the number of Klipper instances to set |
| up. The number of Klipper instances will determine |
| the amount of printers you can run from this host. |
| |
| WARNING: |
| Setting up too many instances may crash your system. |
|-------------------------------------------------------|
| B) « Back |
\=======================================================/
###### Number of Klipper instances to set up: 1
此时KIAUH便会开始Klipper的安装,只需稍作等待即可。
安装过程中需要更新系统并安装一些依赖软件,可能需要系统的管理员密码。
安装好Klipper后,可能会询问是否将当前用户加入tty
、dialout
等用户组,用于解决可能无法连接下位机的问题,回车确认即可。
/=======================================================\
| WARNING: Your current user is not in group: |
| ● tty |
| ● dialout |
| |
| It is possible that you won't be able to successfully |
| connect and/or flash the controller board without |
| your user being a member of that group. |
| If you want to add the current user to the group(s) |
| listed above, answer with 'Y'. Else skip with 'n'. |
| |
| INFO: |
| Relog required for group assignments to take effect! |
\=======================================================/
###### Add user '用户名' to group(s) now? (Y/n):
Moonraker
在Installation Menu界面选择2) [Moonraker]
即可开始安装。
###### Initializing Moonraker installation ...
[✓ OK] Klipper installation found!
###### Install Moonraker? (Y/n):
回车安装,稍等片刻,安装完成后会显示Moonraker的IP地址:
#########################################################
Moonraker has been set up!
#########################################################
Instance 1: 192.168.2.235:7125
使用浏览器访问此地址后,显示类似如下内容即表示安装成功:
Mainsail/Fluidd
以下提示均以安装Fluidd为例,Mainsail安装过程与Fluidd大同小异,故不再赘述。
在Installation Menu
界面中选择3) [Mainsail]
或4) [Fluidd]
即可开始安装。
完成后会询问是否添加常用的gcode宏(脚本),一般情况下直接回车安装即可:
/=======================================================\
| It is recommended to have some important macros in |
| your printer configuration to have Fluidd fully |
| functional and working. |
| |
| The recommended macros for Fluidd can be found here: |
| https://docs.fluidd.xyz/configuration/initial_setup |
| |
| If you already have these macros in your config file, |
| skip this step and answer with 'no'. |
| Otherwise you should consider to answer with 'yes' to |
| add the recommended example macros to your config. |
\=======================================================/
###### Add the recommended macros? (Y/n):
这一步如果使用gitee源可能会直接下载失败,看可以去
等待片刻,Fluidd或Mainsail即可安装完成。
如果在已经登陆图形界面且带有浏览器的系统安装,可进入浏览器访问127.0.0.1
或localhost
,网页加载成功即为完成安装。
如果在远程连接的系统上安装,可以在同一局域网下使用浏览器访问上位机的IP地址,查看网页是否加载成功。