centos6: mysql+nginx+php

來源:互聯網
上載者:User

標籤:

mysql: http://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 [email protected]‘%‘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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.