【记录】:CentOS清理swap和buffer/cache
swap清理:cache清理:To free pagecache:To free dentries and inodes:To free pagecache,dentries and inodes:
Centos6.5安装python2.7.5+pip
1.下载包 $ wget https://python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2 2.到下载目录,解压 $ tar -xvf Python-2.7.5.tar.xz 3.新建文件夹作为安装路径 $ mkdir /usr/local/python27 4.在解压后的路径下,编译安装 $ cd Python-2.7.5.tar.xz $ ./configure --prefi...
记录在shell脚本中使用sudo echo x > 时,抛Permission denied错误
1.场景在一个非root且带有sudo权限的用户,使用shell脚本(单独手工执行命令不会抛错,是成功的):会抛错点击(此处)折叠或打开#!/bin/bash -x DNS_SERVER=10.xx.xx.xx;echo "Add DNS Server";sudo chattr -i /etc/resolv.conf;...
Linux-Memory小记
以前我对这块认识很模糊,而且还有错误的认识;今天由我同事提醒,所以我决定来好好的缕缕这块的关系。图: -------------------------------------------1.参数含义-----------------------------------------------------------------------Mem:表示物理内存统计 total: 表示系统总物...
Linux tar压缩和解压缩等命令
1.tar-c: 建立压缩档案-x:解压-t:查看内容-r:向压缩归档文件末尾追加文件-u:更新原压缩包中的文件2.这五个是独立的命令,压缩解压都要用到其中一个,可以和别的命令连用但只能用其中一个。下面的参数是根据需要在压缩或解压档案时可选的。-z:有gzip属性的-j:有bz2属性的-Z:有compress属性的-v:显示所有...
CentOS最常用命令及快捷键整理
常用命令:文件和目录:# cd /home 进入 '/home' 目录# cd .. 返回上一级目录# cd ../.. ...
VMware Workstation9 下安装 CentOS6.5( 安装图文教程 )
一、下载CentOSer6.5镜像文件https://pan.baidu.com/s/1pKZEUJD 二、创建新的虚拟机,命名CentOS6.51、在VMware Workstation 9 主页中选择“Create a New Virtual Machine”,创建新的虚拟机。 2、选择“Custom(advanced)“,自定义(高级)配置。 3、默认,下一步 4、选择“I wil...
CentOS6.x使用163和epel yum源的选择
注:操作系统 CentOS 6.X ,CentOS 5.X EPEL,即Extra Packages for Enterprise Linux(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。在这里可以获得 RHEL 的高质量、高性能、高可靠性、免费、方便易用的软件包。 今天...
Centos6.5 python2.6.6 升级到2.7.5
查看python的版本 [plain] view plain copy print? #python -V Python 2.6.6 1.下载Python-2.7.5至/usr/local/[plain] view plain copy print? ...
记录 libldap-2.4.so.2: cannot open shared object file: No such file or directory
1.背景: 卸载openldap相关的所有rpm包后,出现libldap-2.4.so.2: cannot open shared object file: No such file or directory [root@sht-sgmhadoopcm-01 ~]# rpm -qa|grep openldap openldap-2.4.23-32.el6_4.1.x86_64 openldap-devel-2.4.23-32.el6_4.1.x86_64 openldap-clients-2.4.23-32.el6_4.1.x86_64 ope...
记录一次帮网友调试ssh信任关系的过程
1.生成公钥和私钥$ ssh-keygen回车回车默认在 ~/.ssh目录生成两个文件: id_rsa :私钥 id_rsa.pub :公钥 2.导入公钥到认证文件 $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys 3.测试本机无密码登录$ ssh master date回车需要输入密...
linux,No package epel-release available.
[root@sht-sgmhadoopdn-01 ~]# yum install epel-release Loaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfile * epel: ftp.cuhk.edu.hkSetting up Install ProcessResolving Dependencies--> Running transaction check---> Package epel-release.noarch...
yum安装xxx包时出错,提示No package xxx available.
1.查看系统版本[root@hadoopnn-01 yum.repos.d]# lsb_release -aLSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarchDistributor ID: CentOSDescription: CentOS release 6.5 (Final)Release: 6.5Codename...
alternatives命令用法
alternatives是Linux下的一个功能强大的命令。只能在root权限下执行。如系统中有几个命令功能十分类似,却又不能随意删除,那么可以用 alternatives 来指定一个全局的设置。alternatives常用于同一个系统中安装同一软件的多个版本。比如为了开发需要,我需要安装JDK1.4.2,同时还需要JDK1.6.10,我怎么样才能忽略安装路径...
配置多台机器SSH相互通信信任
1.5台机器执行 ssh-keygen[root@sht-sgmhadoopnn-01 ~]# ssh-keygenGenerating public/private rsa key pair.Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'.Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been...