分类 Linux 中的文章

Shell-常见使用

脚本状态检测 潜在风险:编辑脚本也会被当作是程序运行中 pid文件+进程状态规避 问题:crontab下无法使用 shell_name=`basename $0` # 基于"脚本&……

阅读全文

Linux-rsync基础配置

配置文件 cat > /etc/rsyncd.conf << 'EOF' ###################################### # 全局默认配置文件(可以在模块中覆盖) uid=root gid=root use chroot=no max connections=6000 read only=no list=no ignore errors=yes strict modes =yes log file=/var/log/rsyncd.log pid file=/var/run/rsyncd.pid lock file=/var/run/rsyncd.lock # 账号密码保存位置 secrets file=/etc/rsyncd.secrets # 默认全部拒……

阅读全文

Linux-samba安装

测试环境:Centos6.x 安装 yum -y install python-devel gnutls-devel libacl-devel pam-devel openldap-devel # 默认路径就是:/usr/local/samba ./configure make && make install mkdir -pv /var/log/samba mkdir -pv /usr/local/samba/etc/user mkdir -pv /data/smb 配置 cat >……

阅读全文

Centos-6源

Base源 cat > /etc/yum.repos.d/CentOS-Base.repo << 'EOF' # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the……

阅读全文