centos上配置shopex环境(lnmp)

上传人:第*** 文档编号:32683670 上传时间:2018-02-12 格式:DOCX 页数:10 大小:37.22KB
返回 下载 相关 举报
centos上配置shopex环境(lnmp)_第1页
第1页 / 共10页
centos上配置shopex环境(lnmp)_第2页
第2页 / 共10页
centos上配置shopex环境(lnmp)_第3页
第3页 / 共10页
centos上配置shopex环境(lnmp)_第4页
第4页 / 共10页
centos上配置shopex环境(lnmp)_第5页
第5页 / 共10页
点击查看更多>>
资源描述

《centos上配置shopex环境(lnmp)》由会员分享,可在线阅读,更多相关《centos上配置shopex环境(lnmp)(10页珍藏版)》请在金锄头文库上搜索。

1、呼叫中心专家 http:/centos 上配置 shopex 环境(LNMP)安装包地址: http:/ 下配置好 IP、DNS、网关、主机名配置防火墙,开启 80、3306 端口vi /etc/sysconfig/iptables添加端口-A INPUT -m state -state NEW -m tcp -p tcp -dport 80 -j ACCEPT #允许 80 端口通过防火墙-A INPUT -m state -state NEW -m tcp -p tcp -dport 3306 -j ACCEPT #允许 3306 端口通过防火墙/etc/init.d/iptables r

2、estart #最后重启防火墙使配置生效关闭 SELinuxvi /etc/selinux/config#SELINUX=enforcing #注释掉#SELINUXTYPE=targeted #注释掉SELINUX=disabled #增加:wq! #保存退出setenforce 0 #使配置立即生效安装所需工具yum install -y make apr* autoconf automake curl curl-devel gcc gcc-c+ gtk+-devel zlib-devel openssl openssl-devel pcre-devel gd kernel keyutil

3、s patch perl kernel-headers compat* cpp glibc libgomp libstdc+-devel keyutils-libs-devel libsepol-devel libselinux-devel krb5-devel libXpm* freetype freetype-devel freetype* fontconfig fontconfig-devel libjpeg* libpng* php-common php-gd gettext gettext-devel ncurses* libtool* libxml2 libxml2-devel p

4、atch policycoreutils bison 1、安装 cmakecd /opt/local/srctar zxvf cmake-2.8.12.1.tar.gzcd cmake-2.8.12.1./configure -prefix=/opt/local/cmakemake #编译make install #安装vi /etc/profile 在 path 路径中增加 cmake 执行文件路径export PATH=$PATH:/opt/local/cmake/bin呼叫中心专家 http:/source /etc/profile 使配置立即生效2、安装 pcrecd /opt/loc

5、al/srcmkdir /opt/local/pcre #创建安装目录tar zxvfpcre-8.36.tar.gzcd pcre-8.36./configure -prefix=/opt/local/pcre #配置make & make install3、安装 libmcryptcd /opt/local/srctar zxvf libmcrypt-2.5.8.tar.gz #解压cd libmcrypt-2.5.8 #进入目录./configure #配置make #编译make install #安装4、安装 gd 库cd /opt/local/srctar zxvf gd-2.0.

6、36RC1.tar.gzcd gd-2.0.36RC1./configure -enable-m4_pattern_allow prefix=/opt/local/gd -with-jpeg=/usr/lib64 -with-png=/usr/lib -with-xpm=/usr/lib64 -with-freetype=/usr/lib64 -with-fontconfig=/usr/lib64 #配置make #编译make install #安装5、安装 Mysqlgroupadd mysql #添加 mysql 组useradd -g mysql mysql -s /bin/false

7、 #创建用户 mysql 并加入到 mysql 组,不允许 mysql 用户直接登录系统mkdir -p /opt/data/mysql/var #创建 MySQL 数据库存放目录chown -R mysql:mysql /opt/data/mysql/var #设置 MySQL 数据库目录权限cd /opt/local/srctar zxvf mysql-5.5.35.tar.gz #解压cd mysql-5.5.35cmake . -DCMAKE_INSTALL_PREFIX=/opt/local/mysql -DMYSQL_DATADIR=/opt/data/mysql/var -DSY

8、SCONFDIR=/etc #配置make #编译make install #安装cd /opt/local/mysqlcp ./support-files/my-f /etc/f #拷贝配置文件(注意:如果/etc 目录下面默认有一个f,直接覆盖即可)呼叫中心专家 http:/vi /etc/f #编辑配置文件,在 mysqld 部分增加datadir = /opt/data/mysql/var #添加 MySQL 数据库路径./scripts/mysql_install_db -user=mysql #生成 mysql 系统数据库cp ./support-files/mysql.serve

9、r /etc/rc.d/init.d/mysqld #把 Mysql 加入系统启动chmod 755 /etc/init.d/mysqld #增加执行权限chkconfig mysqld on #加入开机启动vi /etc/rc.d/init.d/mysqld #编辑basedir = /opt/local/mysql #MySQL 程序安装路径datadir = /opt/local/mysql/var #MySQl 数据库存放目录service mysqld start #启动vi /etc/profile #把 mysql 服务加入系统环境变量:在最后添加下面这一行export PATH

10、=$PATH:/opt/local/cmake/bin:/opt/local/mysql/binsource /etc/profile #使配置立即生效mkdir /var/lib/mysql #创建目录ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock #添加软链接mysql_secure_installation #设置 Mysql 密码,根据提示按 Y 回车输入 2 次密码/opt/local/mysql/bin/mysqladmin -u root -p password 123456 #或者直接修改密码到此,mysql 安装完成!6、安装

11、nginx因为要使用 nginx 作为图片服务器,所以要安装 upload-module 模块, 以及添加 image-filter为 upload_module 打补丁:tar zxvf nginx_upload_module-2.2.0将补丁文件 darvromaniak.txt,复制到 nginx_upload_module 解压的目录 cd nginx_upload_module-2.2.0 patch ngx_http_upload_module.c davromaniak.txtcd /opt/local/srcgroupadd www #添加 www 组useradd -g ww

12、w www -s /bin/false #创建 nginx 运行账户 www 并加入到 www 组,不允许 www 用户直接登录系统tar zxvf nginx-1.6.2.tar.gzcd nginx-1.6.2./configure -prefix=/opt/local/nginx -user=piece -group=piece -without-http_memcached_module -with-http_stub_status_module -with-http_mp4_module -with-http_flv_module -with-http_ssl_module -wit

13、h-http_image_filter_module -with-http_gzip_static_module -with-pcre -add-module=./nginx-upload-module-2.2.0/ -add-module=./nginx-upload-progress-module-0.9.1/makemake install/opt/local/nginx/sbin/nginx #启动 nginx设置 nginx 开启启动vi /etc/rc.d/init.d/nginx #编辑启动文件添加下面内容呼叫中心专家 http:/#!/bin/sh # # nginx - th

14、is script starts and stops the nginx daemin # Taken from http:/ # chkconfig: - 85 15 # description: Nginx is an HTTP(S) server, HTTP(S) reverse # proxy and IMAP/POP3 proxy server # processname: nginx # config: /opt/local/nginx/conf/nginx.conf # pidfile: /opt/local/nginx/logs/nginx.pid # Source funct

15、ion library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. $NETWORKING = no & exit 0 nginx=/opt/local/nginx/sbin/nginx prog=$(basename $nginx) NGINX_CONF_FILE=/opt/local/nginx/conf/nginx.conf 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

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 中学教育 > 职业教育

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号