Ubuntu development environment configuration

Version 17.10 64 (ubuntu-17.10-desktop-amd64.iso)

Installing the operating system

Here is not too much to say, basically the next step next step on it, pay attention to every place you can look at before clicking Next.

After the system is installed, can Ctrl+Alt+T, all commands are executed in the terminal behind the open end.

Installation VMTools

If a virtual machine installed operating system is installed at the case of the physical installation can skip this step.

sudo apt install open-vm-tools-desktop -y

After the installation is complete, you can easily adjust the size of the desktop, and you can copy files and clipboard and between physical machines, if you can not take effect, the currently logged desktop can log off or restart the operating system.

Change the home directory to English

LANG=en_US
xdg-user-dirs-gtk-update

Then click to fill out the lower right corner of the interface Update Names

Remove unnecessary software

This step is not necessary, personally feel that this can reduce some disk space, and update the operating system when you can not update those less than the package, you can save some time.

sudo apt autoremove libreoffice-* ibus -y

Installation package needed

Including: themes, icons, vim, numix-icon-theme, etc.

# 更新源
sudo apt update

# 安装软件
sudo apt install -y gnome-tweak-tool arc-theme numix-icon-theme vim 
gnome-icon-theme git net-tools shutter kazam gnome-shell-extensions

Update to the latest operating system

sudo apt upgrade -y
# 更新完成后重启操作系统
reboot

Log in desktop restart the virtual machine if it is time to select Ubuntu on xorgstart, do not select the default, because now a lot of software does not support the Waylandcase of the physical machine can try, if the card can also be switched directly xorg, if not you can only use the Wayland.

After updating the system, there will be two cores, you can delete the old kernel by the following way

# 查询出当前系统中的内核
sudo dpkg -l | grep kernel
# 用眼睛找到版本老的版本,然后将包名复制删除即可
sudo dpkg -l | grep kernel | grep 4.13.0-16.19 | awk '{print $2}' | xargs sudo apt autoremove -y

Install the graphics driver

If this is a virtual machine can be skipped

Here only records MShybrid graphics card installation, and measured only Raytheon st pro, will be used in the future if other models of notebook installation method will be recorded.

See detailed method: Ubuntu 17.10 installation MShybrid graphics

Configuration Topics

The personal preferences, the difference is only in appearance, I am using arc-theme and Numix icon above when installing the software has been installed.

Shortcuts Alt+F2in the window, enter gnome-tweak-tool, and then follow the preferences to configure it.

Set shortcuts

System Shortcuts

Open the Settings

  • Into the upper right corner of the menu settings interface point

  • Shortcuts Alt+F2inputgnome-control-center

Find the menu on the left 设备-> 键盘, set the shortcut keys on the right side, you can also click on the bottom + 号, custom shortcuts.

Set gnome-terminal (terminal) Shortcuts

Because the frequency of use is very high, previously used xshell used to the full screen Alt + Enter, so this turned into this.

On the menu 编辑> - 首选项-> 快捷键, and then you need to configure it.

Sogou input method configuration

As already installed, if not installed with the following command can be installed, but it needs attention, you want to configure ubuntukylin source.

We can start with the official website to download the deb package

# 下载搜狗拼音
sudo dpkg -i sogoupinyin_2.2.0.0102_amd64.deb
sudo apt install -f

Open 设置Interface -> 区域和语言->Manage Installed Languages

In the pop-up interface selection fcitx, then Ctrl+空格you can switch the input method.

Configure git

In front of the apt install software has been installed, when, following some simple configuration

# 提交数据的时候的用户邮箱和用户名
git config --global user.email "[email protected]"
git config --global user.name "Bro Qiang"
# 保存密码
git config --global credential.helper store

# 设置使用 vim 作为默认文本编辑器,nano 实在是用不习惯……
git config --global core.editor vim

# 配置 git 别名
echo -e "nalias gs='git status'nalias gaa='git add .'nalias ga='git add 'nalias gp='git push'nalias gc='git commit -m 'nalias gl='git log'nalias grao='git remote add origin 'nalias gpo='git push origin 'nalias gb='git branch'" >> ~/.bash_aliases

Configure vim

echo -e ":set nun:set tabstop=4n:set expandtabn:set autoindentn:set shiftwidth=4n:set smartindent" > ~/.vimrc
# 下载
wget https://raw.githubusercontent.com/getlantern/lantern-binaries/master/lantern-installer-64-bit.deb

# 安装
sudo dpkg -i lantern-installer-64-bit.deb

# 如果提示需要依赖关系,执行下面命令
sudo apt install -f

Installation Sublime

The following is a habit I have configured in accordance with the good of the Sublime, more configuration reference documents related to this blog Sublime

git clone https://github.com/BroQiang/Software_Sublime.git

Installation Atom

Specific steps:

Install chrome browser

Quguan direct download network installation can be installed, if not open at the front to determine whether to install the alntern

Official Download chrome browser

# 安装软件包
sudo dpkg -i google-chrome-stable_current_amd64.deb
# 解决依赖关系
sudo apt install -f

Use direct Alt+F2inputgoogle-chrome

Navicat installation

Download: https://gitee.com/BroQiang/Software_Navicat.git

There are detailed installation steps

The installation is complete you can configure a startup script for quick start

echo -e "/opt/navicat112_Premium_cs_x64/start_navicat" > ~/bin/navicat
chmod +x ~/bin/navicat

Used directly in the terminal or Alt+F2the input navicatit can be run.

Screenshot Configuration Tool

shutter

After no good use screenshot tool in Ubuntu, try a few, identified as shutter, this tool is very powerful, it does not work well because it is too heavy, a little less smart, function a little too much.

Use may directly shutterbe Theme command, and can be set by the system, the command to configure the theme shortcuts, Quick shots.

  • shutter -s Screenshot region

  • shutter -f Full screen Screenshot

  • shutter -m Interception menu (right-click menu general tool can not intercept, this is very powerful)

flameshot (推荐)

If you are not using xorg, but Wayland, this was a good choice, detailed steps in:

Ubuntu 17.10 Snipping Tool

Configuration screen recording tool

Used here kazam, we have already installed, if not installed and then install it

hot key

  • Start recording - Supper+Ctrl+R

  • time out - Supper+Ctrl+P

  • End Save - Supper+Ctrl+F

WPS configuration

See detailed steps github

Disable IPv6

This depends on personal optimistic about it, can not help but use does not affect the use, but the content will be more queries to a lot, it looks a bit messy, needs to decide whether to see the disabled.

sudo vim /etc/default/grub
# 找到下面内容
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
# 讲上面内容替换成
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"

# 更新
sudo update-grub

# 重启后生效
reboot

Installation configuration MySQL PHP Nginx environment

You can use the automatic installation script , automatic installation environment, use the time to pay attention to the config file configuration, such as: operating system version, users.

If you want to manually configure, please refer to (note the order of installation, it is recommended to install in the following order):

Installation Composer

Nothing special, downloaded you can use, but to ensure that the system has PHP CLI environment.

installation

sudo wget https://getcomposer.org/download/1.5.6/composer.phar -O /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer

Domestic mirroring configuration

Composer Chinese network can see the configuration, and various documents Chinese here.

composer config -g repo.packagist composer https://packagist.phpcomposer.com

Installation node environment

Installation node and npm

sudo apt install nodejs npm

Installation yarn

Because npm efficiency and other issues, is not very easy to use, it is generally the work of npm install will be replaced with yarn

# 如果没有安装 curl 就先安装,如果已经安装可以忽略
sudo apt install -y curl

# 导入仓库的秘钥
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
# 配置 yarn 的仓库,一定注意,要导入仓库在安装,Ubuntu 默认带的 yarn 是个莫名其妙的东西,反正不是这个 yarn 就对了
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

# 更新软件源,这个也是必须要做的,否则安装的时候还是系统自带的 yarn
sudo apt-get update

# 安装
sudo apt-get install yarn

Configuring domestic source

Here are used in Taobao mirror, the other not tried

# npm 直接将下面内容写去 到 ~/.bash_alias 中即可
alias cnpm="npm --registry=https://registry.npm.taobao.org 
--cache=$HOME/.npm/.cache/cnpm 
--disturl=https://npm.taobao.org/dist 
--userconfig=$HOME/.cnpmrc"

# yarn 国内镜像
yarn config set registry https://registry.npm.taobao.org

Installation screen brush

This individual needs to see it, because there is often a need to do presentations, or very personal needs.

sudo apt-get install gromit-mpx

Very easy to use, can be found through the menu, just click on it to run for the convenience can be placed on the dock, or direct shortcut key Alt+F2input gromit-mpx, the software will be launched at this time, you can see the upper right corner.

hot key

  • F9 - start drawing, click again to stop drawing

  • Shift + F9 empty plot, this if you do not manually clear, painted pattern will always be displayed on the screen

  • Ctrl + F9 to hide the desktop graphics, but not empty, you can click on the show again

  • The default is red when drawing the line, hold down the Shift is the blue line, yellow line Ctrl installation

drawing equipment

DIA is recommended, a pattern can be directly general, the UML diagrams, flowcharts, and the like.

installation

sudo apt install dia

Enter the Chinese can not solve

The default is not input Chinese, can only use a compromise, execute at startup dia --classic, but this navigation bar to detach out, there is no better solution, and for years no one has solved ......

Original: Big Box  Ubuntu development environment configuration


Guess you like

Origin www.cnblogs.com/petewell/p/11611999.html