Linux Mint 18.2 安装与调整
Posted zhangjianying
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux Mint 18.2 安装与调整相关的知识,希望对你有一定的参考价值。
安装系统
- 连接到wifi网络下再从U盘安装.会自动安装中文语言包
- 磁盘划分的时候开启 LVM 便于后期调整
- U盘安装完以后重启系统
- 重启后关闭蓝牙接收以及任务栏图标
- [开始菜单] - [系统管理] - [软件源] 调整镜像源(可以考虑使用阿里源.根据自己的测试结果综合选择,如果速度不慢的话 最好使用官方源)
- sudo apt update
- sudo apt install gedit unzip zip rar unrar axel git tlp
- 再使用[更新管理器] 安装更新补丁,更新完后重启电脑
- linux内核只安装放行版本推荐的.无需自行安装最新的.稳定才是第一生产力
安装输入法
- 无需参考网上使用apt方式安装
- 直接使用[开始菜单] - [首选项] -[输入法],选择 [语言] 中的 [语言支持] 点击[中文语言] 安装
- 使用[开始菜单] - [首选项] -[输入法],选择 [语言支持] [简体中文] 安装.如果这一步出错.请将前面一步的源设置成 美国mint官方源.然后执行 sudo apt update之后.再操作,安装完以后将同面板下的[输入法]下拉框选择成 Fcitx
- 打开浏览器到搜狗拼音输入法官网下载最新的linux deb安装包进行安装,安装完后自行添加搜狗的词库.这样打字很顺手的.
- 安装完成后修改 sudo gedit /etc/X11/xinit/xinitrc [对比一下应该可以直接复制]
#!/bin/sh
# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)
# invoke global X session script
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
exec /etc/X11/Xsession
优化/etc/sysctl.conf 中网络参数
如果发行版本linux内核没有上4.9就无需考虑bbr,直接使用以下参数即可
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_synack_retries = 1
#尽量使用内存而不使用swap分区
vm.swappiness = 1
#阻止别人ping通自己
net.ipv4.icmp_echo_ignore_all = 1
#跟换了4.10以上内核的可以开启bbr
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
优化磁盘参数
sudo gedit /etc/fstab
/dev/sda1 / ext4 discard,noatime,nodiratime,commit=600,errors=remount-ro 0 1
主要是加上 discard,noatime,nodiratime,commit=600
sudo gedit /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#加大预读取大小 需要根据自己的磁盘数来调节
/sbin/blockdev --setra 128 /dev/sda
/sbin/blockdev --setra 128 /dev/sdb
#提高调度器请求队列的
echo 4096 > /sys/block/sdb/queue/nr_requests
# 设置磁盘调度模式
# deadline > /sys/block/sda/queue/scheduler
#echo deadline > /sys/block/sdb/queue/scheduler
#modprobe acpi_call
#/usr/sbin/tlp start
exit 0
sudo gedit /etc/default/grub
修改 GRUB_CMDLINE_LINUX_DEFAULT .在原来的基础上增加
intel_pstate=enable rootflags=data=writeback
如:
GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=enable quiet splash irqpoll rootflags=data=writeback"
可以缩短引导时间
GRUB_TIMEOUT=6
编辑完后保存,运行
sudo grub-mkconfig -o /boot/grub/grub.cfg
TLP配置文件
如果安装了TLP
可以参考设置
# ------------------------------------------------------------------------------
# tlp - Parameters for power save
# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
# Hint: some features are disabled by default, remove the leading # to enable
# them.
# Set to 0 to disable, 1 to enable TLP.
TLP_ENABLE=1
# Operation mode when no power supply can be detected: AC, BAT
# Concerns some desktop and embedded hardware only.
TLP_DEFAULT_MODE=AC
# Seconds laptop mode has to wait after the disk goes idle before doing a sync.
# Non-zero value enables, zero disables laptop mode.
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2
# Dirty page values (timeouts in secs).
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
# Hint: CPU parameters below are disabled by default, remove the leading #
# to enable them, otherwise kernel default values are used.
# Select a CPU frequency scaling governor:
# ondemand, powersave, performance, conservative
# Intel Core i processor with intel_pstate driver:
# powersave, performance
# Important:
# You *must* disable your distribution's governor settings or conflicts will
# occur. ondemand is sufficient for *almost all* workloads, you should know
# what you're doing!
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave
# Set the min/max frequency available for the scaling governor.
# Possible values strongly depend on your CPU. For available frequencies see
# tlp-stat output, Section "+++ Processor".
#CPU_SCALING_MIN_FREQ_ON_AC=0
#CPU_SCALING_MAX_FREQ_ON_AC=0
#CPU_SCALING_MIN_FREQ_ON_BAT=0
#CPU_SCALING_MAX_FREQ_ON_BAT=0
# Set Intel P-state performance: 0..100 (%)
# Limit the max/min P-state to control the power dissipation of the CPU.
# Values are stated as a percentage of the available performance.
# Requires an Intel Core i processor with intel_pstate driver.
CPU_MIN_PERF_ON_AC=0
CPU_MAX_PERF_ON_AC=100
CPU_MIN_PERF_ON_BAT=1
CPU_MAX_PERF_ON_BAT=30
# Set the CPU "turbo boost" feature: 0=disable, 1=allow
# Requires an Intel Core i processor.
# Important:
# - This may conflict with your distribution's governor settings
# - A value of 1 does *not* activate boosting, it just allows it
CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0
# Minimize number of used CPU cores/hyper-threads under light load conditions
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
# Kernel NMI Watchdog:
# 0=disable (default, saves power), 1=enable (for kernel debugging only)
NMI_WATCHDOG=0
# Change CPU voltages aka "undervolting" - Kernel with PHC patch required
# Frequency voltage pairs are written to:
# /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
# CAUTION: only use this, if you thoroughly understand what you are doing!
#PHC_CONTROLS="F:V F:V F:V F:V"
# Set CPU performance versus energy savings policy:
# performance, normal, powersave
# Requires kernel module msr and x86_energy_perf_policy from linux-tools
ENERGY_PERF_POLICY_ON_AC=performance
ENERGY_PERF_POLICY_ON_BAT=powersave
# Hard disk devices; separate multiple devices with spaces (default: sda).
# Devices can be specified by disk ID also (lookup with: tlp diskid).
DISK_DEVICES="sda sdb"
# Hard disk advanced power management level: 1..254, 255 (max saving, min, off)
# Levels 1..127 may spin down the disk; 255 allowable on most drives.
# Separate values for multiple devices with spaces.
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"
# Hard disk spin down timeout:
# 0: spin down disabled
# 1..240: timeouts from 5s to 20min (in units of 5s)
# 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
# See 'man hdparm' for details.
#DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
#DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
# Select IO scheduler for the disk devices: noop, deadline, cfq (Default: cfq);
# Separate values for multiple devices with spaces.
DISK_iosCHED="noop cfq"
# SATA aggressive link power management (ALPM):
# min_power, medium_power, max_performance
SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power
# PCI Express Active State Power Management (PCIe ASPM):
# default, performance, powersave
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
# Radeon graphics clock speed (profile method): low, mid, high, auto, default;
# auto = mid on BAT, high on AC; default = use hardware defaults.
# (Kernel >= 2.6.35 only, open-source radeon driver explicitly)
RADEON_POWER_PROFILE_ON_AC=default
RADEON_POWER_PROFILE_ON_BAT=low
# Radeon dynamic power management method (DPM): battery, performance
# (Kernel >= 3.11 only, requires boot option radeon.dpm=1)
RADEON_DPM_STATE_ON_AC=performance
RADEON_DPM_STATE_ON_BAT=battery
# Radeon DPM performance level: auto, low, high; auto is recommended.
RADEON_DPM_PERF_LEVEL_ON_AC=auto
RADEON_DPM_PERF_LEVEL_ON_BAT=auto
# WiFi power saving mode: 1=disable, 5=enable; not supported by all adapters.
WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5
# Disable wake on LAN: Y/N
WOL_DISABLE=Y
# Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
# A value of 0 disables, >=1 enables power save.
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1
# Disable controller too (HDA only): Y/N
SOUND_POWER_SAVE_CONTROLLER=Y
# Set to 1 to power off optical drive in UltraBay/MediaBay when running on
# battery. A value of 0 disables this feature (Default).
# Drive can be powered on again by releasing (and reinserting) the eject lever
# or by pressing the disc eject button on newer models.
# Note: an UltraBay/MediaBay hard disk is never powered off.
BAY_POWEROFF_ON_BAT=0
# Optical drive device to power off (default sr0).
BAY_DEVICE="sr0"
# Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
# Runtime PM for *all* PCI(e) bus devices, except blacklisted ones:
# 0=disable, 1=enable
RUNTIME_PM_ALL=1
# Exclude PCI(e) device adresses the following list from Runtime PM
# (separate with spaces). Use lspci to get the adresses (1st column).
#RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
# Exclude PCI(e) devices assigned to the listed drivers from Runtime PM
# (should prevent accidential power on of hybrid graphics' discrete part).
# Default is "radeon nouveau"; use "" to disable the feature completely.
# Separate multiple drivers with spaces.
RUNTIME_PM_DRIVER_BLACKLIST="radeon nouveau"
# Set to 0 to disable, 1 to enable USB autosuspend feature.
USB_AUTOSUSPEND=1
# Exclude listed devices from USB autosuspend (separate with spaces).
# Use lsusb to get the ids.
# Note: input devices (usbhid) are excluded automatically (see below)
USB_BLACKLIST="1c4f:0065"
# WWAN devices are excluded from USB autosuspend:
# 0=do not exclude / 1=exclude
USB_BLACKLIST_WWAN=1
# Include listed devices into USB autosuspend even if already excluded
# by the driver or WWAN blacklists above (separate with spaces).
# Use lsusb to get the ids.
#USB_WHITELIST="1111:2222 3333:4444"
# Set to 1 to disable autosuspend before shutdown, 0 to do nothing
# (workaround for USB devices that cause shutdown problems).
#USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
# Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
# on system startup: 0=disable, 1=enable.
# Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
# are ignored when this is enabled!
RESTORE_DEVICE_STATE_ON_STARTUP=0
# Radio devices to disable on startup: bluetooth, wifi, wwan.
# Separate multiple devices with spaces.
#DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
# Radio devices to enable on startup: bluetooth, wifi, wwan.
# Separate multiple devices with spaces.
#DEVICES_TO_ENABLE_ON_STARTUP="wifi"
# Radio devices to disable on shutdown: bluetooth, wifi, wwan
# (workaround for devices that are blocking shutdown).
#DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
# Radio devices to enable on shutdown: bluetooth, wifi, wwan
# (to prevent other operating systems from missing radios).
#DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
# Radio devices to enable on AC: bluetooth, wifi, wwan
#DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
# Radio devices to disable on battery: bluetooth, wifi, wwan
#DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
# Radio devices to disable on battery when not in use (not connected):
# bluetooth, wifi, wwan
#DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
# Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
# required). Charging starts when the remaining capacity falls below the
# START_CHARGE_TRESH value and stops when exceeding the STOP_CHARGE_TRESH value.
# Main / Internal battery (values in %)
START_CHARGE_THRESH_BAT0=70
STOP_CHARGE_THRESH_BAT0=99
# Ultrabay / Slice / Replaceable battery (values in %)
#START_CHARGE_THRESH_BAT1=70
#STOP_CHARGE_THRESH_BAT1=99
# ------------------------------------------------------------------------------
# tlp-rdw - Parameters for the radio device wizard
# Possible devices: bluetooth, wifi, wwan
# Hints:
# - Parameters are disabled by default, remove the leading # to enable them.
# - Separate multiple radio devices with spaces.
# Radio devices to disable on connect.
#DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
#DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
#DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
# Radio devices to enable on disconnect.
#DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
#DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
#DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
# Radio devices to enable/disable when docked.
#DEVICES_TO_ENABLE_ON_DOCK=""
#DEVICES_TO_DISABLE_ON_DOCK=""
# Radio devices to enable/disable when undocked.
#DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
#DEVICES_TO_DISABLE_ON_UNDOCK=""
安装软件
- 使用[开始菜单] -[系统管理] -[新立得软件包管理器] 安装 vlc 播放器
- 安装wps .不要从国内官方网址下载. 要打开 http://wps-community.org,先下载字体deb包与wps安装包,先安装wps再安装字体包, 如果是64位的机器就下载 名字中有 amd64.deb的文件,下载的时候可以使用多线程下载
比如:
axel -an 5 http://kdl1.cache.wps.com/ksodl/download/linux/a21//wps-office_10.1.0.5707~a21_amd64.deb
- 安装字体(比如Yahei 这里不做过多介绍)
- 远程桌面以及SSH工具 sudo apt install Remmina
- google-chrome浏览器 到 https://pkgs.org/download/google-chrome-stable 下载deb 安装
- 截图工具安装深度截图2.0 deb .自行网上下载.然后到 [键盘] 中设置快捷键 即可达到类似qq截图的效果
- 到[驱动管理器]中安装显卡驱动 以及 CPU微码驱动,安装完后需重新启动计算机
- 安装sublime Text 后,注册码自行百度.再安装中文输入补丁才能打字.补丁位置:https://github.com/lyfeyaj/sublime-text-imfix
- 远程链接管理管局; window 远程桌面 rdesktop , sudo apt install rdesktop
rdesktop -f -a 16 -n fuwuqi -r disk:myDisk=/dev/shm -u Administrator -p passwd -0 192.168.1.10
桌面字体优化
sudo gedit /usr/share/themes/Linux Mint/cinnamon/cinnamon.css
前提是安装了yahei字体
stage
font-family: Microsoft YaHei,Noto Sans, sans-serif;
添加分辨率
有些分辨率默认不会增加到[显示]中
以1920x1080分辨率为例,以下是第二种方法的操作步骤:
1、在终端输入:$ cvt 1920 1080
得到以下信息
1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline “1920x1080_60.00” 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
终端输入:sudo gedit /etc/X11/xorg.conf
Section "Monitor"
Identifier "Configured Monitor"
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync //来自步骤1
Option "PreferredMode" "1920x1080_60.00" //来自步骤1
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
Section "Device"
Identifier "Configured Video Device"
EndSection
保存,重启,查看效果
解决Eclipse svn冲突
1 . 安装JavaHL sudo apt-get install libsvn-java
2. 使用 dpkg -L libsvn-java 查看安装位置
XXXX@M4600 /usr/lib $ dpkg -L libsvn-java
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/jni
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so.0.0.0
/usr/share
/usr/share/java
/usr/share/java/svn-javahl.jar
/usr/share/doc
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so.0
/usr/share/doc/libsvn-java
- 修改eclipse.ini 在最后增加
-vm
/home/XXXX/devloperTool/jdk1.8.0_131/bin/java
-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Xms1024m
-Xmx1024m
-Xverify:none
-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni
以上是关于Linux Mint 18.2 安装与调整的主要内容,如果未能解决你的问题,请参考以下文章
迁移Linux mint 18.2 apt到Ubuntu Server 16.04 LTS