Skip to content

Installation

Valerie Pond edited this page Jul 11, 2021 · 4 revisions

Setup for UNIX machines

Dependencies:

For teh bare bot

  • php-cli (installed with PHP)

For SQL shiet

  • php-mysql
  • an SQLdb to connect to (locally or remotely)

If you don't have an SQL server installed, check out this tutorial

For TLS over IRC connectivity:

  • openssl
  • libssl-dev

Installing requirements

To have installed php-cli and php-mysql. This can be installed from your SSH session with the following:

$ sudo apt-get install php php-mysql

You can verify PHP is installed by checking the version using:

$ php -v

Downloading Valeyard

As always, I am going to recommend you do not do any of this as root. Please log into a separate shell account with non-root priviledges. This is in case someone hijacks the bot, they won't have root access.

So, for the purposes of this example, we are assuming you are using account "ircd".

Change directory (cd) to your user directory;

$ cd /home/ircd/

Clone the repository for Valeyard;

$ git clone https://github.com/ValwareIRC/Valeyard.git

Configuration

Change directory (cd) to Valeyard

$ cd Valeyard

Now from here you can either use your FTP client (WinSCP, FileZilla, etc) to copy the example configuration to the same directory and call it "gateway.conf.php", or you can copy it over from SSH like this;

$ cp example.config.php gateway.config.php

Again, you can either use your FTP client to edit and save the file to your specifications, or you can edit it in your SSH client like this (I recommend nano);

$ nano gateway.config.php

You can save and exit the nano editor by pressing Ctrl+X and then hitting 'y' and Enter when it asks you to save.

Running Valeyard

GateWay must be run from a screen, otherwise when you exit the SSH client the bot will stop running.

To do this, you can simply type the following;

$ screen

If you are already running a screen and need to get back into it, you can resume the screen instead by using;

$ screen -r

If you accidentally lost connection whilst in the screen, just type this:

$ screen -D -r

Once inside the screen, you simply need to type the following to execute the bot;

$ php gateway.php

When you have ensured it is up and running, you can close the screen by pressing;

Ctrl+A then Ctrl+D

And that's you all set!

Clone this wiki locally