nginx+php+memcache安裝筆記
安裝mysql
./configure –prefix=/opt/test/mysql –localstatedir=/opt/test/var/mysql/var –with-unix-socket-path=/opt/test/mysql/mysql.sock –with-mysqld-user=mysql –with-plugins=archive,partition,myisam,innobase,heap,csv –with-extra-charsets=gbk,gb2312,utf8,ascii –with-charset=utf8 –with-collation=utf8_general_ci –with-big-tables –enable-assembler –enable-profiling –enable-local-infile –enable-thread-safe-client –with-fast-mutexes –with-pthread –with-zlib-dir=bundled –with-readline –without-geometry –without-embedded-server –without-debug –without-ndb-debug –with-client-ldflags=-all-static –with-mysqld-ldflags=-all-static
make && make install
安裝nginx
./configure –prefix=/opt/test/nginx –user=www –group=www –with-poll_module –with-http_ssl_module –with-http_gzip_static_module –with-pcre
安裝php
./configure –prefix=/opt/test/php –with-mysql=/opt/test/mysql –with-curl –with-freetype-dir –enable-gd-native-ttf –with-ttf –with-sybase –with-mssql –with-zlib –with-gd –with-jpeg-dir –enable-mbstring=all –enable-mbregex –enable-soap –with-mcrypt –enable-sockets –enable-ftp –enable-zip –with-iconv –with-xsl –with-xmlrpc –with-png-dir –with-openssl –with-db4=/opt/test/db4/
Make && make install
cp php.ini-production /opt/test/php/lib/php.ini
修改extension_dir
extension_dir = “/opt/test/php/include/php/ext”
安裝APC擴充套件
Cd APC-*
/opt/test/php/bin/phpize
./configure –with-php-config=/opt/test/php/bin/php-config
Make
cp modules/apc.so /opt/test/php/include/php/ext/
在php.ini中新增
extension=apc.so
memcache擴充套件
/opt/test/php/bin/phpize;./configure –with-php-config=/opt/test/php/bin/php-config
Make
cp modules/memcache.so /opt/test/php/include/php/ext/
在php.ini中新增
extension=memcache.so
安裝ImageMagick
./configure
Make
Make install
安裝imagick擴充套件
/opt/test/php/bin/phpize;./configure –with-php-config=/opt/test/php/bin/php-config
Make
cp modules/imagick.so /opt/test/php/include/php/ext/
修改php.ini
extension=imagick.so
安裝MagickWandForPHP擴充套件
/opt/test/php/bin/phpize
./configure –with-php-config=/opt/test/php/bin/php-config
Make
cp modules/magickwand.so /opt/test/php/include/php/ext/
修改php.ini
extension=magickwand.so
安裝memcached擴充套件
安裝memcached
./configure –prefix=/usr/local/memcached
make && sudo make install
安裝libmemcached
./configure –with-memcached=/usr/local/memcached/bin/memcached
make && sudo make install
安裝memcached擴充套件
/opt/test/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config
Make
cp modules/memcached.so /opt/test/php/include/php/ext/
編輯php.ini
extension=memcached.so
啟動fast-cgi
spawn-fcgi -a 127.0.0.1 -p 10080 -C 250 -u www -f /opt/test/php/bin/php-cgi
啟動nginx
/opt/test/nginx/sbin/nginx -c /opt/test/nginx/conf/nginx.conf
Memcached高可用搭建
編譯安裝libevent
tar zxvf libevent-1.4.9-stable.tar.gz
cd libevent-1.4.9-stable/
./configure – -prefix=/usr
make && make install
編譯安裝Memcached
tar zxvf memcached-1.2.6.tar.gz
cd memcached-1.2.6/
./configure – -with-libevent=/usr
make && make install
編譯安裝magent
mkdir magent
cd magent/
wget http://memagent.googlecode.com/files/magent-0.5.tar.gz
tar zxvf magent-0.5.tar.gz
/sbin/ldconfig
sed -i “s#LIBS = -levent#LIBS = -levent -lm#g” Makefile
make
cp magent /usr/bin/magent
例項
memcached -m 1 -u root -d -l 127.0.0.1 -p 11211
memcached -m 1 -u root -d -l 127.0.0.1 -p 11212
memcached -m 1 -u root -d -l 127.0.0.1 -p 11213
magent -u root -n 51200 -l 127.0.0.1 -p 12000 -s 127.0.0.1:11211 -s 127.0.0.1:11212 -b 127.0.0.1:11213
本文轉自 waydee 51CTO部落格,原文連結:http://blog.51cto.com/waydee/821036,如需轉載請自行聯絡原作者
相關文章
- Manjaro安裝筆記JAR筆記
- laravel安裝筆記Laravel筆記
- ZooKeeper安裝筆記筆記
- 安裝PHP ImageMagick筆記PHP筆記
- Ubuntu安裝docker筆記UbuntuDocker筆記
- influxdb 筆記: 安裝UX筆記
- disconf 安裝筆記筆記
- solr安裝使用筆記Solr筆記
- 黑蘋果安裝筆記蘋果筆記
- Git筆記(3) 安裝配置Git筆記
- RabbitMQ學習筆記-安裝MQ筆記
- fabric 鏈碼安裝筆記筆記
- python 包安裝筆記Python筆記
- harbor安裝實操筆記筆記
- 筆記本固態安裝筆記
- Hive1.2.1安裝筆記Hive筆記
- redmine3.3安裝筆記筆記
- Mono on CentOS 6.3 安裝筆記MonoCentOS筆記
- apache 2.0.47 安裝筆記(轉)Apache筆記
- Solaris8安裝筆記筆記
- Centos學習筆記--安裝CentOS筆記
- ROS筆記[3]-安裝mavrosROS筆記VR
- Debian 11 “bullseye” 安裝筆記筆記
- Mysql學習筆記(安裝篇)MySql筆記
- Docker安裝(學習筆記一)Docker筆記
- 【筆記】安裝和使用CocoaPods筆記
- Airflow學習筆記 --- airflow安裝AI筆記
- Oracle安裝Patch相關筆記Oracle筆記
- Tomcat安裝與配置(筆記)Tomcat筆記
- python學習安裝筆記Python筆記
- Flask學習筆記(安裝篇)Flask筆記
- 【筆記】fedora10 硬碟安裝筆記硬碟
- IBM WebSphere 7.00 安裝筆記IBMWeb筆記
- ASM學習筆記_ASM安裝ASM筆記
- 安裝配置bugzilla筆記(轉)筆記
- Timesten安裝筆記 參考筆記
- monocle2安裝筆記【技巧】Mono筆記
- 小米筆記本 pro 安裝黑蘋果筆記蘋果