戻る
■Vagrant + Ansible で環境構築
■起動 cd C:\Users\refirio\Vagrant\centos7 vagrant up ■終了 cd C:\Users\refirio\Vagrant\centos7 vagrant halt ■Ansible 以下のPlaybookで構築 refirio/ansible-apache_php7_mariadb https://github.com/refirio/ansible-apache_php7_mariadb $ cd /var/www/ansible-develop $ ansible-playbook site.yml --connection=local http://192.168.33.10/ ■C言語のプログラムをコンパイル C:\Users\refirio\Vagrant\centos7\code\c $ gcc -dumpversion 4.8.5 $ cd /var/www/c/hello $ vi hello.c
#include <stdio.h> int main() { printf("Hello, world.\n"); return 0; }
$ gcc -o hello hello.c $ ./hello Hello, world. ■C++ ※ついでにC++のコンパイルも試す 上記手順で環境構築していれば、「gcc」を「g++」に変えることでコンパイルできるみたい $ cd /var/www/cpp/hello $ vi hello.cpp
#include <iostream> int main() { std::cout << "Hello, World!" << std::endl; return 0; }
$ g++ -o hello hello.cpp $ ./hello Hello, world.