当前位置: 首页 > wzjs >正文

双语网站建设报价虹桥网站建设

双语网站建设报价,虹桥网站建设,企业专属空间登录,网站的风格与布局的设计方案一、spug代码仓库地址: spug: 开源运维平台:面向中小型企业设计的无 Agent的自动化运维平台,整合了主机管理、主机批量执行、主机在线终端、文件在线上传下载、应用发布、任务计划、配置中心、监控、报警等一系列功能。 - Gitee.com 注意:如…

一、spug代码仓库地址:

spug: 开源运维平台:面向中小型企业设计的无 Agent的自动化运维平台,整合了主机管理、主机批量执行、主机在线终端、文件在线上传下载、应用发布、任务计划、配置中心、监控、报警等一系列功能。 - Gitee.com

注意:如果要找怎么进行容器化部署的详细说明,直接在这个仓库看官方文档就行了

一般流程:

1.进入docs/docker目录,执行docker-compose up -d

2.docker-compose ps查看容器的端口,打开浏览器查看效果

如果过程中有报错,一般是linux系统版本和软件版本不匹配,比如我的系统是Rockylinux8.6,我根据报错信息替换掉软件(比如将mariadb-server换成mysql-server),升级软件(python3换成python39,顺便升级对应的pip软件)

二、clone或下载代码到本地共享目录

之所以使用共享目录,是因为可以在windows系统使用代码编辑器,在linux系统执行shell命令,可以参考这篇文章:

linux使用samba共享目录,其他虚拟机和windows都可以访问-CSDN博客

如果想直接在windows系统,不借助vmware工具直接打开Ubuntu系统,执行shell命令,配置挺复杂,有兴趣的可以查看如下地址的文档说明:

Manual installation steps for older versions of WSL | Microsoft Learn

1.拷贝docs目录下的install.sh到spug-api目录下:

aedc384b7205489e827976eb9dc31b0c.png

install.sh因为是在本地运行,所以改了一下,最大的改变就是python的版本,一般python3.9为好,还需要升级原本的python3.9对应的pip,否则会报错,其他的自行判断:

#!/bin/bash#set -e #如果写上这一行任何一个报错就会中止程序,不会继续后面的程序spuy_banner() {echo "                           ";
echo " ####  #####  #    #  #### ";
echo "#      #    # #    # #    #";
echo " ####  #    # #    # #     ";
echo "     # #####  #    # #  ###";
echo "#    # #      #    # #    #";
echo " ####  #       ####   #### ";
echo "                           ";}init_system_lib() {source /etc/os-releasecase $ID incentos|fedora|rhel|rocky)echo "开始安装/更新可能缺少的依赖"yum -y remove python3yum install -y python39yum -y install git mysql-server \gcc openldap-devel redis nginx supervisorsed -i 's/ default_server//g' /etc/nginx/nginx.confMYSQL_CONF=/etc/my.cnf.d/spug.cnfSUPERVISOR_CONF=/etc/supervisord.d/spug.iniREDIS_SRV=redisSUPERVISOR_SRV=supervisord;;debian|ubuntu|devuan)echo "开始安装/更新可能缺少的依赖"apt-get update#下载相应的软件,参照上面centos那些系统来写,就是把yum换成ubuntu的下载命令#。。。略。。。rm -f /etc/nginx/sites-enabled/defaultMYSQL_CONF=/etc/mysql/conf.d/spug.cnfSUPERVISOR_CONF=/etc/supervisor/conf.d/spug.confREDIS_SRV=redis-serverSUPERVISOR_SRV=supervisor;;*)exit 1;;esac
}install_spug() {echo "开始安装Spug..."python3 -m venv venvsource venv/bin/activate/usr/bin/pip3.9 install --upgrade pippip3.9 install wheel -i https://pypi.doubanio.com/simple/pip3.9 install gunicorn mysqlclient -i https://pypi.doubanio.com/simple/pip3.9 install -r requirements.txt -i https://pypi.doubanio.com/simple/
}setup_conf() {echo "开始配置Spug配置..."
# mysql conf
cat << EOF > $MYSQL_CONF
[mysqld]
bind-address=127.0.0.1
EOF
echo $PWD
# spug conf
cat << EOF > spug/overrides.py
DEBUG = False
ALLOWED_HOSTS = ['127.0.0.1']DATABASES = {'default': {'ATOMIC_REQUESTS': True,'ENGINE': 'django.db.backends.mysql','NAME': 'spug','USER': 'spug','PASSWORD': 'spug.dev','HOST': '127.0.0.1','OPTIONS': {'charset': 'utf8mb4','sql_mode': 'STRICT_TRANS_TABLES',}}
}
EOFcat << EOF > $SUPERVISOR_CONF
[program:spug-api]
command = bash /data/spug/spug_api/tools/start-api.sh
autostart = true
stdout_logfile = /data/spug/spug_api/logs/api.log
redirect_stderr = true[program:spug-ws]
command = bash /data/spug/spug_api/tools/start-ws.sh
autostart = true
stdout_logfile = /data/spug/spug_api/logs/ws.log
redirect_stderr = true[program:spug-worker]
command = bash /data/spug/spug_api/tools/start-worker.sh
autostart = true
stdout_logfile = /data/spug/spug_api/logs/worker.log
redirect_stderr = true[program:spug-monitor]
command = bash /data/spug/spug_api/tools/start-monitor.sh
autostart = true
stdout_logfile = /data/spug/spug_api/logs/monitor.log
redirect_stderr = true[program:spug-scheduler]
command = bash /data/spug/spug_api/tools/start-scheduler.sh
autostart = true
stdout_logfile = /data/spug/spug_api/logs/scheduler.log
redirect_stderr = true
EOFcat << EOF > /etc/nginx/conf.d/spug.conf
server {listen 80 default_server;root /data/spug/spug_web/build/;location ^~ /api/ {rewrite ^/api(.*) \$1 break;proxy_pass http://127.0.0.1:9001;proxy_redirect off;proxy_set_header X-Real-IP \$remote_addr;}location ^~ /api/ws/ {rewrite ^/api(.*) \$1 break;proxy_pass http://127.0.0.1:9002;proxy_http_version 1.1;proxy_set_header Upgrade \$http_upgrade;proxy_set_header Connection "Upgrade";proxy_set_header X-Real-IP \$remote_addr;}error_page 404 /index.html;
}
EOFsystemctl start mysqld
systemctl enable mysqldmysql -e "create database if not exists spug default character set utf8mb4 collate utf8mb4_unicode_ci;"
mysql -e "create user if not exists spug@'%' identified by 'spug.dev';"
mysql -e "grant all on spug.* to spug@'%'"
mysql -e "create user if not exists admin@'%' identified by 'spug.dev';"
mysql -e "grant all on *.* to admin@'%';"
mysql -e "flush privileges;"python3.9 manage.py initdb
python3.9 manage.py useradd -u admin -p spug.dev -s -n 管理员systemctl enable nginx
systemctl enable $REDIS_SRV
systemctl enable $SUPERVISOR_SRVsystemctl restart nginx
systemctl start $REDIS_SRV
systemctl restart $SUPERVISOR_SRV
}spuy_banner
init_system_lib
install_spug
setup_conf
echo 'good ending'
echo -e "\n\n\033[33m安全警告:默认的数据库和Redis服务并不安全,请确保其仅监听在127.0.0.1,推荐参考官网文档自行加固安全配置!\033[0m"
echo -e "\033[32m安装成功!\033[0m"
echo "默认管理员账户:admin  密码:spug.dev"
echo "默认数据库用户:spug   密码:spug.dev"

在linux系统的spug-api目录下执行:./install.sh

2.将docs/docker目录下的init_spug.sh放在spug-api目录下并修改:

#!/bin/bash
#
set -e
set -upython3.9 manage.py updatedb
python3.9 manage.py user add -u admin -p spug.dev -n 管理员 -s
python3.9 manage.py user add -u spug -p spug.dev -n 开发人员 -s

linux系统执行./init_spug.sh会给数据库填充更新数据,比如新增可登陆的用户名和密码数据

启动效果:

[root@git spug_api]# python3.9 manage.py runserver
/usr/local/lib/python3.9/site-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0."cipher": algorithms.TripleDES,
/usr/local/lib/python3.9/site-packages/paramiko/transport.py:253: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0."class": algorithms.TripleDES,
/usr/local/lib/python3.9/site-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0."cipher": algorithms.TripleDES,
/usr/local/lib/python3.9/site-packages/paramiko/transport.py:253: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0."class": algorithms.TripleDES,
Performing system checks...System check identified no issues (0 silenced).
September 19, 2024 - 00:04:27
Django version 2.2.28, using settings 'spug.settings'
Starting ASGI/Channels version 2.3.1 development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

3.启动spug-web

linux系统下运行如下命令(最好在同一个Linux服务器运行,如果在Windows或其他Linux服务器,则需要把对应接口的IP地址改为后端启动服务所在服务器的IP地址)

npm i下载插件依赖

npm start运行,默认端口3000,被占用3000端口的话提示替换成3001

Compiled successfully!You can now view spug_web in the browser.Local:            http://localhost:3001On Your Network:  http://192.168.137.12:3001Note that the development build is not optimized.
To create a production build, use npm run build.

windows的浏览器效果

203a832778994b25a9c769b84cd35349.png

使用admin和他的密码登录

60eb709f06b94b948b4b74814bb3b43e.png

 

 

 

 

 


文章转载自:

http://HBEJqImx.gbwfx.cn
http://el2H8dDG.gbwfx.cn
http://fjyCKXu1.gbwfx.cn
http://N2tK0JZo.gbwfx.cn
http://3MCcUZzH.gbwfx.cn
http://x77GWfDV.gbwfx.cn
http://uwTYuRyx.gbwfx.cn
http://dJUEdstY.gbwfx.cn
http://LxoygG1g.gbwfx.cn
http://F8scSucC.gbwfx.cn
http://HFolWPkW.gbwfx.cn
http://vKFW4C5a.gbwfx.cn
http://romFiUv0.gbwfx.cn
http://sTSxhGeF.gbwfx.cn
http://QZm9WHWb.gbwfx.cn
http://Ms2ggu8k.gbwfx.cn
http://zsNagZrk.gbwfx.cn
http://nEjuG97g.gbwfx.cn
http://0jtIPKpx.gbwfx.cn
http://SNr9bnS0.gbwfx.cn
http://dAchLFcc.gbwfx.cn
http://jjg9VX7N.gbwfx.cn
http://4pLVM4DM.gbwfx.cn
http://gM5BVYjG.gbwfx.cn
http://ij4uGyko.gbwfx.cn
http://c4B9OLxf.gbwfx.cn
http://7WHUiqWs.gbwfx.cn
http://6b0x2R9W.gbwfx.cn
http://zXJaK7Qv.gbwfx.cn
http://whAN4r8p.gbwfx.cn
http://www.dtcms.com/wzjs/703660.html

相关文章:

  • joomla 做的网站商标 做网站 是几类
  • 招聘网站可以做劳务派遣吗简述网站开发基本流程
  • 设计做兼职最好的网站网站制作客户资料
  • 石家庄局域网网站建设厦门建设局长
  • 提供温州手机网站制作哪家便宜seo需要会网站建设吗
  • 给网站做伪静态模板和网站的区别
  • 郑州市建设工程信息网站昆明网络营销服务公司
  • 网站建设seopptwordpress secondary title
  • 私人做网站需要多少钱效果好的东莞品牌网站建设
  • 建设网站知乎最容易做的门户网站
  • 重庆所有做网站的公司排名四川宜宾建设局官方网站
  • 百度推广网站一年多少钱seo百度关键词优化
  • 政务网站建设浙江项目管理师
  • 我有网网站建设有wordpress使用经验
  • wdcp网站建设wordpress 加文章分享
  • 网站开发介绍人拿多少钱手机怎么同步连接wordpress
  • 广州网站建设公司小程序合肥工程建设信息平台
  • mooc网站开发案例wordpress群晖套件
  • 用python做网站wordpress 忘记数据库密码
  • 富阳做网站方式手工业网站怎么做
  • 做外贸做什么网站好网站建设工作分解
  • 西安响应式网站建设服务提供商个人网页制作成品免费下载
  • 线上推广媒体广告seo指的是搜索引擎营销
  • 建设假网站如何做优化网站排alexa优化
  • 房地产做网站不移动开发是什么
  • 为什么做的网站别的浏览器打不开怎么办网站建设学习浩森宇特
  • 建设银行手机银行官方网站下载安装国际转运网站建设
  • 网站推广费用大概需要多少钱wordpress更改域名
  • 企业开源建站系统百度官方app免费下载
  • 宝山北京网站建设佛山网络公司 乐云seo