How to: Install CSP MySQL User Manager

Install CSP


- Added: Function for genxml to require a key to generate the xml output.
- Added: Added/addedby/changed/changedby added to the csv import/export function.
- Added: Function to turn off/on php notices errors (debug mode).
- Added: Added 'js' folder to the robots.txt disallow list.
- Added: Better support for special characters.
- Added: Sorting after latest user first.
- Added: Function to create random usernames.
- Fixed: Charset error on the "you are not authorized" page.
- Fixed: &-char could cause genxml to stop working.
- Fixed: Removed unneeded mysql calls.
- Fixed: Secured tools from url hack.
- Changed: Removed the '::' in the page title.
- Changed: Locked the 'csp value' textboxes under 'importing profiles from csp' tool.
- Changed: New style for buttons.

Requirements
-Running Version of CSP (Server side)
-CSP Proxy XML
-Download attached cmum-231.zip
-General Linux SSH terminal knowledge

Install
Firstly we have to install phpMyAdmin and MySQL onto your server, 

Code:
 sudo apt-get install phpmyadmin
Code:
sudo apt-get install mysql-server
Make sure all passwords are the same when installing to make it easier to configure and a better database sync.
Once passwords are set you may be prompted to Retry, Cancel, Continue. Select the number which refers to continue if the same error message appears then refer to Skip.

Now into installing the CSP tables for the database into MySQL
Using your FTP Program go to /var/lib/mysql/mysql/ . Copy the contents of SQL in the attached file to this directory.

Now to install the tables run 

Code:
mysql -u root -p PASSWORD -h localhost mysql < /var/lib/mysql/mysql/cmumdb.sql
Replace PASSWORD with the password you set when installing MySQL

That's SQL side installed, and DONE Now onto the Web Interface side

Go to /var/www/ and create a folder called CSP 

Code:
cd /var/www
Code:
 mkdir csp
Login to your prefer FTP program again and go into the server and locate the folder which has just been created /var/www/csp
Copy over the content in WWW in the attached .zip file.

Locate examples.config.php
Copy and paste the following 

Code:
<?php 
$dbhost = "127.0.0.1"; 
$dbname = "mysql"; 
$dbuser = "root"; 
$dbpass = "PASSWORD"; < this is the password you used to set myadmin and mysql 
$charset = "utf-8"; 
?>
Rename this file to config.php

Go to csp/genxml/ and open genxml.php
Edit the top of the file to the following 

Code:
 $dbhost = "127.0.0.1"; 
$dbname = "mysql"; 
$dbuser = "root"; 
$dbpass = "PASSWORD"; < this is the password you used to set myadmin and mysql 
$charset = "utf-8";
ONLY EDIT THAT PART
Using PASSWORD as the one set when installing MySQL.

Go to your browser and put your server IP or DNS/csp
example 

Code:
http://192.168.0.1/csp
CSP should open if not you've done something wrong. So go through the guide again. But without installing SQL

Default Authentication 

Code:
 user = admin 
pass = password
REMEMBER TO CHANGE YOUR PASSWORD

Linking To CSP
Login to your server using your FTP program

Go to your CSP config Installation directory which is usr/local/csp/config and Edit proxy.xml

Replace this the default user manager
With this 

Code:
<user-manager allow-on-failure="false" log-failures="true">
<auth-config>
<update-interval>1</update-interval>
<user-source name="tnt">
<user-file-url>YOUR GENXML DIRECTORY(EXAMPLE:http://192.168.0.1/csp/genxml/genxml.php</user-file-url>
</user-source>
</auth-config>
</user-manager>
Thanks and Enjoy 

Recently Updated