sudo yum -y update
sudo yum install -y gcc make
sudo yum install -y yum-plugin-changelog
sudo yum update --changelog
List of PHP packages [https://webtatic.com/packages/php70/]
sudo rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
sudo yum install --enablerepo=webtatic-testing php70w php70w-devel php70w-fpm php70w-mysqlnd php70w-mbstring php70w-pdo php70w-mcrypt php70w-xml php70w-mbcrypt php70w-pear php70w-gd php70w-curl php70w-opcache php70w-pecl-apcu php70w-imap php70w-pecl-redis
sudo yum install -y nginx
/etc/php-fpm.d/www.conf
(Add or uncomment by removing ;
in the start)
[global]
emergency_restart_threshold = 10
emergency_restart_interval = 1m
process_control_timeout = 10s
[www]
listen = /var/run/php-fpm/php-fpm.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0664
user = nginx
group = nginx
pm.max_children = 20
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 200
php_admin_value[memory_limit] = 64M
### run at startup, and start them up
sudo chkconfig nginx on
sudo chkconfig php-fpm on
sudo service nginx start
sudo service php-fpm start
sudo nginx -s reload && sudo service nginx restart && sudo service php-fpm restart
php -v
sudo yum -y install mysql-server sudo service mysqld start
sudo yum install -y openssl-devel
sudo pecl install mongodb
Note:
- check file exists ====>
/usr/lib64/php/modules/mongodb.so
- add
extension=mongodb.so
tophp.ini
cd ~
curl -sS https://getcomposer.org/installer | php
chmod +x composer.phar
mv composer.phar /usr/local/bin/composer
Check the owner permission for php-fpm sock (/var/run/php-fpm/php-fpm.sock
)
sudo chown -R nginx /var/run/php-fpm/php-fpm.sock
๐ sdev.in