---
title: "gateone 安装与配置"
author: "chembo"
date: "2014-12-17T20:05:58Z"
tags: []
categories: ["开源软件"]
slug: "gateone"
draft: false
lastmod: "2014-12-17T20:10:56Z"
id: 2167176
url: "https://chembo.iteye.com/blog/2167176"
---

gateone-1.1-1.noarch.rpm 

pam-devel-1.1.1-8.el6.x86\_64.rpm 

python-ordereddict-1.1-2.el6.noarch.rpm  
libpam-pwdfile-master    

PyPAM-0.5.0-12.el6.x86\_64.rpm    

tornado-2.4-1.noarch.rpm

以上文件自己找吧。

1.rpm -ivh \*.rpm

2.cd libpam-pwdfile-master

make && make install

ln /lib/security/pam\_pwdfile.so /lib64/security/pam\_pwdfile.so

3.python gateone.py

4.创建密码文件：

vi /etc/gateone/passwd #密码生成用在线工具就行，记得选择Crypt方式： [http://tool.oschina.net/htpasswd](http://tool.oschina.net/htpasswd)

vi /etc/pam.d/gateone

#%PAM-1.0  
\# Login using a htpasswd file  
#@include common-sessionauth  
#required pam\_pwdfile.so pwdfile=/etc/gateone/passwd  
#required pam\_permit.so  
auth            required        pam\_pwdfile.so pwdfile=/etc/gateone/passwd  
account         required        pam\_permit.so  
session         required        pam\_permit.so  
password        required        pam\_deny.so

 

5.修改配置文件：vi /opt/gateone/server.conf

pam\_service = "gateone"

auth = "pam"  
origins="http://ip"

 

6.service gateone restart