
Ubuntu
文章平均质量分 84
hikelee
这个作者很懒,什么都没留下…
展开
-
ubuntu下查看当前网络流量工具
sudo apt-get install nethogssudo nethogs eth0sudo apt-get install ifstatifstatsudo apt-get install iftopsudo iftop -i eth0sudo apt-get install slurmslurm -i e原创 2013-12-18 11:19:30 · 499 阅读 · 0 评论 -
查看文件占用情况并杀掉对应进程
$ sudo fuser /var/cache/debconf/config.dat/var/cache/debconf/config.dat: 15211$ ps aux | grep 15211root 15211 0.0 0.3 63464 12272 pts/2 S+ 22:55 0:00 /usr/bin/perl -w /usr/share/de原创 2014-02-09 15:18:33 · 360 阅读 · 0 评论 -
ubuntu server 安装gui
安装桌面:sudo apt-get install ubuntu-desktop取消GUI自动启动:update-rc.d-fgdm remove恢复GUI自动启动:update-rc.dgdm defaults原创 2014-02-11 17:16:35 · 496 阅读 · 0 评论 -
添加全局环境变量
1. sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup2. sudo vim /etc/bash.bashrcexport ANDROID_HOME=/usr/local/android/sdkexport PATH=/usr/local/apktool:$PATHexport PATH=/usr/local/android/sdk/to原创 2014-02-13 17:34:46 · 526 阅读 · 0 评论 -
Ubuntu管理开机启动的服务
1.rcconfsudo apt-get install rcconfsudo ln -s /bin/whiptail /usr/bin/whiptailsudo rcconf2.sysv-rc-conf sudo apt-get install sysv-rc-confsudo sysv-rc-conf原创 2014-02-15 14:58:38 · 690 阅读 · 0 评论 -
Linux下查看两台机器之间速度
1:A,B之间安装ipref1)sudo apt-get install iperf2.A上面运行 1) sudo ufw allow 5001/tcp2) iperf -s 3.B运行:1)iperf -c 192.168.168.238 -t 60原创 2014-02-15 16:37:39 · 3705 阅读 · 0 评论 -
安装webmin
Using the Webmin APT repositoryIf you like to install and update Webmin via APT, edit the /etc/apt/sources.list file on your system and add the lines :deb http://download.webmin.com/download/rep转载 2014-02-15 22:39:16 · 293 阅读 · 0 评论 -
ubuntu 12.04 搭建nginx + php + mysql +phpmyadmin
直接php+mysql这是Linux web服务器的黄金组合。今天我们一来学如何在ubuntu 12.04 中搭建lnmp环境。1. 使用官方PPA安装 Nginx 最新版本,使用以下命令:sudo add-apt-repository ppa:nginx/stablesudo apt-get updatesudo apt-get install nginxNginx相关控转载 2014-02-17 10:20:21 · 352 阅读 · 0 评论 -
Ubuntu下配置FTP服务器
sudo apt-get install pure-ftpdsudo ufw allow 21/tcpsudo groupadd ftpgroupsudo useradd -g ftpgroup -d /dev/null -s /etc ftpusersudo pure-pw useradd user1 -u ftpuser -d /workspace/ -msudo ln -s /et原创 2014-03-07 11:21:00 · 441 阅读 · 0 评论 -
用ngxtop监视 NGINX
1. sudo pip install ngxtop2. ngxtop原创 2014-03-31 23:11:42 · 426 阅读 · 0 评论 -
Ubuntu 配制DNS
sudo vi /etc/resolvconf/resolv.conf.d/basesudo vi /etc/resolv.conf原创 2013-12-18 11:21:08 · 296 阅读 · 0 评论 -
Linux 系统实时监控 Glances
如何安装$ sudo apt-add-repository ppa:arnaud-hartmann/glances-stable$ sudo apt-get update$ sudo apt-get install glances如何使用# glancesGlances 中颜色的含义Glances 会用一下几种颜色来代表状态:绿色:OK(一切正常)蓝色:CAREFUL(需要注意)紫色:转载 2014-04-02 22:18:35 · 367 阅读 · 0 评论 -
ubuntu change ip address
sudo vim /etc/network/interfacessudo /etc/init.d/networking restart原创 2014-04-02 22:44:40 · 565 阅读 · 0 评论 -
install go
tar -C /usr/local -xzf go1.2.1.linux-amd64.tar.gzexport PATH=$PATH:/usr/local/go/bingo get github.com/astaxie/beegogo get github.com/beego/beego get github.com/coopernurse/gorp原创 2014-04-02 18:38:36 · 501 阅读 · 0 评论 -
解决文件数打开过多问题
vi /etc/security/limits.conf添加:* soft nofile 65535* hard nofile 65535原创 2014-04-05 13:36:32 · 645 阅读 · 0 评论 -
Install Java7 on Ubuntu, apt-get way
sudo add-apt-repository ppa:webupd8team/javasudo apt-get updatesudo apt-get install oracle-java7-installerIt'll keep your java 7 installation up to date.To automatically set up the Jav转载 2014-02-09 10:43:23 · 428 阅读 · 0 评论 -
用dex分析mongodb
1.sudo apt-get install python-pip2.sudo pip install dex 3.dex -f /var/log/mongodb/mongodb.log mongodb://localhost/plugin原创 2014-02-20 19:47:04 · 545 阅读 · 0 评论 -
64位Ubuntu 11.04编译运行Android 2.3其他错误解决
sudo apt-get install ia32-libssudo apt-get install lib32ncurses5 lib32stdc++6原创 2013-12-19 17:04:08 · 272 阅读 · 0 评论 -
ubuntu查看网络流量
1. iftopsudo apt-get install iftopsudo iftop -i eth02. slurmsudo apt-get install slurmslurm -i eth03. vnstatsudo apt-get install vnstatsudo chmod o+x /usr/bin/vnstat原创 2013-12-18 13:49:37 · 861 阅读 · 0 评论 -
Auto mount
sudo vim /etc/fstabc /mnt/c vboxsf defaults 0 0 d /mnt/d vboxsf defaults 0 0 e /mnt/e vboxsf defaults 0 0 r /mnt/r vboxsf defaults 0 0原创 2013-12-18 14:00:03 · 454 阅读 · 0 评论 -
tmux
tmux是一个优秀的终端复用软件,类似GNU Screen,但来自于OpenBSD,采用BSD授权。使用它最直观的好处就是,通过一个终端登录远程主机并运行tmux后,在其中可以开启多个控制台而无需再“浪费”多余的终端来连接这台远程主机;当然其功能远不止于此。安装 可以使用Ports安装tmux,位置在/usr/ports/sysutils/tmux/;tmux仅有一个依赖包libevent转载 2013-12-18 14:00:39 · 320 阅读 · 0 评论 -
apache的流量控制模块bw_mod进行带宽控制
sudo apt-get install libapache2-mod-bwsudo a2enmod bwopen /etc/apache2/apache2.conf:BandWidthModule OnLargeFileLimit .apk 30 23000原创 2013-12-17 22:55:12 · 451 阅读 · 0 评论 -
Ubuntu下配置Apache HTTPS
一、创建证书 证书(Cerificate)的基本作用是将一个公钥和安全个体(个人、公司、组织等)的名字绑定在一起。 一般情况下,制作证书要经过几个步骤,如上图所示。首先用openssl genrsa生成一个私钥,然后用openssl req生成一个签署请求,最后把请求交给CA,CA签署后就成为该CA认证的证书了。如果在第二步请求时加上-x509参数,那么就直接生成一个self-转载 2013-12-17 22:58:47 · 361 阅读 · 0 评论 -
恶意IP
netstat -atun | awk '{print $5}' | cut -d: -f1 | sed -e '/^$/d' |sort | uniq -c | sort -n原创 2013-12-17 22:59:29 · 508 阅读 · 0 评论 -
Ubuntu下修改主机名
1./etc/hosts2./etc/hostname原创 2013-12-18 11:10:20 · 273 阅读 · 0 评论 -
Installing Security Tools
Installing Security ToolsThe Ubuntu repositories contain several useful tools for maintaining a secure network and network administration. This page attempts to list the most popular and useful of转载 2013-12-18 11:20:17 · 303 阅读 · 0 评论 -
find the bad IP and filter
netstat -atun | awk '{print $5}' | cut -d: -f1 | sed -e '/^$/d' |sort | uniq -c | sort -nsudo iptables -t filter -A INPUT -s 211.138.125.212 -i eth0 -j DROPsudo iptables -t filter -A INPUT原创 2013-12-18 11:23:01 · 324 阅读 · 0 评论 -
ubuntu下简单安装maven3
sudo apt-get install python-software-propertiessudo add-apt-repository ppa:natecarlson/maven3sudo apt-get update && sudo apt-get install maven3sudo ln -s /usr/bin/mvn3 /usr/bin/mvn原创 2013-12-18 11:19:01 · 280 阅读 · 0 评论 -
Ubuntu Nginx 配置
安装nginxsudo apt-get install nginxUbuntu安装之后的文件结构大致为:所有的配置文件都在/etc/nginx下,并且每个虚拟主机已经安排在了/etc/nginx/sites-available下程序文件在/usr/sbin/nginx日志放在了/var/log/nginx中并已经在/etc/init.d/下创建了启动脚本nginx默认的虚拟主机的目转载 2013-12-19 10:08:22 · 469 阅读 · 0 评论 -
修改Ubuntu时区
方法1: 使用vim打开timezone直接修改成"Asia/Shanghai"。vim /etc/timezone方法2: 使用以下命令打开交互式界面来更改系统时区。sudo dpkg-reconfigure tzdata原创 2013-12-19 12:10:11 · 360 阅读 · 0 评论 -
Ubuntu, LVS+keepalived+Nginx
LVS Server : 192.168.0.201Virtual IP : 192.168.0.220Real Server1 : 192.168.0.202Real Server2 : 192.168.0.203Real Server1(192.168.0.202) & Real Server2(192.168.0.203), do following same setti原创 2013-12-19 16:34:26 · 514 阅读 · 0 评论 -
Ubuntu如何启动进入命令行模式
1: sudo gedit /etc/default/grub2: 找到 GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”3: 改为 GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash text”3: 运行 sudo update-grub重启原创 2013-12-19 16:56:36 · 1751 阅读 · 0 评论 -
Increase “Open Files Limit”
If you are getting error “Too many open files (24)” then your application/command/script is hitting max open file limit allowed by linux. You need to increase open file limit as below:Increase lim转载 2014-04-05 18:13:55 · 575 阅读 · 0 评论