随笔分类 - ubuntu
摘要:问题:网络不能ping通,dmesg显示很多[6127619.851454] r8169 0000:02:00.0: eth0: link up[6127758.849559] r8169 0000:02:00.0: eth0: link up[6133605.103557] r8169 0000:...
阅读全文
摘要:http://blog.csdn.net/dbigbear/article/details/4398961好吧,其实博主也是转载的。update-alternatives --display | --config editor链接路径/etc/alternativesLinux 发展到今天,可用的软件已经非常多了。这样自然会有一些软件的功能大致上相同。例如,同样是编辑器,就有 nvi、vim、emacs、nano,而且我说的这些还只是一部分。大多数情况下,这样的功能相似的软件都是同时安装在系统里的,可以用它们的名称来执行。例如,要执行 vim,只要在终端下输入 vim 并按回车就可以了。不过,
阅读全文
摘要:ctrl+shift 鼠标变成正十字。按住右键就可以随意截图了。设置方法:打开系统设置面板system settings --> keyboard --> shortcuts --> screenshots --> take a screen of an area
阅读全文
摘要:app ALL = (ALL:ALL) ALLeric.zhan ALL = (app : app) ALLDefaults:eric.zhan runas_default=app如果在/etc/sudoers中添加这么一段,原本的想法是将eric.zhan可以提权到app用户,但存在隐患eric.zhan$ sudo bashpasswd --------app$ sudo bashpasswd --------root#note1:如果想在sudo的时候不输入密码,这么设定eric.zhan ALL = (app:app) NOPASSWD: ALL如果想只给使用部分命令的权限,且不...
阅读全文
摘要:基本概念可以了解http://www.mike.org.cn/articles/understand-upstart/http://blog.fens.me/linux-upstart/http://zh.wikipedia.org/wiki/Upstart传统的linux采用sysvinit daemon,缺点是无法很好地处理现代硬件,如热插拔设备、USB硬盘或山村、网络文件系统等。Upstart是一个基于事件的初始化守护进程,用于替代传统的init。 — 几个类Unix计算机操作系统启动时用于执行任务的方法。它是由Canonical公司前雇员Scott James Remnant所写。Up
阅读全文
摘要:ffmpeg -i InputFile -vn -acodec copy -ss 00:00:00 -t 00:01:32 OutPutFile
阅读全文
摘要:https://github.com/lwfinger/rtl8188eu驱动下载地址安装:make allmake install参考一下把http://devillived.net/forum/home.php?mod=space&uid=2&do=blog&id=214
阅读全文
摘要:下午分析了一下mysql的启动脚本,找到这篇,记录一下,目前很多服务都是以这种方式封装,后面自己写来借鉴一下http://blog.fens.me/linux-upstart/
阅读全文
摘要:服务器是ubuntu12.04用一个账户app,使用su - app得到的环境变量和直接ssh登录的环境变量不同。导致su - app,无法执行ifconfigsu - app的环境变量/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/gamesssh直接登录的环境变量:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games不同地方已经标出。问题出现在su执行的过程中,应该使用了/etc/login.defs文件,经过验证。ENV_SUPATH PATH=
阅读全文
摘要:http://note.drx.tw/2008/01/linuxsudo.htmlfoobar ALL=(ALL) ALL現在讓我們來看一下那三個 ALL 到底是什麼意思。第一個 ALL 是指網路中的主機,我們後面把它改成了主機名,它指明 foobar 可以在此主機上執行後面 的命令。第二個括弧裏的 ALL 是指目標用戶也就是以誰的身份去執行命令。最後一個 ALL 當然就是指命令名了。例如,我們想讓 foobar 用戶在 Linux 主機上以 jimmy 或 rene 的身份執行 kill 命令,這樣編寫配置文件:任务:添加一个用户,使其只能sudo到app用户下:1.useradd -m -
阅读全文
摘要:位置/etc/logrotate.d/rsyslog相关配置信息察看man logrotatesize k/M/G/var/log/syslog{ rotate 7 daily missingok notifempty delaycompress compress size 100M postrotate reload rsyslog >/dev/null 2>&1 || true endscript}/var/log/mail.info/var/log/mail.warn/var/log/mail.err/var/log/m...
阅读全文
摘要:ubuntu12.04内核为linux-image-3.5.0-23-generic要升级为linux-image-3.2.0-57-generic使用apt-get install linux-headers-3.2.0-57-generic按理说直接安装上之后重启后直接可以使用但是重启后内核版本一直没有变化后来进行update-grub,问题依旧然后查看grub.conf文件才发现问题menuentry 'Ubuntu, with Linux 3.5.0-39-generic' --class ubuntu --class gnu-linux --class gnu --c
阅读全文
摘要:1.使用dd拷贝系统,启动后找不到eth0使用lshw -class network查看,发现网卡的逻辑名称是eth1再去查看/etc/udev/rules.d/70-persistent-net.rules发现eth0绑定的是上一台服务器的地址需要将其修改为当前网卡的mac地址2.配置ubuntu的DNS,静态地址格式:auto eth0 iface eth0 inet static address 10.112.18.106 network 10.112.18.0 netmask 255.255.255.0 broadcast 10.112.18.255 gateway...
阅读全文
摘要:http://bbs.chinaunix.net/thread-2126589-2-1.html 希望他说的是对的ubuntu 发布的linux里面有一个非常具有迷惑性的版本-desktop。因为有一套server,所以desktop很容易从字面上被理解成桌面版。而这样理解的人通常会弄不明白剩下那个alternate是什么东西。其实desktop是Live CD的名字,也就是刻录在光盘上运行的Linux。是一套已经装好的系统。把它烧录到光盘上放进光驱就可以直接运行这套完整的linux。当然你也可以在运行之后把它“安装”到硬盘上,而这样的安装更像是一种拷贝或者还原,类似ghost。真正意义上正统
阅读全文
摘要:今天查看之前配置的tomcat发现catalina.out文件已经增大到接近5G,过不了多久就会将所在分区撑爆。搜集了一下,大部分都使用cronolog切割catalina.out文件。按照这个方式设置了一下安装cronolog软件wget http://cronolog.org/download/cronolog-1.6.2.tar.gztar zxvf cronolog-1.6.2.tar.gzcd cronolog-1.6.2./configure --prefix=/path/to/cronologmake && make install修改catalina.sh文件1
阅读全文
摘要:1.制作usb boot盘,在ubuntu上使用startup disk creater将ubuntu-server12.04.iso写入到usb中;2.修改syslinux文件夹中的syslinux.cfg文件,例如:prompt 1timeout 5default auto1label auto1kernel /install/vmlinuzappend initrd=/install/initrd.gz preseed/file=/preseed/preseed.cfg auto=true3.在preseed/目录下添加preseed文件4.安装virtualbox,创建虚拟机使系统从u
阅读全文
摘要:很久之前做ubuntu的PXE配置ubuntu的preseed费了很大的力气,总结的不多,现在温习一下。就我所接触的,有分区普通磁盘,LVM,和raid三种方式。其中前两中方式比较多,raid方式是建立软raid,如果有硬件raid,不许要这个。先看我配置成功的例子:# Partitioning d-i partman-auto/method string regulard-i partman-lvm/device_remove_lvm boolean trued-i partman-md/device_remove_md boolean trued-i partman-lvm/confirm
阅读全文
摘要:这个问题曾经困扰我很久,在了解了MBR之后,我曾认为第一块分区之前为一个block。但是用fdisk查看是2048,一直不了解其中的缘由,今天查了一下资料,大概了解了,其中的细节留着慢慢去了解。最直接的回答:With the death of the legacy BIOS (ok, its not quite dead yet) and its replacement with EFI BIOS, a special boot partitionis needed to allow EFIsystems to boot in EFI mode.Starting the first parti
阅读全文
摘要:ubuntu没有图形界面,插入无线网卡后启动不能连接无线。看这个帖子http://askubuntu.com/questions/138472/how-do-i-connect-to-a-wpa-wifi-network-using-the-command-lineiw(list/config) can only handle WEP.You needwpa-supplicantfor this.sudo apt-get install wpasupplicantIn/etc/wpa_supplicant.confyou put your ssid and password.gksu gedi
阅读全文
摘要:root@cacti:~/box# cat convert.py#!/usr/bin/env pythonimport sqlite3,time,rrdtool,osdef boxstatus(): ''' check the status of the box, and set it to 1 if it is online, set it to 0 if it is offline ''' if "status.db": os.system('rm status.db') dcon = sqlite3.co
阅读全文

浙公网安备 33010602011771号