Skip to content

Instantly share code, notes, and snippets.

@NewFuture
Last active July 20, 2016 15:08
Show Gist options
  • Save NewFuture/edb2790a155d8c18b25f9fe4fa4230f9 to your computer and use it in GitHub Desktop.
Save NewFuture/edb2790a155d8c18b25f9fe4fa4230f9 to your computer and use it in GitHub Desktop.
yyf enviroment
#!/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 yum makecache
# sudo yum -y upgrade
# Apache
sudo yum install httpd -y
sudo systemctl start httpd.service
sudo systemctl enable httpd
sudo firewall-cmd --permanent --add-service=http
# MYSQL
sudo yum install -y mysql55w mysql55w-server
sudo systemctl start mysqld
sudo systemctl enable mysqld
# php 7
# sudo yum -y upgrade
sudo yum install -y php70w php70w-opcache \
php70w-devel php70w-pdo_mysql php70w-mcrypt php70w-mbstring
# YAF
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 -L -o /var/www/html/adminer.php https://www.adminer.org/latest-mysql.php
#!/bin/bash
#update source
#sudo yum install -y wget
#sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
#sudo wget https://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/centos?codeblock=3 -O /etc/yum.repos.d/CentOS-Base.repo
#add php yum source
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
sudo yum makecache
sudo yum -y upgrade
#tools
sudo yum install vim -y
sudo yum install git -y
# Apache
sudo yum install httpd -y
sudo systemctl start httpd.service
sudo systemctl enable httpd
sudo firewall-cmd --permanent --add-service=http
# php 7
# sudo yum -y upgrade
sudo yum install -y php70w php70w-opcache \
php70w-devel php70w-pdo_mysql php70w-mcrypt php70w-mbstring
# YAF
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 $'\nextension=yaf.so\n[yaf]\nyaf.environ=product'>/etc/php.d/yaf.ini"
sudo sh -c "echo '<?php phpinfo();?>'>/var/www/html/index.php"
sudo service httpd restart
# MariaDB (MySQL)
sudo yum install -y mariadb mariadb-server
sudo systemctl start mariadb
sudo systemctl enable mariadb
#adminer mysql mangement online
sudo curl -L -o /var/www/html/adminer.php https://www.adminer.org/latest-mysql.php
#php7.0
sudo apt install -y php php-mcrypt php-curl php-pdo-sqlite php-pdo-mysql php-dev
#YAF
sudo apt 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/7.0/cli/conf.d/yaf.ini"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment