Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Cryptography development environment to build under Ubuntu     - To use yum install VLC under CentOS (Linux)

- map and hash_map STL containers (Programming)

- Use apt-p2p up a local Debian package cache (Server)

- The user how to install Notepadqq 0.41.0 under ubuntu and debian (Linux)

- mydumper installation error process (Database)

- C ++ 11 feature: decltype keywords (Programming)

- Oracle Linux 6.4 (BOND) dual NIC teaming combat - Annotated (Linux)

- Install the latest Eclipse IDE in Ubuntu (Linux)

- Linux system security Comments (Linux)

- Using the Linux folder wc statistics number of lines of code for all files (including subdirectories) (Linux)

- Use ISO document production OpenStack used CoreOS mirror (Linux)

- Linux Services Comments (Linux)

- VNC configuration detailed analysis under Linux (Linux)

- Win7 + Ubuntu Kylin + CentOS 6.5 installed three systems (Linux)

- C ++ in the elimination Wunused (Programming)

- Firewall settings oracle remote connection in Linux systems (Linux)

- MySQL optimization tabs (Database)

- Redis logging system (Database)

- Java integrated development environment common set of operations (Linux)

- Oracle database with test data insertion speed (Database)

 
         
  Cryptography development environment to build under Ubuntu
     
  Add Date : 2017-04-30      
         
       
         
  Inscription

Since recently doing some projects on cryptography, and cryptography libraries are most dependent on the Linux open-source environment, so build cryptography development environment in Ubuntu becomes very necessary. This article describes the steps necessary to build cryptography development environment in Ubuntu, at the same time some minor settings to enhance the experience.

Ubuntu system is installed and set up the root account.

I installed Ubuntu 13.10. Since the development process requires frequent changes of various conf file or modify / usr file folder, so administrator privileges under sudo clearly unable to meet our needs, we need to establish the root account, so that we can carry out future work.

First, open the root account, set the root password

sudo passwd root

Then enter the new password twice when prompted, this time you can use root privileges logged. But if we log out, you will find the system does not allow us to use the root account login, after entering the account must be further elevated privileges, which obviously can not meet our needs. This is because ubuntu hidden by default root account reason. So you want to modify the configuration.

Modify the configuration lightdm

Open Terminal, modify /etc/lightdm/lightdm.conf.d/10-ubuntu.conf file:

sudo gedit /etc/lightdm/lightdm.conf.d/10-ubuntu.conf add the following

greeter-show-manual-login = true # Allows manual input system login user name and password

allow-guest = true # allow guest login

It is worth mentioning that in some low ubuntu version, you need to modify /etc/lightdm/lightdm.conf file, modify the method above.

In this way, we can choose to root account login.

Second. Ubuntu under Eclipse installation and configuration

My main job is to carry out Java / Android development, the bottom layer of the call is to use the C library, is to use jni / NDK calls. Thus, Eclipse is a suitable development tools.

1. Eclipse installation

Download the latest version of Eclipse is https://www.eclipse.org/downloads/ to note that, Eclipse 32-bit systems and 64-bit systems are different, be careful when downloading.

ubuntu, the test system is 32-bit or 64-bit has two methods:

1, terminal, enter uname -m returns i686 is the 32-bit system returns x86_64 is the 64-bit system;

2, terminal, enter getconf LONG_BIT, this command returns the length of the system is long data type, if the return system 32 is 32, 64 is 64-bit systems.

After downloading extract to / usr / local / java folder.

2.Eclipse Bug fixes

It should be noted, there is unity interface ubuntu12.10 after bug, and eclipse interface uses unity interface agent, resulting in a great chance not display eclipse menu, you must create a new shortcut in order to open the option to disable menu Agent Mode Eclipse (if installed open Eclipse, you can find yourself using the menu bar, you can skip this step). Solutions are as follows:
1. Create a new shortcut.
In any folder (in desktop) New -> Blank Document, and enter the following code

[Desktop Entry]
Categories = Development;
Comment [zh_CN] =
Comment =
Exec = env UBUNTU_MENUPROXY = / usr / local / java / eclipse / eclipse
GenericName [zh_CN] = IDE
GenericName = IDE
Icon = / usr / local / java / eclipse / icon.xpm
MimeType =
Name [zh_CN] = eclipse
Name = eclipse
Path =
StartupNotify = true
Terminal = false
Type = Application
X-DBUS-ServiceName =
X-DBUS-StartupType =
X-KDE-SubstituteUID = false
X-KDE-Username = owen
Exec = env UBUNTU_MENUPROXY = 0 / usr / local / java / eclipse / eclipse
Key statement

Exec = env UBUNTU_MENUPROXY = 0 / usr / local / java / eclipse / eclipse
Its role is to disable the agent menu.
After saving and launched, will rename the file to eclipse.desktop, right to increase the file permissions, and check whether the correct command

Double-click the desktop icon to open up, pull-down menus can also be achieved. If there is demand, but also can be fixed on the start bar.
Eclipse itself comes with JDK version, but I still want to install separate jdk, so at some need the command line compiler, they can easily call and javah javac command, so a pure download the Eclipse, and with Oracle- jdk, JDK Download 8 is http://www.oracle.com/technetwork/java/javase/downloads/index.html. If openJDK, direct apt-get install to install.
After downloading decompression, decompression good jdk1.8.0_5 folder to / usr / lib / jvm directory, this time even without jvm directories can also execute the following command, jvm folder will be created.

mv jdk1.8.0_5 / usr / lib / jvm
Modify the following environment variable to any directory can be called Java command. Modify / etc / profile

gedit / etc / profile
Added at the end:

export JAVA_HOME = / usr / lib / jvm / jdk1.8.0_5
export JRE_HOME = / usr / lib / jvm / jdk1.8.0_5 / jre
export CLASSPATH =:. $ JAVA_HOME / lib / dt.jar: $ JAVA_HOME / lib / tools.jar: $ JAVA_HOME / lib: $ JRE_HOME / lib: $ CLASSPATH

export PATH = $ JAVA_HOME / bin: $ PATH
Note that there are two points, one CLASSPATH first colon in front of a small point, refers to the "current directory" must be added; the second is to replace jdk1.8.0_5 own Java version.
After saving execution:

source / etc / profile
This completes the configuration of java environment variable. Test environment variable is correctly configured as follows:

java -version
Display the following on behalf of Java is configured correctly:

java version "1.8.0_05"
Java (TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot (TM) Server VM (build 25.5-b02, mixed mode)
Eclipse in C / C ++ development needs CDT plug-ins, CDT plug-in installation method is as follows:
Start Eclipse, select Help> Install New Software;
In the Available Software dialog box, click the Add ...;
In the Name field Add Site dialog box, enter the name of the remote site (for example, "C Plugin"). In the Location field, enter the following URL: http: //download.eclipse.org/tools/cdt/releases/kepler Click OK, pending then select all the options below, all the way to the next step to complete the installation.

3.andorid sdk environment to build

Eclipse ADT (Android Developer Tools) installation
Start Eclipse, select Help> Install New Software.
In the Available Software dialog box, click Add ...,

In the Name field Add Site dialog box, enter the name of the remote site (for example, "Android Plugin"). In the Location field, enter the following URL: https: //dl-ssl.google.com/android/eclipse/ NOTE: If you have trouble accessing the plug-in, URL can be changed in the https http (https will use more secure). Click OK.
Back Available Software interface should be able to see a list of the Developer Tools option. Select Developer Tools beside the check box will also select Android DDMS and Android Development Tools. Click Next.
In the final Install Details dialog box lists the Android DDMS and Android Development Tools and other features. Click Next to read and accept the license agreement, and install all dependent components, and then click Finish.
Restart Eclipse.

3. Install the android sdk

After the restart Eclipse, you'll be prompted, Android SDK does not give a location

Now we need to cut out and download the Android SDK Tools, the following address: http://developer.android.com/sdk/index.html

Download the SDK Tools Only you can. After downloading extract to any folder. Cut back to Eclipse, the path to the SDK Android SDK Tools just unpack location, and then all the way to the next step to install the sdk. If you need additional later version of SDK, open the Android SDK Manager to download.
In order to let the SDK can also be used in Terminal, sdk configuration environment variable, edit / etc / profile

sudo gedit / etc / profile
Added at the end:

# Android SDK
export ANDROID_SDK = ~ / developTools / android-sdk-linux
export PATH = $ ANDROID_SDK / platform-tools: $ ANDROID_SDK / tools: $ PATH
Do not forget to add the complete input Terminal in

source / etc / profile
Test: emulator -version

4. Install the Android NDK
NDK needed in some need to call C library scene. NDK download address is:
http://developer.android.com/tools/sdk/ndk/index.html
After downloading extract to any folder, and configure the same environment variables as sdk

sudo gedit / etc / profile
Added at the end:

export NDK_HOME = / home / snowdream / android-ndk-r5
export PATH = $ NDK_HOME: $ PATH
Remember to substitute your own path extracting the NDK path.

Do not forget to add the complete

source / etc / profile

Test: input Terminal

ndk-build -version
The results will show the correct version numbers of ndk-build.

Environment installed.

Third, the cryptography libraries installed

First install pbc series library.

1. pbc dependent libraries installation
pbc library depends on
M4
GMP Library
flex
bison
Wherein M4, flex, bison can be installed via apt-get install

apt-get install M4
  apt-get install flex
  apt-get install bison
GMP download the following address:
https://gmplib.org/
Download and unzip, unzip the file into the folder where the terminal is installed, as follows:

./configure
make
make check
make install
2. pbc installation
pbc (The Pairing-Based Cryptography Library) Download the following address:

http://crypto.stanford.edu/pbc/download.html
Download and unzip, unzip the file into the folder where the terminal is installed, as follows:

./configure
    make
    make install
Thus, cryptography complete development environment to build. If you need to develop Java / Android project, we will need some knowledge JNI / NDK development of. Fortunately, the library has been JPBC pbc version, with the same Download Download pbc, its essence is a java library pbc interface, so it is still dependent on the pbc library. Here are a direct method of generating libjpbc-pbc.so dynamic link library, it does not rely on pbc libraries, but note that if pbc library itself has changed, then you need to re-build the library file. In addition, the author does not guarantee that this method of generating sufficiently stable.
This method relies on cmake and ccmake, both for the common programming tool, installation is as follows

apt-get install cmake
    apt-get install cmake-curses-gui
After installation, at teminal enter jpbc extract the directory (with < jpbc> on behalf of that), enter

cd < jpbc> / jpbc-pbc
    ccmake.
Like the use of make, type c, and then enter g, this time in < jpbc> / jpbc-pbc folder generates the necessary Makefile file

Then enter
make

so this file is java library that can be called, at the time of calling attention to setting java.library.path.

Although our basic development environment set up is completed, however, depending on each person's needs, we need to download a separate library files they need, for example, frequently used openSSL.
     
         
       
         
  More:      
 
- Use Redis as time-series database: why and how (Database)
- Linux installation is larger than 2TB (UEFI interface) hard disk solution (Linux)
- HttpClient4 usage upgrade from HttpClient3 (Programming)
- Redis 3.0.3 Cluster Setup (Database)
- How to run Docker client in Windows operating system (Linux)
- 12 novice Linux command must learn (Linux)
- 3 ways to create a lightweight, durable system of Ubuntu Linux USB disk (Linux)
- Ubuntu Froxlor Server Administration panel installation (Server)
- Linux system Perl Lite netstat (Linux)
- Linux systems use IP masquerading anti-hacker (Linux)
- How to build Mono 3.4.0 / 3.4.1 on Windows (Linux)
- Linux maximum number of threads and limit the number of queries the current thread (Linux)
- Install Ubuntu Software Center App Grid (Linux)
- Help you enhance Python programming languages 27 (Programming)
- Visual Studio Code experience (Linux)
- Python extension module Ganglia 3.1.x (Linux)
- The AWK use Cygwin tools mysql binlog log viewer (Database)
- A well-known but rarely used skills: object pool (Programming)
- Ubuntu 14.04 build Gitlab (Linux)
- The Java way to stop a thread of execution (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.