[network]
檢查抓到哪些網路裝置
ls /sys/class/net
啟用
ifconfig eth0 up
promisc mode
ifconfig eth0 promisc on
寫入設定檔
/etc/network/interface
auto eth0
iface eth0 inet dhcp
---
iface eth0 inet manual
up ip link set $IFACE promisc on
---
iface eth0 inet static
address 1.1.1.1
gateway 1.1.1.254
netmask 255.255.255.0
network 1.1.1.0
broadcast 1.1.1.255
---
DNS
dns-nameservers 8.8.8.8
[更新]
apt update
apt upgrade
[安裝軟體]
apt install xxxxx
待整理.......
2015年1月16日 星期五
2014年7月1日 星期二
手動安裝apache+php
在2014的年中,因為客戶的需求需要很舊版的Apache+PHP+Mysql Client
使用yum 安裝只裝的到新版本因此必須手動安裝
OS: CentOS
首先要先把基本的工具跟Library裝好
部分Library 會有太新的問題<就必須抓舊版的回來裝
gcc
autoconf
freetype-devel.x86_64
zlib-devel.x86_64
libxml2-devel
gd-devel.x86_64
libjpeg-turbo-devel.x86_64
libpng-devel.x86_64
libmcrypt-devel.x86_64
libtool-ltdl-devel
mysql mysql-devel mysql-lib
#新作業系統都是64 library需要指定一下
# ln -s /usr/include /opt/include
# ln -s /usr/lib64 /opt/lib
#太舊的PHP不支援openssl 1.x.x 要手動裝
openssl 0.9.8
./config --prefix=/usr/local/openssl
make install_sw # 不安裝說明文件
apache2
/configure --prefix=/usr/local/apache2 --enable-ssl --enable-so --with-ssl=/usr/local/openssl
php5
./configure --prefix=/usr/local/php5 --with-mysql=/opt --with-gd=/opt --with-jpeg-dir=/opt --with-png-dir=/opt --with-libxml-dir=/usr/local/libxml2/ --with-zlib-dir=/opt --with-mcrypt=/opt --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --with-mysqli
使用yum 安裝只裝的到新版本因此必須手動安裝
OS: CentOS
首先要先把基本的工具跟Library裝好
部分Library 會有太新的問題<就必須抓舊版的回來裝
gcc
autoconf
freetype-devel.x86_64
zlib-devel.x86_64
libxml2-devel
gd-devel.x86_64
libjpeg-turbo-devel.x86_64
libpng-devel.x86_64
libmcrypt-devel.x86_64
libtool-ltdl-devel
mysql mysql-devel mysql-lib
#新作業系統都是64 library需要指定一下
# ln -s /usr/include /opt/include
# ln -s /usr/lib64 /opt/lib
#太舊的PHP不支援openssl 1.x.x 要手動裝
openssl 0.9.8
./config --prefix=/usr/local/openssl
make install_sw # 不安裝說明文件
apache2
/configure --prefix=/usr/local/apache2 --enable-ssl --enable-so --with-ssl=/usr/local/openssl
php5
./configure --prefix=/usr/local/php5 --with-mysql=/opt --with-gd=/opt --with-jpeg-dir=/opt --with-png-dir=/opt --with-libxml-dir=/usr/local/libxml2/ --with-zlib-dir=/opt --with-mcrypt=/opt --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --with-mysqli
#修改啟動稿
cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
vi /etc/rc.d/init.d/httpd
在 #!/bin/sh 下面加入以下兩行
# chkconfig: 2345 10 90
# description: Activates/Deactivates Apache Server
設定啟動狀態
chkconfig --add httpd
chkconfig httpd on
2012年10月9日 星期二
JDK安裝及環境設定
JAVA下載
http://www.oracle.com/technetwork/java/javase/downloads/index.html
個人不喜歡RPM因此都是選tarball安裝
Unix:
1.將tarball放到想放的目錄如/usr/local/
2.解開tar zxvf jdk-{版號}-linux-i586.tar.gz
就完成了.....
3. 設定環境變數BASH (修改/etc/profile)
1..........download
2...............install
3......................set path
that's all
http://www.oracle.com/technetwork/java/javase/downloads/index.html
個人不喜歡RPM因此都是選tarball安裝
Unix:
1.將tarball放到想放的目錄如/usr/local/
2.解開tar zxvf jdk-{版號}-linux-i586.tar.gz
就完成了.....
3. 設定環境變數BASH (修改/etc/profile)
export JAVA_HOME=/usr/local/jdk1.{版號}Windows:
export PATH=${PATH}:${JAVA_HOME}/bin
1..........download
2...............install
3......................set path
that's all
訂閱:
文章 (Atom)