Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jimi008/4bba9ede6b7137b48ba097209289f404 to your computer and use it in GitHub Desktop.
Save jimi008/4bba9ede6b7137b48ba097209289f404 to your computer and use it in GitHub Desktop.
Install PHP Redis Client on ec2 aws
##### ec2-user #######
sudo yum update -y
sudo yum install -y httpd24
sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
sudo service httpd start
sudo service httpd restart
sudo chkconfig httpd on
chkconfig --list httpd
sudo usermod -a -G apache ec2-user
groups
service httpd restart
sudo chown -R ec2-user:apache /var/www/folder/
sudo chmod 2775 /var/www/folder/
find /var/www/folder/ -type d -exec sudo chmod 2775 {} \;
find /var/www/folder -type f -exec sudo chmod 0664 {} \;
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
sudo echo "<?php phpinfo(); ?>" > /var/www/folder/phpinfo.php
#### ROOT USER #####
mkdir -p /opt/redis/php
cd /opt/redis/php
wget –no-check-certificate https://github.com/nicolasff/phpredis/zipball/master
unzip master
cd phpredis-phpredis-4c8cf98
make clean
yum install php56-devel
phpize
./configure
make
make test
make install
echo "extension=redis.so" > /etc/php.d/phpredis.ini
service httpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment