亚洲中文字幕无码久久精品1,久久精品a亚洲国产v高清不卡,午夜人妻久久久久久久久http://www.shnenglu.com/elprup/從0開始zh-cnWed, 07 May 2025 03:16:07 GMTWed, 07 May 2025 03:16:07 GMT60腳本中的sudo命令使用管道時的權限問題http://www.shnenglu.com/elprup/archive/2012/02/01/164794.htmlelprupelprupWed, 01 Feb 2012 09:34:00 GMThttp://www.shnenglu.com/elprup/archive/2012/02/01/164794.htmlhttp://www.shnenglu.com/elprup/comments/164794.htmlhttp://www.shnenglu.com/elprup/archive/2012/02/01/164794.html#Feedback0http://www.shnenglu.com/elprup/comments/commentRss/164794.htmlhttp://www.shnenglu.com/elprup/services/trackbacks/164794.html閱讀全文

elprup 2012-02-01 17:34 發表評論
]]>
手機九點密碼鎖的可能性有多少種?http://www.shnenglu.com/elprup/archive/2011/06/26/149520.htmlelprupelprupSun, 26 Jun 2011 15:25:00 GMThttp://www.shnenglu.com/elprup/archive/2011/06/26/149520.htmlhttp://www.shnenglu.com/elprup/comments/149520.htmlhttp://www.shnenglu.com/elprup/archive/2011/06/26/149520.html#Feedback2http://www.shnenglu.com/elprup/comments/commentRss/149520.htmlhttp://www.shnenglu.com/elprup/services/trackbacks/149520.htmlneighbor = [ [], # 0 for null 
             [2,4,5,6,8], # node1
             [1,3,4,5,6,7,9],
             [
2,4,5,6,8],
             [
1,2,3,4,7,8,9],
             [
1,2,3,4,6,7,8,9], # node 5
             [1,2,3,5,7,8,9],
             [
2,4,5,6,7],
             [
1,3,4,5,6,7,9],
             [
2,4,5,6,8] ] # node 9

def step(trace, current):
    nblist 
= neighbor[current]
    avail 
= list(set(nblist) - set(trace))
    c 
= 0
    
for i in avail:
        newtrace 
= trace + [i]
        c 
= c + 1 + step(newtrace, i)
    
return c
    
def main():
    
return step([1], 1* 4 + step([2], 2* 4 + step([5], 5)
    
if __name__ == '__main__':
    
print main()

elprup 2011-06-26 23:25 發表評論
]]>
CENTOS5.5+NGINX0.8.54+MYSQL5.5.8+PHP5.3.5 最新詳細安裝手冊http://www.shnenglu.com/elprup/archive/2011/03/07/141242.htmlelprupelprupMon, 07 Mar 2011 00:39:00 GMThttp://www.shnenglu.com/elprup/archive/2011/03/07/141242.htmlhttp://www.shnenglu.com/elprup/comments/141242.htmlhttp://www.shnenglu.com/elprup/archive/2011/03/07/141242.html#Feedback0http://www.shnenglu.com/elprup/comments/commentRss/141242.htmlhttp://www.shnenglu.com/elprup/services/trackbacks/141242.htmlcentos5.5+nginx0.8.54+mysql5.5.8+php5.3.5 最新詳細安裝手冊
2011年2月20日admin沒有評論

轉載自:http://ggt8702.com/?p=146

本篇參考http://hi.baidu.com/%D3%CE%CF%B7%B3%C8%D7%D3/blog/item/a8f35f34f684db5f241f14e8.html,做了些整理和修改。本篇中nginx、mysql、php都會被安裝在/opt/目錄下,它們的配置文件和日志等都在它們的安裝目錄下;mysql的數據庫數據放在/data/mysql下,網站數據放在/data/www下。

系統準備和依賴程序庫安裝
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
yum -y update
下載安裝包
cd /tmp/
wget http://nginx.org/download/nginx-0.8.54.tar.gz
wget http://www.php.net/get/php-5.3.5.tar.gz/from/this/mirror
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.8.tar.gz/from/http://mysql.he.net/
wget “http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?modtime=1171868460&big_mirror=0″
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
wget “http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.8.tar.gz?modtime=1194463373&big_mirror=0″
wget http://pecl.php.net/get/memcache-2.2.6.tgz
wget “http://downloads.sourceforge.net/mhash/mhash-0.9.9.9.tar.gz?modtime=1175740843&big_mirror=0″
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.11.tar.gz
wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2
wget http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz
wget http://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.gz
安裝libiconv、libmcrypt、libltdl、mhash、mcrypt
cd /tmp/
tar zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1/
./configure –prefix=/usr/local
make
make install
cd /tmp/
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure –enable-ltdl-install
make
make install
cd /tmp/
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
cd /tmp/
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
安裝cmake
cd /tmp/
tar zxvf cmake-2.8.3.tar.gz
cd cmake-2.8.3/
./configure –prefix=/usr
gmake
gmake install
cd ../
tar zxvf bison-2.4.3.tar.gz
cd cd bison-2.4.3
./configure
make
make install
準備用戶、目錄
groupadd mysql
useradd -g mysql mysql
groupadd www
useradd -g www www
mkdir -p /data/mysql
chown -R mysql:mysql /data/mysql
mkdir -p /data/www
chown -R www:www /data/www
安裝mysql
編譯

cd /tmp/
tar zxvf mysql-5.5.8.tar.gz
cd mysql-5.5.8
cmake -DCMAKE_INSTALL_PREFIX=/opt/mysql -DMYSQL_DATADIR=/data/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DSYSCONFDIR=/etc/ -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_READLINE=on
make
make install
ln -s /opt/mysql/lib/lib* /usr/lib/
配置

/opt/mysql/scripts/mysql_install_db –basedir=/opt/mysql/ –datadir=/data/mysql –user=mysql
cd /opt/mysql/support-files
ls一下你會看到有下面的文件: my-huge.cnf 【對應1-2G內存】、my-large.cnf 【對應512M內存】、my-medium.cnf 【對應128M內存】、my-small.cnf 【對應64M或更低】,你可以查看這些文件,參照你的電腦配置,選擇一個文件

cp my-xxx.cnf /etc/my.cnf
你可以再編輯my.cnf,自己調整下參數,也可以保持不變

初始化和啟動

cp /opt/mysql/support-files/mysql.server /etc/rc.d/init.d/mysqld
chkconfig –add mysqld
chkconfig mysqld on
/etc/rc.d/init.d/mysqld start
cd /opt/mysql/
bin/mysql_secure_installation
按照提示設置root密碼等

安裝php
編譯

cd /tmp/
tar zxvf php-5.3.5.tar.gz
cd php-5.3.5
./configure –prefix=/opt/php –with-config-file-path=/opt/php/etc –with-mysql=/opt/mysql –with-mysqli=/opt/mysql/bin/mysql_config –with-iconv-dir=/usr/local –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir=/usr –enable-xml –disable-rpath –disable-safe-mode –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl –with-curlwrappers –enable-mbregex –enable-fpm –enable-mbstring –with-mcrypt –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-ldap –with-ldap-sasl –with-xmlrpc –enable-zip –enable-soap
mkdir /opt/mysql/include/mysql
ln -s /opt/mysql/include/* /opt/mysql/include/mysql/
make ZEND_EXTRA_LIBS=’-liconv’
make install
cp php.ini-production /opt/php/etc/php.ini
安裝擴展

cd /tmp/
tar zxvf memcache-2.2.6.tgz
cd memcache-2.2.6
/opt/php/bin/phpize
./configure –with-php-config=/opt/php/bin/php-config
make
make install

cd /tmp/
tar jxvf eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1/
/opt/php/bin/phpize
./configure –enable-eaccelerator=shared –with-php-config=/opt/php/bin/php-config
make
make install
vi /opt/php/etc/php.ini
配置eaccelerator,在文件末尾添加

[eaccelerator]
zend_extension=”/opt/php/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so”
eaccelerator.shm_size=”64″
eaccelerator.cache_dir=”/tmp/eaccelerator”
eaccelerator.enable=”1″
eaccelerator.optimizer=”1″
eaccelerator.check_mtime=”1″
eaccelerator.debug=”0″
eaccelerator.log_file = “/opt/php/var/log/eaccelerator_log”
eaccelerator.filter=”"
eaccelerator.shm_max=”0″
eaccelerator.shm_ttl=”3600″
eaccelerator.shm_prune_period=”3600″
eaccelerator.shm_only=”0″
eaccelerator.compress=”1″
eaccelerator.compress_level=”9″
mkdir -p /tmp/eaccelerator
配置memcache,在文件中搜索extension_dir、extension ,在相應位置添加下面兩行

extension_dir = “/opt/php/lib/php/extensions/no-debug-non-zts-20090626/”
extension = “memcache.so”
配置php-fpm

cp /opt/php/etc/php-fpm.conf.default /opt/php/etc/php-fpm.conf
vi /opt/php/etc/php-fpm.conf
幾處修改,user/group要設好,其它選項可以自己調整

[global]
pid = run/php-fpm.pid
error_log = log/php-fpm.log
emergency_restart_threshold = 10
emergency_restart_interval = 1m
process_control_timeout = 5s
[www]
user = www
group = www
安裝nginx
安裝pcre

cd /tmp/
tar zxvf pcre-8.11.tar.gz
cd pcre-8.11/
./configure
make && make install
編譯

cd /tmp/
tar zxvf nginx-0.8.54.tar.gz
cd nginx-0.8.54/
./configure –user=www –group=www –prefix=/opt/nginx –with-http_stub_status_module –with-http_ssl_module
make && make install
配置

編輯/opt/nginx/conf/nginx.conf,這里給個簡單的例子

view source

print?

user www www;
worker_processes 1;

error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

pid logs/nginx.pid;

events {
use epoll;
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

#log_format main ‘$remote_addr – $remote_user [$time_local] “$request” ‘
# ‘$status $body_bytes_sent “$http_referer” ‘
# ‘”$http_user_agent” “$http_x_forwarded_for”‘;

#access_log logs/access.log main;

sendfile on;
tcp_nopush on;
tcp_nodelay on;

#keepalive_timeout 0;
keepalive_timeout 60;

gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;

server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root /data/www;
index index.html index.htm index.php;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /data/www$fastcgi_script_name;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache’s document root
# concurs with nginx’s one
#
#location ~ /\.ht {
# deny all;
#location ~ /\.ht {
# deny all;
#}
}
啟動服務器
/opt/nginx/sbin/nginx
/opt/php/sbin/php-fpm
好了,你可以試著從瀏覽器訪問了。為了測試nginx和php是否協作正常,可以建一個test.php,內容為 ,將它放到到/data/www目錄中,從瀏覽器訪問http://your-server-ip-or-hostname/test.php,如果你能看到一個PHP的信息頁面就可以了。



elprup 2011-03-07 08:39 發表評論
]]>
成員變量的地址http://www.shnenglu.com/elprup/archive/2010/11/28/134891.htmlelprupelprupSun, 28 Nov 2010 06:33:00 GMThttp://www.shnenglu.com/elprup/archive/2010/11/28/134891.htmlhttp://www.shnenglu.com/elprup/comments/134891.htmlhttp://www.shnenglu.com/elprup/archive/2010/11/28/134891.html#Feedback0http://www.shnenglu.com/elprup/comments/commentRss/134891.htmlhttp://www.shnenglu.com/elprup/services/trackbacks/134891.html閱讀全文

elprup 2010-11-28 14:33 發表評論
]]>
struct對齊一題http://www.shnenglu.com/elprup/archive/2010/11/27/134812.htmlelprupelprupSat, 27 Nov 2010 03:05:00 GMThttp://www.shnenglu.com/elprup/archive/2010/11/27/134812.htmlhttp://www.shnenglu.com/elprup/comments/134812.htmlhttp://www.shnenglu.com/elprup/archive/2010/11/27/134812.html#Feedback1http://www.shnenglu.com/elprup/comments/commentRss/134812.htmlhttp://www.shnenglu.com/elprup/services/trackbacks/134812.html閱讀全文

elprup 2010-11-27 11:05 發表評論
]]>
webwarehttp://www.shnenglu.com/elprup/archive/2010/11/22/134319.htmlelprupelprupMon, 22 Nov 2010 14:03:00 GMThttp://www.shnenglu.com/elprup/archive/2010/11/22/134319.htmlhttp://www.shnenglu.com/elprup/comments/134319.htmlhttp://www.shnenglu.com/elprup/archive/2010/11/22/134319.html#Feedback0http://www.shnenglu.com/elprup/comments/commentRss/134319.htmlhttp://www.shnenglu.com/elprup/services/trackbacks/134319.htmlhttp://www.webwareforpython.org/
待編輯

elprup 2010-11-22 22:03 發表評論
]]>
django Cheetahhttp://www.shnenglu.com/elprup/archive/2010/11/22/134316.htmlelprupelprupMon, 22 Nov 2010 13:56:00 GMThttp://www.shnenglu.com/elprup/archive/2010/11/22/134316.htmlhttp://www.shnenglu.com/elprup/comments/134316.htmlhttp://www.shnenglu.com/elprup/archive/2010/11/22/134316.html#Feedback0http://www.shnenglu.com/elprup/comments/commentRss/134316.htmlhttp://www.shnenglu.com/elprup/services/trackbacks/134316.htmlhttp://www.cheetahtemplate.org/
中文含義:印度豹


elprup 2010-11-22 21:56 發表評論
]]>
svn 提交時 文件夾 missing 問題的解決http://www.shnenglu.com/elprup/archive/2010/11/07/132837.htmlelprupelprupSun, 07 Nov 2010 00:36:00 GMThttp://www.shnenglu.com/elprup/archive/2010/11/07/132837.htmlhttp://www.shnenglu.com/elprup/comments/132837.htmlhttp://www.shnenglu.com/elprup/archive/2010/11/07/132837.html#Feedback0http://www.shnenglu.com/elprup/comments/commentRss/132837.htmlhttp://www.shnenglu.com/elprup/services/trackbacks/132837.html閱讀全文

elprup 2010-11-07 08:36 發表評論
]]>
apache mod_python ImportError: Could not import settings 'mysite.settings': http://www.shnenglu.com/elprup/archive/2010/11/04/132429.htmlelprupelprupThu, 04 Nov 2010 05:16:00 GMThttp://www.shnenglu.com/elprup/archive/2010/11/04/132429.htmlhttp://www.shnenglu.com/elprup/comments/132429.htmlhttp://www.shnenglu.com/elprup/archive/2010/11/04/132429.html#Feedback1http://www.shnenglu.com/elprup/comments/commentRss/132429.htmlhttp://www.shnenglu.com/elprup/services/trackbacks/132429.html閱讀全文

elprup 2010-11-04 13:16 發表評論
]]>
解決算法問題的思路http://www.shnenglu.com/elprup/archive/2010/10/31/how_to_acm.htmlelprupelprupSun, 31 Oct 2010 12:53:00 GMThttp://www.shnenglu.com/elprup/archive/2010/10/31/how_to_acm.htmlhttp://www.shnenglu.com/elprup/comments/131923.htmlhttp://www.shnenglu.com/elprup/archive/2010/10/31/how_to_acm.html#Feedback0http://www.shnenglu.com/elprup/comments/commentRss/131923.htmlhttp://www.shnenglu.com/elprup/services/trackbacks/131923.html閱讀全文

elprup 2010-10-31 20:53 發表評論
]]>
国产高清美女一级a毛片久久w| 一级做a爰片久久毛片免费陪 | 99999久久久久久亚洲| 狠狠色丁香久久综合婷婷| 欧美亚洲日本久久精品| 欧美激情精品久久久久| 99久久精品国产高清一区二区| 久久美女网站免费| 国产成人无码精品久久久性色| 日本久久中文字幕| 久久se精品一区精品二区| 久久久久亚洲AV无码专区桃色| 国产精品丝袜久久久久久不卡 | 99久久婷婷国产一区二区| 狠狠色丁香久久婷婷综合五月| 漂亮人妻被黑人久久精品| 日韩精品久久无码人妻中文字幕| 99久久无码一区人妻| 久久青青草原亚洲av无码app| 久久无码人妻一区二区三区 | 国产精品久久久久无码av| 久久久这里有精品| 性欧美大战久久久久久久久 | 国产国产成人久久精品| 97久久久精品综合88久久| 亚洲av日韩精品久久久久久a| 亚洲国产成人久久综合碰| 99热成人精品免费久久| 亚洲嫩草影院久久精品| aaa级精品久久久国产片| 久久精品www人人爽人人| 色婷婷久久综合中文久久蜜桃av| 久久久精品国产| 香蕉久久永久视频| 久久国产亚洲精品| 少妇无套内谢久久久久| 国内精品久久久久伊人av| 久久精品无码专区免费东京热| 成人午夜精品无码区久久| 亚洲精品无码久久一线| 久久久久无码精品国产|