In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
First, install nginx
1. Install the dependency package:
Yum install openssl openssl-devel pcre GeoIP perl-devel perl perl-ExtUtils-Embed GeoIP-devel libatomic libatomic_ops-devel
two。 Install zlib
Tar-xf zlib-1.2.11.tar.gz cd zlib-1.2.11./configure makemake install
3. Add user
Adduser nginx-s / sbin/nologin
4. Compile and install nginx
Tar-xf nginx-1.10.3.tar.gzcd nginx-1.10.3./configure\-- prefix=/usr/local/nginx\-- pid-path=/usr/local/nginx\-- user=nginx\-- group=nginx\-- with-threads\-- with-file-aio\-- with-http_ssl_module\-- with-http_v2_module\-with-http_addition_module\-- with-http_sub_module\-- with-http_dav_module \-- with-http_flv_module\-- with-http_mp4_module\-- with-http_perl_module\-- with-http_geoip_module\-- with-http_gunzip_module\-- with-http_auth_request_module\-- with-mail\-- with-http_gzip_static_module\-- with-http_auth_request_module\-with-http_random_index_module\-- with-http_secure_link_module\-- With-http_degradation_module\-with-http_slice_module\-- with-http_stub_status_module\-- with-http_perl_module\-- with-zlib=/tmp/soft/zlib-1.2.11\-- with-stream\-- with-stream_ssl_module\-- with-pcre\-- with-libatomicmakemake install
5. Add script
Cd / etc/init.d/vim nginx #! / bin/bash# nginx Startup script for the Nginx HTTP Server# it is v.0.0.2 version.# chkconfig:-85 description: Nginx is a high-performance web and proxy server.# It has a lot of features But it's not for everyone.# processname: nginx# pidfile: / usr/local/nginx/logs/nginx.pid# config: / usr/local/nginx/conf/nginx.confnginxd=/usr/local/nginx/sbin/nginxnginx_config=/usr/local/nginx/conf/nginx.confnginx_pid=/usr/local/nginx/logs/nginx.pidRETVAL=0prog= "nginx" # Source function library.. / etc/rc.d/init.d/functions# Source networking configuration.. / etc/sysconfig/network# Check that networking is up. ["${NETWORKING}" = "no"] & & exit 0 [- x $nginxd] | | exit nginx_pid Start nginx daemons functions.start () {if [- e $nginx_pid]; then echo "nginx already running...." Exit 1fi echo-n $"Starting $prog:" daemon $nginxd-c ${nginx_config} RETVAL=$? Echo [$RETVAL= 0] & & touch / var/lock/subsys/nginx return $RETVAL} # Stop nginx daemons functions.stop () {echo-n $"Stopping $prog:" killproc $nginxd RETVAL=$? Echo [$RETVAL= 0] & & rm-f / var/lock/subsys/nginx / usr/local/nginx/logs/nginx.pid} # reload nginx service functions.reload () {echo-n $"Reloading $prog:" # kill-HUP `cat ${nginx_pid} `killproc $nginxd-HUP RETVAL=$? Echo} # See how we were called.case "$1" instart) start;; stop) stop;; reload) reload;; restart) stop start;; status) status $prog RETVAL=$?;; *) echo $"Usage: $prog {start | stop | restart | reload | status | help}" exit 1esacexit $RETVAL
Remount:
Systemctl daemon-reload
Start nginx
Systemctl start nginx.service
Second, install PHP
1. Install dependency packages
Yum-y install make apr* autoconf automake curl-devel gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel gd kernel keyutils patch perl kernel-headers mpfr cpp glibc libgomp libstdc++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel libsepol-devel libselinux-devel krb5-devel zlib-devel libXpm* freetype libjpeg* libpng* php-common php-gd ncurses* libtool* libxml2 libxml2-devel patch
two。 Install libmcrypt
Tar-xf libmcrypt-2.5.8.tar.gz cd libmcrypt-2.5.8./configure makemake install
3. Install libxml2
Tar-xf libxml2-2.8.0.tar.gz cd libxml2-2.8.0./configure-prefix=/usr/local/libxml2makemake install
4. Install libpng
Tar-xf libpng-1.5.28.tar.xz cd libpng-1.5.28./configure-- prefix=/usr/local/libpngmakemake install
5. Install jpeg9
Tar-xf jpegsrc.v9b.tar.gz cd jpeg-9b/./configure-prefix=/usr/local/jpeg9-enable-sharedmakemake install
6. Install gettext
Tar-xf gettext-0.19.8.tar.xz cd gettext-0.19.8./configure makemake install
7. Install libpng
Tar-xf libgd-2.2.4.tar.xz cd libgd-2.2.4./configure-prefix=/usr/local/libgd-with-zlib-with-png=/usr/local/libpng-with-jpeg=/usr/local/jpeg9makemake install
8. Install freetype
Wget http://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.gztar-xf freetype-2.7.1.tar.gz cd freetype-2.7.1./configure-- prefix=/usr/local/freetypemakemake install
9. Install libiconv
Tar-xf libiconv-1.15.tar.gz cd libiconv-1.15./configure-- prefix=/usr/local/libiconvmakemake install
10. Install php-5.6
Tar-xf php-5.6.30.tar.xz cd php-5.6.30./configure-prefix=/usr/local/php5-- with-config-file-path=/usr/local/php5/etc-- with-mysql-- with-mysqli-- with-pdo-mysql-- enable-pdo-- with-pdo-sqlite-- with-iconv-- with-zlib-- enable-xml-- enable-bcmath-- enable-shmop-- enable-sysvsem-- enable-inline-optimization-- with -curlwrappers-- enable-mbregex-- enable-fpm-- enable-mbstring-- enable-ftp-- enable-gd-native-ttf-- with-openssl-- enable-pcntl-- enable-sockets-- with-xmlrpc-- enable-zip-- enable-soap-- without-pear-- with-gettext-- enable-session-with-mcrypt-- with-curl-- with-libxml-dir=/usr/local/libxml2-- with-gd-- with-jpeg-dir=/usr/ Local/jpeg9-with-png-dir=/usr/local/libpng-with-freetype-dir=/usr/local/freetypemakemake install
11. Add user
Adduser-s / sbin/nologin php
twelve。 Configure php
Cp php.ini-production / usr/local/php5/etc/php.inirm-f / etc/php.ini ln-s / usr/local/php5/etc/php.ini / etc/php.inicp / usr/local/php5/etc/php-fpm.conf.default / usr/local/php5/etc/php-fpm.confcp sapi/fpm/init.d.php-fpm / etc/rc.d/init.d/php-fpmchmod + x / etc/rc.d/init.d/php-fpm
13. Install opcache
Cd / tmp/soft/php-5.6.30cd ext/opcache/# / usr/local/php5/bin/phpize #. / configure-- with-php-config=/usr/local/php5/bin/php-config# make# make installInstalling shared extensions: / usr/local/php5/lib/php/extensions/no-debug-non-zts-20131226/Installing PHP CLI binary: / usr/local/php5/bin/Installing PHP CLI man page: / usr/local/php5 / php/man/man1/Installing PHP FPM binary: / usr/local/php5/sbin/Installing PHP FPM config: / usr/local/php5/etc/Installing PHP FPM man page: / usr/local/php5/php/man/man8/Installing PHP FPM status page: / usr/local/php5/php/php/fpm/Installing PHP CGI binary: / usr/local/php5/bin/Installing PHP CGI man page: / usr/local/php5/ Php/man/man1/Installing build environment: / usr/local/php5/lib/php/build/Installing header files: / usr/local/php5/include/php/Installing helper programs: / usr/local/php5/bin/ program: phpize program: php-configInstalling man pages: / usr/local/php5/php/man/man1/ page: phpize.1 page: php-config.1/tmp/soft/php-5.6. 30/build/shtool install-c ext/phar/phar.phar / usr/local/php5/binln-s-f phar.phar / usr/local/php5/bin/pharInstalling PDO headers: / usr/local/php5/include/php/ext/pdo/
14. Add opcache
Vim / etc/ php.ini.[opcache] zend_extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20131226/opcache.soopcache.enable=1opcache.memory_consumption=256opcache.interned_strings_buffer=4opcache.max_accelerated_files=8000opcache.max_wasted_percentage=5opcache.use_cwd=1opcache.validate_timestamps=1opcache.revalidate_freq=0opcache.revalidate_path=0opcache.save_comments=0opcache.load_comments=0opcache.force_restart_timeout=3600
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.