⑴ window版本的nginx能重新編譯嗎如何添加新的模塊呢
找到安裝nginx的源碼根目錄,如果沒有的話下載新的源碼
http://nginx.org
tar xvzf nginx-1.3.2.tar.gz
查看ngixn版本極其編譯參數
/usr/local/nginx/sbin/nginx -V
進入nginx源碼目錄
cd nginx-1.3.2
以下是重新編譯的代碼和模塊
./configure --prefix=/usr/local/nginx--with-http_stub_status_mole
--with-http_ssl_mole --with-file-aio --with-http_realip_mole
make 千萬別make install,否則就覆蓋安裝了
make完之後在objs目錄下就多了個nginx,這個就是新版本的程序了
備份舊的nginx程序
cp /usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx.bak
把新的nginx程序覆蓋舊的
cp objs/nginx /usr/local/nginx/sbin/nginx
測試新的nginx程序是否正確
/usr/local/nginx/sbin/nginx -t
nginx: theconfiguration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx:configuration file /usr/local/nginx/conf/nginx.conf test issuccessful
平滑重啟nginx
/usr/local/nginx/sbin/nginx -s reload
查看ngixn版本極其編譯參數
/usr/local/nginx/sbin/nginx -V
這是我重新編譯的代碼:
./configure --prefix=/usr/local/nginx --with-google_perftools_mole
--user=www --group=www --with-http_stub_status_mole
--with-http_gzip_static_mole --with-openssl=/usr/
--with-pcre=/mydata/soft/pcre-8.31
⑵ 給已經編譯安裝好的Nginx添加模塊,是要重新再編譯安裝一次嗎
編譯信息
configure arguments: --user=w /usr/local/nginx --with-pcre=/tmp/pcre-8.30 --with-http_gzip_static_mole
我現在想添加–with-http_stub_status_mole模塊,必須要重新編譯一次然後make && make install嗎?
⑶ linux下如何編譯安裝openssl模塊請高手詳細解答一下。。。。。。。。。。【】【】
1$ tar zxvf openssl-0.9.8k.tar.gz -C /opt/
2$ ./config --prefix=/usr/local/ssl-0.9.8lk shared zlib-dynamic enable-camellia --prefix=/usr/local/ssl-0.9.8lk
3$ ./config -t
4$ make depend
5$ make
6$ make test
7$ make install
/********************************************************************/
附加: 為了ssl
a:$ /usr/local/ssl-0.9.8lk/ssl
b:$ vi openssl.cnf
default_bits = 1024
改 default_bits = 8192//為了安全最好改為4096以上的數據
c:$ countryName = Country Name (2 letter code)
改 countryName = CN //只能使用2字母的國家代碼
d:$ countryName_default = AU
改countryName_default = Beijing
= Beijing //省份或直轄市名稱
/**********************************************************************/
8$ a)cd /usr/local
b)ln -s ssl-0.9.8lk ssl
9$ a)cd /etc/ld.so.conf.d
b)cp -r /usr/local/ssl-0.9.8lk/lib/ ./
10$ cd /etc
vi ld.so.conf
加入:/usr/local/ssl-0.9.8lk/lib
11$ cd /usr/local/ssl-0.9.8lk/lib
ldconfig
12$ vi /root/.bash_profile
另外一個終端:echo $PATH 把PATH顯示路徑加入到.bash_profile里
例如: PATH=$PATH:/usr/local/ssl-0.9.8lk/bin$HOME/bin
13$ source ~/.bash_profile
14$ cd /usr/local/
15$ ldd /usr/local/ssl-0.9.8lk/bin/openssl
16$ which openssl
17$ openssl version
⑷ linux已經安裝openssl,如何重新編譯php支持openssl模塊
下載php的源代碼,執行三步安裝就行了:
./configure
make && sudo make install
sudo make clean
就可以了,然後編輯php.ini文件加入模塊支持:
extensions=openssl.so
好了。大工告成~~~
⑸ php 添加新編譯模塊
以擴展的形式加入,可以下載php pecl擴展,解壓後,進入到對於目錄,然後PHP-PATH/bin/phpize,然後就是 ./configure --with-php-config=PHP-PATH/bin/php-config 然後make,然後就會生成 so文件,到php擴展目前,再修改php.ini文件
⑹ Ubuntu重新編譯內核安裝模塊和內核之後是不是不可以重啟呀可是我已經重啟了,現在沒法開機了,怎麼辦
以前的內核還在嗎,可能不是內核的問題,你能進入到grub選擇系統的菜單嗎,如果不能進入,那是引導的問題,如果能進去,嘗試進入命令行模式引導你以前的舊內核
一般,我遇到這種情況都是顯卡驅動的問題,安裝了linux image後,還要安裝相應的linux headers,系統啟動後,按Crtl+Alt+Fn(n=2,3,4,5,6)如果能進入tty,那就是顯示驅動沒裝上,故不能進入圖形界面。但系統已經啟動了。
⑺ 如何在編譯好的PHP環境中安裝PHP擴展模塊
安裝步驟:
1、先進入php解壓縮後的源碼包中,找到要安裝的擴展模塊的目錄。
[root@redhat5 sockets]# cd /home/soft/php-5.2.12/ext/sockets
在sockets目錄下面以絕對路徑運行phpize程序,這時會自動生成sockets的configure程序,在sockets目錄下面可以看到。
[root@redhat5 sockets]# /home/webserver/php5.2.12/bin/phpize
2、進行編譯安裝
[root@redhat5 sockets]# ./configure --with-php-config=/home/webserver/php5.2.12/bin/php-config
[root@redhat5 sockets]#make
[root@redhat5 sockets]#make install
執行完make install屏幕上會提示sockets.so存放的路徑,然後把它復制到php的extensions目錄中,例如我的路徑為 /home/webserver/php5.2.12/lib/php/extensions
3、修改php.ini文件
找到extension_dir = "./" 這行,修改為:
extension_dir = "/home/webserver/php5.2.12/lib/php/extensions/"
然後再新增加一行:
extension=sockets.so
4、重啟apache即可生效。
其它模塊的安裝方法和這個一模一樣,不管是php自帶的擴展模塊還是第三方擴展模塊都照這種方法安裝即可。