LIRE图片识别搜索demo--Ubuntu开发
Ubuntu安裝shadowsocks客戶端/服務端教程
1.安裝shadowsocks
sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-setuptools m2crypto
sudo pip install shadowsocks
2.json配置文件
shadowsocks.json
{
"server":"*.*.*.*",
"server_port":*,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"*******",
"timeout":300,
"method":"aes-256-cfb"
}
3.后臺啟動
sudo sslocal -c ~/shadowsocks.json -d start
4.開機后臺啟動
sudo vi /etc/rc.local
添加:
sudo sslocal -c ~/shadowsocks.json -d start
5.配置代理
手動代理:Network --> Network proxy --> Method:Manual
Socks Host: 127.0.0.1 1080
動態(tài)代理:Network --> Network proxy --> Method:Automatic
輸入自定義的代理文件路徑:/../../../autoproxy.pac,文件詳情見最后
推薦Chrome安裝插件 SwitchyOmega配置代理啟動
配置代理:
協(xié)議:SOCKS5
服務器:127.0.0.1
端口:1080
開啟:proxy
6.注意事項:
1)未設置開機啟動時,需重新啟動客戶端
2)動態(tài)代理文件路徑盡量不要放在經(jīng)常變動的路徑下,推薦系統(tǒng)配置文件路徑
3)開啟代理后,推薦使用Chrome瀏覽器,使用FireFox瀏覽器時注意在配置中修改代理文件路徑(同network中的配置文件)
4)如果沒有上述情況,推薦查看1080端口是否已被占用
shadowsocks的客戶端十分易用,上述情況排查結束,就可以解決問題
7.network自動代理配置文件
太大,不可提交,網(wǎng)上有很多
附錄:
1.Ubuntu云服務器安裝shadowsocks服務端
apt-get install python-pip //安裝pip pip -V // 校驗 pip install shadowsocks // 安裝shadowsocks
# 注意 Ubuntu 16.4 可直接安裝
apt install shadowsocks
2.創(chuàng)建配置json文件,這里以多端口為例
{
"server":"0.0.0.0",
"local_address": "127.0.0.1",
"local_port":1080,
"port_password":{
"5210":"rosetta123456",
"5211":"rosetta123456",
"5212":"rosetta123456",
"5213":"rosetta123456",
"5214":"rosetta123456",
"5215":"rosetta123456"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
3.后臺啟動shadowsocks代理服務
ssserver -c ss.json -d start
這里:啟動 start 重啟 restart 關閉 stop
4.銳速加速,此處為Ubuntu執(zhí)行腳本
#!/bin/bash
# Ubuntu/14.04/3.16.0-43-generic/x64
# Ubuntu/16.04/4.4.0-47-generic/x64
[ -n "`cat /etc/issue | grep "Ubuntu 16.04"`" ] && echo "Ubuntu 16.04" && KER_VER="4.4.0-47-generic"
[ -n "`cat /etc/issue | grep "Ubuntu 14.04"`" ] && echo "Ubuntu 14.04" && KER_VER="3.16.0-43-generic"
cp /etc/default/grub /etc/default/grub.old
sed -ir "s/GRUB_DEFAULT=.*/GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux $KER_VER"/g" /etc/default/grub
# update-grub
apt-get update
apt-get install -y linux-image-extra-$KER_VER
# reboot
mkdir -p /appex
cat > /appex/appexinstall.sh << TEMPEOF
wget --no-check-certificate -qO /tmp/appex.sh "https://raw.githubusercontent.com/0oVicero0/serverSpeeder_Install/master/appex.sh" && bash /tmp/appex.sh 'install' << EOF
EOF
cp /etc/rc.local.old.ruisu /etc/rc.local
rm /etc/rc.local.old.ruisu
TEMPEOF
# bash /appex/appexinstall.sh
# ps aux | grep appex
if [ ! -f "/etc/rc.local.old.ruisu" ]; then
echo "first time run this script, backup the rc.local"
cp /etc/rc.local /etc/rc.local.old.ruisu
fi
# cp /etc/rc.local /etc/rc.local.old.ruisu
sed -i '$d' /etc/rc.local
echo "bash /appex/appexinstall.sh" >> /etc/rc.local
echo "exit 0" >> /etc/rc.local
chmod 0755 /etc/rc.local
reboot
5.銳速--serverSpeeder使用
#重啟銳速 /appex/bin/serverSpeeder.sh restart #啟動銳速 /appex/bin/serverSpeeder.sh start #停止銳速 /appex/bin/serverSpeeder.sh stop #查看銳速運行情況 /appex/bin/serverSpeeder.sh status
總結
以上是生活随笔為你收集整理的LIRE图片识别搜索demo--Ubuntu开发的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 农行靓居信用卡年费多少?免年费其实很简单
- 下一篇: robotframework悬浮菜单定位