以下操作均在root
用户下完成。
配置系统的文字系统
vi /etc/environment
LC_ALL=en_US.utf-8
LANG=en_US.utf-8
配置基础用户
useradd -m deploy
useradd www
usermod -a -G deploy www
安装php
yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-devel php56w-fpm
参考:
安装redis
yum install redis
安装php的redis扩展
git clone git://github.com/nicolasff/phpredis.git
cd phpredis
phpize
./configure
make
sudo -s make install
sudo -s
echo "extension=redis.so">/etc/php5/conf.d/redis.ini
exit
参考:
检测是否有安装:
php -m | grep redis
安装nginx
yum install nginx
安装mysql
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum update
sudo yum install mysql-server
sudo systemctl start mysqld
然后,secure mysql
mysql_secure_installation
安装composer
yum install composer
composer global require "fxp/composer-asset-plugin:~1.2.0"
配置redis
调整daemon状态
配置php-fpm
调整运行用户,deploy
配置nginx
调整运行用户,deploy