杂记 (5) —— 重装系统后

13 篇文章 0 订阅

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
修改配置文件,参照 http://blog.csdn.net/thearcticocean/article/details/51615466
装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. 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" menu.

添加语法高亮

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
.....
Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdb1  *    1347328 15633407 14286080  6.8G  c W95 FAT32 (LBA)

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
.....
Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1  *      256 976707583 976707328 465.7G  c W95 FAT32 (LBA)

9. 与linux主机名相关的文件(CentOS)

/etc/sysconfig/network

10. ubuntu上拼音输入法fcitx的安装

sudo apt-get install fcitx-libpinyin

11. vmvare tools for CentOS

和 ubuntu的过程类似 http://blog.csdn.net/thearcticocean/article/details/50558304

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 A PARTICULAR PURPOSE.

升级gcc:
做法参照:http://blog.csdn.net/qingfeng_happy7/article/details/49940675
wget http://gcc.skazkaforyou.com/releases/gcc-4.9.1/gcc-4.9.1.tar.gz

./contrib/download_prerequisites
下载安装依赖库

./configure
make 
make install

需要注意的是:../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

发现有GLIBCXX_3.4.15存在。

然后将其复制到/usr/lib中
启动运行简单的UI程序。
/home/edemon/Qt5.1.1/Tools/QtCreator/bin/qtcreator
如果出现 cannot find -lGL
yum install libGL libGL-devel

参照, 相关博文:
http://blog.csdn.net/qingfeng_happy7/article/details/49940675
http://www.cnblogs.com/weinyzhou/p/4983306.html
http://blog.csdn.net/u010340823/article/details/36389017
http://blog.csdn.net/u010340823/article/details/36223583

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值