ubuntu 16.04.2 LTS
版本提供了PHP 7.0
,这个版本的PHP
拥有更好的性能,更低的资源开销,考虑了很久,终于决定还是把目前的ubuntu 14.04.5 LTS
升级到ubuntu 16.04.2 LTS
。
分类: Ubuntu
Ubuntu(友邦拓,网友也喜欢称之为“乌班图”)是一个以桌面应用为主的Linux操作系统,其名称来自非洲南部祖鲁语或豪萨语的“ubuntu”一词,意思是“人性”、“我的存在是因为大家的存在”,是非洲传统的一种价值观,类似华人社会的“仁爱”思想.
Ubuntu 14.04下MySQL监控工具—mytop
安装
mytop
的项目页面为:http://jeremy.zawodny.com/mysql/mytop/
Ubuntu 14.04
上的安装非常简单,命令如下:
1 |
$ sudo apt-get install mytop |
安装完成后,执行如下命令启动(本机数据库的情况):
1 |
$ sudo mytop -uroot -ppassword |
启动后的界面如下图:
ubuntu 14.04 LTS关闭873端口
最近在使用百度统计的网站安全功能的时候,被报告存在873
端口被打开的情况,刚开始以为是被入侵了,后来发现是在测试功能的时候无意安装了rsync
导致的rsyncd
在873
端口进行监听。
解决方法就是卸载rsync
即可:
1 2 3 4 |
$ sudo apt-get purge --auto-remove rsync #需要重启机器,否则端口可能出现长时间仍然开放的状态 $ sudo reboot |
Ubuntu 16.04 LTS上使用Python3版本的PIP
Ubuntu 16.04 LTS
上使用Python2
与Python3
是共存的,而且默认使用Python2
,如果使用Python3
则需要明确指定。
1.安装Python3
版本的PIP
1 2 3 |
$ sudo apt-get install python3-pip $ sudo pip3 install --upgrade pip |
2.安装Python3
版本的NumPy
1 |
$ pip3 install numpy |
3.安装Python3
版本的OpenCV
1 |
$ sudo pip3 install opencv-python |
注意,目前的Python3
版本的OpenCV
是不支持cv2.imshow()
的,具体查看https://pypi.python.org/pypi/opencv-python,可以看到如下信息:
1 2 3 |
**Q: Why I can't open GUI windows (``cv2.imshow()``) on GNU/Linux distribution X or on macOS?** A: Like above, OpenCV was not compiled against GTK or Carbon. Support for these might be added in the future. |
ubuntu 16.04 LTS上16进制文件编辑&比较工具wxHexEditor
ubuntu 16.04 LTS
上比较好用的16
进制编辑&比较工具,当属wxHexEditor
,官网地址在http://www.wxhexeditor.org/。
在Ubuntu
系统上,可以使用如下命令安装:
1 2 3 |
$ sudo apt-get install wxhexeditor $ wxHexEditor |
参考链接
ubuntu 16.04 LTS上安装Torch7
1.安装luarocks
1 |
$ sudo apt-get install luarocks |
2.安装torch
1 2 3 |
$ git clone https://github.com/torch/distro.git ~/torch --recursive $ cd ~/torch; bash install-deps; $ ./install.sh |
如果要使用NVIDIA CUDA
加速版本的Torch7
则使用如下方法
1.安装luarocks
1 |
$ sudo apt-get install luarocks |
2.下载NVIDIA CUDA
适配的代码
1 |
$ git clone https://github.com/torch/cutorch.git |
3.安装编译依赖的库
1 |
$ sudo apt install nvidia-cuda-toolkit |
4.编译代码
1 2 3 4 5 |
$ cd cutorch $ mkdir build $ cd build $ cmake .. $ make |
参考链接
ubuntu 16.04 LTS编译最新的FFMPEG 3.3
ubuntu 16.04 LTS
编译最新的FFMPEG 3.3
的时候被Git
的autocrlf
折磨了好几天才搞定,在这里记录一下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$ sudo apt-get install git #关键操作,否在检出的代码无法正常编译 $ git config --global core.autocrlf false $ git clone https://git.ffmpeg.org/ffmpeg.git $ cd ffmpeg #不要安装nasm否在编译不通过,应当使用yasm $ sudo apt-get remove nasm $ sudo apt-get install yasm $ git fetch $ git branch -a $ git checkout -t remotes/origin/release/3.3 $ sudo apt-get update $ sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \ libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \ libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev $ ./configure $ make |
注意,如果检出的代码在执行./configure
的时候报告错误:
1 |
bash: ./configure: /bin/sh^M: 解释器错误: 没有那个文件或目录 |
则目前看到原因是Git
的autocrlf
导致的。
ubuntu 16.04 LTS更改机器名后执行sudo提示"sudo: 无法解析主机:xx-ubuntu: 连接超时"
ubuntu 16.04 LTS
更改机器名后执行sudo
提示"sudo: 无法解析主机:xx-ubuntu: 连接超时
"。
出现这种问题是hosts
文件没有配置好所导致的,linux
无法解析到您的主机地址,解决方案如下:
1 |
$ sudo vim /etc/hosts |
打开文件以后,将其中的:
1 |
127.0.1.1 xxx(旧主机名) |
修改为新的主机名。
ubuntu 16.04 LTS启动Eclipse Neno.3 报错"An error has occurred. See the log file"
ubuntu 16.04 LTS
启动Eclipse Neno.3
报错"An error has occurred. See the log file
",具体如下图所示:
继续阅读ubuntu 16.04 LTS启动Eclipse Neno.3 报错"An error has occurred. See the log file"
Ubuntu 16.04/14.04.5安装Nvidia CUDA驱动
Ubuntu 16.04/14.04.5
上已经可以简化到直接用命令行来安装Nvidia CUDA
驱动了,不需要以往的繁琐操作,只是安装的版本比较老,但是目前已经足够使用了。
1 |
$ sudo apt install nvidia-cuda-toolkit |
安装的版本目前是Nvidia CUDA 7.5(Ubuntu 16.04)/Nvidia CUDA 5.5(Ubuntu 14.04.5)
版本,最新的Nvidia CUDA 8.0
版本还是需要从Nvidia
官网下载,然后手工安装才行。