pacman -Syy phpmyadmin php-mcrypt
vim /etc/php/php.ini
vim /etc/httpd/conf/extra/phpmyadmin.conf
vim /etc/httpd/conf/httpd.conf
sudo systemctl restart httpd
Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
<Directory "/usr/share/webapps/phpMyAdmin">
DirectoryIndex index.php
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
Example httpd.conf
# phpMyAdmin configuration
Include conf/extra/phpmyadmin.conf
Alternate Installations (Install on user dir not system, but it is useful to manage node.js version)
git clone git://github.com/creationix/nvm.git ~/.nvm
echo ". ~/.nvm/nvm.sh" >> .zshrc //bashrc or your shell rc
source .zshrc
nvm install v0.12.13 //use nvm ls-remote to look up version
nvm use v0.12.13
nvm alias default v0.12.13
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
export JAVA_HOME=/usr/lib/jvm/java-7-oracle/ //you can add it to your bashrc.
**Estinet Server**
OS Fedora-17-i686-Live-Desktop
Esxi CPU 4核心
memory 2G
**controller**
Opendaylight-openflowplugin (2014/10/1 commit)
OS ubuntu 14.04lts
**模擬 openflow 1.3**
安裝基本程式
# su
# yum install screen vim
//如果不能連結server,出現以下錯誤,請參考本站其他篇logdown,
//Error: Cannot retrieve metalink for repository: fedora. Please verify its path and try again
# tar -xvf EstiNet-8.0.4.2426.tar.bz2
# cd EstiNet-8.0.4.2426/EstiNet8_InstallPackage/InstallPackage_for_LinuxFedora17_32bit/
# tar -xvf estinet-8.0.4.2426-1.fc17.alpha.tar.bz2
# mv estinet-8.0.4.2426-1.fc17.alpha ~/
# su
# ./install.sh //裝完後會要求一些設定 請按enter
# reboot //重開機後選擇estinet kernel開機
再裝patch EstiNet-8.1.4.3228.tar.bz2
//登入estinet 密碼預設與帳號相通
# su -
# tar -xvf EstiNet-8.1.4.3228.tar.bz2
# cd EstiNet-8.1.4.3228/InstallPackage/
# tar -xvf estinet-8.1.4.3228-1.fc17.release.tar.bz2
# cd estinet-8.1.4.3228-1.fc17.release
# ./install.sh
# reboot
進入estinet
# su -
# inputkey //輸入license
# reserve
//開啟三個終端機
//第一個
# su -
# dispatcher
//第二個
# su -
# coordinator
//第三個
# su -
# estinetgui
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java7-installer
$ export JAVA_HOME=/usr/lib/jvm/java-7-oracle/ //you can add it to your bashrc.
$ sudo apt-get install -y git ant mercurial aptitude curl vim screen
floodlight install
$ git clone https://bitbucket.org/sdnhub/floodlight-plus.git (1.3)
$ cd floodlight-plus
$ ant
or
$ git clone https://github.com/rizard/floodlight (1.0)
$ cd floodlight
$ ant
# gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.5
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
首先先切2M給GRUB,注意type為EF02 (BIOS boot partition)
這裡把編號設為128,維持/boot還是/dev/sd[ab]1
Command (? for help): n
Partition number (1-128, default 1): 128
First sector (34-20971486, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-20971486, default = 20971486) or {+-}size{KMGTP}: +2M
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): EF02
Changed type of partition to 'BIOS boot partition'
/boot
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-20971486, default = 6144) or {+-}size{KMGTP}:
Last sector (6144-20971486, default = 20971486) or {+-}size{KMGTP}: +100M
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): FD00
Changed type of partition to 'Linux filesystem'
swap,注意type為8200 (Linux swap)
Command (? for help): n
Partition number (2-128, default 2):
First sector (34-20971486, default = 210944) or {+-}size{KMGTP}:
Last sector (210944-20971486, default = 20971486) or {+-}size{KMGTP}: +1G
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8200
Changed type of partition to 'Linux swap'
/ (root)
Command (? for help): n
Partition number (3-128, default 3):
First sector (34-20971486, default = 2308096) or {+-}size{KMGTP}:
Last sector (2308096-20971486, default = 20971486) or {+-}size{KMGTP}: +20G
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8300
Changed type of partition to 'Linux filesystem'
Command (? for help): p
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 6144 210943 100.0 MiB FD00 Linux RAID
2 210944 2308095 1024.0 MiB 8200 Linux swap
3 2308096 62914526 28.9 GiB 8300 Linux filesystem
128 2048 6143 2.0 MiB EF02 BIOS boot partition
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sda.
The operation has completed successfully.
# sgdisk /dev/sda -R=/dev/sdb
# sgdisk -G /dev/sdb
# mkfs.btrfs -d raid1 /dev/sda3 /dev/sdb3
# btrfs filesystem show /dev/sda3
# mount -o defaults,noatime,noacl,compress=lzo,inode_cache,space_cache,autodefrag /dev/sda3 /mnt/btrfs-root
# cd /mnt/btrfs-root
# btrfs subvolume create root_subvolume
# cd root_subvolume
# btrfs subvolume create home
# btrfs subvolume create var
# btrfs subvolume create usr
# btrfs subvolume create tmp
# btrfs subvolume list -p .
ID 258 gen 12 parent 5 top level 5 path root_subvolume
ID 259 gen 7 parent 258 top level 258 path home
ID 261 gen 9 parent 258 top level 258 path var
ID 262 gen 10 parent 258 top level 258 path usr
ID 263 gen 12 parent 258 top level 258 path tmp
# cd ../
# chmod -R 0755 root_subvolume //看起來沒用
# mkdir /mnt/btrfs-system
# mount -o subvol=root_subvolume,defaults,noatime,noacl,compress=lzo,inode_cache,space_cache,autodefrag /dev/sda3 /mnt/btrfs-system
//swap boot 按原本的 並mount到正確位置上
# cd /mnt/btrfs-system
# mdadm --create --verbose /dev/md1 --level=mirror --raid-devices=2 /dev/sd{a,b}1
# mdadm --detail --scan | tee -a /etc/mdadm.conf
# mkswap /dev/sda2
# mkswap /dev/sdb2
# swapon /dev/sd{a,b}2
# mkfs.ext2 /dev/md1
# mkdir /mnt/boot && mount /dev/md1 /mnt/boot
//安裝系統
# cd /
# pacstrap /mnt/btrfs-system base base-devel
# genfstab -U -p /mnt/btrfs-system | tee /mnt/btrfs-system/etc/fstab
# vi /mnt/btrfs-system/etc/fstab
# cp /etc/mdadm.conf /mnt/btrfs-system/etc/
\# /dev/sda3
UUID=5e36cd15-3f29-4b57-a99d-0d3230c1e483 / btrfs rw,noatime,compress=lzo,noacl,space_cache,autodefrag,inode_cache,subvol=root_subvolume 0 0
\# /dev/md1
UUID=21f392d6-fc78-44f5-9c05-b555a3dbbffb /boot ext2 rw,relatime 0 2
\# /dev/sda2
UUID=bd4c005a-e81c-46d4-9c46-f1e35f9e9b6c none swap defaults 0 0
\# /dev/sdb2
UUID=1fa9b186-a957-4e14-a260-ae3eee5da8f2 none swap defaults,pri=-2 0 0
//chroot 安裝btrfs-progs
# arch-chroot /mnt/btrfs-system
# pacman -S btrfs-progs
# hostnamectl set-hostname linuxn.cs.nctu.edu.tw
# echo "KEYMAP=us" > /etc/vconsole.conf
# ln -s /usr/share/zoneinfo/Asia/Taipei /etc/localtime
# hwclock --systohc --utc --adjfile /etc/adjtime
# vi /etc/locale.gen
en_US.UTF-8 UTF-8
en_US ISO-8859-1
zh_CN.UTF-8 UTF-8
zh_CN GB2312
zh_TW.UTF-8 UTF-8
zh_TW BIG5
# locale-gen
# echo "LANG=en_US.UTF-8" > /etc/locale.conf
# pacman -S openssh
# systemctl enable sshd.service
# vi /etc/mkinitcpio.conf
HOOKS="base udev autodetect modconf block filesystems keyboard mdadm_udev btrfs"
# mkinitcpio -p linux
# pacman -S grub
# grub-install --target=i386-pc --recheck /dev/sda
# grub-install --target=i386-pc --recheck /dev/sdb
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
# grub-mkconfig -o /boot/grub/grub.cfg
# passwd
# exit
# reboot
20141111...
未完