安装centos

使用163软件源

首先备份
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

#重建缓存
yum clean metadata
yum makecache

vim设置

set fenc=utf8
set fencs=utf8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936
set backspace=2

set autoindent
set smartindent
set cindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set nu

安装nginx

yum install nginx

ssh开启 root访问

vim /etc/ssh/sshd_config
取消Port 22 前的注释
增加行PermitRootLogin yes
重启服务 /etc/init.d/sshd restart

安装MySQL

sodu yum install mysql
sudo yum install mysql-server
sudo yum install mysql-devel
sudo service mysqld start
sudo mysql_secure_installation

安装PHP

yum install php-fpm
yum install php-xml
yum install php-mysql
yum install php-mbstring
yum install php-pecl-memcached
yum install libmemcached
yum install php-zlib

安装下面的包,否则部分图标不显示

yum install alacarte

限制root帐号登录

$ vim /etc/ssh/sshd_config

把 “#PermitRootLogin yes”
改为: PermiRootLogin no

从客户端连接到 SSH时如果使用ROOT登录,就会提示 Permission denied. please try again.

但可以使用其它用户登录后#su -
添加新评论