1024programmer Java Ubuntu11.10 compiles and installs Nginx, PHP5.3.8, MySQL, MongoDB, Memcac

Ubuntu11.10 compiles and installs Nginx, PHP5.3.8, MySQL, MongoDB, Memcac

Manually compile and install nginx 1.0.5


nginx download page: http://nginx.org/en/download.html

echo Copy the entire shell below to the command line terminal, and it will be automatically executed one by one.  .
wget http://nginx.org/download/nginx-1.0.5.tar.gz
tar -jxvf nginx-1.0.5.tar.gz
cd nginx-1.0.5
sudo apt-get install libpcre3 libpcre3-dev
./configure –prefix=/usr/local/nginx
make
sudo make install
sudo ln -s /usr/local/nginx/sbin/nginx /etc/init.d/
echo starts nginx
sudo /etc/init.d/nginx
Echo visits the local homepage. If it is normal, it means nginx has been started.
wget -O – http://localhost/


Add Nginx to the service and start it automatically at boot. Steps: http://www.linuxidc.com/Linux/2011-10/45735.htm


Manually install mysql


To manually install mysql, please see: http://www.linuxidc.com/Linux/2011-06/37632.htm


Manually compile and install php 5.3.8


php download page: http://php.net/downloads.php


Two ways to send email in php: http://www.linuxidc.com/Linux/2011-10/45736.htm


CGI, fastcgi, php-fpm: http://www.linuxidc.com/Linux/2011-10/45746.htm


Commonly used extensions: curl, pdo, pdo-mysql, mysqli, openssl, gd, jpeg, png, exif, zip, magickwand

sudo apt-get install libltdl-dev libssl-dev sendmail libjpeg8 libjpeg8-dev libpng12-0 libpng12-dev libxml2-dev libcurl4-openssl-dev libmcrypt-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libpng* /usr/lib/
echo According to the official recommendation of PHP, use mysqli and pdo_mysql instead of mysql. gmail stmp requires openssl.
wget http://cn2.php.net/get/php-5.3.8.tar.bz2/from/this/mirror
tar -jxvf php-5.3.8.tar.bz2
cdphp-5.3.8
./configure –prefix=/usr/local/php —enable-fpm –with-fpm-user=www-data –with-fpm-group=www-data –with -curl –with-mcrypt –enable-mbstring –enable-pdo –with-pdo-mysql=mysqlnd –with-mysqli=mysqlnd –with-mysql=mysqlnd – -with-openssl –with-imap-ssl –with-gd –with-jpeg-dir=/usr/lib/ –with-png-dir=/usr/lib/ –enable-exif –enable -zip
make
sudo make install
sudo cp php.ini-development /usr/local/php/lib/php.ini
sudo ln -s /usr/local/php/bin/php /usr/bin/php
sudo cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
sudo vi /usr/local/php/etc/php-fpm.conf
pid = run/php-fpm.pid
error_log = log/php-fpm.log
log_level = notice
pm.start_servers
pm.min_spare_servers
pm.max_spare_servers

sudo cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
sudo chmod 755 /etc/init.d/php-fpm
echo Add php-fpm to the service and start it automatically at boot
sudo update-rc.d php-fpm defaults
sudo /usr/local/php/sbin/php-fpm
sudo vi /usr/local/nginx/conf/nginx.conf
location / {

root /usr/www;

index index.html index.htm index.php;

}

location ~ \.php$ {

root /usr/www;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;

include fastcgi_params;

}

sudo killall nginx

sudo /etc/init.d/nginx

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/ubuntu11-10-compiles-and-installs-nginx-php5-3-8-mysql-mongodb-memcac/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索