일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- fstab
- vsftpd
- MySQL
- CentOS
- VirtualBox
- xampp
- tw_cli
- 명령어
- JavaScript
- php
- VMware
- exception
- MOUNT
- redmine
- Subversion
- php5
- httpd.conf
- Laravel
- Trac
- APM
- GlusterFS
- 라라벨
- ftp
- Network
- BIND
- ubuntu
- AIR
- nateon
- Fedora
- Linux
- Today
- Total
어제와 똑같이 살면서 다른 미래를 기대하지 말자
Vagrant centos/7 본문
1. Vagrant 설치
https://www.vagrantup.com/downloads.html
2. VirtualBox 설치
https://www.virtualbox.org/wiki/Downloads
3. Vagrant CentOS 7 설치
$ vagrant init centos/7
$ vagrant up
$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Fetching: micromachine-3.0.0.gem (100%)
Fetching: vagrant-vbguest-0.21.0.gem (100%)
Installed the plugin 'vagrant-vbguest (0.21.0)'!
$ vagrant reload
4. 개발환경 세팅
1) 기본설정
$ vagrant ssh
# yum install dnf
# yum install dnf-yum
# dnf install net-tools
# dnf install epel-release
# dnf install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
2) PHP 설치
# dnf --enablerepo=remi-php73 install php php-mysql php-gd php-mcrypt php-mbstring php-opcache php-pear php-xml php-xmlrpc php-embedded php-bcmath php-imap php-pdo php-pecl-imagick php-soap php-devel php-ldap php-intl php-pecl-apcu php-snmp php-tidy php-dba php-zip
3) Apache 설치(httpd)
# dnf install httpd
4) Mariadb 설치
# dnf install mariadb mariadb-server mariadb-devel
# vi /etc/my.cnf.d/client.cnf
[client]
default-character-set=utf8
# vi /etc/my.cnf.d/server.cnf
[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
# systemctl start mariadb
# mysql -u root mysql
[mysql]> show variables like 'c%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
| collation_connection | utf8_general_ci |
| collation_database | utf8_unicode_ci |
| collation_server | utf8_unicode_ci |
| completion_type | NO_CHAIN |
| concurrent_insert | AUTO |
| connect_timeout | 10 |
+--------------------------+----------------------------+
# systemctl enable mariadb
5. 프로젝트 세팅
# vi Vatrantfile
Vagrant.configure("2") do |config|
config.vm.define "default", primary: true, autostart: true do |cfg|
cfg.vm.box = "centos/7"
# cfg.vm.box_check_update = false
# cfg.vm.network "forwarded_port", guest: 80, host: 8080
cfg.vm.network "forwarded_port", guest: 80, host: 80, host_ip: "127.0.0.1"
cfg.vm.network "private_network", ip: "192.168.100.100"
# cfg.vm.network "public_network"
cfg.vm.synced_folder "./test", "/home/test", owner: "vagrant", group: "vagrant", disabled: false
cfg.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
cfg.vm.provision "shell", inline: <<-SHELL
SHELL
end
end
'IT관심분야 > Linux' 카테고리의 다른 글
[Mysql8] 패스워드 정책 확인 및 변경 (0) | 2020.08.09 |
---|---|
[리눅스] 대용량 파일복사 (0) | 2020.01.12 |
LGU+ SMS/MMS 전송 시 한글 깨짐 (0) | 2019.01.25 |
[CentOS7] PHP 7.3 to 7.2 downgrade (PHP 다운그레이드) 방법 (1) | 2018.11.30 |
Error: Package: php-pecl-imagick (yum update error) (0) | 2018.11.22 |