正在筛选分类:菜鸟Linux笔记 下的文章 清除筛选 ✕
2017
06
06
15:26

debian 安装php-memcached扩展

memcached 安装
sudo apt-get install memcached

memcached 参数说明
memcached -d -m 50 -p 11211 -u root
-m 指定使用多少兆的缓存空间;-p 指定要监听的端口; -u 指定以哪个用户来运行

安装php-memcache模块
sudo apt-get install php5-memcache

编辑配置文件
sudo vi /etc/php5/conf.d/memcache.ini
;uncomment the next line to enable the module
extension=memcache.so

[memcache]
memcache.dbpath=”/var/lib/memcache”
memcache.maxreclevel=0
memcache.maxfiles=0
memcache.archivememlim=0
memcache.maxfilesize=0
memcache.maxratio=0

2017
02
09
13:28

update-grub command not found

update-grub command not found:apt-get update; apt-get install –reinstall grub

mkdir /boot/grub

update-grub

2016
11
29
12:17

Netgear WNA1000M on Debian Jessie

Add a “non-free” component to /etc/apt/sources.list, for example:

Debian 8 “Jessie”

deb http://httpredir.debian.org/debian/ jessie main contrib non-free

Update the list of available packages and install the firmware-realtek package:

apt-get update && apt-get install firmware-realtek

apt-get update

apt-get install network-manager-gnome

reboot

2016
07
15
06:40

linux查看磁盘是ssd还是hdd

Linux或freebsd,如果是vps,好像必须得是KVM的才能查看。

SSD是非转动磁盘

cat /sys/block/sda/queue/rotational

返回 0, 就是 SSD。

2016
02
29
10:38

Xterm终端中文乱码的解决办法

最近安装了Archlinux发现Xterm终端不支持中文,中文显示乱码。google了半天,终于找到了答案
首先,编辑~/.Xresources文件,添加一下三句:

–英文字体
xterm*faceName:DejaVu Sans Mono:antialias=True:pixelsize=14

–中文字体
xterm*faceNameDoublesize:WenQuanYi Micro Hei:antialias=True:pixelsize=14

Xterm*locale:zh_CN.UTF-8

其中的DejaVu Sans Mono和WenQuanYi Micro Hei是我的字体文件,查看本机上安装的字体使用fc-list命令查看,将第二行WenQuanYi Micro Hei改为你安装的中文字体,修改完成之后在终端下输入命令:

xrdb -merge ~/.Xresources

重新加载你的终端配置文件,好了,大功告成。终端可以显示中文了

2015
12
31
16:49

debian apt-get update:public key 错误修复

apt-get update 出现 这种错误
Reading package lists… Done
W: There is no public key available for the following key IDs:
7638D0442B90D010
W: There is no public key available for the following key IDs:
7638D0442B90D010
W: There is no public key available for the following key IDs:
9D6D8F6BC857C906

解决方法
apt-get install debian-keyring debian-archive-keyring
apt-get update

2015
12
08
13:52

Depends: init-system-helpers (>= 1.18~) but it is not installable

Depends: init-system-helpers (>= 1.18~) but it is not installable
E: Unable to correct problems, you have held broken packages.

Working on debian wheezy…

I added backports to my apt repo “deb http://ftp.de.debian.org/debian wheezy-backports main” and performed a “apt-get update”. Afterwards, the apt-get install docker-engine completed fine.

Personally, I’m leaving backports commented out for now but in my conf as a reminder…

2015
12
07
18:55

How to Disable a Services in Linux

In Red Hat based distributions such as Fedora and CentOS, make use of a script called ‘chkconfig‘ to enable and disable the running services in Linux.

For example, lets disable the Apache web server at the system startup.

[avishek@tecmint]# chkconfig httpd off
[avishek@tecmint]# chkconfig httpd –del

In Debian based distributions such as Ubuntu, Linux Mint and other Debian based distributions use a script called update-rc.d.

For example, to disable the Apache service at the system startup execute the following command. Here ‘-f’ option stands for force is mandatory.

[avishek@tecmint]# update-rc.d -f a