tomsen 发表于 2014-7-20 11:47:22

折腾一下CentOS7安装kangle和easypanel

本帖最后由 tomsen 于 2014-7-20 19:25 编辑

Centos7正式版不支持yum install mysql-server已经被 MariaDB 取代
原来的系统启动服务,已经被 systemctl 所接管,原来的设置为服务脚本已经不被支持,所以安装脚本需要改造或采用手动方式。

kangle(enterprise version)的安装过程跟以前系统一样,装完后设置为自动启动服务:

在/usr/lib/systemd/system/目录下新建kangle.service,内容如下:

Description=Kangle Web Service
After=syslog.target network.target

Type=forking
ExecStart=/vhs/kangle/bin/kangle
ExecStop=/vhs/kangle/bin/kangle -q

WantedBy=multi-user.target

然后建立链接
ln -s '/usr/lib/systemd/system/kangle.service' '/etc/systemd/system/multi-user.target.wants/kangle.service'

启动kangle
systemctl start kangle.service
关闭kangle
systemctl stop kangle.service

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



Easypanel采用手动安装,就是不用ep.sh来安装,当然可以把ep.sh脚本全部修改为支持centos7的脚本来安装。
先安装一些常用的

yum install wget make gcc gcc-c++
yum install pcre-devel zlib-devel
yum install openssl-devel sqlite-devel
yum install quota

安装mariadb,centos7默认安装mariadb5.5.37

yum install mariadb-server mariadb

启动mariadb服务

systemctl start mariadb.service

设置开机自动运行

systemctl enable mariadb.service

设置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
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
... 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? 关闭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? 删除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
... 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!

装完后设置一下链接,mariadb完全兼容mysql,所以很多命令也是一样的
ln -s /usr/bin/mysql /vhs/kangle/bin/mysql
ln -s /usr/bin/mysqldump /vhs/kangle/bin/mysqldump

然后安装php,centos7默认安装5.4.16

yum install php php-cli php-mysql php-gd php-xml php-pdo php-mbsring


安装ioncube
到官方下载ioncube_loader_lin_5.4.so放到/usr/lib64/php/modules目录下,然后再/etc/php.d目录下新建ioncube.ini文件,内容为

zend_extension=/usr/lib64/php/modules/ioncube_loader_lin_5.4.so


安装pureftpd
到http://download.kanglesoft.com/easypanel/source/pure-ftpd-1.0.36.tar.gz或pureftpd官方下载,编译安装
       
tar xzf pure-ftpd-1.0.36.tar.gz
cd pure-ftpd-1.0.36
./configure --prefix=/vhs/pure-ftpd with --with-extauth --with-throttling --with-peruserlimits

设置pureftpd启动服务
在/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

在/usr/lib/systemd/system/下新建pureftpd.service,内容如下:



Description=Pure-FTPd FTP Server
After=syslog.target

Type=forking
ExecStart=/usr/bin/sh /vhs/pure-ftpd/sbin/pureftpd.sh

WantedBy=multi-user.target


建立链接

ln -s '/usr/lib/systemd/system/pureftpd.service' '/etc/systemd/system/multi-user.target.wants/pureftpd.service'

启动和关闭pureftpd

systemctl start pureftpd.service
systemctl stop pureftpd.service


安装easypanel

wget http://download.kanglesoft.com/easypanel/easypanel-2.6.5-x86_64-6.tar.gz
tar xzf easypanel-2.6.5-x86_64-6.tar.gz
/vhs/kangle/bin/kangle -q
cp -a easypanel-2.6.5-x86_64/* /vhs/kangle/


装完后开始设置,不用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

以上脚本仅供测试。










小樱 发表于 2014-7-20 18:10:31

mysql废了?

小樱 发表于 2014-7-20 18:13:23

还有支持service启动。。

tomsen 发表于 2014-7-20 19:32:56

本帖最后由 tomsen 于 2014-7-20 19:42 编辑

小樱 发表于 2014-7-20 18:10
mysql废了?

centos7 默认没有mysql-server安装源了,mariadb和mysql一样全兼容,接口通信方式都一样,php、phpmyadmin不用做任何更改。

小樱 发表于 2014-8-6 17:56:59

tomsen 发表于 2014-7-20 19:32
centos7 默认没有mysql-server安装源了,mariadb和mysql一样全兼容,接口通信方式都一样,php、phpmyadmi ...

http://dev.mysql.com/downloads/repo/yum/

xdai 发表于 2014-8-11 21:55:17

哇,这么强,都centos7了哈~~   我的6到现在还没搞清怎么安装memcached ……

pfnt 发表于 2014-10-17 04:01:04

谢谢楼主了,楼主辛苦了,呵呵

100克银元宝http://china.coovee.net/business1/detail/19972457.html

200克银元宝http://www.china.cn/jinianpin/3181148418.html

200克银元宝http://detail.1688.com/offer/1240585606.html

30克银元宝http://www.51sole.com/b2b/pd_11200984.htm

大铜章 生肖http://detail.1688.com/offer/37372062142.html











static/image/common/sigline.gif













纸币收藏册纸币册http://www.cntrades.com/b2b/ssgyp888/sell/itemid-23045133.html

纸币收藏册纸币册http://www.zk71.com/products/u508469/ssgyp888_41796538.html

纸币收藏册纸币册http://www.cn716.com/sellmarket/sell9054227.shtml

纸币收藏册纸币册http://china.makepolo.com/product-detail/100448188996.html

纸币收藏册纸币册http://www.qy6.com/syjh/showbus6146567.html

www.c969.com 发表于 2014-10-20 16:37:20

受教了 蛮实用的

www.454sj.com 发表于 2014-11-28 17:16:35

楼主辛苦,写的很有作用

alibala123 发表于 2015-1-16 18:43:30

既然来了就顺便回复一下喽。。。。。











static/image/common/sigline.gif
http://blog.sina.com.cn/s/blog_af3e524c0102vaot.html
页: [1] 2
查看完整版本: 折腾一下CentOS7安装kangle和easypanel