Create The Database and Users

CREATE AND PREPARE THE ATTACHMAX DATABASE
-----------------------------------------
Before you proceed to the next installation step you should know:
- "username" - the username for connecting to the database
- "password" - the password for the Database
- "databasename" - the name of the database

1) You can either create this through phpmyadmin or directly via ssh into mysql

Via Phpmyadmin

1) On the Phpmyadmin homepage where it says "Create new database"
Enter any name for the database and then click Create.

2) You will be taken to a new page that gives you a message
Database "name you chose" has been created.

3) Go back to your Homepage and click Privileges

4) Click Enter Username link

5) You will be taken to a new Page, where you can enter
Username: enter a username here
Host: Usually localhost
Password: The password for the user

Down Below you will see some radio options,


Below that Select the adequate Privileges and your Done

------------------------------------------------------------
Faster Alternative approach for ssh users.
Enter these commands
1) mysql -p (which will take you into mysql shell)
2) Create database databasename
2) grant all privileges on databasename.* to user@localhost identified by 'password';
i.e grant all privileges on am_test.* to am_user@localhost identified by 'zoomzoom';

Install Attachmax Script via Webpage

1) Grant File Permissions
Either Ftp and chmod 0777

Files
- config.php
- .htaccess
- slave/config.php

Folders
- cache
- tmp
- slave/images
- slave/files
slave/images

Or if you have ssh faster way inside your attachmax directory is
chmod 0777 config.php cache tmp .htaccess slave/config.php slave/images slave/files



2)Start Installation Website
In browser go to install/ of your chosen installation website,
eg: http://www.yourwebsite/install/
Click Check Button and then next if all writeable and green



3) Database Settings
Click next when entering database details from below, if the database connection fails
it could mean that you type in the wrong information, double check password, for extra spaces and case sensitive information.

- enter your database Username in first field
- enter your Database Password in second field
- Type in your Mysql Database Name
(Only click Drop tables, if you would like to reinstall attachmax with the same
database details and would like to wipe the database clean)



4)Site settings:
By Default Url will already be entered
along with the path, of your current directory, so you will really only need to modify
the name of your site. This can be anything and can be modified later via admin.
You will have option of 3 tick boxes, for first time installs leave everything blank, unless you are sure
you have patched your php for Progress meter and have Short Url's capability.



5)Site admin settings:
Enter a valid email address, admin username and password, which will be used to log into admin.
Click next when done



6)Paypal Settings
Enter the name of your paypal account if you have one, leave blank if you dont.
Only click 2co checkbox if your account is able to accept 2co payments.

Click next to Install Slave Server (Where your Files and Images Will be placed)

Remote Slave Server Installation

Adding Remote Slave Servers (On different Server)
Using ssh
1) Set up a subdomain on another Server, i.e s1.yourdomain.com, test that the domain is up
More information of how to do this can be found via this guide

2) Copy Database Information
Now in your homepage, go into your config.php and copy these 3 entries.
$dbuser = "fvi9";
$dbpass = "fvi9";
$db = "fvi9";


3) Finding Ip of Slave Server
This can be found many ways, but im assuming you already have this knowledge, if not then look at this guide

Keep these values in a notepad as you will need these in future steps.

4) Granting privileges to slave
Now go into shell and type in
a) mysql -p *you should now be logged into mysql shell
b) grant all privileges on databasename.* to dbuser@ipofslave identified by 'password';
i.e grant all privileges on fvi9.* to fvi8@204.34.234.3 identified by 'fvi8';

5) Then type these commands
Flush Privileges;
exit;

6)Now Go onto your slave Server and Upload the contents inside of Slave from the original Attachmax zip package
on the your subdomain root directory.
i.e s1.yourdomain.com in [/home/username/public_html/s1]

7) Giving File Permissions
#chmod 0777 files images
# chmod 667 config.php

8) Running the Install File
Run installer the location will be dependent on where you've uploaded the install folder the domain that you choose in step 1
Follow Steps

9) If succesful a connection will be made to the remote host.
Once finished test an upload from homepage.

10) Now go in and install ffmpeg and other dependencies and you're ready with your new slave.

Setting Up Subdomain via shell

Go into
1) cd /var/named

Usually by default all nameservers are there

2) In your domain type in
nano domain.net.db

In the bottom of this file add an entry like this,
where the ip is the one of your chosen subdomain.

s1 30 IN A 70.212.8.71

Now restart named

and go into your httpd.conf file
Add the entry to s1.