标签:Linux

  • Tengine 配置优化小结

    18-03-22 12:03 22743 0 技术

    Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。Tengine的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的Web平台。

    从2011年12月开始,Tengine成为一个开源项目,Tengine团队在积极地开发和维护着它。Tengine团队的核心成员来自于淘宝、搜狗等互联网企业。Tengine是社区合作的成果,我们欢迎大家参与其中,贡献自己的力量。

  • CentOS 安装 PHP7

    16-11-24 18:23 30105 1 技术
    yum --enablerepo=remi-php70 install php-opcache php-mbstring php-mysql php-gd php-xml php-json php-devel php-pear ImageMagick-devel
    
  • 在 RedHat 或 CentOS 安装 Sphinx 安装包

    16-06-24 16:02 22985 0 未分类
  • Linux 命令行输入的命令的操作技巧

    14-08-03 15:26 23642 0 技术
    ctrl + r //可以在历史的命令中搜索
    ctrl + a //光标移到命令行的开始位置
    ctrl + e //光标移到命令行的结束位置
    
    ctrl + f //光标向前移动
    ctrl + b //光标向后移动
    
    ctrl + u //清除当前命令行
    ctrl + c //直接转到下一行
    
  • CentOS 报错:yum-config-manager: 未找到命令

    14-07-15 20:01 26501 0 技术

    这是因为系统默认没有安装这个命令,这个命令在 yum-utils 包里,可以通过命令 yum -y install yum-utils 安装就可以了。

  • Linux 的 chattr 与 lsattr 命令详解

    13-11-24 15:26 22526 0 技术

    chattr命令的用法:chattr [ -RVf ] [ -v version ] [ mode ] files… 最关键的是在[mode]部分,[mode]部分是由+-=和[ASacDdIijsTtu]这些字符组合的,这部分是用来控制文件的 属性。

    + :在原有参数设定基础上,追加参数。
    - :在原有参数设定基础上,移除参数。
    = :更新为指定参数设定。
    A:文件或目录的 atime (access time)不可被修改(modified), 可以有效预防例如手提电脑磁盘I/O错误的发生。
    S:硬盘I/O同步选项,功能类似sync。
    a:即append,设定该参数后,只能向文件中添加数据,而不能删除,多用于服务器日志文件安全,只有root才能设定这个属性。
    c:即compresse,设定文件是否经压缩后再存储。读取时需要经过自动解压操作。
    d:即no dump,设定文件不能成为dump程序的备份目标。
    i:设定文件不能被删除、改名、设定链接关系,同时不能写入或新增内容。i参数对于文件 系统的安全设置有很大帮助。
    j:即journal,设定此参数使得当通过mount参数:data=ordered 或者 data=writeback 挂 载的文件系统,文件在写入时会先被记录(在journal中)。如果filesystem被设定参数为 data=journal,则该参数自动失效。
    s:保密性地删除文件或目录,即硬盘空间被全部收回。
    u:与s相反,当设定为u时,数据内容其实还存在磁盘中,可以用于undeletion。
    

    各参数选项中常用到的是a和i。a选项强制只可添加不可删除,多用于日志系统的安全设定。而i是更为严格的安全设定,只有superuser (root) 或具有CAP_LINUX_IMMUTABLE处理能力(标识)的进程能够施加该选项。

  • Linux 中命令执行控制 && 与 || 的区别

    13-09-14 10:25 22661 0 技术

    1、&& 方式:command1 && command2 如果command1执行成功,则执行command2

    2、|| 方式:command1 || command2 如果command1执行失败,则执行command2

  • Linux 中 grep 命令实现“或”条件

    11-02-12 12:34 23306 0 技术

    \| 符号法

    # grep 'cui\|liang'
    

    使用多个 -e 参数

    # grep -e cui -e liang
    

    使用扩展 -E

    # grep -E "cui|liang"
    
  • CentOS 中 yum update 与 yum upgrade 的区别

    10-12-23 12:31 23391 0 技术

    在 CentOS 系统中,yum upgradeyum update 都会将系统包更新到最新版本。

    通过 man yum 查询到的帮助信息如下:

    update

    If  run  without any packages, update will update every currently installed package.  If one or more packages or package globs are specified, Yum will only update the listed packages.  While updating packages, yum will ensure
    that all dependencies are satisfied. (See Specifying package names for more information) If the packages or globs specified match to packages which are not currently installed then update will not install them.  update  oper-
    ates on groups, files, provides and filelists just like the "install" command.
    
    If the main obsoletes configure option is true (default) or the --obsoletes flag is present yum will include package obsoletes in its calculations - this makes it better for distro-version changes, for example: upgrading from
    somelinux 8.0 to somelinux 9.
    
    Note that "update" works on installed packages first, and only if there are no matches does it look for available packages. The difference is most noticeable when you do "update foo-1-2" which will act exactly as "update foo"
    if foo-1-2 is installed. You can use the "update-to" if you’d prefer that nothing happen in the above case.
    

    upgrade

    Is the same as the update command with the --obsoletes flag set. See update for more details.
    

    唯一不同是:yum upgrade 会删除旧版本的 package,而 yum update 则会保留。注意!如果你的某些软件依赖旧版本的 package,请使用 yum update

文章归档

文章日历

2024 年 04 月
29 01 02 03 04 05 06
07 08 09 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
29 30 01 02 03 04 05

文章标签

最新评论

友情链接