updating readme for new install

This commit is contained in:
Pepijn Over 2014-02-08 19:36:17 +01:00
parent 6e19063972
commit 9894399c2a
2 changed files with 47 additions and 31 deletions

View File

@ -5,12 +5,14 @@
#########################
- Merged PHP Server Monitor Plus project by Luiz Alberto S. Ribeiro (https://github.com/madeinnordeste/PHP-Server-Monitor-Plus).
-- New layout (thanks to twitter bootstrap)
- Support for mosms provider by Andreas Ek
- Support for Textmarketer provider by Perri Vardy-Mason
- New install module.
- Support for mosms provider by Andreas Ek.
- Support for Textmarketer provider by Perri Vardy-Mason.
- Language files are now automatically detected, instead of a hardcoded list.
- Adding Korean language file (thanks to Ik-Jun).
- Adding Portuguese / Brazilian language file (thanks to Luiz Alberto S. Ribeiro).
- Large status page by Michael Greenhill.
- New config file (see install instructions in README).
#########################
#

View File

@ -6,7 +6,7 @@ PHP Server Monitor is a script that checks whether the servers on your list are
It comes with a web based user interface where you can add and remove servers or websites from the MySQL database,
and you can manage users for each server with a mobile number and email address.
With version 2.0 there's the support for websites as well. On the "Add server" page, you can choose
With version 2 there's the support for websites as well. On the "Add server" page, you can choose
whether it is a "service" or a "website":
* Service
@ -27,8 +27,8 @@ whether it is a "service" or a "website":
In that case the script will return a "status offline", and will start sending out notifications.
Each server has it's own settings regarding notification.
You can choose for email notification or text message (SMS). As of version 2.0, there are 3 gateways
available:
You can choose for email notification or text message (SMS).
The following SMS gateways are currently available:
* Mollie - <http://www.mollie.nl>
* Spryng - <http://www.spryng.nl>
@ -46,60 +46,76 @@ The cron/status.cron.php can be added as a cronjob which will keep the server st
I'd appreciate any feedback you might have regarding this script. Please leave it on the GitHub
project page (tracker), or send me an email (see top of file for link).
## DOWNLOAD
The latest version can be found at <http://phpservermon.neanderthal-technology.com/>.
You can also clone the git repo at <http://github.com/dopeh/phpservermon>.
You can also clone the git repo at <http://github.com/phpservermon/phpservermon> if you want to contribute.
## REQUIREMENTS
* PHP 5
* PHP packages: cURL
* PHP 5.3+
* PHP packages: cURL, MySQL
* MySQL Database
* FTP access
## INSTALL
By default the PHP Server Monitor does not come with any security methods. After uploading these files to
your public html folder these will be visible to everyone on the web. It is recommended to put a password
on this folder to prevent other people from playing with your tool. An example .htaccess login script can
be found in the example/ dir. To create your own username and password for the .htpasswd file, see
<http://www.htaccesstools.com/htpasswd-generator/>
### 1. Configuration
Rename the config.inc.php.sample file to config.inc.php, then open the
config.inc.php file with a plain text editor such as Notepad.
The first thing to do now in order to get started, is to get your database login information
right. The information is stored using php's define() function.
The install script will guide you through setting up the configuration, but if you want to be ahead of the game, you can do this one first.
Rename the config.php.sample file to config.php, then open the config.php file with a plain text editor such as Notepad.
The first thing to do is to get your database login information right.
The information is stored using php's define() function.
To change these values correctly, only update the second parameter of the function.
For example:
define('SM_DB_USER', 'db_user');
define('PSM_DB_USER', 'db_user');
To change your username you should ONLY change the 'db\_user' part.
Do NOT remove the quotes around your username as that will result in an error.
If you do not feel comfortable doing this, skip this step and the install script will generate it for you.
### 2. Upload files
The next step is to get your files onto your webserver where you can reach them.
You can rename the folder of the server monitor without trouble, but if you change the structure please make sure
to update the settings in the config.php file.
You can rename the folder of the server monitor without trouble.
### 3. Run install.php
Once your database login information is correct, you can run the install.php script located in the root dir.
This script will create all the database tables you will need.
After running the install.php script you can remove it.
You can now run the install.php script located in the root dir.
### 4. Configure your installation
Open the main page of the server monitor, by simply calling index.php. In the menu on the top find "config",
it will open a page where you can change the necessary information for your tool.
### 5. [optional] Add a cronjob
## UPGRADE
### From 2.0
The structure of the project has changed quite a bit since 2.0, but if you have not made any local changes the upgrade is quite easy.
The best thing to do is to replace all your current files with the new release, except for the config.inc.php file.
The config file has actually been renamed since 2.0, but if you keep it there while upgrading the install script will use it to prefill your database information.
* Replace all files except(!) config.inc.php
* Navigate to install.php
* Follow the steps
* Remove the old config.inc.php file
## Security
By default the PHP Server Monitor does not (yet) come with any security methods. After uploading these files to
your public html folder these will be visible to everyone on the web. It is recommended to put a password
on this folder to prevent other people from playing with your tool. An example .htaccess login script can
be found in the example/ dir. To create your own username and password for the .htpasswd file, see
<http://www.htaccesstools.com/htpasswd-generator/>
## Setting up a cronjob
In order to keep the server monitor up to date, the monitor.php file has to run regularly.
If you're running this on a linux machine, the easiest way is to add a cronjob.
@ -112,15 +128,13 @@ If it is your own server or you have shell access and permission to open the cro
As you can see, this line will run the status.cron.php script every 15 minutes. Change the line to suit your needs.
If you do not have shell access, ask your web hosting provider to set it up for you.
### 6. Voila!
## CUSTOMIZING
### Language
The server monitor uses language files. That means that any regular text you see on the screen can easily be
changed without having to dig through the code. These language files are stored in the directory "lang".
changed without having to dig through the code. These language files are stored in the directory "src/lang".
The language that's being used by the monitor is defined in the config table. If you like
you can make changes to the language file or even add a new one.
@ -148,12 +162,12 @@ The second part is the actual message. There are a few variables you can use in
To add a new language, follow these steps:
* Create a new file in the directory "lang" named "mylanguage.lang.php".
* Create a new file in the directory "src/lang" named "mylanguage.lang.php".
* Copy the contents of the file "en.lang.php" to your new file.
* Your new language should now be available on the config page.
* Translate the English stuff to your own language.
* Send a copy to pep[at]neanderthal-technology.com so I can add it to the next release :)
* Or, send me a pull request on github.
* Or, send me a pull request on github (https://github.com/phpservermon/phpservermon).
## CREDITS