Last active
August 29, 2015 14:05
-
-
Save ijobling/33d11ece400a74449692 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################################## | |
#### Script to copy install process explained in codio CodeIgniter Tutorial at | |
#### https://codio.com/s/docs/specifics/codeigniter/ | |
########################################################################## | |
#### Instructions | |
#### Option 1. | |
#### From the Codio Dashboard, create a new project and select the Git Tab | |
#### and then paste the following URL into the box | |
#### https://gist.github.com/33d11ece400a74449692.git | |
#### Give your project a name and click Create. | |
#### Option 2. | |
#### From the Codio Dashboard, create a new Empty template project. | |
#### Open a Terminal window from the Tools->Terminal window | |
#### Copy the contents of this file to a file called 'codeigniterinst.sh' in the root of your machines file system | |
#### Then | |
#### Find the Version number of the latest CodeIgniter by looking at the website at - | |
#### https://ellislab.com/codeigniter/user-guide/installation/downloads.html | |
#### At the time of writing, it is 2.2.0 | |
#### If needed, edit the variable on the next line to show the latest version number | |
CIG_VER="2.2.0" | |
#### Then run the script in the terminal window by typing | |
#### bash codeigniterinst.sh | |
#### End of Instructions | |
########################################################################## | |
echo | |
echo " START OF AUTOMATED INSTALL" | |
echo | |
# set the hostname variable | |
CODIO_HOST=`cat /etc/hostname` | |
# set colour output = echo -e '\E[1;33;44m' | |
# remove colour = ; tput sgr0 | |
# See http://www.tldp.org/LDP/abs/html/colorizing.html for colour codes | |
echo -e '\E[1;33;44m' "Download CodeIgniter, decompress and move files to root"; tput sgr0 | |
wget http://ellislab.com/asset/ci_download_files/CodeIgniter_$CIG_VER.zip | |
unzip CodeIgniter_$CIG_VER.zip | |
mv CodeIgniter_$CIG_VER/{*,.*} ~/workspace | |
echo -e '\E[1;33;44m' "Install php mysql and apache services"; tput sgr0 | |
parts install php5 php5-apache2 mysql | |
echo -e '\E[1;33;44m' "Start the apache and mysql services"; tput sgr0 | |
parts start apache2 mysql | |
echo -e '\E[1;33;44m' "delete install files"; tput sgr0 | |
rm CodeIgniter_$CIG_VER.zip | |
rm -r CodeIgniter_$CIG_VER | |
echo -e '\E[1;33;44m' Remove script file"; tput sgr0 | |
rm codeigniterinst.sh | |
echo | |
echo | |
echo -e '\E[1;37;44m'" .......CodeIngiter Installed!"; tput sgr0 | |
echo - | |
echo To get to your CodeIgniter site, open your browser and go to - | |
echo | |
echo http://"$CODIO_HOST".codio.io:3000 | |
echo | |
echo "or" | |
echo from the Preview menu - the right most Codio menu and select | |
echo the drop down menu and check New Browser Tab and select Box URL. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment