Ubuntu14+OpenCV3.1+Caffe虚拟机安装笔记(一)

  1. 安装ubuntu14虚拟机
    1.1下载Ubuntu14
    http://releases.ubuntu.com/14.04/
    http://releases.ubuntu.com/14.04/ubuntu-14.04.5-desktop-amd64.iso
    用迅雷下载,速度飞快!

1.2 安装VM
参考链接:http://blog.csdn.net/u011476718/article/details/52859900

1.3 登陆ubuntu14.04

千万不要升级

1.3.1启动root用户
1. 为root设置密码
sudo passwd root

  1. 修改配置文件
    gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

在文件末尾添加如下内容:
greeter-show-manual-login=true
allow-guest=false

保存修改并退出,重启系统登录即可使用root登录。

以root身份登录图形界面报错:
Error found when loading /root/.profile:
stdin: is not a tty

解决方法:在终端中用命令gedit /root/.profile,打开文件后找到“mesg n”,
将其更改为“tty -s && mesg n”。
然后reboot

1.3.2 ubuntu 14.04源更新(sources.list)
sudocp/etc/apt/sources.list/etc/apt/sources.listbackup sudo gedit /etc/apt/sources.list
加入:
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse

刷新:
$ sudo apt-get update

1.3.3 ubuntu 14.04安装后扫尾工作
http://blog.csdn.net/eversliver/article/details/50733391
1.3.3.1.删除libreoffice
sudo apt-get –purge remove libreoffice-common

1.3.3.2.删除Amazon的链接
sudo apt-get –purge remove unity-webapps-common

1.3.3.3.删掉基本不用的自带软件
sudo apt-get –purge remove thunderbird totem rhythmbox empathy brasero simple-scan gnome-mahjongg aisleriot gnome-mines cheese transmission-common gnome-orca webbrowser-app gnome-sudoku landscape-client-ui-install
sudo apt-get –purge remove onboard deja-dup

1.3.3.4.安装Vim
sudo apt-get install vim
vim优化:
wget -qO- https://raw.github.com/ma6174/vim/master/setup.sh | sh -x

1.3.3.5.安装搜狗输入法–没安装
sudo gedit /etc/apt/sources.list文件,加入ubuntu kylin的apt源
deb http://archive.ubuntukylin.com:10006/ubuntukylin trusty main
然后
sudo apt-get update
sudo apt-get install sogoupinyin

1.3.3.6.安装git和vpnc
sudo apt-get install vpnc git

1.3.3.7. 禁用访客账户
echo allow-guest=false | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

1.3.3.8. 安装ssh,以便远程控制
sudoaptgetinstallssh sudo gedit /etc/ssh/sshd_config文件,注释掉 #PermitRootLogin without-password,添加 PermitRootLogin yes。
重启ssh服务:
$ sudo Service ssh restart

1.3.3.9. 关闭蓝牙
$ sudo gedit /etc/rc.local
在打开的文件最后找到“exit 0”这一句,在前面加一句,如下:
rfkill block bluetooth
exit 0
保存,重启

1.3.3.10. 设置静态IP
$ sudo gedit /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.62.118
netmask 255.255.255.0
gateway 192.168.62.2

sudogedit/etc/resolv.conf sudo gedit /etc/resolvconf/resolv.conf.d/base
nameserver 192.168.62.2
nameserver 220.170.64.68
search localdomain

重启networking服务使其生效–我试了2次,都失败,只好重启。
sudo/etc/init.d/networkingrestart sudo service networking restart

$ sudo tail -f /var/log/upstart/networking.log //查看错误日志
Stopping or restarting the networking job is not supported.
Use ifdown & ifup to reconfigure desired interface.

1.3.3.11. 右键开启终端
$ sudo apt-get install nautilus-open-terminal

1.3.3.12关闭自动锁屏
All Settings -> Security & Privacy, unselect below 2 checkboxs

1.4 在Ubuntu14上安装C++&Java编译环境
参考:http://www.learnopencv.com/install-opencv3-on-windows/

  1. Install Eclipse JEE and Eclipse C/C++ in separate folders in /opt
  2. /opt/eclipse-cpp
  3. /opt/eclipse-jee
  4. Create two different desktop files in ~/.local/share/applications(也可以放在/usr/share/applications目录下)
    gedit /usr/share/applications/eclipse_cpp.desktop
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Name=Eclipse C++
    Comment=Eclipse Integrated C++ Development Environment
    Icon=/opt/eclipse-cpp /icon.xpm
    Exec=/opt/eclipse-cpp/eclipse
    StartupNotify=true
    StartupWMClass=Eclipse-CPP
    Terminal=false
    Categories=Application;Development;

=================================================================
sudo gedit /usr/share/applications/eclipse_java.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Eclipse Java
Comment=Eclipse Integrated JAVA Development Environment
Icon=/opt/eclipse-java/icon.xpm
Exec=/opt/eclipse-java/eclipse
StartupNotify=true
StartupWMClass=Eclipse-Java
Terminal=false
Categories=Application;Development;

During the first start of both Eclipse distributions, select a different workspace folder for each of them, eg
workspace-cpp workspace-java
Alternatively you can change the workspace folder in Eclipse itself via File > Switch Workspace
Now you can use both distributions in parallel.

1.5 Ubuntu14上安装pycharm
IBus prior to 1.5.11 may cause input problems. See IDEA-78860 for details.–完成了
https://stackoverflow.com/questions/33651898/resolving-ibus-issue-ibus-prior-to-1-5-11-may-cause-input-problems
方法一 –我采用这个办法
This solution is if you would like to upgrade ibus in Ubuntu 14.04.4 LTS to the latest version (at the time of writing is 1.5.11).
1. Install the dependencies
$ sudo apt-get install libdconf-dev libnotify-dev intltool libgtk2.0-dev libgtk-3-dev libdbus-1-dev
2. Download the ibus 1.5.11 source code .
3. Extract the files (tar -xvf ibus-1.5.11.tar.gz) and cd into the extracted folder
4. While in the ibus source folder, follow the instructions to install ibus 1.5.11:
./configure –prefix=/usr –sysconfdir=/etc && make
sudo make install
5. Restart Intellij IDE or whichever jetbrain’s IDE that is in question

方法二
echo “export IBUS_ENABLE_SYNC_MODE=1” >> ~/.bashrc
source ~/.bashrc

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值