-
Notifications
You must be signed in to change notification settings - Fork 43
init_environment_in_centos6
New Future edited this page Jul 7, 2016
·
2 revisions
#!/bin/bash
#tools
# sudo yum install wget
# sudo yum install net-tools
# sudo yum install vim
#update source
# sudo yum install -y wget
sudo rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo yum makecache
# sudo yum -y upgrade
sudo yum install httpd -y
sudo systemctl start httpd.service
sudo systemctl enable httpd
sudo firewall-cmd --permanent --add-service=http
sudo yum install -y mysql55w mysql55w-server
sudo systemctl start mysqld
sudo systemctl enable mysqld
# sudo yum -y upgrade
sudo yum install -y php70w php70w-opcache \
php70w-devel php70w-pdo_mysql php70w-mcrypt php70w-mbstring
cd ~
sudo yum install -y gcc
curl -o yaf.tgz https://pecl.php.net/get/yaf-3.0.3.tgz
tar zxvf yaf.tgz
cd yaf-3.0.3/
phpize
./configure
make
sudo make install
#add yaf to php.ini
sudo sh -c "echo $'extension=yaf.so\n[yaf]\nyaf.environ=product'>>/etc/php.d/yaf.ini"
sudo sh -c "echo '<?php phpinfo();?>'>/var/www/html/index.php"
#change document root
sudo sh -c "echo $'DocumentRoot /var/www/public/\n
<Directory \"/var/www/public/\">\n
Options FollowSymLinks\n
AllowOverride all\n
Require all granted\n
</Directory>'>/etc/httpd/conf.d/yyf.conf"
sudo service httpd restart
#adminer mysql mangement online
sudo curl -o /var/www/html/adminer.php https://www.adminer.org/latest-mysql.php