Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

01 January 2022

673. "Better Minecraft [Forge]" server for version 1.16.5

In post 672 I showed how to set up a better minecraft server for version 1.18. As it turns out, if you want to play Better Minecraft you'll want version 1.16.5, since most of the mods aren't yet available for minecraft 1.18.



The instructions here are adopted and adapted from  https://minecraft.fandom.com/wiki/Tutorials/Setting_up_a_Minecraft_Forge_server

1. Download the following files and put them in an appropriate folder:

https://files.minecraftforge.net/net/minecraftforge/forge/index_1.16.5.html

https://www.curseforge.com/minecraft/modpacks/better-minecraft-modpack/files/3585404

2. Next, do the following

First install the server by running this in the terminal

java -jar forge-1.16.5-36.2.20-installer.jar --installServer

It should give output similar to this:
JVM info: Debian - 17-ea - 17-ea+19-Debian-1
java.net.preferIPv4Stack=true
Found java version 17-ea
Target Directory: .
Data kindly mirrored by CreeperHost at https://www.creeperhost.net/
Extracting main jar:
  Extracted successfully
Considering minecraft server jar
...

The server installed successfully
You can delete this installer file now if you wish

Next do this to unpack and generate the eula.txt file:
java -jar minecraft_server.1.16.5.jar
[07:39:16] [main/ERROR]: Failed to load properties from file: server.properties
[07:39:16] [main/WARN]: Failed to load eula.txt
[07:39:16] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
Edit eula.txt and change eula to true:
 eula=true
3. Launch the server
On debian 11.1 the server crashed with openjdk 11 and 17. However, it worked with openjdk 8.

Instead I launched the server with
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx10G -jar forge-1.16.5-36.2.20.jar



Note that I'm dedicating 10Gb of RAM to the server (I have 32 GB). You might want/need less.



Enjoy!

22 December 2021

672. Modded minecraft server on linux (Better Minecraft [FABRIC])

My son is now of the age where he's interested in playing computer games, and minecraft is popular among his friends. But it can't just be minecraft, it has to be Better Minecraft.

Client

Since curseforge doesn't have a linux-installer, we're using GDLauncher (as an AppImage) to run the minecraft client. Once GDLauncher is running you can install an instance of Better Minecraft by clicking on the "+" in the lower left corner, and clicking onthe CurseForrge tab, and searching for Better. We're using the [FABRIC] version.



You might have to adjust the amount of RAM afforded to minecraft.

The Server:

This was a bit trickier, until I found this: https://fabricmc.net/wiki/install

Follow the instructions under 'Server (simple method)' i.e.

1. Download jar from https://fabricmc.net/use/server/ to a folder where you want your server to reside, e.g. ~/.minecraft_server

(or use
curl -OJ https://meta.fabricmc.net/v2/versions/loader/1.18.1/0.12.12/0.10.2/server/jar )

2. Run
java -Xmx2G -jar fabric-server-mc.1.18.1-loader.0.12.12-launcher.0.10.2.jar nogui

It'll fail, with a message about the EULA.

Edit eula.txt and change false to true.

3. Download Fabric API from https://www.curseforge.com/minecraft/mc-mods/fabric-api and put it in the mods folder (e.g. ~/.minecraft_server/mods)

4. Download the Better Minecraft [FABRIC] Server Pack from https://www.curseforge.com/minecraft/modpacks/better-minecraft-fabric/files/3574082

5. Move the files from the server pack to the server directory i.e. replace the mods folder, and add the config folder + the images. The instructions are otherwise in the README.txt

6. Launch the server 
java -Xmx2G -jar fabric-server-mc.1.18.1-loader.0.12.12-launcher.0.10.2.jar

7. Using GDLauncher to launch your client, then go to Multiplayer, add a server (e.g. localhost, 127.0.0.1), and hopefully it'll show up:



I think this server will be a 'normal' one with default settings i.e. NOT creative mode.

To change to creative mode follow this

a) in the server window, type /op YourName to make yourself an operator

b) then in the minecraft client, type /gamemode 1


12 June 2013

447. Multiuser ECCE

A recent comment lead me to make this post:
[..] Can you advise a correct way of setting up ECCE so that everyone can have an individual account and run on the same machine?

It's a valid question. I haven't had any need for it since I'm running my own cluster, which I currently don't share with anyone. I also manage a multi-user cluster overseas, but I am the only one using ECCE, and so I'm fine running the ECCE server here.

Anyway. I built ECCE 6.4 as shown e.g. here and here.

Below I install the ECCE server as the user verahill, and then install the client software as the users lindqvst and me. In the former case I configure the server using a copied config_from_server script, and in the latter case I use config_with_server. Both methods worked fine. All users are on the same machine, but by editing apps/siteconfig/DataServers you can quite easily configure the ECCE client to connect to a remote server.


Server:

hostname
helium
sudo adduser verahill sudo adduser lindqvst ./install_ecce.v6.4.csh
Main ECCE installation menu =========================== 1) Help on main menu options 2) Prerequisite software check 3) Full install 4) Full upgrade 5) Application software install 6) Application software upgrade 7) Server install 8) Server upgrade IMPORTANT: If you are uncertain about any aspect of installing or running ECCE at your site, please refer to the detailed ECCE Installation and Administration Guide at http://ecce.pnl.gov/docs/installation/2864B-Installation.pdf Hit at prompts to accept the default value in brackets. Selection: [1] 7 Host name: [helium] Server installation directory: [/home/verahill/ecce-v6.4/server] Enter the path to the ECCE application software directory that will use this server (even if this directory is not accessible from the current machine) or [return] if you have not installed application software yet or don't want to update it: ECCE v6.4 will be installed using the settings: Installation type: [server install] Host name: [helium] Server installation directory: [/home/verahill/ecce-v6.4/server] Are these choices correct (yes/no/quit)? [yes] ECCE installation succeeded. *************************************************************** !! You MUST perform the following steps in order to use ECCE !! -- Transfer the script: /home/verahill/ecce-v6.4/server/ecce-admin/config_from_server to the machine where the application software is installed. Run this script as the same user as the application software installation. (This step can be skipped if you have not installed the application software and the server name is specified during that install) -- Start the ECCE server as 'verahill' by running: /home/verahill/ecce-v6.4/server/ecce-admin/start_ecce_server ***************************************************************
cp /home/verahill/ecce-v6.4/server/ecce-admin/config_from_server ~ chmod ugo+r config_from_server


First client
su lindqvst
cd ~
cp /home/verahill/config_from_server .
cp /home/verahill/install_ecce.v6.4.csh .
./install_ecce.v6.4.csh
Main ECCE installation menu =========================== 1) Help on main menu options 2) Prerequisite software check 3) Full install 4) Full upgrade 5) Application software install 6) Application software upgrade 7) Server install 8) Server upgrade IMPORTANT: If you are uncertain about any aspect of installing or running ECCE at your site, please refer to the detailed ECCE Installation and Administration Guide at http://ecce.pnl.gov/docs/installation/2864B-Installation.pdf Hit at prompts to accept the default value in brackets. Selection: [1] 5 Host name: [helium] Server installation directory: [/home/lindqvst/ecce-v6.4/apps] ECCE installation succeeded. *************************************************************** !! You MUST perform the following steps in order to use ECCE !! -- Configure the application software to use the desired ECCE server by running the script: /home/lindqvst/ecce-v6.4/apps/scripts/config_with_server as the same user as the application software installation. (This step can be skipped if you prefer to copy over and run the config_from_server script created during the server installation in the ecce-admin directory) -- To register machines to run computational codes, please see the installation and compute resource registration manuals at http://ecce.pnl.gov/using/installguide.shtml -- Before running ECCE each user must source an environment setup script. For csh/tcsh users add this to ~/.cshrc: if ( -e /home/lindqvst/ecce-v6.4/apps/scripts/runtime_setup ) then source /home/lindqvst/ecce-v6.4/apps/scripts/runtime_setup endif For sh/bash users, add this to ~/.profile or ~/.bashrc: if [ -e /home/lindqvst/ecce-v6.4/apps/scripts/runtime_setup.sh ]; then . /home/lindqvst/ecce-v6.4/apps/scripts/runtime_setup.sh fi ***************************************************************
Next, configure:
./config_from_server
Enter the ECCE application software installation home directory: /home/lindqvst/ecce-v6.4/apps ECCE application software home directory is /home/lindqvst/ecce-v6.4/apps Is this correct? [yes] Adding data server URL for helium to siteconfig/DataServers Adding URL for online help to siteconfig/site_runtime Adding message server URL for helium to siteconfig/jndi.properti
And then do
echo 'export ECCE_HOME=/home/lindqvst/ecce-v6.4/apps' >> ~/.bashrc
echo 'export PATH=${ECCE_HOME}/scripts:${ECCE_HOME}/scripts/parsers:${PATH}' >> ~/.bashrc


Second client:
I set up a third user, installed ECCE as shown above for lindqvst, but instead of running config_from_server
I did:
/home/me/tmp/ecce-v6.4/ecce-v6.4/apps/scripts/config_with_server
Enter the full host name of the machine where the ECCE server is installed: helium ECCE server host name is helium Is this correct? [yes]
And then do
echo 'export ECCE_HOME=/home/me/ecce-v6.4/apps' >> ~/.bashrc
echo 'export PATH=${ECCE_HOME}/scripts:${ECCE_HOME}/scripts/parsers:${PATH}' >> ~/.bashrc
source ~/.bashrc


Tying it all together:

Start the server: As user verahill, start the server.
su verahill
/home/verahill/ecce-v6.4/server/ecce-admin/start_ecce_server
/home/verahill/ecce-v6.4/server/httpd/bin/apachectl start: httpd started [1] 13951 INFO BrokerService - ActiveMQ 5.1.0 JMS Message Broker (localhost) is starting INFO BrokerService - ActiveMQ JMS Message Broker (localhost, ID:helium-39358-1370944321599-0:0) started
ps a|grep 13951
13951 pts/3 S 0:00 grep -v -e ACTIVEMQ -e Loading -e AMQ -e Kaha -e help -e Transport
You should be able to autostart ecce using something along the lines of the following in your /etc/rc.local:
su verahill '/home/verahill/ecce-v6.4/server/ecce-admin/start_ecce_server' &
As a user, start ecce:
su lindqvst
/home/lindqvst/ecce-v6.4/apps/scripts/ecce
Create a password

Create a job
Then log out and log in as another user, e.g. me

su me
ecce
me is in reality called something else
Note that as user me you can't see any of the files in lindqvst's folder -- nor access them without inputting the correct (ECCE) username and password.

And again, note that there are alternative ways of setting this up -- you could have everyone log in as the same linux user, but still retain different ECCE identities. I think what I show here is more in line with how most people would want to use ECCE though.

Also, note that you can quite easily be a client on a different computer too -- the key lies in editing the apps/siteconfig/DataServers file.