在ubuntu上面安裝perl

2021-06-03 21:10:50 字數 883 閱讀 5038

隨著人們對程式設計效率追求熱情的提高,指令碼語言便開始深受人們的喜愛,其中就包括perl。在這裡我們不深究perl的歷史,也不爭論perl和python孰優孰劣,我們看看怎麼在ubuntu上面安裝perl,我用的版本是ubuntu11.10。

在www.perl.com和www.cpan.org 上面有很多關於perl的資料和activestateperldevkit的廣告,不過這個工具是要收費的。

我們在ubuntu上面安裝perl後只要用任何一種文字編輯器(比如gedit就是相當強大的文字編輯器)就能寫出能執行的perl程式,包括ddos的perl版的攻擊指令碼.

首先在www.cpan.org 上面獲得安裝檔案:

wget
(推薦這個版本,因為當前這個版本是最穩定的且也不老)
解壓檔案:
tar -xzf perl-5.14.2.tar.gz
進入目錄:

cd perl-5.14.2

./configure –des -dprefix=$home/localperl

make

make test

安裝:make install

測試過程:

開啟gedit 輸入以下perl指令碼:

#!/usr/bin/perl

print "hello,world!\n";

儲存為helloworld(可以不用字尾的,也有人習慣用.plx的字尾)

開啟terminal 之後進入剛剛儲存指令碼檔案的目錄

輸入chmod a+x helloworld (將檔案的屬性改為可以執行)

輸入perlhelloworld 或./helloworld執行

你會看見terminal 執行結果為:

hello,world!

Ubuntu上面安裝Redis Python

ubuntu上面安裝redis python 2,在ubuntu上面解壓 tar xzf redis 4.0.8.tar.gz cd redis 4.0.8 make 編譯redis sudo make install 安裝redis redis server redis.conf 啟動reids伺...

ubuntu上面apt get安裝mysql

mysql簡單安裝方式 1.sudo apt get install mysql server 2.apt get install mysql client 3.sudo apt get install libmysqlclient dev 安裝過程中會提示設定密碼什麼的,注意設定了不要忘了,安裝完...

在Linux上面安裝mongodb

tar zxvf mongodb linux x86 64 3.0.6.tgz 解壓 mv mongodb linux x86 64 3.0.6 mongodb 將解壓包拷貝到指定目錄 配置環境變數,開啟 etc profile加入 export mongodb home data program ...