当前位置:Gxlcms > 数据库问题 > centos6: mysql+nginx+php

centos6: mysql+nginx+php

时间:2021-07-01 10:21:17 帮助过:2人阅读

dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/ yum repolist enabled | grep mysql rm -rf /etc/yum.repos.d/mysql*.config-file-path vim /etc/yum.repos.d/mysql-community.repo #note the baseurl, centos6 --> el6, view the system version: uname -r # Enable to use MySQL 5.6 [mysql56-community] name=MySQL 5.6 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql yum install mysql-community-server service mysqld start mysql -uroot -p create user vagrant@% identified by vagrant; grant all privileges on *.* to vagrant@%identified by password; PHP: tar -zxvf php-5.6.23.tar.gz -C /usr/local/src cd php-5.6.23 mkdir -p /usr/local/php5 ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-gd --with-iconv --with-zlib --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-pear --with-gettext --enable-session --with-mcrypt --with-curl make make install cp php.ini-production /usr/local/php5/etc/php.ini rm -rf /etc/php.ini ln -s /usr/local/php5/etc/php.ini /etc/php.ini cp /usr/local/php5/etc/php-fpm.conf.default /usr/local/php5/etc/php-fpm.conf vi /usr/local/php5/etc/php-fpm.conf pid = run/php-fpm.pid #取消前面的分号 cp /usr/local/src/php-5.5.10/sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm#拷贝php-fpm到启动目录 chmod +x /etc/rc.d/init.d/php-fpm #添加执行权限 chkconfig php-fpm on #设置开机启动 vi /usr/local/php5/etc/php.ini #编辑配置文件 修改为:date.timezone = PRC #设置时区 vim /etc/profile export PATH=$PATH:/usr/local/php5/bin source /etc/profile nginx: sudo salt-call --local state.sls nginx saltenv="local" vim /etc/nginx/nginx.conf #include /etc/nginx/conf.d/*.conf; #去掉行首的#, vim /etc/nginx/conf.d/php-dev.conf server { listen 80; server_name php-dev.jobstreet.com; index index.html index.htm index.php; root /var/www/html; location ~ \.php$ { include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } PHP Demo: Composer: http://pkg.phpcomposer.com/ php -r "readfile(‘https://getcomposer.org/installer‘);" > composer-setup.php php composer-setup.php php -r "unlink(‘composer-setup.php‘);" mv composer.phar /usr/local/bin/composer Laravel: https://github.com/johnlui/Learn-Laravel-5/issues/4

 

centos6: mysql+nginx+php

标签:

人气教程排行