centos 6.5 服务器安装 (LNMP ntfs文件支持 PHP-RPM CHROOT沙盒)
centos 6.5 最小化安装
进入系统 手动开启网卡
#ifconfig eth0 //(默认会自动获得ip)
修改网站配置文件,默认开启
#cd /etc/sysconfig/network-scripts
#vi ifcfg-eth0
ONBOOT=yes
更新yum缓存
yum makecache
升级系统补丁及程序
yum update
安装 wget程序
yum install wget.x86_64
参考安装lnmp
http://www.cnblogs.com/linuxOS/p/3776651.html
centos 6.5 安装ntfs文件支持
-----------------------------------------------------------
下载http://files.cnblogs.com/linuxOS/ntfs-3g-2011.4.12-5.el6.x86_64.zip
解压后,把ntfs-3g-2011.4.12-5.el6.x86_64.rpm 上传到服务器
安装rpm -ivh ntfs-3g-2011.4.12-5.el6.x86_64.rpm 或
在保存这个文件的当前目录运行 yum install ntfs-3g-2011.4.12-5.el6.x86_64.rpm
参考配置iptables防火墙
http://www.cnblogs.com/linuxOS/p/3376342.html
-------------------------------------------------------------------------------------
禁止ip访问网站
# cd /alidata/server/nginx/conf/vhoso
#vi default.conf
server{
listen 80 default;
return 500;
}
#service nginx reload
-----------------------------------------------------------------------------------------
隐藏nginx版本号
#cd /alidata/server/nginx/conf
#vi nginx.conf
在http 里面加入
server_tokens off;
#vi fastcgi.conf
20 fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
修改成 fastcgi_param SERVER_SOFTWARE nginx;
#service nginx reload
修改php 配置简短指令
#cd /alidata/server/php/etc
#vi php.ini
short_open_tag =on 将off修改成on
--------------------------------------------------------------------
mysql 导入尽出
源mysql备份
格式 mysqldump -u 数据库用户 -p 数据库名 > 导出的文件 (存储到当前路径下)
#mysqldump -u root -p blog >blog.sql
用ftp下载到本地
再上传到新服务器
导入数据库
#mysql -u root -p
mysql>show databases;
mysql>create database blog...... //自行手动创建数据库;
mysql>use blog;
mysql>source /home/data/blog.sql; //导入数据库到blog里面
----------------------------------------------------------------------------------------
nginx php 配置
1、备份nginx php两文件夹
2、 nginx
nginx.conf 修改成 nobody 帐号运行
fastcgi.config 修改fastcgi_param script_filename /web/$fastcgi_script_name;
vhosts/webtest1.conf fastcgi_pass 127.0.0.1:9000;
vhost/webtest2.conf fastcgi_pass 127.0.0.1:9001;
2、php-fpm
php-fpm.conf 修改 user:nobody group:nobody
chroot=/alidata/www/test1
fpm.d/test2.conf(复制php-fpm.conf生成) 修改 pid =run/php-fpm-test2.pid
error_log=/alidata/log/php/php-fpm-test2.log
user:nobody group:nobody
listen:127.0.0.1:9001
3、www
/alidata/www/test 下创建两文件 mkdir -p web tmp
chmod 777 tmp
4、php-fpm执行文件
cd /etc/init.d
cp php-fpm php-fpm-test2
vi php-fpm-test2 修改php-fmp-conf= ${prefix}/etc/fpm.d/test2.conf
php-fpm-pid= ${prefix}/var/run/php-fpm-test2.pid
5、加入启动
vi /etc/rc.locaat
/etc/init.d/php-fpm-test2 start
---------------------------------------------------------------------------
nginx log按天打包。
# cat /webdata/server/nginx/sbin/cut-log.sh
#!/bin/bash
##nginx日志文件所在目录
LOGS_PATH=/webdata/log/nginx/access
YESTERDAY=$(date -d "yesterday" +%Y-%m-%d)
gzip $LOGS_PATH/wwwroot.log
mv $LOGS_PATH/wwwroot.log.gz $LOGS_PATH/wwwlog/wwwroot_$YESTERDAY.log.gz
kill -USR1 $(cat /wwwdata/server/nginx/logs/nginx.pid)
[root]#crontab -e
0 0 * * * /bin/bash /webdata/server/nginx/sbin/cut-log.sh
centos 6.5 服务器安装 (LNMP ntfs文件支持 PHP-RPM CHROOT沙盒)的更多相关文章
- iOS 获取沙盒文件路径及 写入/删除 沙盒文件
出于安全考虑,iOS系统的沙盒机制规定每个应用都只能访问当前沙盒目录下面的文件(也有例外,比如系统通讯录能在用户授权的情况下被第三方应用访问),这个规则把iOS系统的封闭性展现的淋漓尽致. 一.沙盒中 ...
- iOS 沙盒路径获取,创建文件
沙盒下主要有四个文件夹:document,caches,tmp,library document 的路径 程序运行时生成的文件,这个文件不要存比较放大的文件,比如音频,视频类,因为这里的东西会被上传 ...
- 谁说NTFS不支持UEFI启动的?启动U盘放不了超过4G的文件怎么办?Server2016 Win10 U盘UEFI启动制作方法
大家都知道,我们平时做启动盘,用得最多的就是UltraISO(软碟通)这个工具了.用它我们可以很简单快速的把一个空白的普通U盘制作成一个PE启动U盘或系统U盘,然后用它来安装系统非常的方便,受到了广大 ...
- 以CentOS为操作系统的vps或服务器安装lnmp运行环境的方法
安装步骤: 1.使用putty或类似的SSH工具登陆VPS或服务器: 登陆后运行:screen -S lnmp 如果提示screen: command not found 命令不存在可以执行:yum ...
- CentOS安装与配置LNMP
本文PDF文档下载:http://www.coderblog.cn/doc/Install_and_config_LNMP_under_CentOS.pdf 本文EPUB文档下载:http://www ...
- 转:CentOS 6.x 挂载读写NTFS分区(fuse-ntfs-3g)
from: http://mtd527.blog.163.com/blog/static/222723720151208127898/ 运行环境:CentOS 6.6 x64版本 CentOS不像F ...
- CentOS 挂载(U盘NTFS格式,新硬盘,增加交换分区,扩展根分区等)
1.挂载fat或者fat32分区的U盘 如果是用VM安装的linux,在vm里挂载U盘有两个前提: 第一,主机里的service要启动: 第二,U盘是连接到虚拟机,而不是主机,需要确认这点: 2.使用 ...
- CentOS使用NTFS-3G加载NTFS硬盘
CentOS使用NTFS-3G加载NTFS硬盘 CentOS 挂载NTFS格式硬盘时会报错unknown filesystem type 'ntfs',这时就需要用到第三方的插NTFS-3G来加载NT ...
- centos下编译安装lnmp
centos下编译安装lnmp 本文以centos为背景在其中编译安装nginx搭建lnmp环境. 编译安装nginx时,需要事先安装 开发包组"Development Tools" ...
随机推荐
- Search Insert Position——LeetCode
Given a sorted array and a target value, return the index if the target is found. If not, return the ...
- 在Kafka中修改Topic的preferred replica
参考site:https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools 目前我们的topic test-add-repl ...
- I - Fire Game
题目大意: 火焰游戏 在一个];][] = { {,},{,},{-,},{,-} };; i<M; i++) ; j<N; j++) { ) ...
- poj1016
题目大意:数据统计 看明白了,就是给你一个数,例如31123314,代表的意思有3个1,1个2,3个3,1个4,但数字本身的有的数字也是有3个1,1个2,3个3,1个4,所以这样的数叫做self-in ...
- 堆排序中建堆过程时间复杂度O(n)怎么来的?
首先这个循环是从i = headsize/2 -> 1,也就是说这是一个bottom-up的建堆.于是,有1/2的元素向下比较了一次,有1/4的向下比较了两次,1/8的,向下比较了3次,.... ...
- Away3D 4.1.4 中实现骨骼绑定
骨骼的绑定归根结底就是将目标骨骼的位置以及旋转数据,同步给要绑定的显示对象. 先来看BindingTag.as package away3d.entities { import away3d. ...
- 实现O(1)时间复杂度带有min和max 函数的栈
仅仅是演示实现.不考虑栈使用的数据结构是vector 还是其它容器. 代码例如以下 #include <iostream> #include <vector> using na ...
- 使用easy_install安装numpy、pandas、matplotlib及各种第三方模块
倒腾了一晚上最终把题目中的环境配好了.以下简要说明.留作资料.并共享. 1.安装python. 在cmd中能进入python环境,通过把python路径加入到系统路径中就可以实现. 2.安装easy- ...
- RT: TCP connection close
CLOSE is an operation meaning "I have no more data to send." The notion of closing a full- ...
- [转] Java中的访问控制
可见/访问性 在同一类中 同一包中 不同包中 同一包子类中 不同包子类中 public yes yes yes yes yes protected yes yes no ...