-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript.sh
More file actions
68 lines (52 loc) · 2.08 KB
/
script.sh
File metadata and controls
68 lines (52 loc) · 2.08 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh
sudo sed -i s/SELINUX=.*/SELINUX=disabled/g /etc/selinux/config
sudo cp /vagrant/files/mongodb.repo /etc/yum.repos.d/mongodb.repo
####################
# Install packages #
####################
sudo wget -r --no-parent -A 'epel-release-*.rpm' http://dl.fedoraproject.org/pub/epel/7/x86_64/e/
sudo rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-*.rpm
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
sudo yum update -y
sudo yum install --enablerepo=remi,remi-php56 -y \
httpd wget nano lynx mongodb-org mongodb-org-server mod_ssl \
php php-devel php-fpm php-cli php-pear php-pdo php-mysqlnd php-common php-gd php-intl php-xml php-process php php-mcrypt* php-mbstring php-mysql \
php-pecl-xdebug php-pecl-apcu php-pecl-memcached php-pecl-memcache php-pecl-mongo php-pecl-redis php-pecl-sqlite php-opcache \
mariadb-server redis
###################
# Manage Services #
###################
sudo systemctl start httpd
sudo systemctl start mongod
sudo systemctl start mariadb.service
sudo systemctl start redis.service
sudo systemctl enable redis.service
sudo systemctl enable mariadb.service
sudo systemctl enable httpd.service
sudo chkconfig mongod on
##########
# APACHE #
##########
sudo rm -f /etc/httpd/conf.d/welcome.conf
sudo rm -f /var/www/error/noindex.html
sudo cp /vagrant/files/httpd.conf /etc/httpd/conf/httpd.conf
sudo cp /vagrant/files/dev.conf /etc/httpd/conf.d/dev.conf
sudo cp /vagrant/files/dev-ssl.conf /etc/httpd/conf.d/dev-ssl.conf
#######
# PHP #
#######
sudo bash -c 'echo -e "[DATE]\n//Notre Timezone\ndate.timezone = "GMT"\n\n" >> /etc/php.d/timezone.ini'
sudo bash -c 'echo -e "\nxdebug.max_nesting_level = 250\n" >> /etc/php.d/xdebug.ini'
###########
# MARIADB #
###########
sudo mysql -u root <<< "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;"
##########
# SYSTEM #
##########
sudo bash -c 'echo "192.168.1.200 dev" >> /etc/hosts'
############
# COMPOSER #
############
curl -k -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer