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/文件名  (拷貝一份線上項目到此路徑)

相關文章
相關標籤/搜索