$ wget https://github.com/openresty/lua-nginx-module/archive/v0.10.15.tar.gz $ tar zxf v0.10.15.tar.gz $ cd lua-nginx-module-0.10.15 [root@centos lua-nginx-module-0.10.15]# make PREFIX=/usr/local/ [root@centos lua-nginx-module-0.10.15]# make install PREFIX=/usr/local/
Nginx
$ wget http://nginx.org/download/nginx-1.13.8.tar.gz --2018-03-06 21:12:40-- http://nginx.org/download/nginx-1.13.8.tar.gz Resolving nginx.org... 95.211.80.227, 206.251.255.63, 2001:1af8:4060:a004:21::e3, ... Connecting to nginx.org|95.211.80.227|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 992237 (969K) [application/octet-stream] Saving to: “nginx-1.13.8.tar.gz” 100%[=============================================================================================>] 992,237 64.9K/s in 7.3s
2018-03-06 21:12:48 (132 KB/s) - “nginx-1.13.8.tar.gz” saved [992237/992237] $ tar zxf nginx-1.13.8.tar.gz $ cd nginx-1.13.8 [root@centos nginx-1.13.8]# ls auto CHANGES CHANGES.ru conf configure contrib html LICENSE man README src
$ wget https://downloads.sourceforge.net/pcre/pcre-8.41.tar.bz2 $ tar jxf pcre-8.41.tar.bz2 $ cd pcre-8.41 $ ./configure --prefix=/usr/local/pcre --enable-utf8 --enable-unicode-properties $ make && make install
$ ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx $ which nginx $ /usr/bin/nginx
Redis
# https://redis.io/download $ wget http://download.redis.io/releases/redis-4.0.8.tar.gz $ tar xzf redis-4.0.8.tar.gz $ cd redis-4.0.8 $ make $ cd src $ make install $ cd .. $ mkdir -p /usr/local/redis/bin $ mkdir -p /usr/local/redis/ect $ cp redis.conf /usr/local/redis/ect/ $ mv mkreleasdhdr.sh redis-benchmark redis-check-aof redis-check-dump redis-cli redis-server redis-check-rdb redis-sentinel redis-trib.rb /usr/local/redis/bin $ ln /usr/local/redis/bin/redis-server /usr/bin/redis-server $ ln /usr/local/redis/bin/redis-cli /usr/bin/redis-cli $ redis-server 6443:C 18 Mar 22:57:20.008 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 6443:C 18 Mar 22:57:20.008 # Redis version=4.0.8, bits=64, commit=00000000, modified=0, pid=6443, just started 6443:C 18 Mar 22:57:20.008 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 6443:M 18 Mar 22:57:20.009 # Not listening to IPv6: unsupproted _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 4.0.8 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 6443 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-' 6443:M 18 Mar 22:57:20.011 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 6443:M 18 Mar 22:57:20.011 # Server initialized 6443:M 18 Mar 22:57:20.011 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 6443:M 18 Mar 22:57:20.011 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 6443:M 18 Mar 22:57:20.011 * Ready to accept connections
$ rpm -ivh mysql-community-libs-compat-5.7.21-1.el6.x86_64.rpm --force --nodeps $ rpm -ivh mysql-community-client-5.7.21-1.el6.x86_64.rpm --force --nodeps $ rpm -ivh mysql-community-server-5.7.21-1.el6.x86_64.rpm --force --nodeps 检查安装 $ which mysql /usr/bin/mysql $ mysql -V mysql Ver 14.14 Distrib 5.7.21, for Linux (x86_64) using EditLine wrapper 启动mysql服务 $ /etc/init.d/mysqld start Initializing MySQL database: [ OK ] Starting mysqld: [ OK ] $ ps -aux |grep mysql root 24518 0.0 0.0 106216 1568 pts/1 S 01:22 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql mysql 24712 2.4 9.0 1171424 173212 pts/1 Sl 01:22 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock root 24755 0.0 0.0 103320 888 pts/1 S+ 01:22 0:00 grep mysql
修改Mysql 密码
查看临时密码
$ grep password /var/log/mysqld.log 2018-03-19T17:22:19.429944Z 1 [Note] A temporary password is generated for root@localhost: hqhY9>D+YvYZ $ mysql -h root -p set password = password("Mysql_123456");
创建mysql 用户数据目录
$ groupadd mysql $ useradd -s /sbin/nologin -g mysql mysql
$ wget http://pecl.php.net/get/redis-4.0.0.tgz $ tar xf redis-4.0.0.tgz $ cd redis-4.0.0 $ /usr/local/php7/bin/phpize $ ./configure --with-php-config=/usr/local/php7/bin/php-config $ make && make install $ make clean $ /usr/local/php5/bin/phpize $ ./configure --with-php-config=/usr/local/php5/bin/php-config $ make && make install
mongodb扩展
$ tar xf mongodb-1.4.2.tgz $ cd mongodb-1.4.2 $ /usr/local/php7/bin/phpize $ ./configure --with-php-config=/usr/local/php7/bin/php-config $ make && make install $ make clean $ ./configure --with-php-config=/usr/local/php5/bin/php-config $ make && make install
swoole 扩展
$ wget http://pecl.php.net/get/swoole-1.10.2.tgz $ tar xf swoole-1.10.2.tgz $ cd swoole-1.10.2 $ /usr/local/php7/bin/phpize $ ./configure --with-php-config=/usr/local/php7/bin/php-config $ make && make install $ make clean $ ./configure --with-php-config=/usr/local/php5/bin/php-config $ make && make install
Yac 扩展 (php7)
$ wget http://pecl.php.net/get/yac-2.0.2.tgz $ tar xf yac-2.0.2.tgz $ cd yac-2.0.2 $ /usr/local/php7/bin/phpize $ ./configure --with-php-config=/usr/local/php7/bin/php-config $ make && make install
Yar 扩展 (php7)
$ wget http://pecl.php.net/get/yar-2.0.4.tgz $ tar xf yar-2.0.4.tgz $ cd yar-2.0.4 $ /usr/local/php7/bin/phpize $ ./configure --with-php-config=/usr/local/php7/bin/php-config $ make && make install
Yaf扩展 (PHP7)
$ wget http://pecl.php.net/get/yaf-3.0.6.tgz $ tar xf yaf-3.0.6.taz $ cd yaf-3.0.6 $ /usr/local/php7/bin/phpize $ ./configure --with-php-config=/usr/local/php7/bin/php-config $ make && make install