泡面师

  • 首页
  • 记录
centos
centos

网站设置301重定向

nginx设置301重定向 可以直接在nginx的配置文件中加if ($host = paomianshi.com) { return 301 http://www.$host$request_uri; } apache设置301重定向 在网站根目录新建.htaccess文件,加入以下内容(需要开启mod_rewrite) RewriteEngine On RewriteCond %{HTTP_HOST} ^paomianshi.com [NC] RewriteRule ^(.*)$ http://www.paom…

2019-05-13 0条评论 2720点热度 0人点赞 泡面师 阅读全文
centos

安装selenium和chromedriver

selenium 测试直接在浏览器中运行,可以模拟真实用户浏览网站。selenium 测试可以在 Windows、Linux 和 Macintosh上的 Internet Explorer、Chrome和 Firefox 中运行 centos7 安装selenium和chromedriver 先安装好python3 安装相关包 yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-d…

2019-04-30 0条评论 3668点热度 2人点赞 泡面师 阅读全文
centos

centos安装supervisor

安装supervisor pip install supervisor 重定向默认配置文件 echo_supervisord_conf > /etc/supervisor/supervisord.conf 如果报错pkg_resources.DistributionNotFound: meld3>=0.6.5 注释/usr/lib/python2.6/site-packages/supervisor-3.3.4-py2.6.egg-info/requires.txt的#meld3 >= 0.6.5 开启…

2019-03-23 0条评论 3069点热度 2人点赞 泡面师 阅读全文
centos

centos限制目录大小

使用dd命令创建一个50M的文件 dd if=/dev/zero of=/data/wwwroot/test.disk bs=1M count=50 格式化为ext4文件系统 mkfs.ext4 -Fq /data/wwwroot/test.disk 挂载到空闲设备 mount -o loop /data/wwwroot/test.disk /data/wwwroot/test_dir/ //网上一些文章用的是losetup /dev/loop0 这种指定设备的方式,如果不确定设备是否空闲,这里使用mount自动挂…

2018-06-10 0条评论 4244点热度 9人点赞 泡面师 阅读全文
centos

centos用pip安装python-mysql报错

安装python-mysql报错 pip install mysql-python Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Z8LTPx/MySQL-python/ 先安装以下库文件 yum install python-devel mysql-devel 再安装mysql-python pip install MySQL-python

2018-06-10 0条评论 3581点热度 0人点赞 泡面师 阅读全文
centos

linux 添加公钥免密ssh

生成Key ssh-keygen -t rsa 查看公钥 cat ~/.ssh/id_rsa.pub 添加公钥到目标机器~/.ssh/authorized_keys 如果不存在authorized_keys cd ~/.ssh cp id_rsa.pub authorized_keys authorized_keys的权限设置成600

2018-06-10 0条评论 2769点热度 2人点赞 泡面师 阅读全文
centos

git迁移

从原地址克隆一份裸版本库,比如原本托管于 GitHub。 git clone --bare git:192.168.1.10:project.git --bare 创建的克隆版本库都不包含工作区,直接就是版本库的内容,这样的版本库称为裸版本库。 然后到新的 Git 服务器上创建一个新项目,比如 newproject。 mkdir newproject cd newproject git --bare init 以镜像推送的方式上传代码到 newproject 服务器上。 cd project.git git pus…

2018-05-25 0条评论 5009点热度 0人点赞 泡面师 阅读全文
centos

centos7 git服务端配置

开发套装 yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel 创建git用户 groupadd git useradd -g git -d /home/git -m -s /bin/bash git passwd git 3HeFUErkCBNviEys 初始化 cd /home/git mkdir project.git cd project.git git --bare init chown -R git:git pro…

2018-05-25 0条评论 3007点热度 2人点赞 泡面师 阅读全文
centos

centos 7 修改ssh、ftp端口

修改ssh端口 vim /etc/ssh/sshd_config 把#Port 22去掉#号 修改为Port 22222 防火墙添加开放22222端口 vim /etc/sysconfig/iptables 添加 -A INPUT -p tcp -m state --state NEW -m tcp --dport 22222 -j ACCEPT 保存退出 保存规则并生效 chkconfig iptables on service iptables restart 修改 ftp 端口,以下为 pureftp vim…

2018-02-26 0条评论 4916点热度 8人点赞 泡面师 阅读全文
centos

linux 定时释放缓存

查看内存使用情况 free -m 类似显示 total used free shared buff/cache available Mem: 992 436 240 88 315 310 Swap: 1023 285 738 清除缓存 echo 3 > /proc/sys/vm/drop_caches 1 释放页缓存 2 释放dentries和inodes 3 释放所有缓存 数字1是用来清空最近放问过的文件页面缓存 数字2是用来清空文件节点缓存和目录项缓存 数字3是用来清空1和2所有内容的缓存 再查看内存使用…

2018-02-25 0条评论 3220点热度 3人点赞 泡面师 阅读全文
12
分类
  • centos (13)
  • golang (2)
  • PHP (4)
  • python (10)
  • 记录 (5)
最新 热点 随机
最新 热点 随机
golang使用mysql连接池 golang使用redis连接池 laravel7的日期格式问题 pyinstaller打包pyqt5后的程序报错Failed to execute script mac使用iterm2进行rzsz 网站设置301重定向
centos 安装Nodejs centos7 git服务端配置 centos7安装scrapy oneinstack php增加fileinfo扩展 golang使用redis连接池 linux 添加公钥免密ssh
标签聚合
golang mysql go-redis redigo iterm2 scrapy redis git Flask centos

COPYRIGHT © 2024 泡面师. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS