Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
This document describes how to manually install SimpleIRC, in case you didn't want to use the single-command self-installer, or you are on a non-Linux platform such as OS X. Note: This will NOT work on Windows.
First you need to install a number of prerequisite packages. These are typically installed with
yum on Linux RedHat (Fedora / CentOS) or
apt-get on Debian/Ubuntu. For OS X you can probably get away with just installing the Apple Developer Command-Line Tools. Basically you need a working development environment with a C/C++ compiler, because we will be installing Perl modules that need to be compiled from source. Also, remember that SimpleIRC has SSL support, so you will need the OpenSSL libraries as well.
Linux RedHat (yum) Packages:
Debian/Ubuntu (apt-get) Packages:
Linux RedHat (yum) Install Command
yum install perl wget gzip zip gcc gcc-c++ libstdc++-devel pkgconfig curl make openssl openssl-devel openssl-perl perl-libwww-perl perl-Time-HiRes perl-JSON perl-ExtUtils-MakeMaker perl-TimeDate perl-MailTools perl-Test-Simple perl-MIME-Types perl-MIME-Lite
Debian/Ubuntu (apt-get) Install Command
apt-get install perl wget gzip zip build-essential libssl-dev pkg-config libwww-perl libjson-perl
Prerequisite Perl Modules
SimpleIRC also relies on a number of 3rd party Perl modules which are not included in the Perl core distribution. Luckily, there are easy ways to install these, my favorite being cpanm. However, you can use the classic CPAN if you wish.
Here are the Perl modules we need:
cpanm (highly recommended, works on all platforms), simply execute this command on your Terminal as root:
curl -L http://cpanmin.us | perl - App::cpanminus
Now, to install the modules, simply execute these commands:
export PERL_CPANM_OPT="--notest --configure-timeout=3600" cpanm POE::Component::Server::IRC cpanm POE::Component::SSLify cpanm JSON::XS cpanm MIME::Lite cpanm MIME::Types cpanm LWP::UserAgent cpanm URI::Escape cpanm HTTP::Date cpanm IRC::Utils
I should explain the
PERL_CPANM_OPT thing above. By default, cpanm runs ALL the unit tests for all the modules being installed. This can take 15 minutes or more, and drives me insane. If you want to run the tests, please remove the
--notest flag. The
--configure-timeout=3600 flag is added because some modules take a very long time to install, even without testing being enabled (many minutes on slow machines), and cpanm normally times out the install after only 60 seconds. This extends the timeout so we don't get any install errors.
Download and Extract
Next you'll want to download and extract the latest stable release of the software, which is packaged as a tarball (.tar.gz) file. I HIGHLY recommend you install it to the
/opt directory, as that is where most of the shell scripts expect files to live. Install it elsewhere at your own risk.
mkdir -p /opt cd /opt wget http://www.effectsoftware.com/software/simpleirc/latest-stable.tar.gz tar zxf latest-stable.tar.gz
The software will now be installed in
If you prefer the unstable development branch instead, change the URL filename to
SimpleIRC ships a sample configuration, which must be copied to a new location to become the "live" config. Run this command:
cp -R /opt/simpleirc/sample_conf /opt/simpleirc/conf
Please edit the
/opt/simpleirc/conf/config-defaults.json file using your favorite text editor, and give your server a unique
"SecretKey" : "12345",
This is used in various places in the code, including as a "salt string" to salt various hashes, including the one that masks IP addresses. Please set it to some totally random unique string.
Please resist the temptation to edit other settings in the
/opt/simpleirc/conf/config-defaults.json file, because it is replaced when you upgrade to a new version (the SecretKey is a special case, and is preserved). To customize your configuration, either use the web interface (see below), which creates a
config-web.json file (which you also shouldn't edit by hand), or, if you don't want to use the web UI you can create a
config.json file, which overrides everything, including the web settings.
Set Permissions and Create Admin User
For the final setup task, we need to set some file permissions (just in case they weren't set properly in the tarball), and create an administrator user:
chmod 775 /opt/simpleirc/bin/* /opt/simpleirc/bin/add-user.pl --Username admin --Password "CHANGEME" --FullName "Administrator" --Email "firstname.lastname@example.org" --Administrator 1
Please change the
CHANGEME string to a unique password for the admin user. You can also change the username to your own preferred username, if you want. This will be a full administrator account, with infinite access privileges. This is the only way to create your first administrator account.
At this point you should be able to start the SimpleIRC daemon, which starts both the IRC service and web UI. This command should do it:
To stop the service use this command:
The Web UI listens on port 8080 by default (you can easily change this from within the UI). Once you get the daemon started, try this URL in your favorite web browser:
From there you should be able to login using your administrator account you just created, and from the "Settings" tab you can change things such as the web server port, then restart the service.
To make SimpleIRC automatically startup when your server reboots, follow these instructions. Note that these are different for RedHat versus Debian/Ubuntu. If you are using a non-Linux platform like OS X, you're on your own :)
For Linux RedHat (Fedora / CentOS):
cp /opt/simpleirc/install/simpleircd.init /etc/init.d/simpleircd chmod 775 /etc/init.d/simpleircd chkconfig simpleircd on
For Debian / Ubuntu:
cp /opt/simpleirc/install/simpleircd.init /etc/init.d/simpleircd chmod 775 /etc/init.d/simpleircd update-rc.d simpleircd defaults
To completely uninstall SimpleIRC from your server, including all users, logs and data, run these commands:
chmod 775 /opt/simpleirc/install/uninstall.pl /opt/simpleirc/install/uninstall.pl