First, the initial configuration:
1, install the system and configure the address and DNS.
2. Set Root password:
sudo passwd root
3. Change the Cloud Source:
sudo cp/etc/apt/sources.list/etc/apt/sources.list.bak
sudo apt-get install vim
sudo vim/etc/apt/sources.list
#Deb Cdrom:[ubuntu 16.04 LTS _xenial xerus_-Release amd64 (20160420.1)]/xenial main restrictedDEB-SRC http://archive.ubuntu.com/ubuntu xenial main restricted#Added by Software-propertiesDeb http://mirrors.aliyun.com/ubuntu/xenial main Restricteddeb-SRC http://mirrors.aliyun.com/ubuntu/xenial main restricted multiverse universe#Added by Software-propertiesDeb http://mirrors.aliyun.com/ubuntu/xenial-Updates main Restricteddeb-SRC http://mirrors.aliyun.com/ubuntu/xenial-updates main restricted multiverse universe#Added by Software-propertiesDeb http://mirrors.aliyun.com/ubuntu/xenial universedeb http:mirrors.aliyun.com/ubuntu/xenial-Updates Universedeb http:mirrors.aliyun.com/ubuntu/xenial multiversedeb http:mirrors.aliyun.com/ubuntu/xenial-Updates Multiversedeb http:mirrors.aliyun.com/ubuntu/xenial-backports main restricted universe Multiversedeb-SRC http://mirrors.aliyun.com/ubuntu/xenial-backports main restricted universe multiverse#Added by Software-propertiesDeb http://archive.canonical.com/Ubuntu xenial Partnerdeb-SRC http://archive.canonical.com/Ubuntu xenial partnerdeb http:mirrors.aliyun.com/ubuntu/xenial-Security Main Restricteddeb-SRC http://mirrors.aliyun.com/ubuntu/xenial-Security main restricted Multiverse universe#Added by Software-propertiesDeb http://mirrors.aliyun.com/ubuntu/xenial-Security Universedeb http:Mirrors.aliyun.com/ubuntu/xenial-security Multiverse
Aili Cloud Source4. Update package:
sudo apt-get update
5. Update Firefox:
sudo apt-get install Firefox
/usr/bin/firefox-v #查看版本号
6. Download the Firefox language pack (or you will get an error when you run it later):
Apt-get Install Firefox-locale-en If you are using the English language environment, please use the following command for English Language pack installation/update
Apt-get Install Firefox-locale-zh-hans If you are using a Chinese language environment, please use the following command for Chinese Language pack installation/update
7. Download Geckodriver:
Https://github.com/mozilla/geckodriver/releases #
Tar zxvf geckodriver-v0.19.1-linux64.tar.gz
CP geckodriver/usr/local/bin/Second, Python package download and configuration:
1. Install PIP (the system Python3.5.2 version is installed by default)
sudo apt-get install Python3-pip
PIP3 Install--upgrade pip
2. Installation Library:
PIP3 Install Selenium
PIP3 Install Jieb
Third, Ubuntu 16.04 Remote Desktop configuration:
1, installing Xrdpsudo apt-Get install XRDP
2, installing Xfce4sudo apt-get Install xubuntu-Desktop
4, configuration Xfce4echo"xfce4-session">~/. Xsession # Create the. xsession file and write the content. After that, many of the online practices are over, but I only show connecting to Sesman ip127 when I use the Remote Desktop Connection mstsc.exe connection .0.0. After 1, there is no reflection, you should continue to connect OK. In this way, continue:5, continue to configure Xfce4sudo VI/etc/xrdp/startwm.sh in./etc/x11/xsession Previous line insert Xfce4-Session6, restart Xrdpsudo service xrdp restart7. Using Remote Desktop Connection Mstsc.exe, type selection after connection sesman-Xvnc fill in the username and password. Note that steps 4th and 5th, two configurations of Xfce, are indispensable. 8, modify the TAB key to complete the function so far, remote login can be used normally, but in the terminal cannot use the automatic completion of the tab, use is very inconvenient, use the following method to modify: This method does not need to restart the system, you can directly in the Remote Desktop settings, open the menuSettings, window Manager, or enter xfwm4-in the terminalSettings Open (XFWM4 is the abbreviation of Xfce4 window Manger) Select the keyboard, you can see the action in the Window shortcut list "Switch the same application window" option, the shortcut key to clear the option to close the window. Default setting, the value of the key is "super+ tabulation ", TAB key is TAB key. This can be used immediately after the modification.
Ununtu16.04+python3+selenium+firefox Environment Construction