MNIST : MXNet

MNIST Data (refer to MNIST : Caffe)

Prepare imglist for MXNet

  1. import os
  2. import sys
  3.  
  4. input_path = sys.argv[1].rstrip(os.sep)
  5.  
  6. out_path = sys.argv[2]
  7.  
  8. filenames = os.listdir(input_path)
  9. with open(out_path, 'w') as f:
  10.     for i, filename in enumerate(filenames):
  11.         filepath = os.sep.join([input_path, filename])
  12.         label = filename[: filename.rfind('.')].split('_')[1]
  13.  
  14.         line = '{}\t{}\t{}\n'.format(i, label, filepath)
  15.         f.write(line)

Convert to rec

  1. python gen_mxnet_imglist.py mnist/train train.lst
  2. python gen_mxnet_imglist.py mnist/val val.lst
  3. python gen_mxnet_imglist.py mnist/test test.lst
  4.  
  5. /home/d/mxnet/bin/im2rec train.lst ./ train.rec color=0
  6. /home/d/mxnet/bin/im2rec val.lst ./ val.rec color=0
  7. /home/d/mxnet/bin/im2rec test.lst ./ test.rec color=0

Train (LeNet-5)

  1. import mxnet as mx
  2.  
  3. data = mx.symbol.Variable('data')
  4.  
  5. conv1 = mx.symbol.Convolution(data=data, kernel=(5, 5), num_filter=20)
  6. pool1 = mx.symbol.Pooling(data=conv1, pool_type="max", kernel=(2, 2), stride=(2, 2))
  7.  
  8. conv2 = mx.symbol.Convolution(data=pool1, kernel=(5, 5), num_filter=50)
  9. pool2 = mx.symbol.Pooling(data=conv2, pool_type="max", kernel=(2, 2), stride=(2, 2))
  10.  
  11. flatten = mx.symbol.Flatten(data=pool2)
  12. fc1 = mx.symbol.FullyConnected(data=flatten, num_hidden=500)
  13. relu1 = mx.symbol.Activation(data=fc1, act_type="relu")
  14.  
  15. fc2 = mx.symbol.FullyConnected(data=relu1, num_hidden=10)
  16.  
  17. lenet5 = mx.symbol.SoftmaxOutput(data=fc2, name='softmax')
  18.  
  19. mod = mx.mod.Module(lenet5, context=mx.gpu(0))
  20.  
  21. #
  22.  
  23. train_dataiter = mx.io.ImageRecordIter(
  24.     path_imgrec="train.rec",
  25.     data_shape=(1, 28, 28),
  26.     batch_size=50,
  27.     mean_r=128,
  28.     scale=0.00390625,
  29.     rand_crop=True,
  30.     min_crop_size=24,
  31.     max_crop_size=28,
  32.     max_rotate_angle=15,
  33.     fill_value=0
  34. )
  35. val_dataiter = mx.io.ImageRecordIter(
  36.     path_imgrec="val.rec",
  37.     data_shape=(1, 28, 28),
  38.     batch_size=100,
  39.     mean_r=128,
  40.     scale=0.00390625,
  41. )
  42.  
  43. #
  44.  
  45. import logging
  46.  
  47. logging.getLogger().setLevel(logging.DEBUG)
  48. fh = logging.FileHandler('train_mnist_lenet.log')
  49. logging.getLogger().addHandler(fh)
  50.  
  51. lr_scheduler = mx.lr_scheduler.FactorScheduler(1000, factor=0.95)
  52. optimizer_params = {
  53.     'learning_rate': 0.01,
  54.     'momentum': 0.9,
  55.     'wd': 0.0005,
  56.     'lr_scheduler': lr_scheduler
  57. }
  58.  
  59. checkpoint = mx.callback.do_checkpoint('mnist_lenet', period=5)
  60.  
  61. mod.fit(train_dataiter,
  62.         eval_data=val_dataiter,
  63.         optimizer_params=optimizer_params,
  64.         num_epoch=36,
  65.         epoch_end_callback=checkpoint)

Log Visualization

Test Model Accuracy

  1. import mxnet as mx
  2.  
  3. test_dataiter = mx.io.ImageRecordIter(
  4.     path_imgrec="test.rec",
  5.     data_shape=(1, 28, 28),
  6.     batch_size=100,
  7.     mean_r=128,
  8.     scale=0.00390625,
  9. )
  10.  
  11. mod = mx.mod.Module.load('mnist_lenet', 35, context=mx.gpu(0))
  12.  
  13. mod.bind(
  14.     data_shapes=test_dataiter.provide_data,
  15.     label_shapes=test_dataiter.provide_label,
  16.     for_training=False)
  17.  
  18. metric = mx.metric.create('acc')
  19.  
  20. mod.score(test_dataiter, metric)
  21.  
  22. for name, val in metric.get_name_value():
  23.     print('{} = {:.2f}%'.format(name, val * 100))

Test Model Time

  1. import time
  2. import mxnet as mx
  3.  
  4. benchmark_dataiter = mx.io.ImageRecordIter(
  5.     path_imgrec="test.rec",
  6.     data_shape=(1, 28, 28),
  7.     batch_size=64,
  8.     mean_r=128,
  9.     scale=0.00390625,
  10. )
  11.  
  12. mod = mx.mod.Module.load('mnist_lenet', 35, context=mx.gpu(0))
  13. mod.bind(
  14.     data_shapes=benchmark_dataiter.provide_data,
  15.     label_shapes=benchmark_dataiter.provide_label,
  16.     for_training=False)
  17.  
  18. start = time.time()
  19.  
  20. for i, batch in enumerate(benchmark_dataiter):
  21.     mod.forward(batch)
  22.  
  23. time_elapsed = time.time() - start
  24. msg = '{} batches iterated!\nAverage forward time per batch: {:.6f} ms'
  25. print(msg.format(i + 1, 1000 * time_elapsed / float(i)))

MNIST : Caffe

Prepare

  1. wget http://deeplearning.net/data/mnist/mnist.pkl.gz

Loading data from pkl

  1. import os
  2. import pickle, gzip
  3. from matplotlib import pyplot
  4.  
  5. print('Loading data from mnist.pkl.gz ...')
  6. with gzip.open('mnist.pkl.gz', 'rb') as f:
  7.     train_set, valid_set, test_set = pickle.load(f)
  8.  
  9. imgs_dir = 'mnist'
  10. os.system('mkdir -p {}'.format(imgs_dir))
  11. datasets = {'train': train_set, 'val': valid_set, 'test': test_set}
  12.  
  13. for dataname, dataset in datasets.items():
  14.     print('Converting {} dataset ...'.format(dataname))
  15.     data_dir = os.sep.join([imgs_dir, dataname])
  16.  
  17.     os.system('mkdir -p {}'.format(data_dir))
  18.  
  19.     for i, (img, label) in enumerate(zip(*dataset)):
  20.  
  21.         filename = '{:0>6d}_{}.jpg'.format(i, label)
  22.  
  23.         filepath = os.sep.join([data_dir, filename])
  24.  
  25.         img = img.reshape((28, 28))
  26.  
  27.         pyplot.imsave(filepath, img, cmap='gray')
  28.         if (i + 1) % 10000 == 0:
  29.             print('{} images converted!'.format(i + 1))

Prepare imglist for Caffe

  1. import os
  2. import sys
  3.  
  4. input_path = sys.argv[1].rstrip(os.sep)
  5.  
  6. output_path = sys.argv[2]
  7.  
  8. filenames = os.listdir(input_path)
  9. with open(output_path, 'w') as f:
  10.     for filename in filenames:
  11.  
  12.         filepath = os.sep.join([input_path, filename])
  13.  
  14.         label = filename[: filename.rfind('.')].split('_')[1]
  15.  
  16.         line = '{} {}\n'.format(filepath, label)
  17.         f.write(line)

Convert to LMDB

  1. python gen_caffe_imglist.py mnist/train train.txt
  2. python gen_caffe_imglist.py mnist/val val.txt
  3. python gen_caffe_imglist.py mnist/test test.txt
  4.  
  5. /home/d/Documents/caffe/build/tools/convert_imageset ./ train.txt train_lmdb --gray --shuffle
  6. /home/d/Documents/caffe/build/tools/convert_imageset ./ val.txt val_lmdb --gray --shuffle
  7. /home/d/Documents/caffe/build/tools/convert_imageset ./ test.txt test_lmdb --gray --shuffle

Train (LeNet-5)

  1. /home/d/Documents/caffe/build/tools/caffe train -solver lenet_solver.prototxt -log_dir ./

Log Visualization

loss_iters

  1. python /home/d/Documents/caffe/tools/extra/plot_training_log.py.example 2 loss_iters.png caffe.ubuntu.d.log


accuracy_iters

  1. python /home/d/Documents/caffe/tools/extra/plot_training_log.py.example 0 accuracy_iters.png caffe.ubuntu.d.log


Test Model Accuracy

  1. /home/d/Documents/caffe/build/tools/caffe test -model lenet_test.prototxt -weights mnist_lenet_iter_36000.caffemodel -iterations 100

Test Model Time

  1. /home/d/Documents/caffe/build/tools/caffe time -model lenet.prototxt

Augmented, Train

loss_iters

  1. python /home/d/Documents/caffe/tools/extra/plot_training_log.py.example 2 loss_iters_aug.png mnist_train.log mnist_train_with_augmentation.log




accuracy_iters

  1. python /home/d/Documents/caffe/tools/extra/plot_training_log.py.example 0 accuracy_iters_aug.png mnist_train.log mnist_train_with_augmentation.log



Update solver max_iter, Train

  1. /home/d/Documents/caffe/build/tools/caffe train -solver lenet_solver_aug.prototxt -snapshot mnist_aug_lenet_iter_36000.solverstate -log_dir ./

Caffe Installation : Ubuntu 16.04

Prepare

  1. sudo apt update
  2. sudo apt install build-essential git libatlas-base-dev
  3. sudo apt-get install python-pip
  4. pip install --upgrade pip
  5. sudo apt-get install graphviz
  6. sudo pip install graphviz
  7. sudo apt install libprotobuf-dev libleveldb-dev libsnappy-dev libboost-all-dev libhdf5-serial-dev protobuf-compiler gfortran libjpeg62 libfreeimage-dev libgoogle-glog-dev libbz2-dev libxml2-dev libxslt-dev libffi-dev libssl-dev libgflags-dev liblmdb-dev python-yaml
  8. sudo apt-get install libopencv-dev python-opencv

Config

  1. # git clone https://github.com/BVLC/caffe. git
  2. # Or
  3. unzip caffe-master.zip 
  4. cd caffe-master/
  5. cp Makefile.config.example Makefile.config
  6.  
  7. d@ubuntu:~/Documents/caffe$ diff Makefile.config.example Makefile.config
  8. 8c8
  9. < # CPU_ONLY := 1
  10. ---
  11. > CPU_ONLY := 1
  12. 94c94
  13. < # WITH_PYTHON_LAYER := 1
  14. ---
  15. > WITH_PYTHON_LAYER := 1
  16. 97,98c97,98
  17. < INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
  18. < LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
  19. ---
  20. > INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
  21. > LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial/
  22. d@ubuntu:~/Documents/caffe$

Compile & Test

  1. export LD_LIBRARY=$LD_LIBRARY:/usr/include/hdf5
  2. export PYTHONPATH=$PYTHONPATH:/home/d/Documents/caffe/python
  3. make pycaffe -j
  4. make all -j
  5. make test -j
  6. make runtest

virtual memory exhausted

  1. sudo mkdir /opt/images/
  2. sudo rm -rf /opt/images/swap
  3. sudo dd if=/dev/zero of=/opt/images/swap bs=1024 count=10240000
  4. sudo mkswap /opt/images/swap
  5. sudo swapon /opt/images/swap

Some built-in macros inside CMakeSettings.json:

  • ${workspaceRoot} – provides the full path to the workspace folder
  • ${workspaceHash} – hash of workspace location; useful for creating a unique identifier for the current workspace (e.g. to use in folder paths)
  • ${projectFile} – the full path for the root CMakeLists.txt
  • ${projectDir} – the full path to the folder of the root CMakeLists.txt file
  • ${thisFile} – the full path to the CMakeSettings.json file
  • ${name} – the name of the configuration
  • ${generator} – the name of the CMake generator used in this configuration

CMake & Arm Cross compilation based Windows systems (Visual Studio)

CMakeLists.txt

  1. cmake_minimum_required(VERSION 3.12)
  2. project(network_information)
  3.  
  4. SET(CMAKE_SYSTEM_NAME Linux)
  5.  
  6. add_definitions("-std=c++17")
  7.  
  8. # specify the cross compiler
  9. SET(CMAKE_C_COMPILER   arm-linux-gnueabihf-gcc)
  10. SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
  11.  
  12. if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
  13.     set(BOOST_ROOT "C:/MinGW/msys/1.0/home/d/boost_1_68_0")
  14. else()
  15.     set(BOOST_ROOT /root/Downloads/boost_1_68_0)
  16. endif()
  17.  
  18. set(Boost_USE_STATIC_LIBS ON)
  19. set(Boost_USE_MULTITHREADED ON)
  20.  
  21. include_directories(sdk/inc)
  22. link_directories("sdk/lib")
  23.  
  24. add_executable(network_information
  25. 		network_information.cpp
  26. 		)
  27. TARGET_LINK_LIBRARIES(network_information "-lpthread" "-ldl" "-lpos" "-lrt" "-lpng" "-liconv" "-lfreetype" "-lz")

GNUlinux_config.cmake

  1. set(GNULINUX_PLATFORM ON)
  2. set(CMAKE_SYSTEM_NAME "Linux")
  3. set(CMAKE_SYSTEM_PROCESSOR "arm")
  4.  
  5. if(NOT DEFINED ENV{NE10_LINUX_TARGET_ARCH})
  6.    set(NE10_LINUX_TARGET_ARCH "armv7")
  7. else()
  8.    set(NE10_LINUX_TARGET_ARCH $ENV{NE10_LINUX_TARGET_ARCH})
  9. endif()
  10.  
  11. if(NE10_LINUX_TARGET_ARCH STREQUAL "armv7")
  12.    set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
  13.    set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
  14.    set(CMAKE_ASM_COMPILER arm-linux-gnueabihf-as)
  15.    find_program(CMAKE_AR NAMES "arm-linux-gnueabihf-ar")
  16.    find_program(CMAKE_RANLIB NAMES "arm-linux-gnueabihf-ranlib")
  17. elseif(NE10_LINUX_TARGET_ARCH STREQUAL "aarch64")
  18.    set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
  19.    set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
  20.    set(CMAKE_ASM_COMPILER aarch64-linux-gnu-as)
  21.    find_program(CMAKE_AR NAMES "aarch64-linux-gnu-ar")
  22.    find_program(CMAKE_RANLIB NAMES "aarch64-linux-gnu-ranlib")
  23. endif()
  24.  
  25. mark_as_advanced(CMAKE_AR)
  26. mark_as_advanced(CMAKE_RANLIB)

CMakeSettings.json

  1. {
  2.   "configurations": [
  3.     {
  4.       "environments": [
  5.         {
  6.           "MINGW64_ROOT": "C:\\MinGW\\msys\\1.0\\home\\d\\gcc-linaro-7.3.1-2018.05-i686-mingw32_arm-linux-gnueabihf",
  7.           "BIN_ROOT": "${env.MINGW64_ROOT}\\bin",
  8.           "FLAVOR": "x86_64-w64-mingw32",
  9.           "TOOLSET_VERSION": "7.3.0",
  10.           "PATH": "${env.MINGW64_ROOT}\\bin;${env.MINGW64_ROOT}\\..\\usr\\local\\bin;${env.MINGW64_ROOT}\\..\\usr\\bin;${env.MINGW64_ROOT}\\..\\bin;${env.PATH}",
  11.           "INCLUDE": "${env.INCLUDE};${env.MINGW64_ROOT}\\include\\c++\\${env.TOOLSET_VERSION};${env.MINGW64_ROOT}\\include\\c++\\${env.TOOLSET_VERSION}\\tr1;${env.MINGW64_ROOT}\\include\\c++\\${env.TOOLSET_VERSION}\\${env.FLAVOR}",
  12.           "environment": "mingw_64"
  13.         }
  14.       ],
  15.       "name": "Mingw64-Release",
  16.       "generator": "Ninja",
  17.       "configurationType": "Release",
  18.       "inheritEnvironments": [
  19.         "mingw_64"
  20.       ],
  21.       "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
  22.       "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
  23.       "cmakeCommandArgs": "",
  24.       "buildCommandArgs": "-v",
  25.       "ctestCommandArgs": "",
  26.       "intelliSenseMode": "linux-gcc-x64",
  27.       "variables": [
  28.         {
  29.           "name": "CMAKE_TOOLCHAIN_FILE",
  30.           "value": "GNUlinux_config.cmake"
  31.         },
  32.         {
  33.           "name": "CMAKE_C_COMPILER",
  34.           "value": "${env.BIN_ROOT}\\arm-linux-gnueabihf-gcc.exe"
  35.         },
  36.         {
  37.           "name": "CMAKE_CXX_COMPILER",
  38.           "value": "${env.BIN_ROOT}\\arm-linux-gnueabihf-g++.exe"
  39.         }
  40.       ]
  41.     }
  42.   ]
  43. }

Cross compile with sftp-server to ARM

zlib

  1. tar xvf zlib-1.2.11.tar.xz
  2. cd zlib-1.2.11/
  3. ./configure --prefix=/root/Downloads/sftp-server/rootfs
  4.  
  5. [root@localhost zlib-1.2.11]# diff Makefile Makefile_bak 
  6. 19c19
  7. < CC=arm-linux-gnueabihf-gcc
  8. ---
  9. > CC=gcc
  10. 30,31c30,31
  11. < LDSHARED=arm-linux-gnueabihf-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
  12. < CPP=arm-linux-gnueabihf-gcc -E
  13. ---
  14. > LDSHARED=gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
  15. > CPP=gcc -E
  16. 39c39
  17. < AR=arm-linux-gnueabihf-ar
  18. ---
  19. > AR=ar
  20. 41c41
  21. < RANLIB=arm-linux-gnueabihf-ranlib
  22. ---
  23. > RANLIB=ranlib
  24.  
  25. make
  26. make install

openssh

  1. tar xzf openssh-6.9p1.tar.gz 
  2. cd openssh-6.9p1/
  3. ./configure --prefix= --host=arm-linux-gnueabihf --sysconfdir=/etc --with-zlib=/root/Downloads/sftp-server/rootfs
  4. make sftp-server
  5.  
  6. [root@localhost openssh-6.9p1]# file sftp-server
  7. sftp-server: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=3f3bb0178b0e2ff2e27553e4754bd58d78dffd4d, not stripped

CMake & Arm Cross compilation based Windows systems (CLion)

CMakeLists.txt

  1. cmake_minimum_required(VERSION 3.12)
  2. project(untitled1)
  3.  
  4. SET(CMAKE_SYSTEM_NAME Linux)
  5.  
  6. add_definitions("-std=c++17")
  7.  
  8. SET(CMAKE_C_COMPILER   arm-linux-gnueabihf-gcc)
  9. SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
  10.  
  11. if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
  12.     set(BOOST_ROOT "C:/MinGW/msys/1.0/home/d/boost_1_68_0")
  13. else()
  14.     set(BOOST_ROOT /root/Downloads/boost_1_68_0)
  15. endif()
  16.  
  17. set(Boost_USE_STATIC_LIBS ON)
  18. set(Boost_USE_MULTITHREADED ON)
  19.  
  20. find_package(Boost COMPONENTS regex system date_time timer REQUIRED)
  21. if(Boost_FOUND)
  22.     include_directories(${Boost_INCLUDE_DIRS})
  23.     link_directories("${Boost_INCLUDE_DIRS}/stage/lib")
  24.     include_directories(sdk/inc)
  25.     link_directories("sdk/lib")
  26.     MESSAGE( STATUS "Boost_INCLUDE_DIRS = ${Boost_INCLUDE_DIRS}.")
  27.     MESSAGE( STATUS "Boost_LIBRARIES = ${Boost_LIBRARIES}.")
  28.     MESSAGE( STATUS "Boost_LIB_VERSION = ${Boost_LIB_VERSION}.")
  29.  
  30.     add_executable(untitled1 main.cpp)
  31.  
  32.     TARGET_LINK_LIBRARIES(untitled1 ${Boost_LIBRARIES} "-lpthread" "-lpos" "-lrt" "-lpng" "-liconv" "-lfreetype" "-lz" "-l:libboost_system.a")
  33. endif()

GNUlinux_config.cmake

  1. set(GNULINUX_PLATFORM ON)
  2. set(CMAKE_SYSTEM_NAME "Linux")
  3. set(CMAKE_SYSTEM_PROCESSOR "arm")
  4.  
  5. if(NOT DEFINED ENV{NE10_LINUX_TARGET_ARCH})
  6.    set(NE10_LINUX_TARGET_ARCH "armv7")
  7. else()
  8.    set(NE10_LINUX_TARGET_ARCH $ENV{NE10_LINUX_TARGET_ARCH})
  9. endif()
  10.  
  11. if(NE10_LINUX_TARGET_ARCH STREQUAL "armv7")
  12.    set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
  13.    set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
  14.    set(CMAKE_ASM_COMPILER arm-linux-gnueabihf-as)
  15.    find_program(CMAKE_AR NAMES "arm-linux-gnueabihf-ar")
  16.    find_program(CMAKE_RANLIB NAMES "arm-linux-gnueabihf-ranlib")
  17. elseif(NE10_LINUX_TARGET_ARCH STREQUAL "aarch64")
  18.    set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
  19.    set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
  20.    set(CMAKE_ASM_COMPILER aarch64-linux-gnu-as)
  21.    find_program(CMAKE_AR NAMES "aarch64-linux-gnu-ar")
  22.    find_program(CMAKE_RANLIB NAMES "aarch64-linux-gnu-ranlib")
  23. endif()
  24.  
  25. mark_as_advanced(CMAKE_AR)
  26. mark_as_advanced(CMAKE_RANLIB)

The Most Important Thing on Windows

cmake -DCMAKE_TOOLCHAIN_FILE=GNUlinux_config.cmake ..

Apache Axis2/C Installation Guide (Windows)

First

http://archive.apache.org/dist/ws/axis2/c/1_6_0/axis2c-bin-1.6.0-win32.zip
ftp://ftp.zlatkovic.com/libxml/libxml2-2.7.8.win32.zip
ftp://ftp.zlatkovic.com/libxml/iconv-1.9.2.win32.zip
ftp://ftp.zlatkovic.com/libxml/zlib-1.2.5.win32.zip
http://archive.apache.org/dist/httpd/binaries/win32/httpd-2.2.25-win32-x86-openssl-0.9.8y.msi

Install Axis2/C

  1. Extract the binary distribution to a folder of your choice.(example: C:\axis2c-bin-1.6.0-win32)
  2. Copy the iconv.dll, libxml2.dll and zlib1.dll to C:\axis2c-bin-1.6.0-win32\lib
  3. Set the variable AXIS2C_HOME to the deploy folder (C:\axis2c-bin-1.6.0-win32)
  4. Add the path to lib directory to the PATH variable (%AXIS2C_HOME%\lib)

Install Apache 2.2

  1. Copy C:\axis2c-bin-1.6.0-win32\lib\mod_axis2.dll C:\Apache22\modules\mod_axis2.so
  2. Edit the Apache2’s configuration file (generally httpd.conf) and add the following directives
  3. LoadModule axis2_module modules/mod_axis2.so
    Axis2RepoPath C:/axis2c-bin-1.6.0-win32
    Axis2LogFile C:/axis2c-bin-1.6.0-win32/logs
    Axis2MaxLogFileSize 40
    Axis2LogLevel warn
  4. Restart apache2 and test whether mod_axis2 module is loaded by typing the URL http://localhost/axis2/services in your Web browser