Setting up a 1-click install for Pligg

Register an Account
 
 
Article Tools Display Modes
  #1 (permalink)  
Old 11-28-2007, 09:49 PM
AshDigg's Avatar
Mayor of PliggVille/Coder
 
Join Date: Dec 2005
Posts: 1,515
-- Reserved --
Reply With Quote
  #2  

Setting up a 1-click install for Pligg

HowTo for Pligg 1-Click installs for Pligg 1.0

Setup a script to do the following...
1) Rename settings.php.default to settings.php.
2) Rename /libs/dbconnect.php.default to /libs/dbconnect.php
3) chmod 777 (or 755)
* /admin/backup/
* /avatars/groups_uploaded/
* /avatars/user_uploaded/
* /cache/
* /cache/admin_c/
* /cache/templates_c/
* /languages/

4) chmod 666
/libs/dbconnect.php
/languages/lang_english.conf
settings.php
5) chmod 655
config.php
6) Update /libs/dbconnect.php with the MySQL information
7) Direct the user to http://www.domain.com/pliggfolder/in...all.php?step=4

We also have a bash script that does the above. This should be run from the folder the pligg files are in. You may want to add a "tar zxvf" in the beginning to untar the pligg files into a folder and a "chown -R" at the end to change ownership.

Usage:
sh PliggInstall.sh database_host database_name database_user database_pass

Example
sh PliggInstall.sh localhost pligg ashdigg password

[php]
#!/bin/bash

cp settings.php.default settings.php
chmod 777 admin/backup
chmod 777 avatars/groups_uploaded
chmod 777 avatars/user_uploaded
chmod 777 cache
chmod 777 cache/admin_c
chmod 777 cache/templates_c
chmod 777 languages
chmod 766 settings.php

touch libs/dbconnect.php

echo "> libs/dbconnect.php
echo "define("EZSQL_DB_USER\", '$3');" >> libs/dbconnect.php
echo "define(\"EZSQL_DB_PASSWORD\", '$4');" >> libs/dbconnect.php
echo "define(\"EZSQL_DB_NAME\", '$2');" >> libs/dbconnect.php
echo "define(\"EZSQL_DB_HOST\", '$1');" >> libs/dbconnect.php
echo "if (!function_exists('gettext')) {" >> libs/dbconnect.php
echo " function _($s) {return $s;}" >> libs/dbconnect.php
echo "}" >> libs/dbconnect.php
echo "?>" >> libs/dbconnect.php

chmod 766 libs/dbconnect.php

-------------------------------------------------------------------------------------------
HowTo for Pligg 1-Click installs for Pligg Beta Versions

Setup a script to do the following...
1) Rename settings.php.default to settings.php.
2) Rename /libs/dbconnect.php.default to /libs/dbconnect.php
3) chmod 777 (or 755)
/avatars/user_uploaded
/backup
/cache
/templates
/templates_c
4) chmod 666
/libs/dbconnect.php
/libs/lang.conf
settings.php
5) chmod 655
config.php
6) Update /libs/dbconnect.php with the MySQL information
7) Direct the user to http://www.domain.com/pliggfolder/in...all.php?step=3



We also have a bash script that does the above. This should be run from the folder the pligg files are in. You may want to add a "tar zxvf" in the beginning to untar the pligg files into a folder and a "chown -R" at the end to change ownership.

Usage:
sh PliggInstall.sh database_host database_name database_user database_pass

Example
sh PliggInstall.sh localhost pligg ashdigg password

PHP Code:
#!/bin/bash

cp settings.php.default settings.php

chmod 766 avatars
/user_uploaded
chmod 766 backup
chmod 777 cache
chmod 755 templates
chmod 777 templates_c

chmod 766 libs
/lang.conf
chmod 766 settings
.php

touch libs
/dbconnect.php

echo "> libs/dbconnect.php
echo "
define("EZSQL_DB_USER\", '$3');" >> libs/dbconnect.php
echo "define(\"EZSQL_DB_PASSWORD\", '$4');" >> libs/dbconnect.php
echo "define(\"EZSQL_DB_NAME\", '$2');" >> libs/dbconnect.php
echo "define(\"EZSQL_DB_HOST\", '$1');" >> libs/dbconnect.php
echo "if (!function_exists('gettext')) {" >> libs/dbconnect.php
echo "    function _($s) {return $s;}" >> libs/dbconnect.php
echo "}" >> libs/dbconnect.php
echo "?>" >> libs/dbconnect.php

chmod 766 libs
/dbconnect.php 


Contributors: chuckroast, AshDigg
Created by AshDigg, 11-28-2007 at 09:49 PM
Last edited by chuckroast, 03-21-2009 at 04:21 PM
1 Comments , 4253 Views
 

Article Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
IIS 6.0 W2K3 & Pligg 9.9.5 - Install (Step by Step) yfki Questions and Comments 2 01-12-2009 03:01 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development