#Prepare CentOS 7.0 Server for Learning Locker LRS
###Assumptions:
- CentOS 7.0 x64 is installed (default install from DigitalOcean Droplet Manager)
- Logged in via ssh key with root privileges
- Using MongoDB as database
Install Remi Collet Repository:
| cd ~ | |
| git clone https://github.com/nateswart/toolbox.git .toolbox | |
| cd .toolbox | |
| git submodule init | |
| git submodule update | |
| cd ~ | |
| ln -s ~/.toolbox/.bash_profile ~/.bash_profile | |
| ln -s ~/.toolbox/.bashrc ~/.bashrc | |
| ln -s ~/.toolbox/composer/.composer ~/.composer | |
| ln -s ~/.toolbox/.drush ~/.drush |
#Prepare CentOS 7.0 Server for Learning Locker LRS
###Assumptions:
Install Remi Collet Repository:
| git clone https://github.com/LearningLocker/learninglocker.git learninglocker | |
| cd learninglocker | |
| composer install | |
| mongo | |
| use learninglocker | |
| exit | |
| db.createUser({user:"username",pwd:"password",roles:["readWrite"]}) | |
| vi app/config/database.php | |
| php artisan migrate |
| rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -y | |
| rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm | |
| yum --enablerepo=remi install httpd | |
| yum --enablerepo=remi,remi-php56 install php php-common php-cli php-pear php-mysqlnd php-pecl-mongo php-gd php-mbstring php-mcrypt php-xml | |
| yum install deltarpm git mongodb mongodb-server npm -y | |
| npm install -g bower -y | |
| yum update -y | |
| systemctl start firewalld.service | |
| systemctl enable firewalld.service | |
| firewall-cmd --permanent --zone=public --add-service=http |
| #!/bin/sh | |
| base='/var/www/html' | |
| owner='root' | |
| webgroup='webdev' | |
| wwwuser='apache' | |
| # UPDATE DRUPAL CORE | |
| #yes | drush up drupal | |
| # UPDATE MODULES | |
| #yes | drush up --no-core |
| sudo -i | |
| # get all RPMs in place | |
| rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
| rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
| # install mysql, restart mysql | |
| yes | yum -y --enablerepo=remi install mysql mysql-server | |
| /etc/init.d/mysqld restart | |
| # install php55 and related packages | |
| yes | yum -y --enablerepo=remi,remi-php55 install httpd php php-common | |
| yes | yum -y --enablerepo=remi,remi-php55 install php-opcache php-pecl-apc php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml |
| yes | yum -y install git && git clone https://github.com/elmsln/elmsln.git /var/www/elmsln && bash /var/www/elmsln/scripts/install/handsfree/centos/centos-install.sh openulmus ou openulmus.org http [email protected] yes | |
| cd $HOME && source .bashrc | |
| rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
| rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
| yes | yum -y --enablerepo=remi install mysql mysql-server | |
| /etc/init.d/mysqld restart | |
| yes | yum -y --enablerepo=remi,remi-php55 install httpd php php-common | |
| yes | yum -y --enablerepo=remi,remi-php55 install php-pecl-apc php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml | |
| /etc/init.d/httpd restart | |
| rm /etc/php.d/uploadprogress.ini |
| <a href="javascript:(function(){ | |
| document.getElementsByClassName("logo-img")[0].innerHTML='<a href="/" rel="home" title="Penn State University" class="active"><img src="http://www.psu.edu/profiles/psu_profile/themes/psu_main/logo.png" alt="Penn State University" id="logo"></a>'; | |
| document.getElementsByClassName("footer-logo")[0].innerHTML='<a href="http://www.psu.edu" title="Penn State" alt="Penn State"><img src="/profiles/psu_profile/themes/psu/images/footer_logo.png" alt="Penn State"></a>'; | |
| })();">For the Glory of Old State</a> |
| #!/bin/bash | |
| # check if apache is still alive, if not bring it back up | |
| # useful for active monitoring systems where you may hit a wall of traffic unexpectedly | |
| # this prevents long term outages in the event you have such a flood of traffic | |
| # based off of http://unix.stackexchange.com/questions/93699/how-to-write-a-shell-script-restart-apache-if-server-reached-maxclients | |
| # where am i? move to where I am. This ensures source is properly sourced | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| cd $DIR |
| yes | yum update | |
| cat <<EOF | sudo apt-get install whatever | |
| O | |
| EOF |