Amosplanet

Stay Hungry, Stay Foolish

IT

How to Create Enterprise Knowledge Base Via AI

langchain+chatglm2 Linux/wsl2部署 说明: 1.ubuntu安装基础gcc 2.ubuntu安装cuda: cuda下载地址: https://developer.nvidia.com/cuda-11-7-1-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local ubuntu22.04, cuda11.7.1,文件链接 wget https://developer.download.nvidia.cn/compute/cuda/11.7.1/local_installers/cuda-repo-ubuntu2204-11-7-local_11.7.1-515.65.01-1_amd64.deb 3.安装miniconda miniconda下载地址,选择linux: https://docs.conda.io/en/latest/miniconda.html 4.安装miniconda 下载langchain-chatglm2-6B 5.下载embedding模型文件 需要先安装git-lfs,下载地址和安装教程如下: https://github.com/git-lfs/git-lfs/blob/main/INSTALLING.md ubuntu 系统: apt/deb repos: curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash Centos/Redhat系统: yum/rpm repos: curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash 然后 6.下载chatglm2-6B模型文件 chatglm2-6b模型文件地址: chatglm2-6b-int4模型文件地址: https://huggingface.co/THUDM/chatglm-6b-int4 7.修改embedding模型配置和大语言模型配置: 修改chatglm2-6b下的pretrained_model_name为本地chatglm2模型文件地址。 8.启动 启动成功 记得在webui.py中把端口号由默认的7860改为6006,如下图: screen -U -S AI screen -wipe

Nginx Installation

Nginx Installation 参考博客: https://blog.csdn.net/Siebert_Angers/article/details/126960866 Introduction Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器,同时也提供了 IMAP/POP3/SMTP服务。Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的 Rambler.ru站点(俄文:Рамблер)开发的,第一个公开版本0.1.0发布于2004 年10月4日。 其将源代码以类BSD许可证的形式发布,因它的稳定性、丰富的功能集、简单的配 置文件和低系统资源的消耗而闻名。2011年6月1日,nginx 1.0.4发布。 Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3) 代理服务器,在BSD-like 协议下发行。其特点是占有内存少,并发能力强,事实 上nginx的并发能力在同类型的网页服务器中表现较好,中国大陆使用nginx网站 用户有:百度、京东、新浪、网易、腾讯、淘宝等。 安装Nginx 源码编译安装 一、安装nginx之前我们需要准备好安装nginx的安装环境 1.首先安装nginx要有gcc的环境,可以使用以下命令进行安装 2. 第三方库 pcre-devel 可以用以下命令进行安装 3. 第三方库 zlib 可以用以下命令进行安装 二、下载安装Nginx 安装包 官网下载地址: https://nginx.org/download 1.下载Nginx 安装包 2.解压安装 3. 进入到解压好的目录中 4. 以下命令开始安装nginx 5. 启动和端口问题 5. 启动ngxin 6. 将nginx安装成系统服务 1)创建服务脚本 使用以下命令在/usr/lib/systemd/system下创建并编辑nginx的服务脚本 将以下内容添加到刚刚创建好的脚本中 注意路径 2)配置文件的权限 …

Nginx Installation Read More »

Centos7 安全配置

Centos7 安全配置 1 常见的日志文件如下:/var/log/messages 绝大多数的系统日志都记录到该文件/var/log/secure 所有跟安全和认证授权等日志都会记录到此文件/var/log/maillog 邮件服务的日志/var/log/cron crond计划任务的日志/var/log/boot.log 系统启动的相关日志https://blog.csdn.net/qq_44379042/article/details/120371860 SSH 安全登陆 一、更改SSH登陆端口 主要参照以下文章:https://zhuanlan.zhihu.com/p/56864040 1. 更改端口 2.重启sshd服务 3.添加防火墙规则 4. 尝试新端口登陆 5. 尝试新端口登陆 二、修改SSH登陆弱口令为强口令 三、修改SSH 密钥登陆 四、防火墙禁止 和 屏蔽 ip 海外服务器安装denyhosts 关于denyhosts功能介绍,可参阅下面文章: 安装denyhosts 1.更新系统(建议所有系统都先更新) 2.下载DenyHosts 3.解压缩 4.进入解压文件夹 5.确认python编译工具安装 6.开始编译安装setup.py 7.编辑配置文件 8.启动denyhosts并且设置为开机自启动 9. 启动denyhosts 10.查看被禁止的IP 阿里云服务器安装denyhosts 关于denyhosts功能介绍,可参阅下面文章: 安装 denyhosts 1)更新系统(建议所有系统都先更新) 2)下载DenyHosts wget http://imcat.in/down/DenyHosts-2.6.tar.gz 3)解压缩 4)进入解压文件夹 5)确认python编译工具安装 6)开始编译安装setup.py 7)设置启动脚本 …

Centos7 安全配置 Read More »

Linux 命令学习

Linux 命令学习 一、CentOS7系统目录 参考博客 https://blog.csdn.net/qq_22860341/article/details/81363655 二、Linux 命令 1. tar 压缩及解压缩命令 2. 通过 uname -r 命令查看你当前的内核版本 3. find / -name “virtualenv” 4. netstat netstat -na |grep 8080 5. ls -l命令 linux下命令“ll”是“ls -l”的别名, 所以”ll”和“ls -l”的功能是相同的。 6. 第一个字符d 代表这是一个目录文件,后面的rwxr‐xr‐x字符,代表user、group、other对文件所拥有的权限,rwx代表该用户拥有读写执行的权限,r‐x 7. cd命令 cd 是 change directory的缩写,表示改变当前所在路径 8. pwd 命令 pwd 是英文print working directory 显示当前所在路径 9. mkdir 命令 mkdir 是make …

Linux 命令学习 Read More »

How to configure remote commissiong function of pycharm

configure remote commissiong function of pycharm Procedures 1. Choose “Settings” on file 2. Choose “Python interpreter” 3. Choose settings In Rectangle and click “Add” 4. Choose “SSH Interpreter” 5. Choose “Existing server configuration”( remote server has been added in server configuration in advance) 6. Configure server info. 6. Choose Interpreter location and mappings