<p style="text-indent: 2em; text-align: left;"></p><p style="text-indent: 2em; text-align: left;"><span style="text-indent: 2em;">在网上找了许多搭建部署chatgpt网站应用的教程,不是写的过于专业就是教程不全,对于部署chatgpt的过程中遇见的些许问题也没有写解决方法,下面我就用简单易懂的方式来展示其chatgpt网站应用部署过程和可能遇见的问题。</span><br/></p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//54561.png" title="美国云服务器" alt="美国云服务器" width="662" height="397" border="0" vspace="0" style="width: 662px; height: 397px;"/></p><p style="text-indent: 2em; text-align: left;"><strong>1、云服务器</strong></p><p style="text-indent: 2em; text-align: left;">部署chatgpt网站应用需要准备一台服务器,这里我用的是恒创美国云服务器2核4G 5M带宽的,所以相关操作以它为例(香港的不能正常使用chatgpt,openai公司没有对中国地区开放(包括香港),所以建议使用其他节点的服务器,比如美国/日本/新加坡等节点的),我这里用美国云服务器主要是价格便宜。</p><p style="text-indent: 2em; text-align: left;"><strong>2、安装宝塔</strong></p><p style="text-indent: 2em; text-align: left;">有了服务器之后,我们需要先安装宝塔。点击进入恒创后台,进入云服务器实例,管理实例,点击VNC登录,</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//72077.png" title="vnc登录" alt="vnc登录" width="665" height="301" border="0" vspace="0" style="width: 665px; height: 301px;"/></p><p style="text-indent: 2em; text-align: left;">进入VNC后,连接云服务器实例,这里就输入云服务器的账号密码即可,登录成功后,</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//51822.png" title="vnc连接云服务器" alt="vnc连接云服务器" width="655" height="183" border="0" vspace="0" style="width: 655px; height: 183px;"/></p><p style="text-indent: 2em; text-align: left;">直接输入下面这串Centos安装脚本:</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//94659.png" title="安装脚本" alt="安装脚本" width="499" height="193" border="0" vspace="0" style="width: 499px; height: 193px;"/></p><p style="text-indent: 2em; text-align: left;">根据提示y/n,输入y再回车确认即可安装</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//89724.png" title="确认安装脚本" alt="确认安装脚本" width="591" height="322" border="0" vspace="0" style="width: 591px; height: 322px;"/></p><p style="text-indent: 2em; text-align: left;">安装完成后,会自动跳出安装好的宝塔登录地址和账号密码,我们保存即可。</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//68373.png" title="安装完成" alt="安装完成" width="589" height="445" border="0" vspace="0" style="width: 589px; height: 445px;"/></p><p style="text-indent: 2em; text-align: left;">接下来,根据保存好的宝塔地址和账号密码,登录宝塔控制面板(初次登录宝塔面板需要绑定宝塔账号,我们去宝塔官网bt.cn注册账号绑定即可)。</p><p style="text-indent: 2em; text-align: left;"><strong>3、安装docker容器</strong></p><p style="text-indent: 2em; text-align: left;">软件商店,搜索安装Docker模块。</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//30819.png" title="搜索docker" alt="搜索docker" width="652" height="294" border="0" vspace="0" style="width: 652px; height: 294px;"/></p><p style="text-indent: 2em; text-align: left;">点击左侧Docker,提示安装相关程序,这里我已经安装了,所以会有显示。</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//04870.png" title="安装docker容器" alt="安装docker容器" width="662" height="415" border="0" vspace="0" style="width: 662px; height: 415px;"/></p><p style="text-indent: 2em; text-align: left;">到这里,宝塔的相关设置就完成了</p><p style="text-indent: 2em; text-align: left;"><strong>4、获取openai-key</strong></p><p style="text-indent: 2em; text-align: left;">也就是我们说的密钥,开始我们就说过,openai不对中国地区的用户开放,所以想要获取openai key就需要过墙,就算过墙之后,openai注册也是比较麻烦的,所以我们换种方式,即购买key服务,也不贵,一块多一个key,额度大概在几千左右,这里就不多说了。</p><p style="text-indent: 2em; text-align: left;"><strong>5、部署chatgpt</strong></p><p style="text-indent: 2em; text-align: left;">放行3000端口(也不是必须3000)</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//00826.png" title="宝塔放行3000端口" alt="宝塔放行3000端口" width="664" height="436" border="0" vspace="0" style="width: 664px; height: 436px;"/></p><p style="text-indent: 2em; text-align: left;">点击“终端”</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//34435.png" title="宝塔终端" alt="宝塔终端" width="664" height="408" border="0" vspace="0" style="width: 664px; height: 408px;"/></p><p style="text-indent: 2em; text-align: left;">执行命令:</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//34326.png" title="chatgpt部署命令" alt="chatgpt部署命令" width="664" height="240" border="0" vspace="0" style="width: 664px; height: 240px;"/></p><p style="text-indent: 2em; text-align: left;">执行完成后,再次执行以下命令:</p><p style="text-indent: 2em; text-align: left;">这里的3000指的是访问端口,openai-key密钥需要更换成自己的</p><p style="text-indent: 2em; text-align: left;"><img src="https://www.henghost.com/news/upload/ueditor/image//06424.png" title="chatgpt网站应用部署完成" alt="chatgpt网站应用部署完成" width="1051" height="201" border="0" vspace="0" style="width: 1051px; height: 201px;"/></p><p style="text-indent: 2em; text-align: left;">弹出这串字符后,就表示chatgpt部署完成了</p><p style="text-indent: 2em; text-align: left;"><strong>6、停止或更换端口/key</strong></p><p style="text-indent: 2em; text-align: left;">输入停止命令:</p><p style="text-indent: 2em; text-align: left;">然后重复chatgpt部署步骤</p><p style="text-indent: 2em; text-align: left;"><strong>7、chatgpt部署完成</strong></p><p style="text-indent: 2em; text-align: left;">我们直接通过IP地址加访问端口的形式就可以访问部署好的chatgpt网站应用,当然我们也可以通过域名的方式访问,具体方法是,将3000端口修改为80端口(放行80),然后将域名解析至服务器IP即可</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//67091.png" title="访问应用" alt="访问应用" width="662" height="422" border="0" vspace="0" style="width: 662px; height: 422px;"/></p><p style="text-indent: 2em; text-align: left;">8、设置chatgpt网站应用</p><p style="text-indent: 2em; text-align: left;">在初次使用chatgpt网站应用时,需要设置,不然是无法正常使用的,点击左下角设置</p><p style="text-indent: 2em; text-align: left;">找到自定义接口,接口地址https://api.openai.com或者https://apis.lconai.com(openai-key有两种,正常的和中转的,非中转使用第一个接口地址,中转使用第二个),然后输入你的API KEY,完成后即可正常使用。</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//80148.png" title="80148.png" alt="image.png"/></p><p style="text-indent: 2em; text-align: left;">完成。</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//18777.png" title="18777.png" alt="image.png"/></p><p style="text-indent: 2em; text-align: left;">注意事项:</p><p style="text-indent: 2em; text-align: left;">1、部署chatgpt输入第一行命令后出现</p><p style="text-indent: 2em; text-align: left;">提示,表明宝塔没有安装docker容器,解决方法,参考步骤3。</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//92948.png" title="错误步骤1" alt="错误步骤1" width="571" height="63" border="0" vspace="0" style="width: 571px; height: 63px;"/></p><p style="text-indent: 2em; text-align: left;">2、完成chatgpt设置后,出现下图提示,接口地址和key是否对应,参考步骤8。</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//56664.png" title="错误步骤2" alt="错误步骤2" width="662" height="243" border="0" vspace="0" style="width: 662px; height: 243px;"/></p><p style="text-indent: 2em; text-align: left;">3、完成chatgpt设置后,出现以下情况,说明openai key没有额度,需要更换key,也可以打开上述的接口地址,查询openai key的使用情况,参考步骤6。</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//11432.png" title="错误步骤3" alt="错误步骤3" width="663" height="184" border="0" vspace="0" style="width: 663px; height: 184px;"/></p><p style="text-indent: 2em; text-align: left;">4、访问chatgpt网站应用,IP地址+端口,出现无法访问,问题为https,去掉s即可。</p><p style="text-indent: 2em; text-align: center;"><img src="https://www.henghost.com/news/upload/ueditor/image//91126.png" title="错误步骤4" alt="错误步骤4" width="660" height="367" border="0" vspace="0" style="width: 660px; height: 367px;"/></p><p style="text-indent: 2em; text-align: left;">以上就是云服务器部署chatgpt网站应用的详细步骤教程及在安装使用过程中容易出现的问题总结。</p>
讯享网

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/177160.html