Ubuntu
- Flask
sudo pip install Flask
- mysql
sudo apt-get install -y mysql-server
sudo apt install -y mysql-client
sudo apt install -y libmysqlclient-dev
sudo pip install -y mysql-python
- redis
sudo apt install -y redis-server
sudo apt-get install -y python-redis
Dejavu
sudo apt-get install -y libasound-dev python-pyaudio
sudo apt-get install -y ffmpeg
sudo apt-get install -y python-tk
sudo apt-get install -y python-mysqldb
sudo pip install pydub numpy scipy matplotlib
$ mysql -u root -p
Enter password: **********
mysql> CREATE DATABASE IF NOT EXISTS dejavu;
Centos
准备工作
vim
sudo mv /bin/vi /bin/vi_bak
sudo ln -s /bin/vim /bin/vi
镜像
http://www.jianshu.com/p/281ee3db7c15
更新系统
yum update
升级python
http://www.jianshu.com/p/5420c4299b40
配置代理
pip install shadowsocks
vi /etc/ss-local.json
{
"server":"IP",
"server_port":PORT,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"PASSWD",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false,
"workers": 1
}
nohup sslocal -c /etc/ss-local.json &>> /var/log/ss-local.log &
yum -y install privoxy
echo 'forward-socks5 / 127.0.0.1:1080 .' >> /etc/privoxy/config
systemctl start privoxy
systemctl enable privoxy
vi /usr/local/bin/myss
#!/bin/bash
case $1 in
start)
nohup sslocal -c /etc/ss-local.json &>> /var/log/ss-local.log &
systemctl start privoxy
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
export no_proxy=localhost
;;
stop)
unset http_proxy https_proxy no_proxy
systemctl stop privoxy
pkill sslocal
;;
reload)
pkill sslocal
nohup sslocal -c /etc/ss-local.json &>> /var/log/ss-local.log &
;;
set)
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
export no_proxy=localhost
;;
unset)
unset http_proxy https_proxy no_proxy
;;
*)
echo 'usage start|stop|reload|set|unset'
exit 1
;;
esac
chmod +x /usr/local/bin/myss
myss start
opencv
yum -y install cmake git pkgconfig libpng-devel libjpeg-turbo-devel jasper-devel openexr-devel libtiff-devel libwebp-devel libdc1394-devel libv4l-devel gstreamer-plugins-base-devel gtk2-devel tbb-devel eigen3-devel
yum -y install gcc gcc-c++
上传opencv相关文件
cd opencv3.2
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_OPENCV_PYTHON2=ON ..
# 期间可能遇到ippicv_linux_20151201.tgz 无法下载的问题,请参照下方的方案解决
make -j2 #11:08开始,11:27分结束
make -j2 install
Mysql
https://www.cnblogs.com/starof/p/4680083.html
yum -y install mariadb-server mariadb mysql-devel
systemctl start mariadb #启动MariaDB
systemctl stop mariadb #停止MariaDB
systemctl restart mariadb #重启MariaDB
systemctl enable mariadb #设置开机启动
mysql -u root -p
set password for 'root'@'localhost' =password('root');
redis
https://www.linode.com/docs/databases/redis/install-and-configure-redis-on-centos-7
yum -y install redis
systemctl start redis
systemctl enable redis
Dejavu
yum -y install numpy scipy python-matplotlib portaudio-devel
virtualenv
pip install virtualenv
pip install virtualenvwrapper
echo -e "export WORKON_HOME=~/Envs\nsource /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
source ~/.bashrc
ffmpeg
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
yum -y install ffmpeg ffmpeg-devel
requirments
pip install -r requirments.txt
网友评论