linux lamp编译环境安装

 

apache 安装:http://blog.csdn.net/wplblog/article/details/52172128 编译安装 php

mysql安装:http://www.centoscn.com/CentosServer/www/2014/1023/3990.html   yum安装 html

php安装:http://www.centoscn.com/CentosServer/www/2014/1023/3990.html  编译安装mysql

/softwire/php-5.6.30/configure  --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/httpd-2.2.32/bin/apxs  --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config --with-iconv-dir=/usr/local  --with-jpeg-dir  --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr/bin --enable-xml --disable-rpath --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex  --enable-ftp --enable-mbstring --with-mcrypt  --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets  --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-zlib --enable-pdo --with-pdo-mysql

 

记录 php安装扩展redis

phpize安装mongo扩展sql

一、解压扩展包并进入  apache

二、执行 phpizevim

三、./configure --with-php-config=/usr/local/php/bin/php-configcentos

四、makeapp

make testcurl

php -m查看php扩展模块,报错信息:

解决:mongo的编译php版本与当前运行的php版本不一致(到php源码解压包下,把php.ini-production文件复制到php安装目录etc下为php.ini,修改php.ini文件的date.timezone和添加extension=mongo.so扩展)
把mongo扩展的目录彻底删掉 从新解压,phpize的时候注意引用的phpize文件与你编译的php环境版本是否一致
五、make install
六、执行php -m 查看是否加载mongo扩展
 
安装redis(参考http://blog.csdn.net/baidu_30000217/article/details/51476712)
一、解压redis源码安装包执行 make,提示 进行src目录进行编译
二、进入src 目录,执行make
二、make test
三、make install
四、移动文件,便于管理(个人全部源代码安装的软件都安装在/usr/local下,如apache等)
建立两个文件夹,bin用于存放命令,etc拥有存放配置文件
mkdir -p /usr/local/redis/bin
mkdir -p /usr/local/redis/etc
五、接下来,将redis解压源码文件夹下的redis.conf复制到/usr/local/redis/etc/
mv ./redis.conf /usr/local/redis/etc/
mv mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server /usr/local/redis/bin/
六、进入/usr/local/redis/bin
./redis-server

可是,这样作的话,咱们并无使用etc的下的配置文件进行启动(图中红线部分)。

若是但愿经过指定的配置文件启动,须要在启动时指定配置文件:

这里咱们先用ctrl+C来终止服务,而后查看redis服务是否终止干净了,以后经过设置配置文件来启动服务:

七、按下ctrl+c后(^C):

八、运行:pstree -p | grep redis 发现redis服务已经被终止干净

如今咱们带上配置文件 /usr/local/etc/redis.conf 运行redis

九、./redis-server /usr/local/redis/etc/redis.conf启动成功

十、将redis改成后台启动(Redis的后台启动并运行须要经过配置文件中的参数设置)

vim /usr/local/redis/etc/redis.conf  把daemonize配置项改成yes

十一、以后咱们再次使用配置文件启动redis-server。

./redis-server /usr/local/redis/etc/redis.conf

十二、能够看到,redis是后台启动了,而且经过ps命令能够查看到redis正在运行。

ps -ef | grep redis

 注意:

redis默认端口为6379,查看端口是否被占用netstat -tunpl | grep 6379

客户端登陆:/usr/local/redis/bin/redis-cli

cenos 7 安装svn

来源:http://blog.csdn.net/tjcyjd/article/details/41673705

注意:在某个路径下执行 svn co svn:186.xxx.xxx.xxx/文件名  (拷贝一份线上项目到此路径)

相关文章
相关标签/搜索