$ yum install -y gcc make wget git zsh openssl-devel vim-enhanced
$ chsh
/bin/zsh
$ curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
$ sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ sudo sed -i -e "s/enabled *= *1/enabled=0/g" /etc/yum.repos.d/epel.repo
$ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
$ sudo sed -i -e "s/enabled *= *1/enabled=0/g" /etc/yum.repos.d/remi.repo
$ sudo yum install -y php --enablerepo=epel --enablerepo=remi --enablerepo=remi-php56
$ sudo yum install -y php-xml --enablerepo=epel --enablerepo=remi --enablerepo=remi-php56
$ sudo yum install -y php-mbstring --enablerepo=epel --enablerepo=remi --enablerepo=remi-php56
$ sudo yum install -y php-mcrypt --enablerepo=epel --enablerepo=remi --enablerepo=remi-php56
$ sudo yum install -y php-mysql --enablerepo=epel --enablerepo=remi --enablerepo=remi-php56
$ sudo yum install -y php-opcache --enablerepo=epel --enablerepo=remi --enablerepo=remi-php56
$ yum -y install php-pecl-xdebug --enablerepo=remi-php56
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/bin/composer
sudo yum install -y php-fpm --enablerepo=epel --enablerepo=remi --enablerepo=remi-php56
- user = apache
+ user = nginx
- group = apache
+ group = nginx
$ sudo rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
$ sudo yum install -y nginx
#laravelプロジェクト名をToDoとする
server {
listen 80;
server_name mylaravelenv.com;
root /vagrant/ToDo/public;
index index.html index.htm index.php;
access_log /var/log/nginx/larabel_access.log;
error_log /var/log/nginx/larabel_error.log;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
try_files $uri =404; #phpファイルが見つからない場合は404
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
# Unixソケットを利用してFastCGIに渡す場合
# fastcgi_pass unix:/path/to/socket_dir/php-fpm.sock;
fastcgi_index index.php;
#fastcgi_split_path_info ^(.+\php)(/.+)$;
# 以下はfastcgi_paramsファイルに直接記述してもOK
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
}
error_page 404 /index.php;
}
$ sudo yum install -y mysql-server mysql-devel
$ sudo chkconfig mysqld on
$ chown -R nginx:nginx storage
$ wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -ivh epel-release-6-8.noarch.rpm
$ yum install beanstalkd --enablerepo=epel
$ chkconfig beanstalkd on
$ service beanstalkd start
/etc/sysconfig/beanstalkd
- #BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog
+ BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog
- CentOS 6.5 + nginx 1.6.1 + Laravel 4.2のインストールメモ。ほぼここを参考にした。
- Laravel4のインストールと初期設定。nginxの設定ファイルをコピペした。