飞飞侠官方论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2588|回复: 2

linux系统安装php5.4个人推荐!

[复制链接]

签到天数: 324 天

[LV.8]以坛为家I

25

主题

388

帖子

1796

积分

飞飞侠付费用户

Rank: 12Rank: 12Rank: 12

积分
1796
发表于 2015-2-15 15:07:17 | 显示全部楼层 |阅读模式

马上注册加入飞飞侠论坛,轻松做淘客!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
本帖最后由 天崖树 于 2015-2-15 15:22 编辑

1、安装之前需要对内核进行优化:(四核,内存1024   32位系统 )(安装之前的优化不会可以淘宝找人做做,30rmb或者20rmb)
    1.1关闭不需要的服务,可降低内存使用率(这个可以百度,我是百度)
    1.2内核参数优化
  
  1. # Kernel sysctl configuration file for Red Hat Linux
  2. #
  3. # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
  4. # sysctl.conf(5) for more details.
  5. # Controls IP packet forwarding
  6. net.ipv4.ip_forward = 0
  7. # Controls source route verification
  8. net.ipv4.conf.default.rp_filter = 1
  9. # Do not accept source routing
  10. net.ipv4.conf.default.accept_source_route = 0
  11. # Controls the System Request debugging functionality of the kernel
  12. kernel.sysrq = 0
  13. # Controls whether core dumps will append the PID to the core filename.
  14. # Useful for debugging multi-threaded applications.
  15. kernel.core_uses_pid = 1
  16. # Controls the use of TCP syncookies
  17. net.ipv4.tcp_syncookies = 1
  18. # Disable netfilter on bridges.
  19. net.bridge.bridge-nf-call-ip6tables = 0
  20. net.bridge.bridge-nf-call-iptables = 0
  21. net.bridge.bridge-nf-call-arptables = 0
  22. # Controls the default maxmimum size of a mesage queue
  23. kernel.msgmnb = 65536
  24. # Controls the maximum size of a message, in bytes
  25. kernel.msgmax = 65536
  26. # Controls the maximum shared segment size, in bytes
  27. kernel.shmmax = 1073741824
  28. # Controls the maximum number of shared memory segments, in pages
  29. kernel.shmall = 268435
  30. fs.file-max=65535
  31. net.ipv4.conf.default.rp_filter = 1
  32. net.ipv4.conf.default.accept_source_route = 0
  33. net.ipv4.tcp_tw_reuse = 1
  34. net.ipv4.tcp_tw_recycle = 1
  35. net.ipv4.tcp_fin_timeout = 30
  36. kernel.sysrq = 0
  37. kernel.core_uses_pid = 1
  38. net.ipv4.tcp_syncookies = 1
  39. net.ipv4.ip_local_port_range = 10240 65000
  40. net.core.somaxconn = 10240
  41. net.core.netdev_max_backlog = 163840
  42. net.ipv4.tcp_max_syn_backlog = 163840
  43. fs.file-max=65535
  44. fs.file-max=65535


  45. net.ipv4.tcp_keepalive_intvl = 75
  46. net.ipv4.tcp_keepalive_probes = 9
  47. net.ipv4.tcp_keepalive_time = 600
  48. net.ipv4.tcp_max_tw_buckets = 36000
  49. net.ipv4.route.gc_timeout = 100
  50. net.ipv4.tcp_syn_retries = 1
  51. net.ipv4.tcp_synack_retries = 1
  52. net.ipv4.tcp_max_orphans = 163840
  53. #以下参数是对iptables防火墙的优化,防火墙不开会提示,可以忽略不理。
  54. net.ipv4.ip_conntrack_max = 25000000
  55. net.ipv4.netfilter.ip_conntrack_max=25000000
  56. net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=180
  57. net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait=120
  58. net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait=60
  59. net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait=120

  60. net.ipv4.tcp_timestamps=1
复制代码


有问题,多用论坛搜索功能;搜索的关键词尽量简洁,尽量不要用长语句搜索

签到天数: 324 天

[LV.8]以坛为家I

25

主题

388

帖子

1796

积分

飞飞侠付费用户

Rank: 12Rank: 12Rank: 12

积分
1796
 楼主| 发表于 2015-2-15 15:21:01 | 显示全部楼层
本帖最后由 天崖树 于 2015-2-15 15:27 编辑

推荐lnmpa   我安装完成后运行内存是170m

1 运行 yum install screen -y   ( 推荐使用xshell)
   (附件图片)
然后在xhsell中如下设置
完成后重新连接,这样就可以 离线安装程序了
2运行lnmp一键安装包(http://lnmp.org/install.html)(自带zend goard loader6.0  php5.2或者5.3)
wget -c http://soft.vpser.net/lnmp/lnmp1.1-full.tar.gz && tar zxf lnmp1.1-full.tar.gz && cd lnmp1.1-full && ./centos.sh
提示操作就行
3运行./apache.sh    安装lnmpa
4安装php5.4    ./upgrade_lnmpa_php.sh
5安装第三方扩展
推荐:
     1.1 ./eaccelerator.sh
     1.2 ./memcached.sh
以上就完成了飞飞侠或小淘客的环境配置

虚拟主机管理
1、LNMPA添加虚拟主机:/root/vhost.sh
2、删除虚拟主机,ssh执行:rm /usr/local/nginx/conf/vhost/域名.conf 同时需要:rm /usr/local/apache/conf/vhost/域名.conf

我配置的环境演示:http://www.tuanupin.com/i.php

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
有问题,多用论坛搜索功能;搜索的关键词尽量简洁,尽量不要用长语句搜索

签到天数: 324 天

[LV.8]以坛为家I

25

主题

388

帖子

1796

积分

飞飞侠付费用户

Rank: 12Rank: 12Rank: 12

积分
1796
 楼主| 发表于 2015-2-15 15:27:26 | 显示全部楼层
我配置的环境演示:
http://www.tuanupin.com/i.php
有问题,多用论坛搜索功能;搜索的关键词尽量简洁,尽量不要用长语句搜索
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|飞飞侠官方论坛 ( 京ICP备14034159号-4 )

GMT+8, 2025-10-29 15:44 , Processed in 0.082214 second(s), 12 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表