環境搭建

  

1.安裝mysql
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server
service mysqld start 啓動mysql
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456'); 設置mysql root密碼
將mysql設置爲開機自啓動
systemctl enable mysqld.service
 
2.安裝nginx
下載源碼包
nginx-1.6.3.tar.gz
解壓,進入目錄內
tar zxvf nginx-1.6.3.tar.gz
yum -y install gcc gcc-c++ autoconf automake
yum -y install zlib zlib-devel openssl openssl-devel pcre-devel
./configure --with-http_ssl_module 含ssl配置nginx
make
make install
配置nginx.conf
將nginx設爲開機自啓動 在/etc/init.d 寫腳本nginx設置可執行權限
執行chkconfig --add nginx 將nginx設爲開機自啓動
chkconfig --list 檢查開機自啓動列表
3.安裝flask
安裝pip
pip install flask
安裝flask的一些包
4.安裝gunicorn
yum -y install python-gunicor
 
5.安裝gevent
yum -y install python-gevent
6.安裝redis
下載redis-3.2.1.tar.gz
解壓
make
配置reids.conf
7.安轉python包
pip freeze > require.txt python 安裝目錄
相關文章
相關標籤/搜索