博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
php7.0+mysql5.7+nginx1.12.1+vmware共享
阅读量:5935 次
发布时间:2019-06-19

本文共 7109 字,大约阅读时间需要 23 分钟。

mysql-boost-5.7.11.tar.gz

#创建mysql用户和组groupadd mysqluseradd -g mysql -s /usr/sbin/nologin mysqlmkdir -p /web/lanmp/mysql/datamkdir -p /web/lanmp/mysql/logsmkdir -p /usr/local/mysqlchown -R mysql:mysql /usr/local/mysqlchown -R mysql:mysql /web/lanmp/mysql#编译参数cmake \-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \-DMYSQL_DATADIR=/web/lanmp/mysql/data \-DWITH_BOOST=boost \-DSYSCONFDIR=/etc \-DMYSQL_UNIX_ADDR=/tmp/mysql.sock \-DMYSQL_TCP_PORT=3306 \-DDEFAULT_CHARSET=utf8 \-DDEFAULT_COLLATION=utf8_general_ci \-DWITH_READLINE=1 \-DWITH_SSL=system \-DWITH_EMBEDDED_SERVER=1 \-DENABLED_LOCAL_INFILE=1 \-DWITH_ARCHIVE_STORAGE_ENGINE=1 \-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \-DWITH_PARTITION_STORAGE_ENGINE=1 \-DWITH_ARCHIVE_STORAGE_ENGINE=1 \-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \-DWITH_EXAMPLE_STORAGE_ENGINE=1 \-DWITH_FEDERATED_STORAGE_ENGINE=1 \-DWITH_NDB_STORAGE_ENGINE=1 \-DWITH_PARTITION_STORAGE_ENGINE=1## 编译make && make install# 初始化/usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/web/lanmp/mysql/data# root密码修改mysqladmin -uroot password '新密码'# 配置开机自启动cp ./support-files/mysql.server /etc/init.d/mysqldchmod +x /etc/init.d/mysqldchkconfig --add mysqldchkconfig mysqld on

my.cnf

[client]port=3306[mysql]default-character-set=utf8[mysqld]port=3306basedir=/usr/local/mysqldatadir=/web/lanmp/mysql/data#server_id=1character-set-server=utf8default-storage-engine=InnoDBsql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"slow_query_log=1long_query_time=2slow-query-log-file=/web/lanmp/mysql/logs/slow.loglocal-infile=0skip-external-lockingmax_connections=1000query_cache_size=0key_buffer_size=64Msort_buffer_size=256kbread_buffer_size=512kbjoin_buffer_size=2Mread_rnd_buffer_size=2Mmax_allowed_packet=16Mtable_open_cache=1024tmp_table_size=128Mmax_heap_table_size=128Mmyisam_max_sort_file_size=64Gmyisam_sort_buffer_size=32Mmyisam_repair_threads=1innodb_buffer_pool_size=1Ginnodb_log_file_size=256Minnodb_log_buffer_size=2Minnodb_file_per_table=1innodb_flush_log_at_trx_commit=1innodb_lock_wait_timeout=50[mysqldump]quickmax_allowed_packet=16M[mysql]no-auto-rehash[myisamchk]key_buffer_size=20Msort_buffer_size=20Mread_buffer=2Mwrite_buffer=2M[mysqlhotcopy]interactive-timeout[mysqld_safe]open-files-limit=8192

php7

wget http://softlayer.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gztar -zxvf libmcrypt-2.5.8.tar.gzcd /usr/local/src/libmcrypt-2.5.8./configuremakemake install/sbin/ldconfigcd libltdl/./configure --enable-ltdl-installmake && make installwget https://nchc.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gztar zxvf mhash-0.9.9.9.tar.gzcd mhash-0.9.9.9/./configuremake && make install
./configure \--prefix=/usr/local/php \--with-config-file-path=/usr/local/php/etc \--with-mysql=/usr/local/mysql \--with-mysqli=/usr/local/mysql/bin/mysql_config \--enable-fpm \--enable-calendar \--enable-dba \--enable-wddx \--enable-opcache \--with-fpm-user=php-fpm \--with-fpm-group=php-fpm \--with-mysql=mysqlnd \--with-mysql-sock=/tmp/mysql.sock \--with-libxml-dir=/usr \--with-xsl \--with-gd \--with-bz2 \--with-kerberos \--with-gettext=/usr/lib \--with-jpeg-dir \--with-png-dir \--with-zlib \--with-freetype-dir \--with-iconv-dir \--with-zlib-dir \--with-mcrypt \--enable-soap \--enable-gd-native-ttf \--enable-ftp \--enable-sockets \--enable-zip \--enable-posix \--enable-pcntl \--enable-mbstring \--enable-fpm \--enable-mbstring \--with-openssl \--with-mhash \--enable-sockets \--with-xmlrpc \--enable-zip \--enable-soap \--enable-mbregex \--enable-sysvsem \--enable-shmop \--enable-bcmath \--enable-xml \--enable-exif \--disable-ipv6 \--with-pear \--with-curl \--with-pdo-mysql \--enable-inline-optimization \--disable-fileinfomakemake installcp ./sapi/fpm/init.d.php-fpm /etc/init.d/php-fpmchmod +x /etc/init.d/php-fpmchkconfig --add php-fpmchkconfig php-fpm oncp php.ini-production /usr/local/php/etc/php.ini启动php-fpm#/usr/local/php/sbin/php-fpmservice php-fpm startcd /usr/local/php/etccp php-fpm.conf.default php-fpm.confcd php-fpm.dcp www.conf.default default.confvim default.confuser = www #默认user = php-fpmgroup = www #默认group = php-fpm

nginx

groupadd wwwuseradd -g www -s /usr/sbin/nologin wwwmkdir -p /web/lanmp/nginx/wwwchmod +w /web/lanmp/nginx/wwwchown -R www:www /web/lanmp/nginx/wwwmkdir -p /web/lanmp/nginx/logschmod +w /web/lanmp/nginx/logschown -R www:www /web/lanmp/nginx/logs安装 pcrewget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gztar zxvf pcre-8.38.tar.gzcd pcre-8.38./configuremake && make installwget http://nginx.org/download/nginx-1.12.1.tar.gztar zxvf nginx-1.12.1.tar.gzcd nginx-1.12.1./configure \--user=www \--group=www \--prefix=/usr/local/nginx \--with-http_stub_status_module \--with-http_ssl_module \--with-http_realip_module \--with-http_image_filter_module \--with-file-aio \--with-threads \--with-debugmake && make installulimit -SHn 65535到 /etc/rc.local 每次启动启用。终极解除 Linux 系统的最大进程数和最大文件打开数限制:vim /etc/security/limits.conf# 添加如下的行* soft nproc 11000* hard nproc 11000* soft nofile 655350* hard nofile 655350

/etc/init.d/nginx

#!/bin/bash# nginx Startup script for the Nginx HTTP Server# it is v.0.0.2 version.# chkconfig: - 85 15# 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: /var/run/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 0# 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
chmod +x /etc/init.d/nginxchkconfig nginx on

vmware 挂载win共享目录

#win机上操作#创建share目录和share账号,开启共享,加入用户share和everyone全部权限mkdir /web/lanmp/nginx/sharemount -o username=share,password=share,uid=www,gid=www //win机子的ip/share /web/lanmp/nginx/share

软件包下载地址

#mysql 5.7.20wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-boost-5.7.20.tar.gz#phphttp://php.net/downloads.php 自行选择版本下载#nginx wget http://nginx.org/download/nginx-1.12.2.tar.gz

转载地址:http://kpjtx.baihongyu.com/

你可能感兴趣的文章
linux里的bootproto的none,static,dhcp有什么区别
查看>>
安全框架 SpringSecurity 和 Shiro 对比
查看>>
MFC中状态栏显示鼠标坐标位置
查看>>
[AngularFire 2] Push, remove, update
查看>>
Uint8Array 对象
查看>>
写好shell脚本的13个技巧【转】
查看>>
Hash算法的讲解
查看>>
Python的datetime模块分析
查看>>
负载均衡----实现配置篇(Nginx)
查看>>
Hive的基本介绍
查看>>
sql server 2000 sp3 数据库复制 修改sp_MSget_repl_commands
查看>>
openlayer9 http://hi.baidu.com/perneter/blog/item/194f1399ba4135056e068cde.html
查看>>
android系统常用Uri
查看>>
今天碰到一个神经病,留念,以后少惹这种人!
查看>>
4. Median of Two Sorted Arrays
查看>>
HBase1.0.1.1 API与原来有所不同
查看>>
转-JS之Window对象
查看>>
fread和fwrite函数功能
查看>>
Github恶搞之自定义你的contribution图表
查看>>
TypeScript学习笔记(五):接口
查看>>