Contents
  1. 1. –>修改更新源
  2. 2. –>更新
  3. 3. 安装一些软件
  4. 4. –>开启SSH
  5. 5. 配置编译环境,配置gcc
  6. 6. –>配置数据库
    1. 6.1. ->配置MariaDB
    2. 6.2. ->配置Redis
    3. 6.3. ->配置MongoDB
  7. 7. –>配置Nginx+uWSGI
    1. 7.1. ->配置Nginx
    2. 7.2. ->配置uWSGI
  8. 8. –>安装虚拟环境
  9. 9. –>配置开发软件
    1. 9.1. ->VIM
    2. 9.2. ->PyCharm
    3. 9.3. ->Sublime

Parrot Security OS下载地址
安装Parrot Security OS

–>修改更新源

修改parrot.list
vim /etc/apt/source.list.d/parrot.list

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# parrot repository
# this file was automatically generated by parrot-mirror-selector
# 官方源
deb http://mirrordirector.archive.parrotsec.org/parrot/ parrot main contrib non-free
#deb-src http://mirrordirector.archive.parrotsec.org/parrot/ parrot main contrib non-free
# 中国源
deb http://mirrors.ustc.edu.cn/parrot/ parrot main contrib non-free
deb http://mirrors.ustc.edu.cn/parrot/ testing main contrib non-free
#deb-src http://mirrors.ustc.edu.cn/parrot/ parrot main contrib non-free
# 清华源
deb http://mirrors.tuna.tsinghua.edu.cn/parrot/ parrot main contrib non-free
#deb-src http://mirrors.tuna.tsinghua.edu.cn/parrot/ parrot main contrib non-free

–>更新

更新源
apt-get update --fix-missing

更新软件,及更新操作系统
apt-get upgrade && apt-get dist-upgrade

安装一些软件

安装vim,tree,htop,vsftpd,ipython3,谷歌拼音输入法
apt-get install vim tree htop vsftpd ipython3 fcitx fcitx-googlepinyin

–>开启SSH

vi /etc/ssh/sshd_config
将#PasswordAuthentication yes的#去掉
将#PermitRootLogin prohibit-password,修改为PermitRootLogin yes

#开启SSH服务
/etc/init.d/ssh start

开机自动启动SSH服务
update-rc.d ssh enable

配置编译环境,配置gcc

apt-get install libffi libxml2 python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev
apt-get install gcc libpcre3 libpcre3-dev zlib1g zlib1g-dev openssl openssl-dev

–>配置数据库

->配置MariaDB

允许任意主机登录
mysql -uroot -p

grant all privileges on *.* to 'root'@'%' identified by 'mysql' with grant option;

FLUSH PRIVILEGES;

修改配置文件,屏蔽绑定本地ip

1
2
vi /etc/mysql/mysql.conf.d/mysqld.cnf
# bind-address = 127.0.0.1

修改数据库密码
use mysql;

update user set authentication_string=password('password') where user='root';

flush privileges;

重启mysql服务
service mysql restart

->配置Redis


->配置MongoDB


–>配置Nginx+uWSGI

->配置Nginx

在nginx官网下载并安装稳定版nginx 1.12
解包
tar -zxvf nginx……
cd nginx……
编译
./config……
安装
make && make install

->配置uWSGI


–>安装虚拟环境

安装virtualenv虚拟环境
pip install virtualenv && apt-get install python-virtualenv && pip install virtualenvwrapper

创建目录存放虚拟环境
mkdir $HOME/.virtualenvs

在用户环境变量~/.bashrc中添加:
vi ~/.bashrc

1
2
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

应用环境变量
source ~/.bashrc

创建并进入虚拟环境

  • 自用的环境文件**
    mkvirtualenv 虚拟环境名(虚拟环境:djangospidertornado)

导入pip包
pip install -r xxx.txt

–>配置开发软件

->VIM

个人配置文件
VIM_IDE参考网址
安装插件
PluginInstall

->PyCharm

PyCharm下载链接
下载之后在applications创建图标
leafpad /usr/share/applications/Pycharm.desktop

  • 写入
    1
    2
    3
    4
    5
    6
    7
    8
    9
    [Desktop Entry]
    Type=Application
    Name=Pycharm
    GenericName=Pycharm3
    Comment=Pycharm3:The Python IDE
    Exec="/opt/pycharm-2017.1.4/bin/pycharm.sh" %f
    Icon=/opt/pycharm-2017.1.4/bin/pycharm.png
    Terminal=pycharm
    Categories=Pycharm;

PyCharm激活及屏蔽

->Sublime

Sublime3安装包
dpkg -i sublime-text_build-3126_amd64