centos下安装xampp,Zend Guard,memcached
这里说的生产环境是php5.4x,要高版本的其实也一样
第一步:安装xampp
xampp它是跨平台的,且自带很多拓展,安装之后会为我们省去很多事,使用起来很方便。
i>http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.2/ 在这里找个x64版本的,右键复制链接(如果选择5.4*版本的,这步可省略)
ii>下载 wget http://cznic.dl.sourceforge.net/project/xampp/XAMPP%20Linux/1.8.2/xampp-linux-x64-1.8.2-6-installer.run
iii>增加权限:chmod a+x xampp-linux-x64-1.8.3-a-installer.run
iv>
sh xampp-linux-x64-1.8.--installer.run xampp-linux-x64-1.8.--installer.run: xampp-linux-x64-1.8.--installer.run: cannot execute binary file [root@nginxone src]# ./xampp-linux-x64-1.8.--installer.run ---------------------------------------------------------------------------- Welcome to the XAMPP Setup Wizard. ---------------------------------------------------------------------------- Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue. XAMPP Core Files : Y (Cannot be edited) XAMPP Developer Files [Y/n] :y Is the selection above correct? [Y/n]: y ---------------------------------------------------------------------------- Installation Directory XAMPP will be installed to /opt/lampp Press [Enter] to continue : ---------------------------------------------------------------------------- Setup is now ready to begin installing XAMPP on your computer. Do you want to continue? [Y/n]: y ---------------------------------------------------------------------------- Please wait while Setup installs XAMPP on your computer. Installing % ______________ % ______________ % ######################################### ---------------------------------------------------------------------------- Setup has finished installing XAMPP on your computer. Launch XAMPP [Y/n]: y
六、启动xampp: [root@nginxone lampp]# /opt/lampp/xampp start Starting XAMPP for Linux 1.8.-... XAMPP: Starting Apache...fail. XAMPP: Another web server is already running. XAMPP: Starting MySQL...ok. XAMPP: Starting ProFTPD...fail. XAMPP: Another FTP daemon is already running. 七、停止xampp: [root@nginxone lampp]# /opt/lampp/xampp stop Stopping XAMPP for Linux 1.8.-... XAMPP: Stopping Apache...not running. XAMPP: Stopping MySQL...ok. XAMPP: Stopping ProFTPD...not running. 八、添加开机启动: 温习一下ln命令,使用方式: #ln [option] source dist #ln –s /opt/lampp/xampp /etc/rc.d/init.d/xampp 九、如果执行完上面这条还不能开机自动启动,再执行下面3条语句。 #chkconfig –add xampp #chkconfig –list | grep xampp #chkconfig –level xampp on
访问localhost时会出现拒绝访问,使用下面的方法
http://blog.csdn.net/jonahzheng/article/details/8032454 非本机访问出现的问题,如果这个还解决不了你的问题,是因为不同版本的xampp的httpd-xampp.conf文件有点不太一样
#/opt/lampp/etc/extra/httpd-xampp.conf
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
#Require local 将这个注释掉
ErrorDocument /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
第二步:安装sftp,将项目文件上传上去,当然可以使用svn或者git
http://wenku.baidu.com/link?url=2R3rZQj13tWIGNpmOy__cJ0wbXU02IYnj3Kpjgc2fSs4Oeyqo8fOCwrbDm9q34ky1Gk6OU88Qu1i_zUX88xe1VleuSOIXo9itDqbmQz3dYG
项目访问目录默认是在/opt/lampp/htdocs里,如果需要更改在/opt/lampp/etc/httpd.conf里面更改就行了。修改过后记得重启服务 /opt/lampp/xampp restart
第三步:phpmyadmin默认不需要密码就可以登录,且root的初始密码为空,所以要更改用户密码,最好的办法是禁止root用户外部访问,创建新用户,密码需要10几位且包括大小写和数字。
建议直接将phpmyadmin文件夹删除掉,不允许使用phpmyadmin登录数据库
vim /opt/lampp/phpmyadmin/config.inc.php
$cfg['Servers'][$i]['auth_type'] = 'http'; // 从配置文件中获取密码,还可以配成cookie、http等见default文件可知含义。
$cfg['Servers'][$i]['password'] = 'XXXXX'; // 你新配置的密码
第四步:通过上面的设置,访问host/phpmyadmin里是需要输入密码,但用户名填写root,密码为空还是可以访问的,此时需要修改数据库里的root密码
访问host/phpmyadmin,点击mysql数据库,输入命令,再点击右下角的执行。
UPDATE user SET password=PASSWORD('XXXXX') WHERE user='root';
FLUSH PRIVILEGES;

再重新访问host/phpmyadmin,是不是需要新密码才可以访问了。如果不需要密码还可以访问,请查看第三步。
ln -s /opt/lampp/bin/mysql /usr/bin #建立软链接,这个可以直接通过mysql -uroot -p 命令访问
安装Memcached
memcached分服务端与客户端,下面讲解的是服务器的安装,此链接里面还有客户端的安装,如果安装php的memcached拓展,请打开此链接 http://www.cnblogs.com/flywind/p/6021568.html
memcache自带一致性hash算法,所以不用再用php实现
1:下载libevent与memcached软件包.
libevent下载地址:http://monkey.org/~provos/libevent/
memcache下载地址:http://memcached.org/
curl -O https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
curl -O http://www.memcached.org/files/memcached-1.4.33.tar.gz
2:解压,编译libevent。
# tar -zxvf libevent-2.1.-stable.tar.gz
# cd libevent-2.1.-stable
# ./configure --prefix=/usr/local/memcached/libevent
# make && make install
3:解压,编译memcached。
# cd ../
# tar -zxvf memcached-1.4..tar.gz
# cd memcached-1.4.
# /usr/local/php/bin/phpize
# ./configure --prefix=/usr/local/memcached/ --with-php-config=/usr/local/php/bin/php-config --with-libevent=/usr/local/memcached/libevent
# make && make install
开启memcached,并连接测试:
以守护进程模式启动memcached
# /usr/local/memcached/bin/memcached -d -l 192.168.1.39 -p -m -u root
客户端连接测试(使用telnet)
#telnet192.168.1.39
能连接上,说明memcached成功启用,可使用stats命令查看当前状态
#stats
安装memcache
php7下memcache安装参考:https://www.cnblogs.com/hejun695/p/5369610.html
(1)、安装memcache
PHP Memcache扩展
官网:http://pecl.php.net/package/memcache
下载:http://pecl.php.net/get/memcache-2.2.7.tgz
tar -zxvf memcache-2.2.7.tgz
cd memcache-2.2.7
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
//在php.ini中新增配置内容:
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"
extension = memcache.so
安装zend guard
下载地址http://www.zend.com/en/products/loader/downloads#Linux
根据选择php版本对应的扩展并下载,将ZendGuardLoader.so放在/opt/lampp/modules/目录下并在php.ini最后添加这行代码
zend_extension="/opt/lampp/modules/ZendGuardLoader.so"
重启xampp
文件不要给777权限,将项目权限给apache用户及用户组 chmod -R daemon:daemon 目录名
添加vhost
vim /opt/lampp/etc/extra/httpd-vhosts.conf
Directory "/data1/www/htdocs/www.simukeji.com">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory> <VirtualHost *:>
ServerAdmin minister.xiang@gmail.com
DocumentRoot "/data1/www/htdocs/www.simukeji.com" ServerName www.qingganzhijia.cn
ServerAlias www.qingganzhijia.cn
</VirtualHost>
redis安装
http://www.cnblogs.com/_popc/p/3684835.html
phpredis扩展配置方法
http://www.cnblogs.com/yangxia-test/p/4195198.html
防火墙配置参考网站
http://www.cnblogs.com/kgdxpr/p/4061646.html centos6+
http://blog.csdn.net/xlgen157387/article/details/52672988 centos7
https配置
http://www.cnblogs.com/chjbbs/p/5748369.html
centos下安装xampp,Zend Guard,memcached的更多相关文章
- CentOS下安装XAMPP详细教程
现在php的集成运行环境越来越多,个人比较喜欢XAMPP,更新速度快,好用,安装便捷.windows下面的安装,就是下一步.下一步,没什么好说的,详细说一下linux下面的安装,这里以CentOS为例 ...
- CentOS下安装XAMPP详细教程(转)
[原文]http://blog.csdn.net/hel12he/article/details/49781813 现在PHP的集成运行环境越来越多,个人比较喜欢XAMPP,更新速度快,好用,安装便捷 ...
- centos下安装php环境
centos下安装php环境 安装apache yum install httpd-devel 启动apache /etc/init.d/httpd start 安装mysql yum install ...
- PHP:使用Zend对源码加密、Zend Guard安装以及Zend Guard Run-time support missing的解决方法
Zend Guard是目前市面上最成熟的PHP源码加密产品了.刚好需要对自己的产品进行加密,折腾了一晚上,终于搞定,将碰到的问题及解决方法记录下来,方便日后需要,也可以帮助其他人.我使用的是Wamps ...
- Centos下安装PHP ldap扩展
Centos下安装PHP ldap扩展,有两种方法,仅供参考. 一.在线安装 执行下面命令: 1 yum install PHP-ldap 可能出现的问题: Error: php70w-common- ...
- CentOS下安装hadoop
CentOS下安装hadoop 用户配置 添加用户 adduser hadoop passwd hadoop 权限配置 chmod u+w /etc/sudoers vi /etc/sudoers 在 ...
- CentOS下安装使用start-stop-daemon
CentOS下安装使用start-stop-daemon 在centos下下了个自启动的服务器脚本 执行的时候发现找不到start-stop-daemon命令 好吧 执行手动编译一下 加上这个命令 w ...
- 从零开始学 Java - CentOS 下安装 Tomcat
生活以痛吻我,我仍报之以歌 昨天晚上看到那个冯大辉老师的微信公众号,「小道消息」上的一篇文章,<生活以痛吻我,我仍报之以歌>.知乎一篇匿名回答,主题为<冯大辉到底是不是技术大牛,一个 ...
- CentOS 下安装
2016年12月5日15:25:58 ----------------------------------- 通常情况下在centos下安装软件就用yum. 关键是,使用yum你要知道安装包的名字是什 ...
随机推荐
- JavaScripts 基础详细笔记整理
一.JS简介 JavaScript 是 Web 的编程语言,浏览器内置了JavaScript语言的解释器,所以在浏览器上按照JavaScript语言的规则编写相应代码之,浏览器可以解释并做出相应的处理 ...
- 初识HTTP协议
本篇文章从概念上初识HTTP协议,参考链接:http://www.runoob.com/http/http-tutorial.html 目录: 一.HTTP协议 HTTP 工作原理 HTT ...
- [.NET] 使用C#开发SQL Function来提供服务 - 简讯发送
[.NET] 使用C#开发SQL Function来提供服务 - 简讯发送 范例下载 范例程序代码:点此下载 问题情景 在「使用C#开发SQL Function来提供数据 - 天气预报」这篇文章中,介 ...
- 领域对象模型(domain object model)
在Play程序中,模型(model)占据了核心地位.它是程序操作的信息的特定领域的表现方式. Martin Fowler这样定义模型: 负责表达业务概念,业务状态信息以及业务规则.尽管保存业务状态的技 ...
- SharePoint 2013 创建web应用程序报错"This page can’t be displayed"
错误描述 This page can’t be displayed •Make sure the web address http://centeradmin is correct. •Look fo ...
- Struts2(十)OGNL标签二与Struts2标签
一.Struts2标签的优势 标签库简化了用户对标签的使用 结合OGNL使用,对于集合.对象的访问功能非常强大 提供可扩展的主题.模板支持.极大简化了视图页面的编写 不依赖任何表现层技术 Struts ...
- OC第一讲:类和对象
今天终于开始进行OC的学习了 一.首先讲了NSLog NSLog是oc里面的输出语句,其用法和printf差不多,但是还是有差别的 1,NSLog是自动换行的,不用像printf那样还需要加'\n': ...
- iOS Technology Overview_Introduction
关于iOS技术 iOS是运行在iPad,iPhone和iPod touch设备上的操作系统.这个操作系统管理着这些设备的硬件并且提供了实现原生APP所需的技术.这个操作系统也附带许多系统APP,例如P ...
- Swift 中的函数(下)
学习来自<极客学院:Swift中的函数> 工具:Xcode6.4 直接上基础的示例代码,多敲多体会就会有收获:百看不如一敲,一敲就会 import Foundation /******** ...
- android EditView ime
1.android:imeOptions 可以用来配置输入法右下角的: 这可以在xml中添加相应的属性android:imeOptions actionGo 输入法右下角显示“去往” actionS ...