IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    [备忘]新主机Python部署环境初始化清单

    the5fire发表于 2017-05-22 11:50:30
    love 0

    openresty

    官网:https://openresty.org/cn/linux-packages.html

    vim /etc/yum.repos.d/OpenResty.repo:

    [openresty]
    name=Official OpenResty Repository
    baseurl=https://copr-be.cloud.fedoraproject.org/results/openresty/openresty/epel-$releasever-$basearch/
    skip_if_unavailable=True
    gpgcheck=1
    gpgkey=https://copr-be.cloud.fedoraproject.org/results/openresty/openresty/pubkey.gpg
    enabled=1
    enabled_metadata=1

    yum install openresty

    Vim

    插件管理工具: https://github.com/VundleVim/Vundle.vim

    MySQL:

    • yum install mariadb-server mariadb -y
    • yum install mysql-devel
    • systemctl enable mariadb

    vim /etc/my.conf:

    [mysqld]
    # 省略其他,增加下面一行配置
    character-set-server = utf8
    
    [mysql]
    # 省略其他,增加下面一行配置
    default-character-set = utf8
    • systemctl start mariadb
    • /usr/bin/mysqladmin -u root password 'new-password'
    • mysql -uroot -p 'new-password'

      create database myblog; GRANT ALL PRIVILEGES ON myblog.* TO 'the5fire'@'localhost' IDENTIFIED BY '123456';

    导入数据: mysql -uthe5fire -p '123456'

    > user myblog
    > source myblog.sql

    Python

    • yum install python-devel
    • yum install python-setuptools
    • easy_install pip
    • pip install virtualenv

    Redis

    yum install redis

    no root user

    • useradd the5fire
    • passwd 'suibianshishenmeba'

      su - the5fire chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys



沪ICP备19023445号-2号
友情链接