本文共 1898 字,大约阅读时间需要 6 分钟。
安装mysql
如果前期安装了mysql,删除安装包,安装目录,用户,关闭mysql服务重新下载文件,解压wget tar zxvf mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz拷贝到指定目录 mv mysql-5.6.35-linux-glibc2.5-x86_64 /usr/local/mysqlcd /usr/local/mysql创建用户及目录useradd mysql mkdir /data/加载配置文件./scripts/mysql_install_db --user=mysql --datadir=/data/mysql[root@aminglinux-001 mysql]# cp support-files/mysql.server /etc/init.d/mysqld
[root@aminglinux-001 mysql]# vi /etc/init.d/mysqld 启动mysqld服务,并搜索服务是否开启将mysqld加入到服务列表中去,PHP安装
下载php5.6.30切换到之前安装的php服务,清理之前的安装(make clean)编辑配置文件./configure --prefix=/usr/local/php-fpm --with-config-file-path=/usr/local/php-fpm/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --with-pear --with-curl --with-openssl然后make && make install打开目录
编辑配置文件make make install cp php.ini-production /usr/local/php-fpm/etc/php.ini添加如下信息:[global]pid = /usr/local/php-fpm/var/run/php-fpm.piderror_log = /usr/local/php-fpm/var/log/php-fpm.log[www]listen = /tmp/php-fcgi.socklisten.mode = 666user = php-fpmgroup = php-fpmpm = dynamicpm.max_children = 50pm.start_servers = 20pm.min_spare_servers = 5pm.max_spare_servers = 35pm.max_requests = 500rlimit_files = 1024拷贝启动文件,修改权限,前面添加个用户(useradd -s bin),添加到开机自启动文件,添加服务,开启服务nginx介绍
参考http://jinnianshilongnian.iteye.com/blog/2280928 Nginx官网 nginx.org,最新版1.13,最新稳定版1.12 Nginx应用场景:web服务、反向代理、负载均衡Nginx著名分支,淘宝基于Nginx开发的Tengine,使用上和Nginx一致,服务名,配置文件名都一样,和Nginx的最大区别在于Tenging增加了一些定制化模块,在安全限速方面表现突出,另外它支持对js,css合并Nginx核心+lua相关的组件和模块组成了一个支持lua的高性能web容器openresty转载于:https://blog.51cto.com/13528516/2085843