Skip to content

Commit

Permalink
2016-04-02格式调整
Browse files Browse the repository at this point in the history
  • Loading branch information
judasn committed Apr 1, 2016
1 parent e59e16b commit fe55a52
Show file tree
Hide file tree
Showing 17 changed files with 82 additions and 192 deletions.
15 changes: 5 additions & 10 deletions CentOS-Install.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
<h1 id="centos0">CentOS 安装 </h1>
# CentOS 安装

------

* [CentOS 安装](#centos0)
* [VirtualBox 下安装 CentOS 过程](#virtualbox1)
* [VMware 下安装 CentOS 过程](#vmware1)

------
## 概括

- 本教程中主要演示了 VirtualBox 和 VMware Workstation 下安装 `CentOS 6.6` 的过程。
- VirtualBox 是免费开源,我个人在使用经历中遇到过很多次崩溃、安装有问题等,所以它不是我主推的虚拟机
- VMware Workstation 是商业软件,很好用,一些辅助功能也很到位,主推该虚拟机。


<h2 id="virtualbox1">VirtualBox 下安装 CentOS 过程</h2>
## VirtualBox 下安装 CentOS 过程

- VirtualBox 的介绍和下载
- 官网:<https://www.virtualbox.org/>
Expand Down Expand Up @@ -65,7 +60,7 @@
- 安装完成后一定要把盘片删除,防止系统启动的时候去读盘,重新进入安装系统模式


<h2 id="vmware1">VMware 下安装 CentOS 过程</h2>
## VMware 下安装 CentOS 过程

- VMware Workstation 的介绍和下载
- 官网:<https://www.vmware.com/products/workstation>
Expand Down Expand Up @@ -118,4 +113,4 @@
- ![VMware 下安装](images/CentOS-install-VMware-a-22.jpg)
- ![VMware 下安装](images/CentOS-install-VMware-a-23.jpg)
- ![VMware 下安装](images/CentOS-install-VMware-a-24.jpg)
- ![VMware 下安装](images/CentOS-install-VMware-a-25.jpg)
- ![VMware 下安装](images/CentOS-install-VMware-a-25.jpg)
9 changes: 6 additions & 3 deletions CentOS-Virtual-Machine-Copy-Settings.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<h1 id="centos0">VMware 克隆 CentOS 后网卡信息修改</h1>
# VMware 克隆 CentOS 后网卡信息修改

------
## 概述

很多时候,在我们需要多台 CentOS 虚拟机的时候,对已有虚拟机的系统进行克隆或是复制。但是这样做又有一个问题,克隆出来的虚拟机启动的时候你输入命令:`ifconfig`,eth0 网卡信息没了,只有一个 eth1。 对于处女座的人来讲这是不允许的。所以我们需要改动下.
- 在我们需要多台 CentOS 虚拟机的时候,对已有虚拟机的系统进行克隆或是复制。但是这样做又有一个问题,克隆出来的虚拟机启动的时候你输入命令:`ifconfig`,eth0 网卡信息没了,只有一个 eth1。 对于处女座的人来讲这是不允许的。所以我们需要改动下.


## 修改方法

- 命令:`sudo vim /etc/udev/rules.d/70-persistent-net.rules`
- 该文件中正常此时应该有两行信息
Expand Down
16 changes: 4 additions & 12 deletions Crontab.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<h1 id="crontab0">Crontab 介绍</h1>
# Crontab 介绍

------

* [Crontab 介绍](#crontab0)
* [Crontab 安装](#crontab1)
* [Crontab 服务器配置文件常用参数](#crontab2)
* [Crontab 资料](#crontab3)

------

<h2 id="crontab1">Crontab 安装</h2>
## Crontab 安装

- 查看是否已安装:
- CentOS:`rpm -qa | grep cron`
Expand All @@ -19,7 +11,7 @@
- CentOS 6:`sudo yum install -y vixie-cron crontabs`
- Ubuntu:`sudo apt-get install -y cron`

<h2 id="crontab2">Crontab 服务器配置文件常用参数</h2>
## Crontab 服务器配置文件常用参数

- 配置文件介绍(记得先备份):`sudo vim /etc/crontab`
- 该配置格式解释:
Expand All @@ -35,7 +27,7 @@
- 0,30 18-23 * * * service httpd restart #每天 18:00 到 23:00 之间,每隔 30 分钟重启 apache(方法二)
- 执行记录日志:`cd /var/log/cron`

<h2 id="crontab3">Crontab 资料</h2>
## Crontab 资料

- <http://www.imooc.com/video/4498>
- <http://www.centoscn.com/image-text/config/2015/0901/6096.html>
25 changes: 7 additions & 18 deletions FTP.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
<h1 id="ftp0">FTP(File Transfer Protocol)介绍</h1>
# FTP(File Transfer Protocol)介绍

------

* [FTP(File Transfer Protocol)介绍](#ftp0)
* [FTP 安装](#ftp1)
* [FTP 使用之前要点](#ftp2)
* [FTP 服务器配置文件常用参数](#ftp3)
* [vsftpd 的两种传输模式](#ftp4)
* [vsftpd 的两种运行模式](#ftp5)
* [FTP 资料](#ftp6)

------

<h2 id="ftp1">FTP 安装</h2>
## FTP 安装

- 查看是否已安装:
- CentOS:`rpm -qa | grep vsftpd`
Expand All @@ -22,7 +11,7 @@
- CentOS 6:`sudo yum install -y vsftpd`
- Ubuntu:`sudo apt-get install -y vsftpd`

<h2 id="ftp2">FTP 使用之前要点</h2>
## FTP 使用之前要点

- 关闭 CentOS 上的 SELinux 组件(Ubuntu 体系是没有这东西的)。
- 查看 SELinux 开启状态:`sudo getenforce`
Expand All @@ -38,7 +27,7 @@
- 命令:`sudo vim /etc/selinux/config`
- 将:`SELINUX=enforcing` 改为 `SELINUX=disbaled`,配置好之后需要重启系统。

<h2 id="ftp3">FTP 服务器配置文件常用参数</h2>
## FTP 服务器配置文件常用参数

- vsftpd 默认是支持使用 Linux 系统里的账号进行登录的(登录上去可以看到自己的 home 目录内容),权限跟 Linux 的账号权限一样。但是建议使用软件提供的虚拟账号管理体系功能,用虚拟账号登录。
- 配置文件介绍(记得先备份):`sudo vim /etc/vsftpd/vsftpd.conf`,比较旧的系统版本是:`vim /etc/vsftpd.conf`
Expand All @@ -60,13 +49,13 @@
- 启动服务:
- `service vsftpd restart`

<h2 id="ftp4">vsftpd 的两种传输模式</h2>
## vsftpd 的两种传输模式

- 分为:主动模式(PORT)和被动模式(PASV)。这两个模式会涉及到一些端口问题,也就涉及到防火墙问题,所以要特别注意。主动模式比较简单,只要在防火墙上放开放开 21 和 20 端口即可。被动模式则要根据情况放开一个端口段。
- ![vsftpd 的两种传输模式](images/FTP-a-1.jpg)
- 上图箭头:xftp 新建连接默认都是勾选被动模式的,所以如果要使用主动模式,在该连接的属性中是要去掉勾选。

<h2 id="ftp5">vsftpd 的两种运行模式</h2>
## vsftpd 的两种运行模式

- 分为:xinetd 模式和 standalone 模式
- xinetd 模式:由 xinetd 作为 FTP 的守护进程,负责 21 端口的监听,一旦外部发起对 21 端口的连接,则调用 FTP 的主程序处理,连接完成后,则关闭 FTP 主程序,释放内存资源。好处是资源占用少,适合 FTP 连接数较少的场合。
Expand All @@ -91,7 +80,7 @@
- Listen=YES(如果是注释掉则要打开注释)
- 重启服务:`sudo service vsftpd restart`

<h2 id="ftp6">FTP 资料</h2>
## FTP 资料

- <http://www.jikexueyuan.com/course/994.html>
- <http://www.while0.com/36.html>
Expand Down
13 changes: 3 additions & 10 deletions Hsk-Install.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
<h1 id="hsk0">花生壳 安装</h1>
# 花生壳 安装

------

* [花生壳 安装](#hsk0)
* [CentOS 下过程](#hsk1)
* [资料](#hsk2)

------

<h2 id="hsk1">CentOS 下过程</h2>
## CentOS 下过程

- 官网:<http://hsk.oray.com/>
- 官网下载:<http://hsk.oray.com/download/#type=linux>
Expand All @@ -32,7 +25,7 @@
- `sudo rpm -e phddns-2.0.6-1.el6.x86_64`


<h2 id="jdk2">资料</h2>
## 资料

- <http://service.oray.com/question/1890.html>

22 changes: 6 additions & 16 deletions Iptables.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
<h1 id="iptables0">Iptables 介绍</h1>
# Iptables 介绍

------

* [Iptables 介绍](#iptables0)
* [前提说明](#iptables1)
* [Iptables 安装](#iptables2)
* [Iptables 服务器配置文件常用参数](#iptables3)
* [Iptables 例子](#iptables4)
* [Iptables 资料](#iptables5)

------

<h2 id="iptables1">前提说明</h2>
## 前提说明

iptables 的设置在 CentOS 和 Ubuntu 下有些细节不一样,Ubuntu 这里不讲,文章底下贴的资料有部分关于 Ubuntu 的,有需要的可以自己看。一般大家会用到 iptables 都是服务器,而一般服务器大家普遍是用 CentOS)

<h2 id="iptables2">Iptables 安装</h2>
## Iptables 安装

- 查看是否已安装:
- CentOS:`rpm -qa | grep iptables`

- 安装(一般系统是集成的):
- CentOS 6:`sudo yum install -y iptables`

<h2 id="iptables3">Iptables 服务器配置文件常用参数</h2>
## Iptables 服务器配置文件常用参数

- 常用命令:
- 查看已有规则列表,并且显示编号:`sudo iptables -L -n --line-numbers`
Expand All @@ -50,7 +40,7 @@ iptables 的设置在 CentOS 和 Ubuntu 下有些细节不一样,Ubuntu 这里
- -d 目标 IP/网域:同 -s ,只不过这里指的是目标的 IP 或网域。
- -j :后面接动作,主要的动作有接受(ACCEPT)、丢弃(DROP)、拒绝(REJECT)及记录(LOG)

<h2 id="iptables4">Iptables 例子</h2>
## Iptables 例子

- 开放指定端口
- `sudo iptables -I INPUT -i lo -j ACCEPT` #允许本地回环接口(即运行本机访问本机)
Expand All @@ -65,7 +55,7 @@ iptables 的设置在 CentOS 和 Ubuntu 下有些细节不一样,Ubuntu 这里
- `sudo iptables -I INPUT -j REJECT` #禁止其他未允许的规则访问(使用该规则前一定要保证 22 端口是开着,不然就连 SSH 都会连不上)
- `sudo iptables -I FORWARD -j REJECT`

<h2 id="iptables5">Iptables 资料</h2>
## Iptables 资料

- <https://wsgzao.github.io/post/iptables/>
- <http://www.vpser.net/security/linux-iptables.html>
24 changes: 13 additions & 11 deletions JDK-Install.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## JDK 安装
# JDK 安装


## CentOS 下过程
Expand All @@ -17,17 +17,19 @@
- 默认 CentOS 有安装 openJDK,建议先卸载掉
- 检查 JDK 命令:`java -version`
- 查询本地 JDK 安装程序情况; `rpm -qa|grep java`
- 我查询出来的结果如下:
```
java-1.6.0-openjdk-1.6.0.38-1.13.10.0.el6_7.x86_64
java-1.7.0-openjdk-1.7.0.95-2.6.4.0.el6_7.x86_64
tzdata-java-2015g-2.el6.noarch
```
- 卸载上面三个文件(`--nodeps` 的作用:忽略依赖的检查):
- `sudo rpm -e --nodeps java-1.6.0-openjdk-1.6.0.38-1.13.10.0.el6_7.x86_64`
- `sudo rpm -e --nodeps java-1.7.0-openjdk-1.7.0.95-2.6.4.0.el6_7.x86_64`
- `sudo rpm -e --nodeps tzdata-java-2015g-2.el6.noarch`
- 我查询出来的结果如下:

```
java-1.6.0-openjdk-1.6.0.38-1.13.10.0.el6_7.x86_64
java-1.7.0-openjdk-1.7.0.95-2.6.4.0.el6_7.x86_64
tzdata-java-2015g-2.el6.noarch
```
- 卸载上面三个文件(`--nodeps` 的作用:忽略依赖的检查):
- `sudo rpm -e --nodeps java-1.6.0-openjdk-1.6.0.38-1.13.10.0.el6_7.x86_64`
- `sudo rpm -e --nodeps java-1.7.0-openjdk-1.7.0.95-2.6.4.0.el6_7.x86_64`
- `sudo rpm -e --nodeps tzdata-java-2015g-2.el6.noarch`
- 也可以一起卸载:`sudo rpm -e --nodeps java-1.6.0-openjdk-1.6.0.38-1.13.10.0.el6_7.x86_64 java-1.7.0-openjdk-1.7.0.95-2.6.4.0.el6_7.x86_64 tzdata-java-2015g-2.el6.noarch`
- JDK 1.8 安装
- 我们以安装 `jdk-8u72-linux-x64.tar.gz` 为例
Expand Down
14 changes: 3 additions & 11 deletions Jenkins-Install-And-Settings.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<h1 id="jenkins0">Jenkins 安装和配置</h1>
# Jenkins 安装和配置

------

* [Jenkins 安装和配置](#jenkins0)
* [Jenkins 安装](#jenkins1)
* [Jenkins 配置](#jenkins2)
* [资料](#jenkins3)

------

<h2 id="jenkins1">Jenkins 安装</h2>
## Jenkins 安装

- Jenkins 安装
- 官网:<http://jenkins-ci.org/>
Expand Down Expand Up @@ -48,6 +40,6 @@
- 如果访问的时候报这个异常:`java.net.UnknownHostException`,可以查看这篇文章:<http://stackoverflow.com/questions/4969156/java-net-unknownhostexception>
<h2 id="jenkins3">资料</h2>
## 资料
- <http://stackoverflow.com/questions/4969156/java-net-unknownhostexception>
12 changes: 2 additions & 10 deletions Jira-Install-And-Settings.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<h1 id="jira0">Jira 安装和配置</h1>
# Jira 安装和配置

------

* [Jira 安装和配置](#jira0)
* [Jira 安装](#jira1)
* [Jira 配置](#jira2)
* [资料](#jira3)

------

<h2 id="jira1">Jira 安装</h2>
## Jira 安装

- Jira 安装
- 官网:<https://www.atlassian.com/software/jira>
Expand Down
18 changes: 5 additions & 13 deletions Linux.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
<h1 id="linux0">Linux 介绍</h1>
# Linux 介绍

------

* [Linux 介绍](#linux0)
* [Linux 这个名字](#linux1)
* [Linux 的发行版本](#linux2)
* [Linux 作用](#linux3)
* [推荐的发行版本](#linux4)

------

<h2 id="linux1">Linux 这个名字</h2>
## Linux 这个名字

Linux 的 Wiki 介绍:<http://zh.wikipedia.org/zh/Linux>

Expand All @@ -31,7 +23,7 @@ Linux 也称:`GNU/Linux`,而其中 GNU 的全称又是:`Gnu’s Not Unix`
- FreeBSD 介绍:<http://zh.wikipedia.org/zh/FreeBSD>
- Mac OS X 介绍:<http://zh.wikipedia.org/wiki/OS_X>

<h2 id="linux2">Linux 的发行版本</h2>
## Linux 的发行版本

Linux 的 Wiki 中有这句话:

Expand All @@ -53,7 +45,7 @@ Linux 的 Wiki 中有这句话:

其实 Linux 的发行版本有太多了,我也只是简单说下常见的而已,具体可以看:<http://zh.wikipedia.org/wiki/Linux%E5%8F%91%E8%A1%8C%E7%89%88%E5%88%97%E8%A1%A8>

<h2 id="linux3">Linux 作用</h2>
## Linux 作用

为什么要用 Linux 系统?大家常看到的说法是这样的:

Expand All @@ -68,7 +60,7 @@ Linux 的 Wiki 中有这句话:
在认识 Linux 作用上我以下面这边文章为结尾。Linux 和 Mac OS X 都是类 Unix 系统,所以这篇文章中基本上的理由都可以用到 Linux 上的。
为什么国外程序员爱用 Mac?<http://www.vpsee.com/2009/06/why-programmers-love-mac/>

<h2 id="linux4">推荐的发行版本</h2>
## 推荐的发行版本

**Ubuntu:适用于开发机**

Expand Down
14 changes: 3 additions & 11 deletions Mysql-Install-And-Settings.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<h1 id="mysql0">Mysql 安装和配置</h1>
# Mysql 安装和配置

------

* [Mysql 安装和配置](#mysql0)
* [Mysql 安装](#mysql1)
* [Mysql 配置](#mysql2)
* [资料](#mysql3)

------

<h2 id="mysql1">Mysql 安装</h2>
## Mysql 安装

- Mysql 安装
- 官网:<http://www.mysql.com/>
Expand Down Expand Up @@ -52,6 +44,6 @@
- `sudo ln -s /usr/program/mysql/bin/mysql /usr/bin`
- `sudo ln -s /usr/program/mysql/bin/mysqladmin /usr/bin`

<h2 id="mysql3">资料</h2>
## 资料

- <http://www.cnblogs.com/xiongpq/p/3384681.html>
Loading

0 comments on commit fe55a52

Please sign in to comment.