1. Install git
yum install git
2. Install composer
curl -sS https://getcomposer.org/installer | php
chmod +x composer.phar
mv composer.phar /usr/local/bin/composer
composer -V
References : http://idroot.net/tutorials/how-to-install-php-composer-on-centos-7/
https://github.com/petehouston/laravel-deploy-on-shared-hosting
3. Install gcc
yum install gcc
4. Install mongo (php extension)
yum groupinstall “Development tools” -y
yum install openssl-devel
pecl install mongodb
5. Adding mongodb to php.ini
php -i | grep “Loaded Configuration File”
nano /etc/php.ini
Add the following line
extension=mongodb.so
/usr/sbin/apachectl restart
References : http://php.net/manual/en/mongodb.installation.pecl.php
6.
chmod -R o+w storage
composer install
composer dumpautoload -o
php artisan config:cache
php artisan route:cache
References : https://github.com/petehouston/laravel-deploy-on-shared-hosting
7.
php artisan cache:clear
sudo chmod -R 777 vendor storage
References : http://stackoverflow.com/a/38155938/566092
8. Redirect to /public using .htaccess
sudo nano /etc/httpd/conf/httpd.conf
Find the section <directory /var/www/html> and change AllowOverride None to AllowOverride All
<Directory /var/www/html>
AllowOverride All
</Directory>
Save and exit.
Create .htaccess in the root of your web directory with the following contents :
DirectorySlash Off
RewriteEngine on
RewriteRule ^(.*)$ public/$1
Now restart Apache to put the change into effect:
systemctl restart httpd
References : https://devops.profitbricks.com/tutorials/install-and-configure-mod_rewrite-for-apache-on-centos-7/
9. Creating Solr core
sudo -u solr bin/solr create -c video2
References : http://stackoverflow.com/a/36438016/566092
10. Enabling gzip on apache
Add the following to .htaccess file
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x- javascript application/javascript
</ifmodule>
Reference : http://stackoverflow.com/a/5846765/566092