amuck-landowner

[Minecraft] How to install & fully secure Multicraft control panel.

professionalxen

New Member
Tutorial on how to install multicraft control panel (CentOS 6-64 bit)

SSH into root and begin:

 

yum install nano

 

And disable SELinux:

Code:

setenforce 0

 

Installing MySQL 5:

 

To install MySQL, we do this:

 

Code:

yum install mysql mysql-server

 

Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:

 

Code:

chkconfig --levels 235 mysqld on

/etc/init.d/mysqld start

 

Set passwords for the MySQL root account:

 

Code:

mysql_secure_installation

 

Code:

[root@Server8 ~]# mysql_secure_installation

 

 

 

 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL

SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

 

 

In order to log into MySQL to secure it, we'll need the current

password for the root user. If you've just installed MySQL, 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):

OK, successfully used password, moving on...

 

Setting the root password ensures that nobody can log into the MySQL

root user without the proper authorisation.

 

Set root password? [Y/n] <-- Press ENTER

New password: <-- your new root mysql password

Re-enter new password: <-- re-enter your new root mysql password

Password updated successfully!

Reloading privilege tables..

... Success!

 

 

By default, a MySQL installation has an anonymous user, allowing anyone

to log into MySQL 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/n] <-- Press ENTER

... 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? [Y/n] <-- Press ENTER

... Success!

 

By default, MySQL 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? [Y/n] <-- Press ENTER

- 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/n] <-- Press ENTER

... Success!

 

Cleaning up...

 

 

 

All done! If you've completed all of the above steps, your MySQL

installation should now be secure.

 

Thanks for using MySQL!

 

 

[root@Server8 ~]#

 

Installing Apache:

 

Code:

yum install httpd

 

Now configure your system to start Apache at boot time...

 

Code:

chkconfig --levels 235 httpd on

 

... and start Apache:

 

Code:

/etc/init.d/httpd start

 

Apache's default document root is /var/www/html on CentOS, and the configuration file is /etc/httpd/conf/httpd.conf. Additional configurations are stored in the /etc/httpd/conf.d/ directory.

 

Installing PHP5:

 

We can install PHP5 and the Apache PHP5 module as follows:

 

Code:

yum install php

 

We must restart Apache afterwards:

 

Code:

/etc/init.d/httpd restart

 

Getting MySQL Support In PHP5:

 

To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:

 

Code:

yum search php

 

Pick the ones you need and install them like this:

 

Code:

yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc

 

Now restart Apache2:

 

Code:

/etc/init.d/httpd restart

 

Installing phpMyAdmin:

 

phpMyAdmin is a web interface through which you can manage your MySQL databases.

 

First we enable the RPMforge repository on our CentOS system as phpMyAdmin is not available in the official CentOS 6.2 repositories:

 

Import the RPMforge GPG key:

 

Code:

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

 

On x86_64 systems:

 

Code:

yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

 

On i386 systems:

 

Code:

yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

 

phpMyAdmin can now be installed as follows:

 

Code:

yum install phpmyadmin

 

Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza):

 

Code:

nano /etc/httpd/conf.d/phpmyadmin.conf

 

Code:

#

# Web application to manage MySQL

#

 

#<Directory "/usr/share/phpmyadmin">

# Order Deny,Allow

# Deny from all

# Allow from 127.0.0.1

#</Directory>

 

Alias /phpmyadmin /usr/share/phpmyadmin

Alias /phpMyAdmin /usr/share/phpmyadmin

Alias /mysqladmin /usr/share/phpmyadmin

 

Next we change the authentication in phpMyAdmin from cookie to http:

 

Code:

nano /usr/share/phpmyadmin/config.inc.php

 

Code:

[...]

/* Authentication type */

$cfg['Servers'][$i]['auth_type'] = 'http';

[...]

 

Restart Apache:

 

Code:

/etc/init.d/httpd restart

 

Installing PDO_MYSQL:

 

Code:

yum install php-devel php-pear mysql-devel httpd-devel

 

pecl install pdo

 

PHP_PDO_SHARED=1 pecl install pdo_mysql

 

Now add these lines at the top of Php.ini:

 

Code:

extension=pdo.so

extension=pdo_mysql.so

 

To access the file type this in ssh:

Code:

nano /etc/php.ini

 

Now restart apache

 

Code:

apachectl restart

 

Installing Sun/Oracle Java On Centos:

 

Download Sun/Oracle Java JDK/JRE 7u21 32-bit/64-bit RPM packages (choose 1 only)

Download Sun/Oracle Java 7u21 from here Java 7 Download. Select rpm package

 

Now upload that to your server via FTP to the /root directory this should take 10-15 minutes depending on your internet connection speed.

 

Once done you now have to enter this in ssh;

 

Code:

## JDK 32-bit ##

rpm -Uvh /root/jdk-7u45-linux-i586.rpm

 

## JDK 64-bit ##

rpm -Uvh /root/jdk-7u45-linux-x64.rpm

 

## JRE 32-bit ##

rpm -Uvh /root/jre-7u45-linux-i586.rpm

 

## JRE 64-bit ##

rpm -Uvh /root/jre-7u45-linux-x64.rpm

 

Installing Multicraft:

 

Download Multicraft:

Code:

32 bit:

# wget http://www.multicraft.org/download -O multicraft.tar.gz

64 bit:

# wget http://www.multicraft.org/download?arch=linux64 -O multicraft.tar.gz

 

Extract the Multicraft archive:

#

Code:

tar xvzf multicraft.tar.gz

 

Change into the extracted directory:

#

Code:

cd multicraft

 

Run the setup.sh script:

#

Code:

./setup.sh

 

-----------------------------

 

And to protect directory:

 

nano /etc/httpd/conf/httpd.conf

 

Find the following:

# 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 ALL

 

Pro-Xen

   
 

Wintereise

New Member
Just as a FYI to people following this, you're going to end up with PHP 5.3.3 this way, which is well, ancient.

If Multicraft works with 5.4, you should pull the remi repo and use that. If not, 5.3.27 should be your goal. Writing guides for the default 5.3.3 is not a good idea anymore.
 
Top
amuck-landowner