CentOS 6上的Multicraft(Minecraft Panel)
Ammyae
・10 分钟阅读
Multicraft Panel
Multicraft是一个简单易用的基于网络的控制面板,用于Minecraft服务器,你可以通过在线控制面板创建,停止,启动,监视,配置,上传,下载和运行你的服务器,它包含以下功能:
- 玩家监控
- 文件配置
- 轻松更改.jar
- 内置FTP客户端
- Web控制台
按照以下步骤在CentOS 6上安装Multicraft
1.安装MySQL
yum install mysql mysql-server
设置MySQL在启动时启动,然后启动MySQL :
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
运行安全安装,在提示时输入密码,然后按enter键。
mysql_secure_installation
2.安装Apache和PHP
yum install httpd php
将Apache设置为开机时启动,然后启动Apache :
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
安装PHP扩展:
yum install php-mysql php-gd
重启apache:
/etc/init.d/httpd restart
3.安装phpMyAdmin
要管理MySQL数据库,必须安装phpMyAdmin,但是要做到这一点,你需要打开EPEL repo,并且安装phpMyAdmin 。
cd /tmp
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum install phpmyadmin
要使用phpMyAdmin,你需要配置它的访问,首先打开配置文件:
nano /etc/httpd/conf.d/phpMyAdmin.conf
使用向下箭头键查找此节:
IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
/IfModule>
并更改拒绝允许。
按Ctrl +X键退出,并且保存文件,然后按Y键,然后按回车键,接下来,重新启动你的网络服务器:
/etc/init.d/httpd restart
你现在可以通过yourdomain.com/phpMyAdmin或yourserverIP/phpMyAdmin登录到phpMyAdmin ,请注意phpMyAdmin
是区分大小写的。
默认登录帐户为"root",你的root密码为。
成功登录到phpMyAdmin后,创建两个数据库:
multicraft_panel
multicraft_daemon
为了保护Multicraft面板内容你需要使用以下方式打开Apache配置:
nano /etc/httpd/conf/httpd.conf
向下滚动,直到找到类似于下面的部分:
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be"All","None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
全部更改为全部,保存文件,然后退出(Ctrl +X,然后输入Y,然后输入)。
重启apache:
/etc/init.d/httpd restart
接下来,我们还有几个先决条件,通过运行以下命令安装Java,zip和解压缩:
yum install java-1.7.0-openjdk zip unzip
4安装Multicraft
现在安装Multicraft板
首先下载64位Multicraft,如果运行32位Linux操作系统请将64改为32.
wget http://www.multicraft.org/download?arch=linux64 -O multicraft.tar.gz
然后提取并切换到目录,在目录中,运行安装程序:
tar xvzf multicraft.tar.gz
cd multicraft
./setup.sh
你将看到以下输出,按照粗体字突出显示的说明。
***
*** Welcome to Multicraft!
***
`This installer will help you get Multicraft up and running.
No changes are made to the system until all of the required information has been collected.
`NOTE: This script automates the installation as described on the Multicraft website. Use it at your own risk.`
Run each Minecraft server under its own user? (Multicraft will create system users): [y]/n
按回车键Run Multicraft under this user: [minecraft]
按回车键User not found. Create user 'minecraft' on start of installation? [y]/n
按回车键Install Multicraft in: [/home/minecraft/multicraft]
按回车键If you have a license key you can enter it now: [no]
如果你有一个,并且继续请输入许可证密钥或者按ENTER键If you control multiple machines from one control panel you need to assign each daemon a unique ID (requires a Dynamic or custom license). Daemon ID? [1]
按回车键`Will the PHP frontend run on this machine? [y]/n` **Press ENTER** `User of the webserver: [apache]` **Press ENTER** `Location of the PHP frontend: [/var/www/html/multicraft]` **Press ENTER**
Enable builtin FTP server? [y]/n
按回车键IP the FTP server will listen on (empty for same as daemon): [108.61.212.243]
FTP server port: [21]
按回车键Block FTP upload of .jar files and other executables (potentially dangerous plugins)? [y]/n n
按n,然后输入`What kind of database do you want to use? [sqlite]/mysql mysql` **Type mysql, then press ENTER**
NOTE: This is for the daemon config, the front end has an installation routine for database configuration and initialization.
Database host: [127.0.0.1]
Database name: [multicraft_daemon]
Database user: [root]
Database password: [] YourPassword
输入你的MySQL密码,然后按回车键`***` `*** Please use the control panel to initialize the database.` `***`
NOTE: Any running daemon will be stopped!
Ready to install Multicraft. Start installation? [y]/n
按回车键`***` `*** INSTALLING`
(这里修剪过的详细输出)*** Installation complete
!***
`PLEASE READ:`
Before starting the daemon you need to run the control panel installer to initialize your database. (example: http://your.address/multicraft/install.php)
`The daemon WILL NOT work correctly as long as the database hasn't been initialized.`
`After running the control panel installer start the daemon using the following command:`
/home/minecraft/multicraft/bin/multicraft -v start
`If there are any issues, please check the log file: '/home/minecraft/multicraft/multicraft.log'`
After reading the instructions above, press [Enter] to continue.
按回车键
``In case you want to rerun this script you can save the entered settings.
Save entered settings? ([y]/n)
按回车键Saving settings to 'setup.config'.
面板配置
如果没有遇到任何错误,你可以转到yourdomain.com/multicraft或yourserverIP/multicraft 。
你现在将在Multicraft板安装。
按START INSTALLATION
开始,然后查看需求,如果你的服务器满足所有要求,请按CONTINUE
,然后再次按CONTINUE
。
到达Database 1: PANEL
页面时,需要从数据库类型下拉列表中选择MySQL,然后填写所需的数据,包括你的密码,按SAVE AND TEST
来初始化数据库。
初始化数据库后,你可以继续进入到面板的下一步,用户名为admin
,密码为admin
。
登录后,按CONTINUE
键,然后前往下一个数据库节Database 2: DAEMON
,再次选择MySQL,填写所需的数据,然后按CONTINUE
。
你现在已经进入了最后一页,Settings
,这里需要的唯一配置是将"管理员联系人电子邮件"设置为你的电子邮件地址,然后按SAVE
键。
最后,通过返回到命令行,并且运行以下命令来启动Multicraft控制守护进程:
/home/minecraft/multicraft/bin/multicraft -v start
你现在可以登录到面板,并且控制你的Minecraft服务器了。