💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
debian系统APT仓库 第1章 搭建和部署APT私有仓库 1.1 配置镜像源 阿里云或 1.2 安装依赖 ``` apt-get -y install build-essential libpcre3 libpcre3-dev zlib1g-dev openssl libssl-dev ``` 1.3 安装Nginx和fpm ``` mkdir -p nginx_tools cd nginx_tools wget -q http://nginx.org/download/nginx-1.6.3.tar.gz useradd www -s /sbin/nologin -M -u 888 tar xf nginx-1.6.3.tar.gz cd nginx-1.6.3 ./configure --user=www --group=www --prefix=/application/nginx-1.6.3 --with-http_stub_status_module --with-http_ssl_module make && make install ln -s /application/nginx-1.6.3/ /application/nginx egrep -v "#|^$" /application/nginx/conf/nginx.conf.default >/application/nginx/conf/nginx.conf /application/nginx/sbin/nginx ``` 测试访问一下 ``` [root@apt-hub nginx-1.6.3]# curl -I -s -w %{http_code}"\n" -o /dev/null "http://192.168.56.61" 200 ``` 修改配置文件,增加一条包含其他配置文件目录 ``` [root@apt-hub conf]# cat /application/nginx/conf/nginx.conf worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; include /application/nginx/conf/conf.d/*.conf; } ``` 最后包含的配置文件 ``` [root@apt-hub conf]# cat /application/nginx/conf/conf.d/apt-hub.conf server { listen 80; server_name localhost; # 显示目录 autoindex on; location / { index index.html index.htm; root /data/init/; } location /init { index index.html index.htm; root /data/conf/; } location /prod { index index.html index.htm; root /data/deb/; } location /soft { index index.html index.htm; root /data/soft; } access_log /var/log/nginx/localhost.log; } ``` 第2章 安装打包工具 ``` apt-get -y install ruby ruby-full apt-get -y install rubygems ``` 第3章 报错解决 报错内容,客户端安装的时候不能使用-y 私有仓库不能使用-y安装问题 ``` [root@apt-test ~]# apt-get install nginx -y Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libxslt1.1 nginx-common nginx-full Suggested packages: fcgiwrap nginx-doc The following NEW packages will be installed: libxslt1.1 nginx nginx-common nginx-full 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 823 kB of archives. After this operation, 1924 kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! libxslt1.1 nginx-common nginx-full nginx E: There are problems and -y was used without --force-yes ``` 解决方法:创建一个新文件 ``` [root@apt-test ~]# cat /etc/apt/apt.conf.d/02allow-unsigned APT::Get::AllowUnauthenticated 1; ``` 更新索引 ``` dpkg-scanpackages mydeb /dev/null | gzip -9c > mydeb/Packages.gz ```