# sed -i ‘s/SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
# setenforce 0
# cd /usr/local/src # wget http://nginx.org/download/nginx-1.10.3.tar.gz
# tar xvf nginx-1.10.3.tar.gz # yum groupinstall “Development tools” # yum -y install gcc wget gcc-c++ automake autoconf libtool libxml2-devel libxslt-devel perl-devel perl-ExtUtils-Embed pcre-devel openssl-devel
cd /usr/local/src/nginx-1.10.3
./configure --prefix=/usr/local/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fcgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --http-scgi-temp-path=/var/tmp/nginx/scgi --user=nginx --group=nginx --with-pcre --with-http_v2_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module --with-threads --with-stream --with-stream_ssl_module
# make && make install # mkdir -pv /var/tmp/nginx/client
# vim /etc/init.d/nginx
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
# pidfile: /var/run/nginx.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
nginx="/usr/sbin/nginx"
prog=$(basename $nginx)
NGINX_CONF_FILE="/etc/nginx/nginx.conf"
[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
lockfile=/var/lock/subsys/nginx
start() {
[ -x $nginx ] || exit 5
[ -f $NGINX_CONF_FILE ] || exit 6
echo -n $"Starting $prog: "
daemon $nginx -c $NGINX_CONF_FILE
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog -QUIT
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
killall -9 nginx
}
restart() {
configtest || return $?
stop
sleep 1
start
}
reload() {
configtest || return $?
echo -n $"Reloading $prog: "
killproc $nginx -HUP
RETVAL=$?
echo
}
force_reload() {
restart
}
configtest() {
$nginx -t -c $NGINX_CONF_FILE
}
rh_status() {
status $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart|configtest)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
exit 2
esac
# chmod +x /etc/init.d/nginx
# chkconfig –add nginx # chkconfig nginx on
# service nginx start
# useradd -s /sbin/nologin -M nginx # id nginx
# yum groupinstall “Server Platform Development” “Development tools” -y # yum install cmake -y
# mkdir /mnt/data # groupadd -r mysql # useradd -r -g mysql -s /sbin/nologin mysql # id mysql
# chown -R mysql:mysql /mnt/data
# tar xvf mysql-boost-5.7.17.tar.gz -C /usr/local/src # cd /usr/local/src/mysql-5.7.17 # cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/mnt/data -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LIBWRAP=0 -DMYSQL_TCP_PORT=3306 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/mysql/boost/boost_1_59_0 # make && make install
# chown -R mysql:mysql /usr/local/mysql/
# /usr/local/mysql/bin/mysqld –initialize –user=mysql –basedir=/usr/local/mysql –datadir=/mnt/data/
# /usr/local/mysql/scripts/mysql_install_db –user=mysql –datadir=/mnt/data/
# cp support-files/my-default.cnf /etc/my.cnf
</div> <div>[mysqld]</div> <div>basedir = /usr/local/mysql</div> <div>datadir = /mnt/data</div> <div>port = 3306</div> <div>socket = /Ultrapower/test/mysql/tmp/mysql.sock</div> <div></div> <div>sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES</div> <div>[client]</div> <div>socket = /Ultrapower/test/mysql/tmp/mysql.sock</div> <div>
# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld # chmod +x /etc/init.d/mysql
# chkconfig mysqld on # chkconfig –add mysqld
# chkconfig –list mysql
# echo “export PATH=$PATH:/usr/local/mysql/bin” > /etc/profile.d/mysql.sh # source /etc/profile.d/mysql.sh
# service mysqld start
mysql -uroot -p生成的密码
alter user ‘root'@'localhost' identified by ‘newpassword';
yum install libmcrypt libmcrypt-devel mhash mhash-devel libxml2 libxml2-devel bzip2 bzip2-devel
# tar xvf php-7.0.16.tar.bz2 -C /usr/local/src # cd /usr/local/src/php-7.0.16 执行下面的配置文件: # ./configure --prefix=/usr/local/php --with-config-file-scan-dir=/etc/php.d --with-config-file-path=/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-fpm --enable-opcache --disable-fileinfo --with-jpeg-dir --with-iconv-dir=/usr/local --with-freetype-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-bcmath --enable-shmop --enable-exif --with-curl --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-inline-optimization --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --with-gettext --enable-zip --enable-soap --with-bz2
# make && make install
# cp /usr/local/src/php-7.0.16/php.ini-production /etc/php.ini # cd /usr/local/php/etc/ # cp php-fpm.conf.default php-fpm.conf # sed -i ‘s@;pid = run/php-fpm.pid@pid = /usr/local/php/var/run/php-fpm.pid@' php-fpm.conf
# cp /usr/local/src/php-7.0.16/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm # chmod +x /etc/init.d/php-fpm
# chkconfig –add php-fpm # chkconfig –list php-fpm # chkconfig php-fpm on
# service php-fpm start
WARNING: Nothing matches the include pattern ‘/usr/local/etc/php-fpm.d/*.conf' from /usr/local/etc/php-fpm.conf at line 125. ERROR:. No pool defined at least one pool section must be specified in config file ERROR: failed to post process the configuration ERROR: FPM initialization failed
# cp /etc/nginx/nginx.conf /etc/nginx/nginx.confbak # cp /etc/nginx/nginx.conf.default /etc/nginx/nginx.conf
</div>
<div>location / {</div>
<div>root /usr/local/nginx/html;</div>
<div>index index.php index.html index.htm;</div>
<div>}</div>
<div>
</div>
<div>location ~ .php$ {</div>
<div>root /usr/local/nginx/html;</div>
<div>fastcgi_pass 127.0.0.1:9000;</div>
<div>fastcgi_index index.php;</div>
<div>fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name;</div>
<div>include fastcgi_params;</div>
<div>}</div>
<div>
# service nginx reload
<?php phpinfo(); ?>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有