ubuntu下安裝nginx php mysql

以下操作是在root下進行(爲了方便自己使用

1、安裝nginx 

  a)下載nginx、pcre、openssl、zlib庫後,直接解壓到/usr/local目錄下。

  b)進入zlib目錄後,執行chmod +x ./configure

    ./configure;

    make;make install

  c)進入nginx目錄

   第一步:./configure --prefix=/usr/local/nginx --with-openssl=/usr/local/openssl --with-pcre=/usr/local/pcre --with-zlib=/usr/local/zlib-1.2.8 --user=www --group=www --with-http_ssl_module

   第二步:make ;make install

2、安裝mysql

   安裝文件爲:mysql-server_5.6.27-1ubuntu15.04_amd64.deb-bundle.tar,解壓文件到Downloads目錄下的mysql目錄

  a)apt-get install libaio1 libaio1-dev

  b)dpkg -i mysql-common_5.6.27-1ubuntu15.04_amd64.deb mysql-community-server_5.6.27-1ubuntu15.04_amd64.deb mysql-community-client_5.6.27-1ubuntu15.04_amd64.deb


3、安裝php

 './configure' '--prefix=/usr/local/php' '--enable-fpm' '--enable-mysqlnd' '--with-mysql=/usr' '--with-pcre-dir=/usr/local/pcre' '--with-pdo-mysql=/usr' '--with-zlib-dir=/usr/local/zlib-1.2.8/' 

  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章