Ubuntu 环境安装整理
Ubuntu11.04下Java开发环境搭建和配置
转自:http://guoyunsky.iteye.com/blog/1175861
类似的搭建,网上一搜一大把,但每次去搜索比较麻烦.我这里就整理下,方便下次使用.
1.Ubuntu下更换JDK
由于Ubuntu11.04默认安装的是open-JDK,但有的东西只支持sun-jdk.所以这里需要更换.大概如下命令:
Java代码 收藏代码
// 更换数据源
sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner”
// 更新数据源
sudo apt-get update
// 安装sun-jdk
sudo apt-get install sun-java6-jdk sun-java6-plugin
// 更改系统默认的JDK
sudo update-java-alternatives -s java-6-sun
// 测试
java -version
还没有源的话采用这里:http://witmax.cn/install-sun-java6-jdk.html
手动安装: http://forum.ubuntu.org.cn/viewtopic.php?t=183803
2. Ubuntu下安装ANT
sudo apt-get install ant
3.Ubuntu下安装SVN
sudo apt-get install subversion
3.1 Ubuntux下Eclipse SVN设置
对所有项目设置svn:ignore:Windows->Team->Ignored Resources->Add Pattern
对某个项目设置svn:ignore:右击项目->Team->Set Property->选择svn:ignore->在输入文本属性中输入
要对项目中某一个目录/文件设置svn:ignore,选中该文件->右击选择Team->选择添加进svn:ignore
4.Ubuntu下安装Eclipse
sudo apt-get install eclipse
Eclipse在Ubuntu下碰到无法输入的问题,原因是输入法兼容性问题,解决方案:http://carltao.blog.51cto.com/856514/541226
5.Ubuntu下压缩和解压RAR文件
sudo apt-get install rar unrar
6. Ubuntu下 安装和启动mysql
sudo apt-get install mysql-server # 安装
sudo netstat -tap | grep mysql # 是否启动
sudo /etc/init.d/mysql restart # 重新启动
6.1. Ubuntu下 安装mysql Ubuntu图形化客户端
sudo apt-get install mysql-admin
或者使用mysql-workbench,下载页面:http://dev.mysql.com/downloads/tools/workbench/5.2.html
7. Ubuntu下 安装Git
sudo apt-get install git-core
8. Ubuntu下 安装google拼音
http://www.kukaka.org/home/showonews/306
8.1 Ubuntu下重启google拼音/scim
有时使用google拼音会发现无法输入中文的情况,如此的话就需要重启了,具体是先用pkill scim,干掉scim.然后输入scim -d重启即可.
8.2 Ubuntu下安装google拼音后导致eclipse无法输入,也就是input method冲突问题解决:
sudo vi /etc/X11/xinit/xinput.d/scim
将里面的GTK_IM_MODULE=xim和QT_IM_MODULE=xim中的xim改为scim
sudo update-alternatives –install /etc/X11/xinit/xinput.d/all_ALL xinput-all_ALL /etc/X11/xinit/xinput.d/scim 30
sudo im-switch -s scim
9. Ubuntu下 安装ssh
sudo apt-get install openssh-server
10. Ubuntu下 windows通过VirtualBox安装的Ubuntu实现文件共享:
http://yulei568.blog.163.com/blog/static/1358867201122913117665/
http://judywang.iteye.com/blog/1037729
11. Ubuntu下主目录中文文件名变回英文
安装Ubuntu后发现你的主目录/home/youranme/下的文件变成来中文,比如我的是/home/guoyun,下面Downloads变成来下载,但输入个cd /home/guoyun/下载 也进入不了这个目录,同时输入/home/guoyun/Downloads也没用.所以决定还是将中文文件名改回英文.也很简单,几行命令即可:
export LANG=en_US
xdg-user-dirs-gtk-update #会弹出个会话框,然后你勾选你要变回英文的文件即可
export LANG=zh_CN
最后发现Ubuntu实际上是将旧的移到新的目录里面:
Html代码 收藏代码
(process:6515): Gtk-WARNING **: Locale not supported by C library.
Using the fallback ‘C’ locale.
Moving DESKTOP directory from 桌面 to Desktop
Moving DOWNLOAD directory from 下载 to Downloads
Moving TEMPLATES directory from 模板 to Templates
Moving PUBLICSHARE directory from 公共的 to Public
Moving DOCUMENTS directory from 文档 to Documents
Moving MUSIC directory from 音乐 to Music
Moving PICTURES directory from 图片 to Pictures
Moving VIDEOS directory from 视频 to Videos
12.Ubuntu下安装和启动tomcat6
# 安装
sudo apt-get instal tomcat6
# 根据自己情况看是否安装admin,docs,examples
sudo apt-get install tomcat6-admin tomcat6-docs tomcat6-examples
#启动
/etc/init.d/tomcat6 start
#停止
/etc/init.d/tomcat6 stop
#重启
/etc/init.d/tomcat6 restart
tomcat6所在目录:/var/lib/tomcat6,比如你要部署web,则是/var/lib/tomcat6/webapps
或者可以:
sudo service tomcat6 start
sudo service tomcat6 stop
sudo service tomcat6 restart
13.Ubuntu下tomcat,mysql等程序随机启动和取消随机启动
#添加随机启动,如mysql:
sudo update-rc.d -f mysql defaults
可以看到如下提示:
Txt代码 收藏代码
Adding system startup for /etc/init.d/mysql …
/etc/rc0.d/K20mysql -> ../init.d/mysql
/etc/rc1.d/K20mysql -> ../init.d/mysql
/etc/rc6.d/K20mysql -> ../init.d/mysql
/etc/rc2.d/S20mysql -> ../init.d/mysql
/etc/rc3.d/S20mysql -> ../init.d/mysql
/etc/rc4.d/S20mysql -> ../init.d/mysql
/etc/rc5.d/S20mysql -> ../init.d/mysql
#取消随机启动,如mysql:
sudo update-rc.d -f mysql remove
可以看到如下提示:
Txt代码 收藏代码
Removing any system startup links for /etc/init.d/mysql …
/etc/rc0.d/K20mysql
/etc/rc1.d/K20mysql
/etc/rc2.d/S20mysql
/etc/rc3.d/S20mysql
/etc/rc4.d/S20mysql
/etc/rc5.d/S20mysql
/etc/rc6.d/K20mysql
14. Ubuntu下类似Visio的工具dia
sudo apt-get install dia
15.Ubuntu下安装Google Reader
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install google-reader-indicator
16.Ubuntu下安装如Outlook,Foxmail的邮件客户端:
sudo aptitude install pidgin
也有Empathy但不太稳定
17.Ubuntu下安装google浏览器Chrome
sudo add-apt-repository ppa:chromium-daily/ppa
sudo apt-get update
sudo apt-get install chromium-browse
18.Ubuntu下通过VirtualBox安装windows xp以及跟windows xp共享文件
http://lhflinux.blog.51cto.com/1961662/515811
19.Ubuntu11.10下使用传统界面/老界面
sudo aptitude install gnome-session-fallback
Ubuntu下有时界面打开文件夹不稳定,一闪就自己关了,删除nautilus-open-terminal就可以
sudo apt-get remove nautilus-open-terminal
nautilus -q
20.Ubuntu下将程序最小化到托盘,类似windows下如QQ一样将程序放到右下角
sudo apt-get install alltray
alltray 程序运行脚本
如alltray eclipse
21.Eclipse下开发C/C++
http://www.cppblog.com/kangnixi/archive/2010/02/10/107636.html
22.Ubuntu下安装mongodb
sudo apt-get install mongodb
启动mongodb: sudo service mongodb start
重启mongodb: sudo service mongodb restart
停止mongodb: pkill mongodb
24.Eclipse安装maven插件
Help->Install New Software->输入:http://m2eclipse.sonatype.org/sites/m2e
25.Eclipse安装python插件
Help->Install New Software->输入:http://pydev.org/updates
26.Virtualbox内虚拟机跟Ubuntu共享复制
就是在Ubuntu里复制的东西可以在VirtualBox内粘贴
安装增强功能包->VirtualBox控制台里选择General(常规)->Advanced(高级)->Shared Clipboard(共享剪贴板)->里选择Bidirectional(双向)
27.VirtualBox内虚拟机光驱/直接读取光盘
虚拟机里上面->Device(设备)->CD/DVC Devices->勾选 Host Devices TSSTcorp CDDVDW SN-208AB (r0) 就可
28.Ubuntu下最大化虚拟机VirtualBox
CTRL(右边的)+F
29.Ubuntu自定义快捷键
sudo apt-get install gconf-editor
安装完成后在终端里运行gconf-editor,然后会跳出一个配置编辑器的东西,在里面进行如下操作
点击Apps->Metacity->Global keybingdings
可以看到各种快捷键,如;
Ubuntu下显示快捷键为:show desktop ->d
也就是CTRL+WIN+D键,也可以自定义。如一般的CTRL+ALT+D
30.使用VIrtualbox虚拟机设置系统为多CPU时报错解决
http://askubuntu.com/questions/256792/how-do-i-enable-hardware-virtualization-technology-vt-x-for-use-in-virtualbox
以下错误:
Failed to open a session for the virtual machine Tux 3
VT-x features locked or unavailable in MSR
(VERR_VMX_MSR_LOCKED_OR_DISABLED)
Details
Ubuntu 环境安装整理的更多相关文章
- Ubuntu环境安装Gradle
AndroidStudio使用全新的构建系列—–Gradle. 这是官方为什么使用gradle 的理由: Domain Specific Language (DSL) to describe and ...
- ubuntu环境安装docker
查看已安装的docker apt list docker* 如果已安装,并且需要卸载,则执行以下命令: apt remove docker* 更新apt索引 apt update apt需要支持HTT ...
- 在ubuntu环境安装youcompleteme
sudo apt-get update #更新软件源 sudo apt-get clang #安装clang sudo apt-get cmake #安装cmake sudo apt-get inst ...
- VMvare+Ubuntu环境安装
安装步骤参考:https://blog.csdn.net/stpeace/article/details/78598333 VMvare15秘钥:https://blog.csdn.net/felix ...
- ubuntu环境安装谷歌驱动命令
1.sudo apt-get install chromium-chromedriver. 2.直接下载:http://chromedriver.storage.googleapis.com/inde ...
- [Linux] ubuntu环境安装和使用elasticsearch
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -apt-get install ap ...
- OpenCV 3.4.2 环境搭建(适用于Ubuntu 一键安装)
前面的话 最近决定要好好地学习一下OpenCV,Ubuntu系统上简单地搭建了OpenCV环境,(Windows的搭建方法移步到window10的搭建方法),千里之行始于足下,不积跬步无以至千里,在这 ...
- 转:CentOS/Debian/Ubuntu一键安装LAMP(Apache/MySQL/PHP)环境
CentOS/Debian/Ubuntu一键安装LAMP(Apache/MySQL/PHP) 今天遇到一个网友提到需要在Linux VPS服务器中安装LAMP(Apache/MySQL/PHP)网站环 ...
- 在Windows/Ubuntu下安装OpenGL环境(GLUT/freeglut)与跨平台编译(mingw/g++)
GLUT/freeglut 是什么? OpenGL 和它们有什么关系? OpenGL只是一个标准,它的实现一般自带在操作系统里,只要确保显卡驱动足够新就可以使用.如果需要在程序里直接使用OpenGL, ...
随机推荐
- python子进程模块subprocess调用shell命令
http://www.cnblogs.com/vamei/archive/2012/09/23/2698014.html
- 使用jstl 截取字符串
时常碰见这样的 问题:获取数据库中的文本域的时候经常是在p标签中的,在页面显示的时候也是带着p标签,如何去除p标签呢 这里提供一个使用jstl的方式 1.首先导入jstl的函数标签库 <%@ t ...
- linux ubuntu安装jdk
Oracle对Jdk7与Jre7的关系的经典图解 Oracle has two products that implement Java Platform Standard Edition(Java ...
- 基于visual Studio2013解决C语言竞赛题之0414特殊平方数
题目 解决代码及点评 这道题依旧是通过for循环,遍历所有四位数,然后根据题目要求判断数的性质即可 /**************************************** ...
- socket通信技术介绍
[-] 网络中进程之间怎样通信 什么是Socket socket一词的起源 socket的基本操作 socket函数 bind函数 网络字节序与主机字节序 listenconnect函数 accept ...
- vim-ctags-taglist-netrw
vim配置 在~/.vimrc文件里配置例如以下内容.或者在/etc/vim/vimrc中进行全局配置,经常使用配置例如以下: syntax on set tabstop=4 set nu set s ...
- ASP.NET Excel导入到SQL Server数据库
本文转自:http://www.cnblogs.com/lhking/archive/2009/06/08/1499002.html 提供把Excel里的数据导入到SQL Server 数据库,前提是 ...
- Mixtile LOFT
日前,国内电子原型类开发团队Mixtile(深圳致趣科技)新推出的 Mixtile LOFT套件,受到业内著名的海外科技网站CNXSoft的关注和报道. 如果要阅读相关的原文报道,可点击这里.下面摘录 ...
- POJ 2455 网络流 基础题 二分+网络流 dicnic 以及 sap算法
Secret Milking Machine Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8189 Accepted: ...
- ajax异步请求实例
1. 问题分析 用户管理显示页面:usermanagement.tpl(也可以说是MVC中的V,即视图) 用户管理数据发送页面:usermanagement.php(也可以说是MVC中的M,即模型) ...