虚拟化容器,大数据,DBA,中间件,监控。

Centos7 安装配置Kangle

31 01月
作者:admin|分类:系统运维

Centos7正式版不支持yum install mysql-server  已经被 MariaDB 取代

原来的系统启动服务,已经被 systemctl 所接管,

原来的设置为服务脚本已经不被支持,所以安装脚本需要改造或采用手动方式。


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

  1. 在/usr/lib/systemd/system/目录下新建kangle.service,内容如下:
  2. [Unit]
  3. Description=Kangle Web Service
  4. After=syslog.target network.target
  5. [Service]
  6. Type=forking
  7. ExecStart=/vhs/kangle/bin/kangle
  8. ExecStop=/vhs/kangle/bin/kangle -q
  9. [Install]
  10. WantedBy=multi-user.target

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

  13. 启动kangle
  14. systemctl start kangle.service
  15. 关闭kangle
  16. systemctl stop kangle.service

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

复制代码



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

  1. yum install wget make gcc gcc-c++
  2. yum install pcre-devel zlib-devel
  3. yum install openssl-devel sqlite-devel
  4. yum install quota

复制代码

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

  1. yum install mariadb-server mariadb

复制代码

启动mariadb服务

  1. systemctl start mariadb.service

复制代码

设置开机自动运行

  1. systemctl enable mariadb.service

复制代码

设置root密码

  1. /usr/bin/mysql_secure_installation

复制代码

然后根据提示一步步操作即可。

  1. NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
  2.       SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
  3. In order to log into MariaDB to secure it, we'll need the current
  4. password for the root user.  If you've just installed MariaDB, and
  5. you haven't set the root password yet, the password will be blank,
  6. so you should just press enter here.
  7. Enter current password for root (enter for none): 安装后默认没有root密码,直接回车
  8. OK, successfully used password, moving on...
  9. Setting the root password ensures that nobody can log into the MariaDB
  10. root user without the proper authorisation.
  11. Set root password? [Y/n] Y
  12. New password: 输入root的新密码
  13. Re-enter new password: 新密码确认
  14. Password updated successfully!
  15. Reloading privilege tables..
  16. ... Success!
  17. By default, a MariaDB installation has an anonymous user, allowing anyone
  18. to log into MariaDB without having to have a user account created for
  19. them.  This is intended only for testing, and to make the installation
  20. go a bit smoother.  You should remove them before moving into a
  21. production environment.
  22. Remove anonymous users? [Y/n] 删除匿名用户 Y
  23. ... Success!
  24. Normally, root should only be allowed to connect from 'localhost'.  This
  25. ensures that someone cannot guess at the root password from the network.
  26. Disallow root login remotely? [Y/n] 关闭root远程登录 Y
  27. ... Success!
  28. By default, MariaDB comes with a database named 'test' that anyone can
  29. access.  This is also intended only for testing, and should be removed
  30. before moving into a production environment.
  31. Remove test database and access to it? [Y/n] 删除test数据库 Y
  32. - Dropping test database...
  33. ... Success!
  34. - Removing privileges on test database...
  35. ... Success!
  36. Reloading the privilege tables will ensure that all changes made so far
  37. will take effect immediately.
  38. Reload privilege tables now? [Y/n] 确定以上所有操作 Y
  39. ... Success!
  40. Cleaning up...
  41. All done!  If you've completed all of the above steps, your MariaDB
  42. installation should now be secure.
  43. 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

  1. 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文件,内容为

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

复制代码


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

复制代码

设置pureftpd启动服务
在/vhs/pure-ftpd/sbin下新建pureftpd.sh,内容如下:

  1. #!/usr/bin/bash
  2. /vhs/pure-ftpd/sbin/pure-authd --daemonize -s /var/run/ftpd.sock -r /vhs/kangle/bin/pureftp_auth
  3. sleep 1
  4. /vhs/pure-ftpd/sbin/pure-ftpd --daemonize -lextauth:/var/run/ftpd.sock

复制代码

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


  1. [Unit]
  2. Description=Pure-FTPd FTP Server
  3. After=syslog.target
  4. [Service]
  5. Type=forking
  6. ExecStart=/usr/bin/sh /vhs/pure-ftpd/sbin/pureftpd.sh
  7. [Install]
  8. WantedBy=multi-user.target


复制代码

建立链接

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

复制代码

启动和关闭pureftpd

  1. systemctl start pureftpd.service
  2. systemctl stop pureftpd.service

复制代码


安装easypanel

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

复制代码


装完后开始设置,不用ep自带的php52,打开/vhs/kangle/ext/tpl_php52/config.xml找到
<cmd name="nodephp" 行,修改为:

  1. <cmd name='nodephp' file='/usr/bin/php-cgi' listen='local' lock='0' type='mp' proto='fastcgi'>
  2. <env PHP_FCGI_MAX_REQUESTS='0' PHPRC='/etc/php.ini'/>
  3. </cmd>

复制代码


最后启动kangle和pureftp
systemctl start kangle.service
systemctl start pureftpd.service

以上脚本仅供测试。






浏览2734 评论0
返回
目录
返回
首页
光猫中兴F607 超级账号与密码破解 Linux被DDOS&CC攻击解决实例