Ubuntu创建nologin用户用于Bitvise SSH科学上网

首先查看/etc/shells中有没有/sbin/nologin(debian和Ubuntu下为/usr/sbin/nologin)
cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
没有的话加上/usr/sbin/nologin
echo "/usr/sbin/nologin" >> /etc/shells
然后添加新用户,其中M为不为该用户创建主目录,-s为指定该用户登录的shell
useradd -M -s /usr/sbin/nologin vincent
其它系统是
useradd -M -s /sbin/nologin vincent
修改密码
passwd ******

debian7安装docker

直接用官方提供的https://get.docker.com/安装

curl -sSL https://get.docker.com/ | sh

如果提示没有curl的话,先安装curl

apt-get install curl

安装出错提示
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
docker-engine : Depends: init-system-helpers (>= 1.18~) but it is not installable
Recommends: aufs-tools but it is not going to be installed
Recommends: cgroupfs-mount but it is not installable or
cgroup-lite but it is not installable
Recommends: git but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

解决方法

wget http://launchpadlibrarian.net/173841617/init-system-helpers_1.18_all.deb
dpkg -i init-system-helpers_1.18_all.deb

再次执行上面官方的安装docker命令。成功。

docker version
Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:13:40 2017
OS/Arch: linux/amd64

Centos yum升级PHP5.2 官方源

centos5.4安装好后通过yum来安装php的版本是5.1.6,现在很多站点都是在5.2.x上开发的

今天安装wordpress一个插件也同样遇到提示php版本要5.2x以上

找了很久找到一个官方的一个test repo里面有php5.2.x,安装centos官方的我表示很放心,有木有….

首先, vi /etc/yum.repos.d/CentOS-Testing.repo
再将下面内容粘贴进去,保存退出
Read More Centos yum升级PHP5.2 官方源

Centos yum安装httpd mysqld php

1、一次性安装:

yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql

2、优化mysql
vi /etc/my.cnf
在 [mysqld] 下面加入

skip-bdb
skip-innodb
skip-locking

Read More Centos yum安装httpd mysqld php

Ubuntu 10.10 系统安装极点五笔

换了电脑装了个Ubuntu 10.10系统,默认的拼音也不错,但一直打五笔的我打拼音很吃力,所以就找了在windows中一直用的极点五笔

ibus下用法如下:
1.下载附件文件vissible-ibus.tar.gz

2. 解压
tar xvzf vissible-ibus.tar.gz

3. 执行如下命令:
cd vissible-ibus
sudo cp vissible.db /usr/share/ibus-table/tables
sudo cp vissible.gif /usr/share/ibus-table/icons

4.重启ibus或注销再登录,ibus里添加极点五笔即可
注:如原来已经用过,请把~/.ibus/tables/vissible-user.db删除,或者也可以把 vissible.db改成别的*.db。