NAVIGATION
Hi there, since I was recently introduced into all the benefits from shell access, I wrote a little shell script that sets up a fresh phpwcms v 1.4.1 within seconds :) Of course you still need to run the online-setup routine afterwards since it creates the admin user and sets some basic variables. But if you have shell access, this script might spare you approx. 20 minutes!!
Docu: –
Forum: (Shell) Script: Installation in under 10 seconds
Autor: phalancs (08.05.09) –> treated: K.Heermann (flip-flop) (08.05.09)
CMS-version: >= V1.4.1
Script-version: V1.0 (08.05.09)
fileiname: phpwcms_install.sh
Location: user root
Condition: → You need a account with executable shell scripting
This what the script does in detail:
#!/bin/sh clear echo "=================================================" echo "THIS WILL INSTALL PHPWCMS V.1.4.1" echo "" echo "Be sure to have the p7zip package installed" echo "Otherwise use this command as root: apt-get install p7zip" echo "=================================================" echo "" echo "press any key to continue" read echo "" echo "TYPE SUBFOLDER NAME (no quotes or slashes):" echo "Installation will start immediately afterwards" echo "==============================================" read SUBF clear echo "======================================" echo "DOWNLOADING PHPWCMS VERSION 1.4.1 r307" echo "======================================" echo "" mkdir $SUBF cd $SUBF wget http://phpwcms.googlecode.com/files/phpwcms_r307.7z p7zip -d phpwcms_r307.7z mv phpwcms_r307/* . rm phpwcms_r307 -r clear echo "===============================" echo "SETTING FILE- AND FOLDER-RIGHTS" echo "===============================" echo "" echo "This might take a moment..." find . -type d -exec chmod 0755 {} \; find . -type f -exec chmod 0644 {} \; cd .. chmod 777 $SUBF/upload chmod 777 $SUBF/filearchive chmod 777 $SUBF/filearchive/can_be_deleted chmod 777 $SUBF/template chmod 777 $SUBF/content chmod 777 $SUBF/content/images chmod 777 $SUBF/content/gt chmod 777 $SUBF/content/form chmod 777 $SUBF/content/rss chmod 777 $SUBF/content/tmp chmod 777 $SUBF/content/pages chmod 777 $SUBF/template/template_lang chmod 666 $SUBF/setup/setup.conf.inc.php chmod 666 $SUBF/template/inc_css/frontend.css chmod 666 $SUBF/config/phpwcms/conf.indexpage.inc.php chmod 666 $SUBF/template/inc_default/startup.php clear echo "===================================" echo "SUCCESS! SETUP DONE!" echo "" echo "NOW CONTINUE USING THE WEBINSTALLER:" echo "yourdomain.tld/$SUBF/setup/setup.php" echo "===================================" echo ""
<note>Since there might issues if you upload a shell script edited on a windows system to a linux server you might sometimes get the following error: bad interpreter: No such file or directory
See this hint for a quick remedy
http://www.devdaily.com/blog/post/linux-unix/shell-script-error-bad-interpreter-no-such-file/
</note>
<note>You need a 7zip extractor to extract the package, use this command as root to get one: apt-get install p7zip </note>