此前寫過Configuration After Freshly Installed Linux OS,但並未涉及軟件安裝。本文主要記錄個人在Linux系統平臺下的常用軟件安裝過程,相關操作基於CentOS7系統進行,其它發行版(如Debian)可參考相關操作。

System Update

使用163開源鏡像站 * CentOS使用幫助 * Debian使用幫助

  • 更新yum源

    sudo mkdir -pv /etc/yum.repos.d/bak
    cd /etc/yum.repos.d/
    sudo mv ./*.repo bak
    sudo curl -so CentOS7-Base1111.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
    

    : 命令curl-o表示output file,-s表示silent

  • 更新系統

    sudo yum clean all
    sudo yum update -y
    

系統更新包括內核更新,更新完成後新舊內核同時存在。 重啓系統,在內核選擇界面選擇最新的內核啓動,進入系統後,將舊內核移除。

  • 移除舊內核 ```bash #查看當前內核版本 uname -r

#查看當前系統已安裝的與內核kernel相關的安裝包 rpm -qa | grep ‘^kernel’


通過命令`sudo yum remove/erase`將舊內核移除。

* 移除不需要的軟件
此操作看個人實際情況,酌情操作

```bash
sudo yum erase -y totem rhythmbox empathy abrt* firefox

Essential Packages

一些常用的軟件包

sudo yum install -y epel-relase

sudo yum install -y kernel-devel kernel-headers ntfs-3g vim

sudo yum install -y chrony

vim的配置參見本人Blog VIM Editor Configuration

chrony用於時間同步,具體設置參見本人Blog Setting System Language,Clock,Hostname in CentOS 7


GNome Desktop Setting

Remove Unneeded Packages

移除GNome中不需要的軟件

sudo yum remove -y evolution totem empathy brasero bijiben
sudo yum remove -y gnome-{maps,music,clocks,contacts,weather}

# Game
sudo yum remove -y gnome-{chess,sudoku,mahjongg,mines}
sudo yum remove -y aisleriot swell-foop lightsoff quadrapassel iagno

Recent Files

GNome 3桌面環境中,默認會記錄當前用戶打開的文件,在 Recent 窗口中列出。

參考自Blog DISABLING GNOME’S RECENTLY-USED FILE LIST, THE BETTER WAY進行如下設置,但重啓後仍舊會顯示,不推薦,命令如下:

[[ -f ~/.local/share/recently-used.xbel ]] && rm -f ~/.local/share/recently-used.xbel

[[ -f ~/.config/gtk-3.0/settings.ini ]] && sed -i -r '/^gtk-recent-files/d;/^\[Settings\]/a gtk-recent-files-max-age=0\ngtk-recent-files-limit=0' ~/.config/gtk-3.0/settings.ini

方案1: 禁止Recent按鈕出現,參考鏈接,通過gsettings設置

gsettings get org.gnome.desktop.privacy remember-recent-files

gsettings set org.gnome.desktop.privacy remember-recent-files false

方案2:通過GNome Extension Recent Items手動清理,參考鏈接

可將二者結合起來使用。

CustomCorner

CustomCorner是GNome的一個擴展,用於在屏幕的四個角落創建快捷功能,代碼託管在Gitlab

注意: 該擴展不支持GNome 3.14及之前的版本,而Debian Jessie默認使用的是3.14,無法正常使用。經測試,在OpenSUSE Leap 42.2中運行正常。

根據說明編寫操作命令,通過如下命令安裝擴展

fileSavaPath='/tmp/archive.tar.gz'
curl -s https://gitlab.com/eccheng/customcorner/repository/archive.tar.gz?ref=master -o $fileSavaPath

targetPath="$HOME/.local/share/gnome-shell/extensions/customcorner@eccheng.gitlab.com"
[[ -d "$targetPath" ]] && rm -rf "$targetPath"/* || mkdir -p "$targetPath"

tar xf $fileSavaPath -C "$targetPath" --strip-components=1

gnomeShellVersion=$(gnome-shell --version | sed -n -r 's@GNOME Shell (.*)@\1@p')

sed -i -r '/shell-version/s@("shell-version": \[\").*(\"\],)@\1'"$gnomeShellVersion"'\2@' "$targetPath"/metadata.json

[[ -f $fileSavaPath ]] && rm -f $fileSavaPath
unset fileSavaPath
unset targetPath
unset gnomeShellVersion

通過組合命令Alt + F2重啓GNome Shell,在 Applications –> System Tools –> Tweak Tool –> Extensions中找到 *Customcorner*,根據個人喜好進行設置。

Extensions


Browser

瀏覽器安裝

Google Chrome

Google Chrome官網爲 https://www.google.com/chrome/,點擊頁面的 Download now 按鈕,會跳出彈框提示需要下載何種安裝包,主要兩種,分別針對RedHat和Debian發行版

使用命令sudo yum localinstall -y命令自動解決包依賴關係

[flying@lempstacker ~]$ namei -om ~/Downloads/google-chrome-stable_current_x86_64.rpm
f: /home/flying/Downloads/google-chrome-stable_current_x86_64.rpm
 dr-xr-xr-x root   root   /
 drwxr-xr-x root   root   home
 drwx------ flying flying flying
 drwxr-xr-x flying flying Downloads
 -rw-rw-r-- flying flying google-chrome-stable_current_x86_64.rpm
[flying@lempstacker ~]$ sudo yum localinstall -y ~/Downloads/google-chrome-stable_current_x86_64.rpm

該rpm包安裝完成時會自動在目錄/etc/yum.repos.d下創建yum源文件google-chrome.repo

[flying@lempstacker ~]$ cat /etc/yum.repos.d/google-chrome.repo
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
[flying@lempstacker ~]$

Google Chrome以後若有版本更新,直接通過yum update即可更新。

在GNome Desktop環境中,/usr/bin/x-www-browser用於設置系統默認瀏覽器,以下是Google Chrome在安裝過程中的配置記錄

update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode

Google Chrome的配置文件(如登錄信息、設置、插件等)目錄爲

~/.config/google-chrome

安裝成功後,即可在Menu菜單中找到Google Chrome應用程序(通常是Applications->Internet)。

在瀏覽器地址欄中輸入如下地址,可顯示對應功能、信息

#瀏覽器版本信息
chrome://version

#Experiments功能控制
chrome://flags

#清除瀏覽歷史
chrome://settings/clearBrowserData

Plugins

在瀏覽器地址欄中輸入

chrome://plugins/

禁用不需要的插件,如Chrome PDF Viewer

啟用Do Not Track (Setting–>Privacy中)

Extensions

出於某些需要,安裝如下擴展 * crxMouse Chrome Gestures * AdBlock * uBlock Origin * WOT: Web of Trust, Website Reputation Ratings * Disconnect * HTTPS Everywhere * Proxy SwitchyOmega * Random User-Agent * WebRTC Network Limiter * Privacy Badger * Click&Clean * Ghostery

Mozilla Firefox

系統自帶的Mozilla Firefox版本較低,若要使用最新版本,需從Mozilla Firefox官網下載,FTP路徑。Mozilla Firefox默認未安裝Adobe Flash Player無法播放視頻,需從Adobe官網下載Adobe Flash Player後手動安裝,按需選擇下載格式,此處選擇.tar.gz格式。

Mozilla Firefox官網下載後將其解壓至/opt目錄下。

#移除系統存在的firefox
sudo yum remove -y firefox

#解壓到目錄/opt下
sudo tar xf ~/Downloads/firefox-47.0.1.tar.bz2 -C /opt

可直接使用alias命令別名通過CLI啓動

# vim ~/.bashrc
alias firefox='/opt/firefox/firefox'

#執行source或.重新加載文件
source ~/.bashrc

也可設置圖形化界面啓動,具體操作可參考本人之前的Blog 如何在CentOS7中爲新版本Firefox創建桌面快捷圖標在CentOS7 X64中爲Firefox安裝FlashPlayer插件

#複製瀏覽器圖片到目錄/usr/share/pixmaps/作爲logo
sudo cp -fa /opt/firefox/browser/icons/mozicon128.png /usr/share/pixmaps/firefox.png

#創建桌面快捷圖標

cat << EOF | sudo tee -a /usr/share/applications/firefox.desktop
# sudo tee -a /usr/share/applications/firefox.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=Firefox Web Browser
GenericName[en]= firefox
Comment=Firefox web browser
Exec=/opt/firefox/firefox %u
Icon=firefox.png
Terminal=false
Type=Application
StartupWMClass=Firefox-bin
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
Categories=Network;Application;
EOF

#將flash player解壓至/tmp目錄
mkdir -pv /tmp/flashPlayer
sudo tar xf ~/Downloads/install_flash_player_11_linux.x86_64.tar.gz -C /tmp/flashPlayer

#將解壓出的libflashplayer.so文件複製到 ~/.mozilla/plugins目錄中,目錄存在則創建之
ls ~/.mozilla
mkdir -pv ~/.mozilla/plugins
cp -pv /tmp/flashPlayer/libflashplayer.so ~/.mozilla/plugins
ls ~/.mozilla/plugins

Extensions

出於某些需要,安裝如下擴展

在GNome桌面中隱藏標題欄(TitleBar),參考自Firefox GNOME Tutorial HTitle

SRWare Iron

SRWare Iron官方網站 https://www.srware.net/en/介紹頁面下載頁面

其中Linux版本下載頁的鏈接可通過如下命令獲取

curl -s https://www.srware.net/en/software_srware_iron_download.php | sed -n '/Iron for Linux/p' | sed -r -n 's@.*href="(.*)" .*@\1@p;' | sed -r 's@\&amp\;@\&@g'

操作過程

[flying@lempstacker ~]$ curl -s https://www.srware.net/en/software_srware_iron_download.php | sed -n '/Iron for Linux/p' | sed -r -n 's@.*href="(.*)" .*@\1@p;' | sed -r 's@\&amp\;@\&@g'
http://www.srware.net/forum/viewtopic.php?f=18&t=11258
[flying@lempstacker ~]$

安裝包的固定下載連接爲

http://www.srware.net/downloads/iron-linux-64.tar.gz

配置可參考Mozilla Firefox的配置過程,將SRWare Iron解壓至/opt目錄下

# 創建文件存儲目錄
[[ -d /opt/iron-linux-64 ]] && sudo rm -rf /opt/iron-linux-64/* || sudo mkdir -p /opt/iron-linux-64

#解壓到目錄/opt下
sudo tar xf ~/Downloads/iron-linux-64.tar.gz -C /opt/iron-linux-64 --strip-components=1

圖形化啓動界面

#複製瀏覽器圖片到目錄/usr/share/pixmaps/作爲logo
sudo cp -fv /opt/iron-linux-64/product_logo_48.png /usr/share/pixmaps/iron.png

#創建桌面快捷圖標

cat << EOF | sudo tee /usr/share/applications/iron.desktop
# sudo tee /usr/share/applications/iron.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=SRWare Iron Browser
GenericName[en]= Iron
Comment=SRWare Iron Browser
#Exec=/opt/iron-linux-64/iron %u
Exec=/opt/iron-linux-64/chrome %u
Icon=iron.png
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
Categories=Network;WebBrowser;Application;
EOF

SRWare Iron的配置文件(如登錄信息、設置、插件等)目錄爲

~/.config/chromium

重要:在版本55.2900.0中,啟動文件從 iron 改為 *chrome*,故須對應更改文件iron.desktop中的Exec指令參數為

/opt/iron-linux-64/chrome %u

Error Occuring

有時無法啓動,在文件存儲目錄/opt/iron-linux-64中執行./iron(或./chrome)會提示

The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I’m aborting now. You need to make sure that /opt/iron-linux-64/chrome-sandbox is owned by root and has mode 4755.

按照提示對文件/opt/iron-linux-64/chrome-sandbox進行文件權限修改

sudo chown root:root /opt/iron-linux-64/chrome-sandbox
sudo chmod 4755 /opt/iron-linux-64/chrome-sandbox

後即可正常啓動。

操作過程

[flying@lempstacker iron-linux-64]$ ls -lh /opt/iron-linux-64/chrome-sandbox
-rwxrwxr-x 1 flying flying 18K Nov 17 17:37 /opt/iron-linux-64/chrome-sandbox
[flying@lempstacker iron-linux-64]$ sudo chown root:root /opt/iron-linux-64/chrome-sandbox
[flying@lempstacker iron-linux-64]$ sudo chmod 4755 /opt/iron-linux-64/chrome-sandbox
[flying@lempstacker iron-linux-64]$ ls -lh /opt/iron-linux-64/chrome-sandbox
-rwsr-xr-x 1 root root 18K Nov 17 17:37 /opt/iron-linux-64/chrome-sandbox
[flying@lempstacker iron-linux-64]$

Version Control

Git

Git的官網地址 https://git-scm.com/,Github地址

Git的安裝、配置可參考本人之前Blog Compile Install And Configure Git On CentOS7

#安裝相關依賴包
sudo yum install -y autoconf gcc zlib-devel perl-ExtUtils-MakeMaker curl-devel

#將壓縮包解壓至目錄/opt
tar xf ~/Downloads/git-2.9.2.tar.gz -C /tmp/
cd /tmp/git-2.9.2/

#編譯安裝
make configure
./configure --prefix=/usr/local/
sudo make -j 2
sudo make install

#查看是否安裝成功
git --version

#創建符號鏈接
sudo ln -s /usr/local/bin/git /usr/bin

#Git設置,使用Github賬戶的用戶名和郵箱
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL ADDRESS"
git config --list

#生成SSH key
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

#將key添加入ssh-agent
ssh-agent -s
ssh-add ~/.ssh/id_rsa

#將ssh公鑰內容添加到Github賬戶中 https://github.com/settings/ssh
cat ~/.ssh/id_rsa.pub

#測試配置是否成功
ssh -T git@github.com

Editors

GNOME 3桌面中默認安裝有gedit編輯器,但界面略顯簡陋,不太適合代碼編寫。

Atom

Atom是一款開源的文本和代碼編輯器,官網地址 https://atom.io/,其安裝包的下載鏈接來自其GitHub倉庫,relese頁面

使用sudo yum localinstall -y命令自動解決包依賴關係。具體安裝配置過程參加本人之前Blog Install and Configure Atom Editor

[flying@lempstacker ~]$ namei -om ~/Downloads/atom.x86_64.rpm
f: /home/flying/Downloads/atom.x86_64.rpm
 dr-xr-xr-x root   root   /
 drwxr-xr-x root   root   home
 drwx------ flying flying flying
 drwxr-xr-x flying flying Downloads
 -rw-rw-r-- flying flying atom.x86_64.rpm
[flying@lempstacker ~]$ sudo yum localinstall -y ~/Downloads/atom.x86_64.rpm
...
...
[flying@lempstacker ~]$ which atom
/usr/bin/atom
[flying@lempstacker ~]$ atom --version
Atom    : 1.9.0
Electron: 0.37.8
Chrome  : 49.0.2623.75
Node    : 5.10.0
[flying@lempstacker ~]$

重要 1. 插件terminal-plus依賴於git,git的安裝配置可參考本人之前Blog Compile Install And Configure Git On CentOS7 。 2. 在Atom窗口3/4處可能會有一條豎線,無法關閉。原因是因爲插件wrap-guide默認被啓用(屬於Core Packages),用於標誌第80個字符的位置。可在Settings->Packages中搜wrap-guide並將其禁用。


Virtualization

VirtualBox

VirtualBox官網地址 https://www.virtualbox.org/,下載頁https://www.virtualbox.org/wiki/Downloads,根據需要選擇對應的操作系統平臺,此處選擇Linux –> CentOS7

完整的操作步驟

sudo yum localinstall -y ~/Downloads/VirtualBox-5.1-5.1.2_108956_el7-1.x86_64.rpm
sudo yum install gcc make -y
sudo /sbin/vboxconfig

Error Occuring

以下是操作過程中出現的報錯,啓動新創建的虛擬機時出現報錯

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/sbin/vboxconfig'

as root.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

執行sudo /sbin/vboxconfig報如下錯

[flying@lempstacker ~]$ sudo /sbin/vboxconfig
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:

  yum install gcc make
vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:

  yum install gcc make

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
[flying@lempstacker ~]$

按照提示安裝gccmake

sudo yum install gcc make -y

再次執行sudo /sbin/vboxconfig出現如下提示

[flying@lempstacker ~]$ sudo /sbin/vboxconfig
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
[flying@lempstacker ~]$

再次啓動創建的虛擬機,可正常啓動。

Docker

Docker官方网站 https://www.docker.com/,GitHub地址。關於Docker的介紹和安裝可參考本人Blog Docker Instroduction and Installation on CentOS 7,也可直接参考官方文档Install Docker Engine

#添加docker倉庫
sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF

#更新系統
sudo yum update

#安裝Docker
sudo yum install docker-engine

#啓動Docker服務
sudo service docker start #CentOS6.x
sudo systemctl start docker #CentOS7.x

#通過容器中的測試鏡像(hello-world)驗證Docker是否安裝正確
sudo docker run hello-world

#添加用戶加入docker用戶組
sudo groupadd docker
sudo usermod -aG docker `who -m | awk '{print $1}'`

#查看是否已成功添加
sudo tail -1 /etc/gshadow
id `who -m | awk '{print $1}'`
[flying@lempstacker ~]$ rpm -qi docker-engine
Name        : docker-engine
Version     : 1.12.0
Release     : 1.el7.centos
Architecture: x86_64
Install Date: Tue 02 Aug 2016 08:40:50 PM CST
Group       : Tools/Docker
Size        : 82762300
License     : ASL 2.0
Signature   : RSA/SHA512, Fri 29 Jul 2016 07:14:45 AM CST, Key ID f76221572c52609d
Source RPM  : docker-engine-1.12.0-1.el7.centos.src.rpm
Build Date  : Fri 29 Jul 2016 05:45:36 AM CST
Build Host  : 1b8d8e1ae166
Relocations : (not relocatable)
Packager    : Docker <support@docker.com>
Vendor      : Docker
URL         : https://dockerproject.org
Summary     : The open-source application container engine
Description :
Docker is an open source project to build, ship and run any application as a
lightweight container.

Docker containers are both hardware-agnostic and platform-agnostic. This means
they can run anywhere, from your laptop to the largest EC2 compute instance and
everything in between - and they don't require you to use a particular
language, framework or packaging system. That makes them great building blocks
for deploying and scaling web apps, databases, and backend services without
depending on a particular stack or provider.
[flying@lempstacker ~]$

Database Relevent

MariaDB

MariaDB官方網站 https://mariadb.org/,下载页面 , Repo设置页

具體安裝、配置可參考本人Blog LEMP Installation and Nginx Optimization

#添加MariaDB官方repo
sudo tee -a /etc/yum.repos.d/MariaDB.repo << EOF
# MariaDB 10.1 CentOS repository list - created 2016-08-02 13:11 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF

#安裝MariaDB
sudo yum install -y MariaDB-server MariaDB-client

#進行安全配置嚮導
mysql_secure_installation

在用戶家目錄下創建文件.my.cnf,可直接執行mysql命令登陸數據庫,格式如下

[client]
user={USERNAME}
password={PASSWORD}
host={HOST}

Oracle SQL Developer

Oracle的數據庫需使用Oracle SQL Developer,其官網下載頁鏈接Linux RPM還需安裝JDK8環境。

根據官網 RPM for Linux Installation Notes,需先安裝JDK 1.8+,再安裝sqldeveloper

注意: 下載sqldeveloper須有Oracle帳號,如果沒有,請先註冊一個。

This download does not include the JDK. You can connect to and use any JDK 1.8 or above.

To install and run:

- Ensure you have a JDK installed, if not, download here
- rpm -Uhv sqldeveloper-(build number)-1.noarch.rpm (install the package)
- cd sqldeveloper (go to sqldeveloper folder)
- ./sqldeveloper.sh (run sqldeveloper.sh file)
- You will be prompted to enter a jdk path. (ie usr/java/jdk1.8.0_25)
- SQL Developer will automatically launch once jdk location is provided
#安裝jdk1.8.0_102,安裝路徑是/usr/java/jdk1.8.0_102
sudo yum localinstall -y ~/Downloads/jdk-8u102-linux-x64.rpm

#安裝sqldeveloper,安裝路徑爲/opt
sudo yum localinstall -y ~/Downloads/sqldeveloper-4.1.3.20.78-1.noarch.rpm

#進入安裝路徑
cd /opt/sqldeveloper/

#執行腳本,根據提示操作
./sqldeveloper.sh

文件/usr/share/applications/Oracle-sqldeveloper.desktop內容

[Desktop Entry]
Encoding=UTF-8
Name=SQL Developer
Comment=Oracle SQL Developer
Icon=/opt/sqldeveloper/icon.png
Exec=sqldeveloper
Terminal=false
Type=Application
X-Desktop-File-Install-Version=0.22
Categories=X-Red-Hat-Extra;Application;Development;

E-mail

郵件客戶端

Thunderbird

Thunderbird 的官方網站 https://www.mozilla.org/en-US/thunderbird/

# 創建目錄
[[ -d '/opt/thunderbird' ]] && sudo rm -rf /opt/thunderbird/* || sudo mkdir -pv /opt/thunderbird

# 解壓縮
sudo tar xf ~/Downloads/thunderbird-45.6.0.tar.bz2 -C /opt/thunderbird --strip-components=1

#複製圖片到目錄/usr/share/pixmaps/作爲logo
[[ -f '/usr/share/pixmaps/thunderbird.png' ]] && sudo rm -f /usr/share/pixmaps/thunderbird.png
sudo cp /opt/thunderbird/chrome/icons/default/default256.png /usr/share/pixmaps/thunderbird.png

sudo tee /usr/share/applications/thunderbird.desktop <<-'EOF'
[Desktop Entry]
Encoding=UTF-8
Name=Thunderbird
GenericName=Email
Comment=Send and Receive Email
#TryExec=thunderbird
Exec=/opt/thunderbird/thunderbird %u
Icon=thunderbird.png
Terminal=false
Type=Application
MimeType=message/rfc822;x-scheme-handler/mailto;
StartupNotify=true
Categories=Network;Email;Application;
EOF

Add-ons Recommendation

推薦安裝的插件 * Markdown Here, source code * Enigmail

Enigmail的配置過程參見本人Blog Secure Mozilla Thunderbird With Enigmail & GnuPG On GNU/Linux


Tor

安裝Tor服務,實現匿名訪問網路。

安裝參考Tor官方文檔 Installing Tor On Debian/Ubuntu,以下命令針對Debian Jessie

#添加tor官方source list
sudo tee /etc/apt/sources.list.d/tor.list <<-EOF
deb http://deb.torproject.org/torproject.org jessie main
deb-src http://deb.torproject.org/torproject.org jessie main
EOF

#安裝GnuPG Public Key
#886DDD89
#gpg --fingerprint --with-colons 886DDD89 | sed -rn 's@fpr:*(.*):@\1@p'
gpg --keyserver keys.gnupg.net --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89

gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

#安裝tor
sudo apt-get update
sudo apt-get install -y tor deb.torproject.org-keyring

安裝完成後,通過如下命令查看tor服務狀態

systemctl status tor

sudo systemctl start tor
sudo systemctl enable tor

Tor默認監聽9050端口,可通過如下命令查看

sudo ss -tunlp | awk 'match($NF,/tor/){port=gensub(/.*:(.*)/,"\\1"," ",$(NF-2));service=gensub(/users:\(\("([^"]*)",.*/,"\\1"," ",$NF);}END{print port,service}'

Typically Tor listens for SOCKS connections on port 9050. Tor Browser listens on port 9150. – https://www.torproject.org/docs/faq.html.en#TBBSocksPort

Tor日誌文件路徑爲

/var/log/tor/

具體見 How do I set up logging, or see Tor’s logs?

Tor配置文件路徑/etc/tor/,文件列表

/etc/tor/torrc
/etc/tor/torsocks.conf

具體配置可參考以下文檔 * Configure your applications to use Tor * Debian Wiki - Tor configuration

Usage

Tor服務啓動後,默認監聽本機(127.0.0.1)的9050端口,使用SOCKS協議。在需要使用且支持SOCKS協議的應用中配置該端口即可連接Tor網路。

item detail
host 127.0.0.1
port 9050

端口號可在配置文件/etc/tor/torsocks.conf中修改。


Office

Libre Office

Libre Office的官方網址 https://www.libreoffice.org/ ,下載頁鏈接

完整操作過程可參考本人之前Blog CentOS7 RPM安裝LibreOffice 4.3.7.2 (stable)

#移除系統安裝的Libre Office
sudo yum erase -y libreoffice*

#將壓縮包解壓至/tmp目錄下
tar xf ~/Downloads/LibreOffice_5.1.4_Linux_x86-64_rpm.tar.gz -C /tmp
ls /tmp/LibreOffice_5.1.4.2_Linux_x86-64_rpm

#安裝RPMS目錄下的所有rpm包
sudo yum localinstall -y /tmp/LibreOffice_5.1.4.2_Linux_x86-64_rpm/RPMS/*.rpm

References

Bibliography


Change Logs

  • 2016.08.03 11:19 Wed Asia/Shanghai
    • 初稿完成
  • 2016.12.02 09:58 Fri Asia/Shanghai
    • SRWare Iron部分進行更新
  • 2016.12.26 15:21 Mon Asia/Shanghai
    • Google Chrome添加插件、擴展,SRWare Iron的啟動文件由iron變成chrome
  • 2017.01.31 10:52 Tue America/Boston
    • Google ChromeSRWare Iron添加配置文件路徑,爲Mozilla Firefox添加擴展
  • 2017.02.02 17:18 Thu America/Boston
    • 添加GNome Desktop Setting,禁止記錄最近打開文件
  • 2017.02.03 10:53 Fri America/Boston
    • 爲Mozilla Firefox添加插件HTitle用於在GNome中隱藏標題欄
  • 2017.02.03 15:55 Fri America/Boston
    • 添加Tor軟件安裝、配置、使用
  • 2017.02.08 10:15 Wed Asia/Shanghai
    • 添加GNome Recent Files設置
  • 2017.02.16 19:34 Thu Asia/SHanghai
    • 添加GNome CustomCorner 擴展
  • 2017.05.03 14:36 Wed America/Boston
    • Mozilla Firefox添加插件Hide Caption Titlebar Plus,移除HTitle
  • 2017.11.16 11:40 Thu Asia/Shanghai
    • 更新Mozilla Firefox使用插件