A-A+

CentOS7安装kangle和easypanel

2015年03月11日 Kangle 暂无评论 阅读 275 次浏览 次

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

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



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

  1.  
  2. 在/usr/lib/systemd/system/目录下新建kangle.service,内容如下:
  3. [Unit]
  4. Description=Kangle Web Service
  5. After=syslog.target network.target
  6. [Service]
  7. Type=forking
  8. ExecStart=/vhs/kangle/bin/kangle
  9. ExecStop=/vhs/kangle/bin/kangle -q
  10. [Install]
  11. WantedBy=multi-user.target
  12.  
  13. 然后建立链接
  14. ln -s '/usr/lib/systemd/system/kangle.service' '/etc/systemd/system/multi-user.target.wants/kangle.service'
  15.  
  16. 启动kangle
  17. systemctl start kangle.service
  18. 关闭kangle
  19. systemctl stop kangle.service
  20.  
  21. 设置为开机自动启动
  22. systemctl enable kangle.service
  23.  

复制代码







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

先安装一些常用的

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

复制代码



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

  1.  
  2. yum install mariadb-server mariadb
  3.  

复制代码



启动mariadb服务

  1.  
  2. systemctl start mariadb.service
  3.  

复制代码



设置开机自动运行

  1.  
  2. systemctl enable mariadb.service
  3.  

复制代码



设置root密码

  1.  
  2. /usr/bin/mysql_secure_installation
  3.  

复制代码



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

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

复制代码



装完后设置一下链接,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.  
  2. yum install php php-cli php-mysql php-gd php-xml php-pdo php-mbsring
  3.  

复制代码





安装ioncube

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

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

复制代码





安装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
  5.  

复制代码



设置pureftpd启动服务

在/vhs/pure-ftpd/sbin下新建pureftpd.sh,内容如下:

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

复制代码



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

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

复制代码



建立链接

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

复制代码



启动和关闭pureftpd

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

复制代码





安装easypanel

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

复制代码





装完后开始设置,不用ep自带的php52,打开/vhs/kangle/ext/tpl_php52/config.xml找到

<cmd name="nodephp" 行,修改为:

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

复制代码





最后启动kangle和pureftp

systemctl start kangle.service

systemctl start pureftpd.service



以上脚本仅供测试。



 

 

 




标签:

评论已关闭!

Copyright © 香港虚拟主机_美国虚拟主机_香港服务器_美国服务器租用托管 保留所有权利.   Theme  Ality 蜀ICP备14006632号-1

用户登录