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, ...
随机推荐
- linux chmod权限
Linux chmod 命令 chmod用于改变文件或目录的访问权限.用户用它控制文件或目录的访问权限.该命令有两种用法.一种是包含 字母和操作符表达式的文字设定法:另一种是包含数字的数字设定法. 1 ...
- Python 做过哪些有趣的项目
1 icedx 241 天前 via Android ♥ 1 考虑到Windows 下的类Alfred 软件都太傻逼 自己用PyQT 写了一个 2 crazyxin19 ...
- hdu 4736 This Is The Job The Bear Finds(2013年成都ACM网络赛)
// Time 1718 ms; Memory 1500 K #include<iostream> #include<cstdio> #include<cmath> ...
- 模式匹配KMP
字符串朴素模式匹配算法的2种实现: //1.朴素的模式匹配算法,用while实现 int StrStr_While(const char* pStr, const char* pSub, int* p ...
- BZOJ 3438: 小M的作物( 最小割 )
orz出题人云神... 放上官方题解... 转成最小割然后建图跑最大流就行了... ---------------------------------------------------------- ...
- Homebrew 1.0.0 发布,MacOS 上的包管理器
神器,没有它不知道怎么用macos https://www.oschina.net/news/77367/homebrew-1-0-0
- Qt学习之路(49): 通用算法
今天开始的部分是关于Qt提供的一些通用算法.这部分内容来自C++ GUI Programming with Qt 4, 2nd Edition. <QtAlgorithms>提供了一系 ...
- Oracle百问百答(二)
Oracle百问百答(二) 11. nvl函数有什么用? NVL( string1, replace_with) 功能:如果string1为NULL,则NVL函数返回replace_with的值,否则 ...
- 黑龙江省第七届大学生程序设计竞赛-Mysterious Organization
描述 GFW had intercepted billions of illegal links successfully. It has much more effect. Today, GFW i ...
- 基于visual Studio2013解决C语言竞赛题之0705矩阵转置
题目 解决代码及点评 /* 5. 写一函数,将一个3×3的矩阵转置. */ #include <stdio.h> #include <stdlib.h> void mai ...