波神

导航

2016年11月19日 #

redhat 6用yum方式安装nginx

摘要: 前提条件:如果发生了没有注册redhat账号造成没有权限使用yum的情况下,可以参考:http://www.cnblogs.com/boshen-hzb/p/6080431.html 1、cd /etc/yum.repos.d/ 在里面新建文件nginx.repo 注意,上面的baseurl要检测是 阅读全文

posted @ 2016-11-19 14:45 波神 阅读(428) 评论(0) 推荐(0) 编辑

解决yum安装时 Cannot retrieve repository metadata (repomd.xml) for repository

摘要: 打开/etc/yum.repos.d/CentOS6-Base-163.repo 将下面的baseUrl的地址换成网上最新 # CentOS-Base.repo## The mirror system uses the connecting IP address of the client and 阅读全文

posted @ 2016-11-19 14:26 波神 阅读(1452) 评论(0) 推荐(0) 编辑

RHEL6解决无法使用YUM源问题(转)

摘要: RHEL的YUM源需要注册用户才能更新使用,由于CentOS和RHEL基本没有区别,并且CentOS已经被REHL收购。所以将RHEL的YUM源替换为CentOS即可。问题如下:[root@bogon ~]# yum repolistLoaded plugins: product-id, refre 阅读全文

posted @ 2016-11-19 13:56 波神 阅读(466) 评论(0) 推荐(0) 编辑

在centos7.1上安装systemd

摘要: 1.检查本地systemd的版本 [admin@localhost ~]$ systemctl --version systemd 208 +PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ 2.获 阅读全文

posted @ 2016-11-19 12:54 波神 阅读(3570) 评论(0) 推荐(0) 编辑

Shell 中expr的使用

摘要: 1.expr命令一般用于整数值,其一般格式为:expr argument operator argument一般的用法是使用expr做算术运算,如:[root@centos ~]# expr 10 + 2030$expr 30 / 3 / 25(注意运算符左右都有空格 ,如果没有空格表示是字符串连接 阅读全文

posted @ 2016-11-19 11:07 波神 阅读(889) 评论(1) 推荐(0) 编辑

Shell获取当前路径

摘要: PRG="$0" while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG= 阅读全文

posted @ 2016-11-19 11:06 波神 阅读(6166) 评论(0) 推荐(0) 编辑