天天看點

雜記 (5) —— 重裝系統後

1. xshell+xmanager

本想安裝win7+ubuntu的雙系統,但是安裝後開機系統引導出現問題,隻能看到一個系統。聽說還需要下載下傳修複軟體處理它,我已經被引導問題搞怕了,上一個硬碟就莫名其妙的壞了,是以這次就安分的把linux放在虛拟機中吧。但是在虛拟機中始終有一些不舒服,于是使用xshell+xmanager的組合方式在主機上進行linux的操作。

xshell使用ssh登陸就不多說了,想要用xmanager展示視窗程式,那麼我們需要對xshell的部分屬性進行設定。檔案——屬性——ssh——隧道——x11轉移——轉發x11連接配接到X DISPALY(D): localhost: 0.0 (有的情況下換成 xmanager)

2. xshell遠端登陸的時間

修改/etc/ssh/sshd_config配置檔案 ClientAliveInterval 120(秒,或者更長的時間),

重載,service sshd reload

3. 構造簡單的ubuntu java環境

sudo apt-get install default-jre

修改配置檔案

裝eclipse: sudo apt-get install eclipse

4. 建構eclipse C/C++的開發環境

eclipse版本: 3.8.1

cdt代理: ​​http://download.eclipse.org/tools/cdt/releases/galileo​​

(也許,你需要:​​http://download.eclipse.org/tools/cdt/releases/helios​​ 版本)

安裝:help – install new software – work with,add – 填寫相關的東西。

選擇:

雜記 (5) —— 重裝系統後
雜記 (5) —— 重裝系統後

5. win7顯示檔案的字尾名

alt – 工具 – 檔案夾選項 – 檢視 – 進階設定 – 隐藏已知檔案類型的拓展名(去掉)

6. ssh登陸自動斷開的解決:

在/etc/ssh/ssh_config的末尾添加設定:

ClientAliveInterval 300

7. ubuntu配置retext:

設定數學公式:

Installing MathJax

1. In Debian-based systems (such as Ubuntu or Mint), all you should do is
sudo apt-get install libjs-mathjax
2. Enabling WebKit mode
Math in ReText will work only when using WebKit renderer. To enable it, use "Edit → Use WebKit renderer"      

添加文法高亮

​sudo apt-get install python-pygments​

​​

在Markdown extensions框裡添加字段:codehilite

ReText的編輯——首選項——Markdown extensions下填寫codehilite,mathjax

8. 移動裝置連接配接linux後的表現:

新連接配接移動裝置的名稱:/dev/sdb

for U盤:

edemon@ubuntu1:/dev$ sudo fdisk -l
.....
Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1  *     2046 41601023 41598978 19.9G  5 Extended
/dev/sda5        2048 41601023 41598976 19.9G 83 Linux
.....      

for 移動硬碟:

edemon@ubuntu1:/dev$ sudo fdisk -l
.....
Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1  *     2046 41601023 41598978 19.9G  5 Extended
/dev/sda5        2048 41601023 41598976 19.9G 83 Linux
.....      

9. 與linux主機名相關的檔案(CentOS)

/etc/sysconfig/network

10. ubuntu上拼音輸入法fcitx的安裝

sudo apt-get install fcitx-libpinyin

11. vmvare tools for CentOS

12 qt、qt-creator在CentOS上的安裝

​wget http://mirrors.hustunique.com/qt/official_releases/qtcreator/3.1/3.1.2/qt-creator-opensource-linux-x86-3.1.2.run​

​​

賦予其可執行屬性,然後執行它即可。

$ pwd
/home/edemon/Qt5.1.1/Tools/QtCreator/bin
$ ./qtcreator
Failed to load core: /home/edemon/Qt5.1.1/Tools/QtCreator/lib/qtcreator/plugins/QtProject/libCore.so: Cannot load library 
/home/edemon/Qt5.1.1/Tools/QtCreator/lib/qtcreator/plugins/QtProject/libCore.so: (/usr/lib/libstdc++.so.6: version
 `GLIBCXX_3.4.15' not found (required by
 /home/edemon/Qt5.1.1/Tools/QtCreator/lib/qtcreator/plugins/QtProject/../.././libQt5CLucene.so.5))      

gcc的安裝目錄:

$ which gcc
/usr/bin/gcc      

​strings /usr/bin/gcc/libstdc++so.6 | grep GLIBC​

​​

沒有??

檢視gcc版本:

$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR      

更新gcc: ​​

​​

​wget http://gcc.skazkaforyou.com/releases/gcc-4.9.1/gcc-4.9.1.tar.gz​

​./contrib/download_prerequisites​

​​

下載下傳安裝依賴庫

./configure
make 
make      

需要注意的是:​

​../configure --prefix=/usr/local/gcc-4.7 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.0 --with-mpc=/usr/local/mpc-0.9​

​​

應修改為:​​

​../configure --prefix=/usr/local/GCC-4.9 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.0 --with-mpc=/usr/local/mpc-0.9​

​​

然後才有後面的​​

​vim /etc/profile​

​​

添加​​

​PATH=/usr/local/GCC-4.9/bin:$PATH​

接下來,檢視gcc的安裝目錄

# which gcc
/usr/local/GCC-4.9/bin/gcc      

在lib中找到檔案libstdc++.so.6

# ls /usr/local/GCC-4.9/lib |grep libstdc++.so.
libstdc++.so.6
libstdc++.so.6.0.20
libstdc++.so.6.0.20-gdb.py      
# cd /usr/local/GCC-4.9/lib
strings libstdc++.so.6 |grep GLIBC      

繼續閱讀