1  更新源

进入 /etc/apt/sources.list

sudo vim进入,

更改为如下源

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

更新源后,sudo-apt-get update

2 安装chrome

安装谷歌浏览器,只需要三行代码:

打开终端,输入 
cd /tmp 
对于谷歌Chrome32位版本,使用如下链接:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb

对于64位版本可以使用如下链接下载:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 
下载完后,运行如下命令安装。

sudo dpkg -i google-chrome*; sudo apt-get -f install

3 下载对应浏览器版本的chromedriver,并拷贝到/usr/bin目录下

ubuntu上传下载:

http://www.linuxidc.com/Linux/2017-06/145191.htm

1.第一种方法是最常用的 :如果下载了Xshell和Xftp,Ctrl+Alt+F就可以选择文件的互传了!(虚拟机/云服务器通用)--只要相互间能ping得通。

2

第二种方法 :ubuntu环境下安装lrzsz,具体命令是--->      sudo apt-get install lrzsz      (如果是root权限就不用加sudo)

安装完毕后,具体操作命令是:   sz 【file】 --->可将服务器的文件下载到本地,

(1)比如要把ubuntu上的urls.txt下载到本地,

那么我只要输入sz urls.txt回车,就能选择下载到本地哪个路径下。

(2)比如要把本地文件上传到ubuntu上,只需输入 rz 命令回车就会弹出本地路径窗口:

4 安装pip

sudo apt-get install python-pip

5 安装 virtualenv

用virtualenv建立虚拟环境 py3env

6激活虚拟环境

source py3env/bin/activate

7在虚拟环境中安装必备python包,

configparser,selenium

pip install -r requirements.txt

8将测试代码 拷贝至code目录下

9 安装tmux  sudo apt-get install tmux

10 启动新的tmux窗口,开启py3env虚拟环境,注意chromedriver中options要添加正确,不然chrome启动失败

ubuntu配置 测试环境 记录的更多相关文章

  1. ubuntu 配置JDK环境变量

    ubuntu 配置JDK环境变量 (2011-11-25 16:45:59) 转载▼ 标签: ubuntu jdk 环境变量 杂谈 分类: Linux_Ubuntu_CentOs 过程如下: 1. 先 ...

  2. 通过Maven配置测试环境和开发环境连接不同的数据库

    通过Maven配置测试环境和开发环境连接不同的数据库   作者及来源: 通灵宝玉 - 博客园    收藏到→_→: 此文来自: 马开东博客 网址:http://www.makaidong.com   ...

  3. Ubuntu 配置Tomcat环境(转载)

    Ubuntu 配置Tomcat环境   1.下载Tomcat http://tomcat.apache.org/,下载Tomcat 8(由于目前最新eclipse不支持tomcat 9) 将下载的ap ...

  4. 携程框架Apollo实现.NET Core微服务统一配置(测试环境-单机)

    Apollo实现.NET Core微服务统一配置(测试环境-单机) https://www.cnblogs.com/guolianyu/p/10065999.html 一.前言 注:此篇只是为测试环境 ...

  5. angular8 配置 测试环境打包指令 生成测试环境包指令

    1.angular.json 文件中在architect 下添加 buildTest指令 距离位置 projects => (你的项目名称) => architect 下和 build 指 ...

  6. Ubuntu配置java环境变量

    参考文章: http://www.cnblogs.com/BigIdiot/archive/2012/03/26/2417547.html 方法1:修改/etc/profile 文件所有用户的 she ...

  7. 基于Apollo实现.NET Core微服务统一配置(测试环境-单机)

    一.前言 注:此篇只是为测试环境下的快速入门.后续会给大家带来生产环境下得实战开发. 具体的大家可以去看官方推荐.非常的简单明了.以下介绍引用官方内容: Apollo(阿波罗)是携程框架部门研发的分布 ...

  8. ubuntu配置机器学习环境(一) ubuntu安装

    第一部分:Ubuntu14.04安装 Step :安装Ubuntu Step 1.1:准备安装U盘 首先到官网下载Ubuntu的镜像,我使用的是Ubuntu 14.04.3的ISO. 然后使用Ultr ...

  9. Linux:Ubuntu配置jdk环境变量

    1.下载jdk 推荐官网:https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html 下载tar.gz包即可. ...

随机推荐

  1. BZOJ4001 [TJOI2015]概率论 【生成函数】

    题目链接 BZOJ4001 题解 Miskcoo 太神了,orz #include<algorithm> #include<iostream> #include<cstr ...

  2. [USACO06NOV]玉米田Corn Fields (状压$dp$)

    题目链接 Solution 状压 \(dp\) . \(f[i][j][k]\) 代表前 \(i\) 列中 , 已经安置 \(j\) 块草皮,且最后一位状态为 \(k\) . 同时多记录一个每一列中的 ...

  3. freemarker的简单入门程序

    本文主要介绍了freemarker的常用标签<#list>   <#import>  <#assign>  <#if> <#else> &l ...

  4. Windows彻底删除不用的dc

    如果DC迁移,或者多台DC中的某台DC损坏,要退出历史舞台,一定要彻底的卸载,否则,系统会默认存在,一直同步,会出很多问题.怎么做才能彻底的从域中卸载呢?下面介绍一个个人认为很好用的方法:1.在存活的 ...

  5. angular控制器controller里获取不到ng-model的值,获取为undefined

    所遇问题: html:ng-model=“test”, 但是在controller里打印的$scope属性里面并未发现test,控制台打印test为undefined,页面上{{test}}却可以正常 ...

  6. Linux Ubuntu mysql 乱码

    进入mysql后,敲入命令status,就可以看到mysql的字符编码问题. 默认如下: Server characterset:    latin1 Db  characterset:    lat ...

  7. 最全面的Android Webview详解

    转自:最全面的Android Webview详解 前言 现在很多App里都内置了Web网页(Hyprid App),比如说很多电商平台,淘宝.京东.聚划算等等,如下图  那么这种该如何实现呢?其实这是 ...

  8. (转)MSI - Enable MSI Logging

    转自: http://www.cnblogs.com/atempcode/archive/2007/04/10/707917.html 安装MSI安装包的时候, 有时会遇到错误, 这时LOG文件就非常 ...

  9. xen 保存快照的实现之 —— device model 状态保存

    xen 保存快照的实现之 —— device model 状态保存 实现要点: 设备状态保存在 /var/lib/xen/qemu-save.x 文件这个文件由 qemu-dm 产生,也由 qemu- ...

  10. 深入解析Linux内核I/O剖析(open,write实现)

    Linux内核将一切视为文件,那么Linux的文件是什么呢?其既可以是事实上的真正的物理文件,也可以是设备.管道,甚至还可以是一块内存.狭义的文件是指文件系统中的物理文件,而广义的文件则可以是Linu ...