1 service XXX does not support chkconfi
有时候为了方便管理,我们常常喜欢在Linux中将之安装为服务,然后就可以使用服务来管理。
但是当我们运行安装服务的命令时候,假设服务名为myservice
#chkconfig --add myservice
常常会出现
service myservice does not support chkconfig
添加下面两句到 #!/bin/bash 之后。
# chkconfig: 2345 10 90 # description: myservice ....
其中2345是默认启动级别,级别有0-6共7个级别。
等级0表示:表示关机
等级1表示:单用户模式
等级2表示:无网络连接的多用户命令行模式
等级3表示:有网络连接的多用户命令行模式
等级4表示:不可用
等级5表示:带图形界面的多用户模式
等级6表示:重新启动
10是启动优先级,90是停止优先级,优先级范围是0-100,数字越大,优先级越低。
2 服务或程序启动不了
提示如下:
WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
提示里已经说明如何操作了
3 挂载u盘或其他系统文件
mount -t cifs //ip/共享目录名称 /mnt/sharefile -o username=,password=
上面的命令即将windows的共享目录映射为linux上的/mnt/sharefile目录
U盘
fdisk -l 查看usb设备
mount -t vfat /dev/sda1 /mnt/usb 当然上面的参数-t vfat也是可以省略的。
使用完了别忘了卸载:
umount /dev/sda1
或 umount /mnt/usb
4 git WARNING: terminal is not fully functional
在用git ls -5 ,git log 时提示terminal is not fully functional
在命令行执行 export TERM=msys 即可
附:如果是windows 系统 在命令行执行 TERM=msys 即可