2016年10月25日 星期二

Install the latest Nginx and PHP in Ubuntu 16.04 with OpenCC, GeoIP and Imagick


#Install Aptitude
apt-get update
apt-get install aptitude

#Install Ubuntu Essential
aptitude update
aptitude dist-upgrade
aptitude install dstat build-essential fail2ban git
aptitude install python-software-properties

#Install the Latest Nginx:
add-apt-repository ppa:ondrej/nginx-mainline
aptitude update
aptitude install nginx

#Install the Latest PHP7.1:
add-apt-repository ppa:ondrej/php
aptitude update
aptitude install php7.1-fpm php7.1-cli php7.1-curl php7.1-mysql php7.1-dev php7.1-cli php7.1-common php7.1-mbstring php7.1-intl

#Install the Latest GeoIP:
aptitude install libgeoip-dev
aptitude install git
git clone https://github.com/Zakay/geoip.git
cd geoip
phpize
./configure --with-php-config=/usr/bin/php-config
make
make install
echo "extension=geoip.so" > /etc/php/7.1/mods-available/geoip.ini
ln -s /etc/php/7.1/mods-available/geoip.ini /etc/php/7.1/cli/conf.d/20-geoip.ini
ln -s /etc/php/7.1/mods-available/geoip.ini /etc/php/7.1/fpm/conf.d/20-geoip.ini

#Install the Latest Imagick:
aptitude install libmagickwand-dev libmagickcore-dev
git clone https://github.com/mkoppanen/imagick.git
cd imagick
phpize
./configure --with-php-config=/usr/bin/php-config
make
make install
echo "extension=imagick.so" > /etc/php/7.1/mods-available/imagick.ini
ln -s /etc/php/7.1/mods-available/imagick.ini /etc/php/7.1/cli/conf.d/20-imagick.ini
ln -s /etc/php/7.1/mods-available/imagick.ini /etc/php/7.1/fpm/conf.d/20-imagick.ini

#Install the Latest OpenCC
aptitude install cmake doxygen
git clone https://github.com/BYVoid/OpenCC.git
cd OpenCC
make
sudo make install
git clone https://github.com/NauxLiu/opencc4php
cd opencc4php
phpize
./configure --with-php-config=/usr/bin/php-config
make
sudo make install
echo "extension=opencc.so" > /etc/php/7.1/mods-available/opencc.ini
ln -s /etc/php/7.1/mods-available/opencc.ini /etc/php/7.1/cli/conf.d/20-opencc.ini
ln -s /etc/php/7.1/mods-available/opencc.ini /etc/php/7.1/fpm/conf.d/20-opencc.ini


#Install Railgun
echo 'deb http://pkg.cloudflare.com/ wily main' | sudo tee /etc/apt/sources.list.d/cloudflare-main.list
curl -C - https://pkg.cloudflare.com/pubkey.gpg | sudo apt-key add -
aptitude update
aptitude install memcached railgun-stable

3 則留言:

  1. The site was so nice, I found out about a lot of great things. I like the way you make your blog posts. Keep up the good work and may you gain success in the long run.
    online Python training
    python training in chennai

    回覆刪除
  2. Nice post. By reading your blog, i get inspired and this provides some useful information. Thank you for posting this exclusive post for our vision. 

    Best Devops training in sholinganallur
    Devops training in velachery
    Devops training in annanagar
    Devops training in tambaram

    回覆刪除
  3. Some us know all relating to the compelling medium you present powerful steps on this blog and therefore strongly encourage
    contribution from other ones on this subject while our own child is truly discovering a great deal.
    Have fun with the remaining portion of the year.

    Selenium training in bangalore | best selenium training in bangalore

    回覆刪除