In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Configure Lnmp+redis
[root@40 ~] # yum-y install gcc gcc-c++ pcre-devel zlib-devel
[root@40 lnmp] # tar-xf nginx-1.12.2.tar.gz
[root@40 lnmp] # cd nginx-1.12.2/
[root@40 nginx-1.12.2] #. / configure
[root@40 nginx-1.12.2] # make & & make install
[root@40 nginx-1.12.2] # ln-s / usr/local/nginx/sbin/* / sbin/
[root@40 nginx-1.12.2] # nginx
[root@40 nginx-1.12.2] # ss-antulp | grep nginx
Tcp LISTEN 0 128: 80: * users ("nginx", pid=8346,fd=6), ("nginx", pid=8345,fd=6))
[root@40 nginx-1.12.2] # yum-y install php-common
[root@40 lnmp] # rpm-ivh php-fpm-5.4.16-42.el7.x86_64.rpm
[root@40 lnmp] # systemctl start php-fpm
[root@40 lnmp] # systemctl enable php-fpm
[root@40 lnmp] # vim / usr/local/nginx/conf/nginx.conf
65 location ~ .php ${
66 root html
67 fastcgi_pass 127.0.0.1:9000
68 fastcgi_index index.php
69 # fastcgi_param SCRIPT_FILENAME / scripts$fastcgi_script_name
70 include fastcgi.conf
71}
[root@40 lnmp] # nginx-s reload
[root@40 lnmp] # ss-antulp | grep nginx
Tcp LISTEN 0 128: 80: * users: ("nginx", pid=8646,fd=6), ("nginx", pid=8345,fd=6)
[root@40 lnmp] # vim / usr/local/nginx/html/index.php
[root@40 redis] # yum-y install autoconf automake
[root@40 redis] # yum-y install php-devel-5.4.16-42.el7.x86_64.rpm
[root@40 redis] # tar-xf php-redis-2.2.4.tar.gz
[root@40 redis] # cd phpredis-2.2.4/
[root@40 phpredis-2.2.4] # phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100425
Zend Extension Api No: 220100425
[root@40 phpredis-2.2.4] # ll / usr/bin/php-config
-rwxr-xr-x. 1 root root 4424 November 6 2016 / usr/bin/php-config
[root@40 phpredis-2.2.4] #. / configure-with-php-config=/usr/bin/php-config
[root@40 phpredis-2.2.4] # make & & make install
...
....
Build complete.
Don't forget to run 'make test'. The following error will occur when you install here
Solution:
1.make install View path
Installing shared extensions: / usr/lib64/php/modules/
[root@40 phpredis-2.2.4] # ls / usr/lib64/php/modules/
Curl.so fileinfo.so json.so phar.so redis.so zip.so
two。 Change php profile
[root@40 phpredis-2.2.4] # vim / etc/php.ini
728 extension_dir = "/ usr/lib64/php/modules/"
729; On windows:
730 extension_dir = "redis.so"
[root@40 phpredis-2.2.4] # systemctl restart php-fpm
Php-m | grep-I redis to check whether redis is supported
If you enter the above command with the following problem:
[root@43 phpredis-2.2.4] # php-m | grep redis
PHP Warning: PHP Startup: Unable to load dynamic library 'redis.so/curl.so'-redis.so/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
Solution:
[root@43 phpredis-2.2.4] # vim / etc/php.ini
Put extension_dir = "redis.so" > > extension = "redis.so"
[root@40 phpredis-2.2.4] # vim / usr/local/nginx/html/test1.php
[root@40 phpredis-2.2.4] # redis-cli-h 192.168.4.40-p 6040
192.168.4.40 > keys *
1) "redistest"
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.