ubuntu env setup

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

1、 install vim---

apt-get install vim

2、git 安裝

sudo -i
apt-get install git

3、postgresql安裝

sudo -i
apt-get update
apt-get install postgresql postgresql-contrib
sudo -i -u postgres 
#su postgres
psql
#exit:
\q
#Create a New Role
createuser --interactive

#install pgadmin3

apt-get install pgadmin3
pgadmin3 打開pgadmin3

#重啓postgresql

/etc/init.d/postgresql restart
systemctl restart postgresql

service  postgresql restart

vim /etc/postgresql/9.5/main/pg_hba.conf

listen_address = '*' 修改後無法重啓

......


4、试图双击deb文件进行安装,点击install 按钮,提示“This software comes from a 3rd party and may contain non-free components”。

解決:

sudo apt install gdebi

5、skype 安裝 下載deb包

gdebi skype-ubuntu-precise_4.3.0.37-1_i386.deb

6、軟件中心閃退解決

  重装命令:

  sudo apt-get install --reinstall software-center software-center-aptdaemon-plugins

  当然也可以选择用其他包管理器,例如新立德(synaptic)

  安装synaptic命令:

  sudo apt-get install synaptic
參考:
http://www.cnblogs.com/wmllz/p/5033769.html

7、搜狗输入法繁体简体切换

ctrl + shift +f
http://ubuntuhandbook.org/index.php/2016/07/2-best-chinese-pinyin-im-ubuntu-16-04/

8、#ubuntu install hexo

#apt-get install -y nodejs
#apt install npm
#ubuntu install hexo
nodejs 二进制包解压安装
npm install --unsafe-perm --verbose -g hexo 
参考:
http://www.cnblogs.com/codeblock/p/5209849.html

nodejs 二进制包下载

https://nodejs.org/download/release/

nodejs解压安装

http://jingyan.baidu.com/article/25648fc18ee5bd9190fd0058.html

Q&A

------------------------------------------------------------------------------

npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
npm verb stack Error: EACCES: permission denied, access '/usr/local/etc/node/lib/node_modules'
npm verb cwd /home/kevin/Downloads
npm ERR! Linux 4.4.0-57-generic
npm ERR! argv "/usr/local/etc/node/bin/node" "/usr/local/etc/node/bin/npm" "install" "--unsafe-perm" "--verbose" "-g" "hexo"
npm ERR! node v7.3.0
npm ERR! npm  v3.10.10
npm ERR! path /usr/local/etc/node/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/etc/node/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/etc/node/lib/node_modules'
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/etc/node/lib/node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.
npm verb exit [ -13, true ]

npm ERR! Please include the following file with any support request:
npm ERR!     /home/kevin/Downloads/npm-debug.log


sudo chmod -R 777 /usr/local/etc/node/
每个人有读写执行权限

------------------------------------------------------------------------------
https://rawbin-.github.io/%E5%BC%80%E5%8F%91%E6%8A%80%E6%9C%AF/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91/%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/2016/01/11/node-version-management/

**nodejs multi version install**
 
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04#conclusion


9、deb包安装

dpkg -i 包名称 参考: http://blog.csdn.net/lhf_tiger/article/details/7493400

10、ubuntu python3.x安装,python多版本安装

参考 http://www.cnblogs.com/ningvsban/p/4384995.html

11、sublime package control

https://packagecontrol.io/installation#st3 sublime 中文输入法问题解决 https://github.com/lyfeyaj/sublime-text-imfix sougou http://html5beta.com/page/ubuntu-14-04-install-fcitx-sougoupinyin-sublime-text-3-chinese-input-fix.html

12、gedit图形编辑

gedit ~/.bashrc

13、jdk

sudo mkdir /usr/lib/jvm

查看本机上是否还有java可选。这里用到以下命令

$ sudo update-alternatives --list java

配置环境变量命令:

$sudo gedit ~/.bashrc

添加以下代码:

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_55

export JRE_HOME=${JAVA_HOME}/jre

export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib

export PATH=${JAVA_HOME}/bin:$PATH


14、终端分屏软件 tmux简单教程 

sudo -i apt-get install tmux tmux


http://blog.csdn.net/longxibendi/article/details/38541005 http://kumu-linux.github.io/blog/2013/08/06/tmux/

**终端分屏软件 terminator**

命令 说明 Ctrl+Shift+O 水平分割窗口 Ctrl+Shift+E 垂直分割窗口 F11 全屏/退出全屏 Ctrl+Shift+C 复制 Ctrl+Shift+V 粘贴 Ctrl+Tab 在分割的各窗口之间切换 Ctrl+Shift+X 将分割的某一个窗口放大至全屏使用 Ctrl+Shift+Z 从放大至全屏的某一窗口回到多窗格界面

http://www.linuxidc.com/Linux/2008-09/16192.htm

http://blog.csdn.net/haolvshiqi/article/details/52859018

screen tmux使用学习

http://blog.csdn.net/taiyang1987912/article/details/41551987



15、Ubuntu chrome  firefox  安装flash

这里输入代码

groovy

http://www.ibm.com/developerworks/cn/education/java/j-groovy/j-groovy.html

http://jamie-wang.iteye.com/blog/1910959 http://www.cnitblog.com/yunshichen/archive/2016/04/06/66498.html

https://zybuluo.com/emac/note/330205

16、ubuntu 安装jenkins

Installation

wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add - sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' sudo apt-get update sudo apt-get install jenkins

Upgrade

Once installed like this, you can update to the later version of Jenkins (when it comes out) by running the following commands:

sudo apt-get update sudo apt-get install jenkins

(aptitude or apt-get doesn't make any difference.) 参考官方文档: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu https://pkg.jenkins.io/debian/

17、ubuntu 16.0.4TSL  docker  install

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04 compose https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-16-04

18、jenkins pipline

https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console https://www.cloudbees.com/jenkins/juc-2015/presentations/JUC-2015-USEast-Groovy-With-Jenkins-McCollum.pdf

https://wilsonmar.github.io/jenkins2-pipeline/

http://javadoc.jenkins-ci.org/hudson/model/ParametersAction.html http://stackoverflow.com/questions/10882515/how-to-retrieve-jenkins-build-parameters-using-the-groovy-api

https://www.cloudbees.com/jenkins/juc-2015/presentations/JUC-2015-USEast-Groovy-With-Jenkins-McCollum.pdf

http://stackoverflow.com/questions/10995254/jenkins-script-console-list-of-available-jenkins-methods

19、Jenkins入门到进阶

http://blog.waterstrong.me/jenkins-by-step/


20、groovy Ubuntu 安装

http://www.cnblogs.com/jyan/archive/2012/05/28/2520837.html

21、 groovy pipeline

https://wilsonmar.github.io/jenkins2-pipeline/#Stages

http://www.ciandcd.com/?p=145

https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md

22、QQ

http://www.linuxidc.com/Linux/2016-09/134923.htm


tmp

pipline examples

archiveArtifacts

https://jenkins.io/doc/pipeline/examples/ https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md https://github.com/jenkins-infra/jenkins.io/blob/master/Jenkinsfile/

http://fabric8.io/guide/develop/pipelines.html

主要参考 https://wilsonmar.github.io/jenkins2-pipeline/#Groovy

groovy http://www.groovy-lang.org/documentation.html#gettingstarted

https://jenkins.io/blog/2016/04/21/dsl-plugins/

/def upload/

/*node { sshagent (credentials: ['deploy-dev']) { sh 'ssh -o StrictHostKeyChecking=no -l cloudbees 192.168.1.106 uname -a' } } */ /node { stage 'Does sshpass work?' sh 'sshpass -p 'password' ssh user@host "ls; hostname; whois google.com;"' }/

/* Using rsync sshagent(['repository']) { sh "rsync -av .rpm [email protected]:/srv/www/htdocs/staging_rpms/" }/

/*Using the following with ssh I can disable host key verification ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no [email protected] also scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no *.rpm [email protected]:/tmp

http://stackoverflow.com/tags/jenkins-pipeline https://github.com/Diabol/delivery-pipeline-plugin/blob/master/examples/demo.groovy

ArtifactArchiver https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md

https://github.com/jenkinsci/pipeline-examples/tree/master/pipeline-examples https://github.com/jenkinsci/pipeline-model-definition-plugin/wiki/Getting-Started http://docs.groovy-lang.org/latest/html/documentation/index.html#all-strings https://testerhome.com/topics/5044 https://jenkins.io/doc/book/pipeline-as-code/


23、ntopng安装

https://www.vultr.com/docs/how-to-install-ntopng-on-ubuntu-16-04


24、install vaitualbox on ubuntu16.4

uninstall other versions sudo apt remove virtualbox virtualbox-5.0 virtualbox-4.*

sudo vim /etc/apt/sources.list //run this wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - //update && install sudo apt-get update sudo apt-get install virtualbox-5.1 //url reference https://www.virtualbox.org/wiki/Linux_Downloads


25、docky dock
软件中心搜索安装
26、s

http://www.jianshu.com/p/b5c4fbadbfae

26、dash change to bash

在终端执行 sudo dpkg-reconfigure dash 然后选择 no。

27、 

nvm install : https://www.liquidweb.com/kb/how-to-install-nvm-node-version-manager-for-node-js-on-ubuntu-14-04-lts/

28

AppStream cache update completed, but some metadata was ignored due to errors.

解决方式:

sudo rm /var/lib/dpkg/lock

http://www.jianshu.com/p/cee2de32ca28

转载于:https://my.oschina.net/u/1186013/blog/812256

你可能感兴趣的:(数据库,java,开发工具)