ZPanel是一个免费的虚拟主机控制面板,支持Windows,Linux,UNIX和MacOSX等多个操作系统的VPS或者服务器。目前,ZPanel最新的版本命名为ZPanelX(10),基于个人使用习惯,我这里只要是简单介绍ZPanelX在linux系统的安装和使用。ZPanelX支持的linux操作系统包括CentOS 6和Ubuntu 11.10,12.04等(其他诸如Debian等暂未支持)。
编译安装
我依然使用比较熟悉的CentOS系统,先重做下VPS系统为CentOS 6.
官方Centos下的安装教程地址:http://www.zvps.co.uk/zpanel/centos-6
首先,下载源码,传入VPS。您可以直接下载到本地解压后用SFTP传上去,也可以直接SSH登陆下载解压,我们需要用到的是installer.sh.x,假设我们已经放入root目录,接下来命令。
cd /root #进入目录
chmod +x installer.sh.x #设定权限
yum install ld-linux.so.2 #此步非必须
./installer.sh.x #编译安装
对了,建议大家在执行命令前先screen,因为安装过程可能超过30分钟,干等是很不明智的。
执行编译后,暂时别离开,这时候,我们需要确定和设定一些项目,除了要输入y之后,还需要你设定时区,比如:Asia/Shanghai,以及MySQL的root密码(2次)。全部完成后,等他自己装,看电视先。
登陆汉化
安装完成后,我们以IP/zpanel打开登陆页面,默认的用户名和密码:zadmin/password(登陆后记得修改,这是好习惯)。
确认登陆无误,我们开始汉化的过程(以下过程全部引用,敬请留意)
1.通过ZPANELX面板打开PHPMYADMIN,分别选中对应的表,执行以下SQL语句
========core库=========
ALTER TABLE `x_accounts` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_aliases` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_bandwidth` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_cronjobs` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_distlists` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_distlistusers` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_dns` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_faqs` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_forwarders` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_ftpaccounts` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_groups` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_htaccess` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_mailboxes` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_logs` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_mailboxes` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_modcats` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_modules` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_mysql` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_mysql_databases` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_mysql_dbmap` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_mysql_users` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_packages` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_permissions` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_profiles` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_quotas` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_settings` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_translations` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `x_vhosts` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;============postfix库===========
ALTER TABLE `admin` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `alias` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `alias_domain` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `config` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `domain` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `domain_admins` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `fetchmail` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `log` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `mailbox` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `quota` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `quota2` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `vacation` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `vacation_notification` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;============proftpd库(实际上我觉得这一部分做不做无所谓)===========
ALTER TABLE `ftpgroup` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `ftpquotalimits` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `ftpquotatallies` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `ftpuser` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;============roundcube库===========
ALTER TABLE `cache` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `contactgroupmembers` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `contactgroups` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `contacts` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `identities` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `messages` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `session` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `users` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
注意,上面的SQL执行过程可能有报错,赵容在3台VPS上测试,每台都有报错的情况,但不影响最终的汉化结果,不过,您有能力的话,可以针对报错内容修改执行。
2.修改文件,先修改/etc/zpanel/panel/dryden/db/driver.class.php文件,找到
public function query($query) { try {
在try里面加入
$FIXSql1 = “set character_set_server=’utf8′”; $FIXSql2 = “set names ‘utf8′”; $FIX = parent::query($FIXSql1); $FIX2 =parent::query($FIXSql2);
保存。
然后,接着修改/etc/zpanel/panel/etc/styles/zpanelx/master.ztml,找到
<meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″>
修改为
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
保存。
3.接下来又是数据库,到core库执行:
ALTER TABLE `x_translations` ADD `tr_Chinese_tx` TEXT NULL;
命令有点多,打包了:点击下载
下载下来了,SQL执行文档中的内容。
4.返回ZPanelX,选择我的账户,修改语言为Chinese,就可以了(这之前请确保你的邮箱也设定了,我试过账户中没有设定邮箱提交不成功)。说了这么久,上一张图片:
添加文件管理插件
ZPanelX最大的缺点在文件管理,就一个FTP,太弱了,所以,我们再加一个文件管理插件,让他能自由的在线管理文件,上传下载、压缩解压等等。(以下为引用,敬请留意)
SSH登陆服务器,依次执行:
zppy repo add zppy.vjvj.tk
zppy update
zppy install ajaxplorer
完成后,登陆ZPanelX,选择服务器管理→模块管理,勾选AjaXplorer中你要授权使用的用户组。
由于在不同的VPS上安装更换【Mr.Ra1n】帖子中提供的皮肤都出现了登陆界面空白的情况,加之与原默认皮肤差异不大,所以,我没有贴出皮肤的下载,大家有兴趣也可以自己试试。
2013年更新简化的安装方式
以下来源于Hostloc会员ccnif
(一)安装软件
wget http://www.zvps.co.uk/sites/default/files/downloads/zpanelx-centos-6-beta.tar.gz
tar -xf zpanelx-centos-6-beta.tar.gz
chmod +x installer.sh.x
yum install ld-linux.so.2
./installer.sh.x
输入时区
输入MYSQL密码
安装完成后回自动重启
(二)安装文件管理(网上的安装教程都是装AjaXplore,r但其实真正用过的人应该知道这管理器是没文件解压缩功能的.所以我这边在这里增加一个带解压缩功能的管理器安装方法)
zppy repo add rustus.txt-clan.com
zppy update
zppy install kfm
zppy repo add zppy.vjvj.tk
zppy update
zppy install ajaxplorer
文件管理器装好了就(后台记得把摸块打开)
(三)安装语言包
zppy repo add zpanel-packages.sammottley.co.uk
zppy update
zppy install ZXTS
后台开启动摸块设置好语言(虽然官方说到这里就可以用了其实还是不能用的)
phpMyAdmin用root帐户登陆 _core下的x_translations (Structure 结构)把Type 改成MEDIUMTXT
这样语言就装好了