一、康乐简介

主要特点
1、免费开源
kangle技术团队希望国人拥有一款真正好用、易用、实用的国产web服务器。
2、跨平台
可在linux、windows、freebsd、openbsd、netbsd、solaris等平台上运行。
3、可轻松查看到被攻击的url
这是kangle web服务器独有的,其它web服务器很难查找到。
4、性能高
工作模型多样化。Windows上采用iocp、Linux上采用epoll、Bsd上采用kqueue。
5、功能强大、灵活
kangle的访问控制理念来自linux的iptables防火墙,kangle拥有功能最小化的匹配模块和标记模块,通过组合,反转等可以实现用户最复杂的需求;
谈kangle的访问控制:点击查看
6、是一款做idc的专业web服务器
.实现虚拟主机独立身份,独立进程。
.隔离攻击(实现某个虚拟主机受到外部攻击,不影响到服务器上其它虚拟主机)。
.智能防cc攻击(CC是http协议的攻击,不是tcp/ip,kangle是底层的web服务器,更懂http)。
.做全能空间(php虚拟主机、java虚拟主机等)

主要特性

  • kangle采用基于事件驱动(epoll等)加非阻塞socket及异步IO的方式构架,使其比传统web服务器性能更高;静态网页处理能力达到Apache的8-10倍左右。
  • kangle支持isapi,fastcgi,cgi,ajp,uwsgi,fcgi,hmux,http等多种扩展接口,是一个非常开放的系统,非常方便的做负载均衡功能;
  • kangle内置内存/磁盘两级缓存,采用LRU淘汰算法,缓存命中率非常高,有效降低资源占用
  • 可以设置每个虚拟主机独立进程,独立身份运行(虚拟主机商的最爱,安全的实现虚拟主机功能);
  • 企业版还带有独特的防CC攻击和限制虚拟主机cpu的功能,自动监测动态网页的访问频率,一但达到设定的阀值,自动对该网页保护,kangle能区分攻击访问和正常访问。一但某个虚拟主机的cpu超过设置,自动对该虚拟主机降低优先级。从而不影响其它虚拟主机。做到隔离攻击。
  • 独有的命令扩展(虚拟化其它web服务器,使其它web服务器亦具有前述优点,如tomcat,这样就能安全的提供java虚拟 主机了)
    • kangle具有扩展队列功能。对于突发大量的动态网页请求会加入到队列中,以使系统稳定的提供服务
    • kangle的访问控制理念来自linux的iptables防火墙,kangle实现很多最小化的匹配模块和标记模块,通过组合,反转可以实现最复杂的需求;从而实现强大的访问请求控制(url,ip地址,连接数/网速限制,http头,时间控制,多种http认证,服务器负载,url重定向,url重写,内容过滤等等);
    • 支持远程web方式管理.默认管理端口:3311,初始用户名:admin,密码:kangle;
    • 兼容apache的自定义.htaccess功能

二、安装部署

第一步:系统支持包安装
yum -y install wget tar make automake gcc gcc-c++ pcre pcre-devel zlib-devel sqlite-devel openssl-devel libxml2 libxml2-devel libtool libtool-libs quota perl gd
第二步:安装kangle(目前最新版本 :kangle-3.4.8.tar.gz)
1、下载kangle源码包
wget http://download.kanglesoft.com/zcore.php?os=src
2、解压
tar xzf kangle-3.4.8.tar.gz
3、进入kangle目录
cd kangle-3.4.8
4、配置kangle源代码
./configure –prefix=/vhs/kangle –enable-disk-cache –enable-ipv6 –enable-ssl –enable-vh-limit
5、编译安装
make && make check && make install

6、启动kangle
/vhs/kangle/bin/kangle
7、设置centos7 kangle 启动
在/usr/lib/systemd/system/目录下新建kangle.service,内容如下:
[Unit]
Description=Kangle Web Service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/vhs/kangle/bin/kangle
ExecStop=/vhs/kangle/bin/kangle -q
[Install]
WantedBy=multi-user.target

8、使用SSH输入下列命令建立链接
ln -s ‘/usr/lib/systemd/system/kangle.service’ ‘/etc/systemd/system/multi-user.target.wants/kangle.service’
9、启动kangle
systemctl start kangle.service
(关闭kangle的命令是systemctl stop kangle.service)

10、设置为开机自动启动
systemctl enable kangle.service

三、mariadb配置

第三步:安装数据库mariadb
1、centos7默认安装mariadb5.5.37
yum install mariadb-server mariadb
2、启动mariadb服务
systemctl start mariadb.service
3、设置mariadb开机自动运行
systemctl enable mariadb.service
4、设置root密码
/usr/bin/mysql_secure_installation
然后根据提示一步步操作即可,如下所示:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we’ll need the current
password for the root user.  If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): 安装后默认没有root密码,直接回车
OK, successfully used password, moving on…
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] Y
New password: 输入root的新密码
Re-enter new password: 新密码确认
Password updated successfully!
Reloading privilege tables..
… Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] 删除匿名用户 Y
… Success!
Normally, root should only be allowed to connect from ‘localhost’.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] 关闭root远程登录 Y
… Success!
By default, MariaDB comes with a database named ‘test’ that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] 删除test数据库 Y
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] 确定以上所有操作 Y
… Success!
Cleaning up…
All done!  If you’ve completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
5、装完后设置一下链接,mariadb完全兼容mysql,所以很多命令也是一样的
ln -s /usr/bin/mysql /vhs/kangle/bin/mysql
ln -s /usr/bin/mysqldump /vhs/kangle/bin/mysqldump

四、安装php

第四步:安装php,centos7默认安装5.4.16
yum install php php-cli php-mysql php-gd php-xml php-pdo php-mbsring

五、安装ioncube

ioncube是一个保护使用PHP编程语言编写的软件不被查看的工具。这些工具使用在编码之前编译为字节码的技术,从而消除了源代码,减少了运行时开销(加密)。还有一个名为ionCube Loader 的PHP 扩展在运行时处理编码文件的读取和执行(解密)。

cd /usr/local
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar zxvf ioncube_loaders_lin_x86.tar.gz

64位ionCube

cd /usr/local
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar zxvf ioncube_loaders_lin_x86-64.tar.gz

1、到官方下载ioncube_loader_lin_5.4.so放到/usr/lib64/php/modules目录下
2、在/etc/php.d目录下新建ioncube.ini文件,内容为
zend_extension=/usr/lib64/php/modules/ioncube_loader_lin_5.4.so

六、安装pftp

第六步:安装pureftpd(用户使用,36版有问题)
1、官方下载pureftpd(目前最新版是1.0.42版)
wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.42.tar.gz
或者在kangle下载(1.0.36版)
wget http://download.kanglesoft.com/easypanel/source/pure-ftpd-1.0.36.tar.gz
2、解压
tar xzf pure-ftpd-1.0.42.tar.gz
3、进入目录
cd pure-ftpd-1.0.42
4、配置pureftpd源代码
./configure –prefix=/vhs/pure-ftpd with –with-extauth –with-throttling –with-peruserlimits
5、编译安装
make && make check && make install
6、设置pureftpd启动服务
(1)在/vhs/pure-ftpd/sbin下新建pureftpd.sh,内容如下:
#!/usr/bin/bash
/vhs/pure-ftpd/sbin/pure-authd –daemonize -s /var/run/ftpd.sock -r /vhs/kangle/bin/pureftp_auth
sleep 1
/vhs/pure-ftpd/sbin/pure-ftpd –daemonize -lextauth:/var/run/ftpd.sock
(2)在/usr/lib/systemd/system/下新建pureftpd.service,内容如下:
[Unit]
Description=Pure-FTPd FTP Server
After=syslog.target
[Service]
Type=forking
ExecStart=/usr/bin/sh /vhs/pure-ftpd/sbin/pureftpd.sh
[Install]
WantedBy=multi-user.target
7、建立软连接
ln -s ‘/usr/lib/systemd/system/pureftpd.service’ ‘/etc/systemd/system/multi-user.target.wants/pureftpd.service’
8、启动pureftpd
systemctl start pureftpd.service
(关闭pureftpd:  systemctl stop pureftpd.service)

七、安装easypanel

第七步:安装easypanel
1、下载easypanel(目前最新版是2.6.26)
wget http://download.kangleweb.com/easypanel/easypanel-2.6.26-x86_64-6.tar.gz
2、解压缩
tar xzf easypanel-2.6.26-x86_64-6.tar.gz
3、关闭kangle服务
/vhs/kangle/bin/kangle -q
4、复制文件
cp -a easypanel-2.6.26-x86_64/* /vhs/kangle/
5、安装
最后启动kangle和pureftp
systemctl start kangle.service
systemctl start pureftpd.service
6、装完后开始设置,不用ep自带的php52,打开/vhs/kangle/ext/tpl_php52/config.xml找到<cmd name=”nodephp” 行,修改为:
<cmd name=’nodephp’ file=’/usr/bin/php-cgi’ listen=’local’ lock=’0′ type=’mp’ proto=’fastcgi’>
<env PHP_FCGI_MAX_REQUESTS=’0′ PHPRC=’/etc/php.ini’/>
</cmd>

第八步:启动kangle和pureftp
systemctl start kangle.service
systemctl start pureftpd.service

[运维-安全]CentOS7.0环境下安装kangle和easypanel的更多相关文章

  1. centos7.2环境下安装smokeping对网络状态进行监控

    centos7.2环境下安装smokeping对网络状态进行监控 安装smokeping建议用centos7,用centos6.5一直卡在smokeping那里,下载不了perl的扩展插件,可能是因为 ...

  2. cuda8.0环境下安装py-faster-rcnn问题总结

    首先声明,由于之前安装的cuda8.0,在实践中出现各种问题,这里不是指安装环境问题,而是在训练模型是会阻止内核启动,因此让我不得不转战8.0,说出来都是泪啊,配个环境都配了一个礼拜了,所以,请不要轻 ...

  3. Centos7.x环境下 安装Diszz

    镜像下载.域名解析.时间同步请点击 阿里云开源镜像站 一.背景 Discuz 是基于PHP网页,在 Linux 和 windows 两平台均可部署的论坛工具.本实验带你基于 CentOS 快速搭建属于 ...

  4. CentOS7.x-lnmp环境下安装Discuz论坛

    1.安装lnmp.这里采用一键安装的包 yum -y install wget wget http://soft.vpser.net/lnmp/lnmp1.6-full.tar.gz 2.加压安装ln ...

  5. CentOS7.2环境下安装Nginx

    目录 1.下载安装包 2.安装nginx 3.配置nginx开机启动 4.测试 1.下载安装包 官网下载 wget http://nginx.org/download/nginx-1.16.0.tar ...

  6. CentOS7.5环境下安装配置GitLab

    1. 安装依赖软件 yum -y install policycoreutils openssh-server openssh-clients postfix 2.设置postfix开机自启,并启动, ...

  7. centos7.6环境下编译安装tengine-2.2.2的编译安装

    centos7.6环境下编译安装tengine-2.2.2的编译安装 .获取tengine2..2的源码包 http://tengine.taobao.org/download/tengine-2.2 ...

  8. CentOS7.3环境下源码安装httpd

    CentOS7.3环境下源码安装httpd 本文在CentOS7.3下,源码安装apache服务httpd2.4. 1.下载好源码安装包 [root@localhost ~]#ll total 625 ...

  9. Centos7.4 版本环境下安装Mysql5.7操作记录

    Centos7.x版本下针对Mysql的安装和使用多少跟之前的Centos6之前版本有所不同的,废话就不多赘述了,下面介绍下在centos7.x环境里安装mysql5.7的几种方法: 一.yum方式安 ...

随机推荐

  1. javaWeb项目重命名的问题

    tomcat项目名称修改 步骤: 1.对工程重命名(选择工程,右键Refactor->Rename)      2.修改Web路径(选择工程,右键Properties->MyEclipse ...

  2. QT之 Hello World

    下载……   我下载的Qt creater 版本为4.2.1,Qt版本为5.8.0 打开QT Creater 1. 新建项目 New Project -> Application -> Q ...

  3. WP8.1学习系列(第十八章)——Windows Phone 交互和可用性

    本主题讨论了布局会对应用的可用性产生怎样的影响.在应用的可用性上下文中还讨论了其他常用 UI,例如搜索和设置. 在继续使用控件和交互之前,请执行以下操作: 有关概念化应用的策略,请参阅尽你所能,设计最 ...

  4. 【Drools-开源业务规则引擎】入门实例(含源码)

    该实例转自:http://blog.csdn.net/quzishen/article/details/6163012 便于理解的应用实例1: 现在我们模拟一个应用场景:网站伴随业务产生而进行的积分发 ...

  5. Android 查看system/bin目录下支持哪些命令?

    C:\Users\yonghuming>adb shell "ls system/bin" >log acpiadbdamapp_processapp_process3 ...

  6. 外网电脑配置8G运行内存,运行Android Studio,速度很轻松

    Win 7系统 之前RAM是 4 G,运行Android studio ,再运行浏览器或办公软件时卡的一比.再插入一个 4G内存条,总共8G时,速度嗖的一下就上来了.

  7. 九度OJ小结2

    由于安排问题,距离上次小结时间已经过去很久.导致这次小结的内容很多. 本次小结涉及到主要内容如下所示: 基于并查集操作的最小生成树问题(prime算法或者kruskal算法): 最短路径问题(Floy ...

  8. [转]centos6 与 7 其中的一些区别

    # vi /etc/ssh/sshd_config #将MaxAuthTries注释去掉 MaxAuthTries 5(登录次数) UseDNS no   默认是yes 的,把这个改为no,可以大大减 ...

  9. 【CF903G】Yet Another Maxflow Problem 线段树

    [CF903G]Yet Another Maxflow Problem 题意:一张图分为两部分,左边有n个点A,右边有m个点B,所有Ai->Ai+1有边,所有Bi->Bi+1有边,某些Ai ...

  10. PHPStorm 注册码&主题皮肤

    JetBrains PhpStorm 注册方法: 用浏览器打开 http://idea.lanyus.com/ 点击页面中的“获得注册码” 然后打开PhpStorm,在注册时切换至Activation ...