Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2437749
  • 博文数量: 293
  • 博客积分: 2660
  • 博客等级: 少校
  • 技术积分: 3632
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-03 17:50
文章分类

全部博文(293)

文章存档

2015年(13)

2014年(58)

2013年(73)

2012年(25)

2011年(30)

2010年(86)

2009年(8)

分类: LINUX

2013-12-08 10:49:40

1.Ubuntu 变成了只读文件系统
    fsck /
    reboot
    http://blog.163.com/qimeizhen8808@126/blog/static/165119518201281892121501
3.etc/profile和/etc/environment的比较
   /etc/environment是设置整个系统的环境,而/etc/profile是设置所有用户的环境,前者与登录用户无关,后者与登录用户有关。
   http://andy136566.iteye.com/blog/1025338
4.在/etc/rc.local里添加
  方法:
  route add -net 192.168.3.0/24 dev eth0
  route add -net 192.168.2.0/24 gw 192.168.2.254
  http://blog.csdn.net/yangdaliang/article/details/5657000
5.Ubuntu进入文本模式后启动停在Checking battery state
  1.ALT+F1
  2.将/etc/default/grub改回原始状态,然后执行update-grub命令
  6.Ubuntu 12.04 xrdp 一片空白
  
%E4%B8%80%E7%89%87%E7%A9%BA%E7%99%BD/
   Step1. 開啟 startwm.sh
   sudo vim /etc/xrdp/startwm.sh 
   Step2. 在 . /etc/X11/Xsession 一行前插入一行如下
   echo "gnome-session --session=ubuntu-2d" > .xsession
   or
   echo "gnome-session --session=gnome-classic" > .xsession
   Step3. 重新啟動 xrdp
   sudo service xrdp restart
   如果要使用xrdp,需要把用户加入到adm群组中:adduser username adm
   将用户从群组中移除:gpasswd -d  testUser1 testGroup2 
   http://www.cnblogs.com/eastson/archive/2012/08/24/2654163.html
8.apt-get出现E:Encountered a section with no Package: header……的解决方法
   http://blog.chinaunix.net/uid-26853826-id-3190753.html
   重启电脑安ESC键或者F2键进入GRUB引导模式如下图所示,选择第二行的recovery mode。
   按e进入recovery mode 编译kernel进行启动参数

   在linux /boot/vmlinuz...这一行后面添加 quiet splash rw init=/bin/bash。然后ctrl + x 就可以直接运行。
   运行后系统直接进入root mode,此时运行passwd命令更改密码。
10.xmanager
11.md5sum
    md5sum file > file.md5
    md5sum -c file.md5
    http://blog.chinaunix.net/uid-7450016-id-2625909.html
12.ssh远程创建带空格的文件夹,scp也是如此
  ssh username@192.168.*.* mkdir "/test/soft/123/Microsoft\\ SQL\\ Server" 
 1、需要用括号(是双引号)把路径扩起来。
  2、需要在空格前加两个\
 http://blog.sina.com.cn/s/blog_71906a600100unly.html
  /> 13.crontab 指定执行用户
crontab -e -u 用户名

su 用户名
crontab -e
直接在/etc/crontab文件中添加,不过需要是root身份。
/> 14.grep不查找隐藏文件夹的方法 
grep --exclude-dir=".svn"
15.
使用public/private key让putty(ssh)自动登录

17.nfs相关配置

    服务器端:apt-get install   nfs-common nfs-kernel-server portmap

   编辑/etc/exports: /storage/pic 192.168.1.1(rw,sync,no_root_squash) 192.168.1.2(rw,sync,no_root_squash)

   service nfs-kernel-server restart

    service portmap restart

   客户端:apt-get install   nfs-common

   showmount -e 192.168.1.3

   mount -t nfs 192.168.1.3:/storage/pic  /mnt

  http://general.blog.51cto.com/927298/354523/

18.端口转发工具rinetd

配置,端口转发的配置在 /etc/rinetd.conf

配置规则

0.0.0.0 8080 172.19.94.3 8080
0.0.0.0 2222 192.168.0.103 3389
1.2.3.4 80     192.168.0.10 80

说明一下(0.0.0.0表示本机绑定所有可用地址)
将所有发往本机8080端口的请求转发到172.19.94.3的8080端口
将所有发往本机2222端口的请求转发到192.168.0.103的3389端口
将所有发往1.2.3.4的80端口请求转发到192.168.0.10的80端口

http://www.cnblogs.com/Bonker/p/4274349.html

阅读(945) | 评论(0) | 转发(0) |
0

上一篇:heartbeat学习_2

下一篇:彻底搞定C语言指针

给主人留下些什么吧!~~