ssh远程连接服务器常用命令

命令行下,使用ssh 远程登录服务器

ssh  '用户名'@'IP地址'    #不用加'号,这里是为了作区分
'用户名'@'IP地址''s password:  xxx

项目所在服务器目录

/home/jimsir/sites/www.lovejim.cn/DjangoBlog/JimWeb/JimWeb

gunicorn 网站部署

gunicorn --bind unix:/tmp/lovejim.cn.socket JimWeb.wsgi:application

Django-haystack框架结合中文jieba分词和英文whoosh引擎实现全文检索功能(参考:https://blog.csdn.net/weixin_40475396/article/details/78692981)

pip install whoosh   # 纯Python编写的全文搜索引擎
pip install jieba   # 一款免费的中文分词包
pip install django-haystack  # 全文检索的框架

激活虚拟环境

source env/bin/activate
source /home/jimsir/sites/www.lovejim.cn/env/bin/activate

nginx -s reload :修改配置后重新加载生效

Ubuntu下启动/重启/停止apache服务器

Task: Start Apache 2 Server /启动apache服务
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start
Task: Restart Apache 2 Server /重启apache服务
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
Task: Stop Apache 2 Server /停止apache服务
# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop

Django 忘记管理员账户和密码的解决办法 :https://www.cnblogs.com/liyiran/p/4123637.html

  • 3
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值