搭建ubuntu14.04服務器必備環境

1.  設置網絡python

設置網絡時,必定要設置好網卡,第一個網卡必定要設置爲‘br0’(以下圖),設置爲其餘的上不去網。mysql

修改網絡配置文件,命令:sudo gedit /etc/network/interfaceslinux

  •  單個網卡配置文件
# interfaces(5) file used by ifup(8) and ifdown(8)

auto lo
iface lo inet loopback  #設置本地環回
auto eth0 iface eth0 inet
static #設置靜態IP address 192.168.0.118  #靜態IP地址 netmask 255.255.255.0 #子網掩碼 gateway 192.168.0.1 #網關
  • 雙網卡配置文件
# interfaces(5) file used by ifup(8) and ifdown(8)

auto lo
iface lo inet loopback

auto eth0  #第一個網卡(接外網)
iface eth0 inet static
address 192.168.0.118
netmask 255.255.255.0
gateway 192.168.0.1

auto eth1  #第二個網卡(接內網)
iface eth1 inet static
address 192.168.213.103 netmask 255.255.255.0

auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0

auto br1
iface br1 inet static
bridge_ports eth1
bridge_stp off
bridge_fd 0

 

2.  更新爲國內源,並安裝vimgit

1 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #備份
2 sudo vim /etc/apt/sources.list #修改
3 sudo apt-get update #更新列表

 

# 阿里源
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

 

3.  下載並安裝搜狗輸入法github

    百度「搜狗輸入法」,下載linux版,雙擊打開deb包,在ubuntu中心安裝便可,安裝成功後,重啓生效。sql

4. ubuntu14.04/16.04安裝mysqlbootstrap

  安裝連接:https://www.linuxidc.com/Linux/2017-06/144805.htmubuntu

5.  安裝anaconda工具包vim

    百度「anaconda 清華源」,下載最新版的linux版的anaconda包,下載好後,在終端輸入:bash 包名,一步步往下走便可;python3.x

    詳細安裝過程。

6.  安裝cmake

 Installation of Cmake:(it tooks a while to install ~1.5 min)

1 sudo wget  https://cmake.org/files/v3.9/cmake-3.9.0-rc5.tar.gz -O cmake.tar.gz
2 sudo tar -xvf cmake.tar.gz
3 cd cmake-3.9.0-rc5/
4 sudo chmod +x bootstrap
5 sudo ./bootstrap
6 sudo make
7 sudo make install

注:安裝好cmake後,輸入cmake -version查看cmake版本是否安裝成功。

*7.  安裝dlib庫

  • 下面經過手動編譯dlib的方式進行安裝dlib
1 git clone https://github.com/davisking/dlib.git     //Clone the code from github
2 cd dlib
3 mkdir build 4 cd build 5 cmake .. -DDLIB_USE_CUDA=0 -DUSE_AVX_INSTRUCTIONS=1 //以AVX指令的方式編譯dlib 6 cmake --build . 7 cd .. 8 sudo python3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA

注:最後一步須要等待一些時間。若是使用python3.x版本,最後一步命令python改成python3

安裝完成後,運行python3,輸入

import dlib

*8.  安裝face_recognition人臉識別庫

  • 安裝face_recognition
$ sudo pip install face_recognition

安裝完成後,運行python3,輸入

import face_recognition

 *9.  安裝setuptools包

 wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python

 *10.  安裝teamviewer

ubuntu14.04安裝teamviewer遠程桌面

*11.  安裝vlc

終端輸入:sudo apt-get install vlc

相關文章
相關標籤/搜索