Thursday, November 8, 2018

Azure Centos 7.3 setup with apache + php7.3 +mongodb

#disable selinux
163 vim /etc/selinux/config
164 setenforce 0

#install php7.3
10 yum install
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
11 yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
12 yum install yum-utils
22 yum-config-manager --enable remi-php73
25 yum install php php-mcrypt php-cli php-gd php-curl php-mysql
php-ldap php-zip php-fileinfo
26 php -v

#httpd(apache)
1 yum install httpd
27 vim /etc/httpd/conf/httpd.conf
38 netstat -punta | grep LISTEN
60 pkill -9 httpd
57 service httpd restart

#install mongodb
89 vim /etc/yum.repos.d/mongodb-org-4.0.repo (copied from mongodb website)
90 sudo yum install -y mongodb-org
93 sudo service mongod start
95 cat /var/log/mongodb/mongod.log |grep waiting
96 sudo chkconfig mongod on
98 mongo (client)
103 mongorestore -d master mongo_dump/master/

#php mongo extension
127 yum -y install gcc php-pear php-devel
141 pecl install mongodb
142 vim /etc/php.ini (enable mongodb.so extension)
125 php -m | grep -i mongo
144 service httpd restart
145 mongo
146 setsebool -P httpd_can_network_connect on (not required if you
disable selinux)


No comments:

Blog Archive