Django环境安装与配置. 1-> conda list 查看安装了哪些包. 2->conda env list 或 conda info -e 查看当前存在哪些虚拟环境. 3->conda update conda 检查更新当前conda. 4->conda create -n homepage python=3.6 anaconda. 创建名字为homepage的python3.6项目. 5->source activate your_env_name(虚拟环境名称). 6->source deactivate(关闭虚拟环境). 7->conda remove -n your_env_name(虚拟环境名称) --all, 即可删除. 8->conda install --name homepage django(一定要指定虚拟环境名称,否则默认安装在当前). 9->测试安装成功. >>> import django >>> print(django.get_version()) 1.10.5 管理 django-admin.py startproject homepage( 新建项目 ) python manage.py runserver(本机) python manage.py startapp blog(建立blog应用) python manage.py migrate (数据初始化) python manage.py createsuperuser (创建超级用户)
1->安装组件: $ yum install m2crypto python-setuptools $ easy_install pip $ pip install shadowsocks 2 -> 配置文件: $ vi /etc/shadowsocks.json { "server":"45..........", #服务器IP "server_port":443, "local_address": "127.0.0.1",#服务器IP "local_port":1080, "password":"123456",#自己设定 "timeout":300, "method":"aes-256-cfb", "fast_open": false } 3->安装防火墙 : $ yum install firewalld 4->启动防火墙 : $ systemctl start firewalld 5->端口号是你自己设置的端口 $ firewall-cmd --permanent --zone=public --add-port=443/tcp $ firewall-cmd --reload 6->启动: $ nohup ssserver -c /etc/shadowsocks.json & 7->DONE