ubuntu开发环境搭建

左心房为你撑大大i 提交于 2020-10-28 06:38:42

1.搜狗

sudo add-apt-repository ppa:fcitx-team/nightly

sudo apt-get update

sudo apt-get -f install fcitx

sudo apt-get install fcitx-config-gtk

sudo apt-get install fcitx-table-all

sudo apt-get install im-switch

2.更新源

cd /etc/apt

sudo cp sources.list sources.list.bak

sudo vi sources.list

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

 

sudo apt-get update

sudo apt-get upgrade

 3.jdk

sudo mkdir /usr/lib/jdk 

tar -zxvf jdk-8u161-linux-x64.tar.gz

(

tar cvf etcbak.tar etc/  打包一个tar
tar xvf etcbak.tar         解开一个tar
tar cvzf etcbak.tar.gz etc/ 打包压缩一个 tar
tar zxvf etcbak.tar.gz  解压一个tar
-c :建立一个压缩文件的参数指令(create 的意思);
-x :解开一个压缩文件的参数指令!
-t :查看 tarfile 里面的文件!
-z :是否同时具有 gzip 的属性?亦即是否需要用 gzip 压缩?
-j :是否同时具有 bzip2 的属性?亦即是否需要用 bzip2 压缩?
-v :压缩的过程中显示文件!这个常用,但不建议用在背景执行过程!
-f :使用档名,请留意,在 f 之后要立即接档名喔!不要再加参数!
-p :使用原文件的原来属性(属性不会依据使用者而变)
-P :可以使用绝对路径来压缩!
-N :比后面接的日期(yyyy/mm/dd)还要新的才会被打包进新建的文件中!

)

mv jdk1.8.0_161  /usr/lib/jdk/

sudo vi ~/.bashrc

export JAVA_HOME=/usr/lib/jdk/jdk1.8.0_161

export JRE_HOME=${JAVA_HOME}/jre

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

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

source ~/.bashrc

4.maven settings.xml

<mirror>
    <id>nexus-aliyun</id>
    <mirrorOf>*</mirrorOf>
    <name>Nexus aliyun</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>

export M2_HOME=/home/weaponking/develop/apache-maven-3.5.3
PATH=$M2_HOME/bin:$PATH

 

5.mysql

https://dev.mysql.com/downloads/repo/apt/

sudo dpkg -i mysql-apt-config_0.8.9-1_all.deb

sudo apt-get update

sudo apt-get install mysql-server

数据库目录:/var/lib/mysql/ 

配置文件:/usr/share/mysql(命令及配置文件) ,/etc/mysql(如:my.cnf)

相关命令:/usr/bin(mysqladmin mysqldump等命令) 和/usr/sbin

启动脚本:/etc/init.d/mysql(启动脚本文件mysql的目录)

sudo netstat -anp | grep mysql

#启动

sudo service mysql start

#停止

sudo service mysql stop

#服务状态

sudo service mysql status

mysql -h 127.0.0.1 -P 3306 -uroot -p123456

解决mysql8 navicat链接

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

FLUSH PRIVILEGES;

show variables like '%char%';

set character_set_client=utf8;
set character_set_connection=utf8;
set character_set_database=utf8;
set character_set_results=utf8;
set character_set_server=utf8;

6.git

sudo add-apt-repository ppa:git-core/ppa

sudo apt-get update

sudo apt-get install git

git config --global user.name "name"

git config --global user.email ww@qq.com

sudo vi .git-crdentials

https://{username}:{password}@github.com

git config --global credential.helper store

git pull --allow-unrelated-histories

7.svn

sudo apt-get install subversion 

sudo mkdir /home/svn

sudo svnadmin create /home/svn/repos

 

8.jenkins

9.sudo apt-get install shutter

   sudo apt-get install dia

   sudo apt-get install gthumb

   sudo apt-get install geany

10.nginx

  sudo apt-get install build-essential

  sudo apt-get install libtool

  sudo apt-get install libpcre3 libpcre3-dev

  sudo apt-get install zlib1g-dev

  tar -zxvf nginx-1.13.12.tar.gz

  ./configure --prefix=/usr/local/nginx

  make

  sudo make install

  sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

  ps -ef | grep nginx

  sudo ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx

  sudo service nginx {start|stop|restart|reload|force-reload|status|configtest|rotate|upgrade}

 

11.node.js

sudo apt install curl

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -

sudo apt-get install nodejs

安装目录usr/bin

12.openstack

apt-get install qemu-kvm ubuntu-vm-builder bridge-utils

error: modprobe: ERROR: could not insert 'kvm_intel' : Operation not supported

dmesg | grep kvm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!