不灭的焱

革命尚未成功,同志仍须努力下载JDK17

作者:Albert.Wen  添加时间:2019-05-10 15:09:09  修改时间:2024-04-23 18:55:49  分类:Linux基础  编辑

在服务器站点执行 git pull 时,报错:

Your local changes to the following files would be overwritten by merge
error: Your local changes to the following files would be overwritten by merge:

protected/config/main.php
Please, commit your changes or stash them before you can merge.
作者:Albert.Wen  添加时间:2015-09-21 11:47:22  修改时间:2024-05-02 06:57:30  分类:Linux基础  编辑

Linux下显示系统进程的命令ps,最常用的有ps -efps aux。这两个到底有什么区别呢?两者没太大差别,讨论这个问题,要追溯到Unix系统中的两种风格,System V风格和BSD 风格,ps aux最初用到Unix Style中,而ps -ef被用在System V Style中,两者输出略有不同。现在的大部分Linux系统都是可以同时使用这两种方式的。

作者:Albert.Wen  添加时间:2014-04-01 08:47:00  修改时间:2024-04-28 23:31:18  分类:Linux基础  编辑

问)在当前脚本文件中调用另外一个脚本文件?

方法一: 使用 source

方法二: 使用 .

 

作者:Albert.Wen  添加时间:2015-05-29 11:38:28  修改时间:2024-04-28 23:31:21  分类:Linux基础  编辑

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 

作者:Albert.Wen  添加时间:2015-05-20 23:03:48  修改时间:2024-05-01 05:20:29  分类:Linux基础  编辑

由于硬件的原因,机器或多或少的跟标准时间对不上,一个月的误差几秒到几分钟不等。对于服务器来说时间不准,会有很多麻烦。例如,支付的时候,无法下单,游戏无法登录等。

方法一:用 ntpdate从时间服务器更新时间

yum -y install ntp
ntpdate time.nist.gov
作者:Albert.Wen  添加时间:2018-02-19 11:02:00  修改时间:2024-04-24 14:18:36  分类:Linux基础  编辑

Linux系统安装过程中需要选择系统时区,还需要选择键盘布局,往往新手在英文模式下安装Linux系统的时候容易出错,这样会给后续生产环境的系统造成不必要的困扰。以下配置以Linux RedHat系列操作系统为例修改Linux系统时区。

作者:Albert.Wen  添加时间:2014-11-19 10:33:40  修改时间:2024-05-02 10:08:09  分类:Linux基础  编辑

实现用户账号的管理,要完成的工作主要有如下几个方面:

  • 用户账号的添加、删除与修改。
  • 用户密码的管理。
  • 用户组的管理。
作者:Albert.Wen  添加时间:2014-08-03 10:27:47  修改时间:2024-04-23 16:32:21  分类:Linux基础  编辑

1、查看物理CPU的个数

[root@MysqlCluster01 ~]# cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
1

2、查看逻辑CPU的个数

[root@MysqlCluster01 ~]# cat /proc/cpuinfo |grep "processor"|wc -l
4

作者:Albert.Wen  添加时间:2014-02-25 15:49:22  修改时间:2024-04-14 21:32:57  分类:Linux基础  编辑

Linux 开机自启动设置 inittab 详解:

# Default runlevel. The runlevels used are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
# 
#id:5:initdefault:
id:3:initdefault:

 

作者:Albert.Wen  添加时间:2014-02-19 16:22:09  修改时间:2024-04-23 15:52:01  分类:Linux基础  编辑

crontab的语法

crontab [-u username] [-l|-e|-r]
选项与参数:
-u  :只有 root 才能进行这个任务,亦即帮其他使用者创建/移除 crontab 工作排程;
-e  :编辑 crontab 的工作内容
-l  :查阅 crontab 的工作内容
-r  :移除所有的 crontab 的工作内容,若仅要移除一项,请用 -e 去编辑