2019獨角獸企業重金招聘Python工程師標準>>>
RPM安裝:
????????? ? 二進制格式:
????????? ? 源程序--》編譯--》二進制格式
????????????????????? ? 有些特性是編譯時選定的,如果編譯時未選定此特性,將無法使用;
????????????????????? ? rpm包的版本會落后于源碼包,甚至落后很多:
定制:手動編譯安裝
編譯環境,開發環境
開發庫,開發工具
Linux:C
GUN:C
c環境,C++,
gcc:編譯C語言用的工具
g++:編譯C++語言的工具
make :項目管理工具
????????? ? makefile:定義了make(調用gcc,g++)按何種次序去編譯這些源程序文件中的源程序
????????? ? automake,--》makefile.in-->makefile
????????? ? autoconf, ?-->configure(配置源程序如何編譯的)
make ?install
編譯安裝的三個步驟:
前提:準備開發環境(編譯環境)
安裝 ?“Development ?Tools” 和 “Development lib”
tar
cd
./configure
????????? ? --help
????????? ? --prefix=/path/to/somewhere
????????? ? --sysconfdir=/path/to/conffile_path
????????? ? 功能:1、讓用戶選定編譯特性,2、檢查編譯環境
make
make ?install
eg:
tar ?-xf ?tengine....gz
cd ? tengine
./configure ? ?--prefix=/usr/local/tengine ? ?--conf--path=/etc/tengine/tengine.conf
make
make ? ?install
/usr/local/tengine/sbin/nginx
注意:
1、修改path環境變量,以能夠識別此程序的二進制文件路徑;
????????? ? 修改/etc/profile文件
????????? ? 在/etc/profile.d/目錄建立一個以.sh為名稱后綴的文件,在里面定義 ?export ?PATH=$PATH:/PATH/TO/SOMEWHERE
2、默認情況下,系統搜索庫文件的路徑/lib, ? /usr/lib;要增添額外搜尋路徑;
????????? ? 在/etc/ld.so.conf.d/中創建以.conf為后綴名的文件,而后把要增添的路徑直接寫至此文件中;
????????? ? ldconfig ? 通知系統重新搜尋庫文件
????????????????? ? -v ? :顯示重新搜尋庫的過程
3、頭文件:輸出給系統
????????默認:/usr/include
????? ? 增添頭文件搜尋路徑,使用連接進行:
????????? ? /usr/local/tengine/include/????????? ? /usr/include/
????????? ? ln ? -s ? ?/usr/local/tengine/include/* ? ?/usr/include/ ? 或
????????? ? ln ? -s ? /usr/local/tengine/include/ ? ?/usr/include/tengine
4、man文件路徑:安裝在--prefix指定的目錄下的man目錄:/usr/share/man
????????? ? 1、man ? -M ? /path/to/man_dir ? command
????????? ? 2、在/etc/man.config中添加一條manpath
netstat命令:
????????????-r:顯示路由表
????????????-n:以數字的方式顯示
????????????-t:建立的tcp的連接
????????????-u:顯示udp連接
????????????-l:顯示監聽狀態的連接
????????????-p:顯示監聽指定的套接字的進程的進程號及進程名
perl,java,python