Changeset View
Changeset View
Standalone View
Standalone View
scripts/install/install_rhel-derivs.sh
| Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
| if [[ $RHEL_MAJOR_VER == 5 ]] | if [[ $RHEL_MAJOR_VER == 5 ]] | ||||
| then | then | ||||
| # RHEL 5's "php" package is actually 5.1. The "php53" package won't let us install php-pecl-apc. | # RHEL 5's "php" package is actually 5.1. The "php53" package won't let us install php-pecl-apc. | ||||
| # (it tries to pull in php 5.1 stuff) ... | # (it tries to pull in php 5.1 stuff) ... | ||||
| yum repolist | grep -i epel | yum repolist | grep -i epel | ||||
| if [ $? -ne 0 ]; then | if [ $? -ne 0 ]; then | ||||
| echo "It doesn't look like you have the EPEL repo enabled. We are to add it" | echo "It doesn't look like you have the EPEL repo enabled. We are to add it" | ||||
| echo "for you, so that we can install git." | echo "for you, so that we can install git." | ||||
| $SUDO rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm | $SUDO rpm -Uvh https://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm | ||||
| fi | fi | ||||
| YUMCOMMAND="$SUDO yum install httpd git php53 php53-cli php53-mysql php53-process php53-devel php53-gd gcc wget make pcre-devel mysql-server" | YUMCOMMAND="$SUDO yum install httpd git php53 php53-cli php53-mysql php53-process php53-devel php53-gd gcc wget make pcre-devel mysql-server" | ||||
| else | else | ||||
| # RHEL 6+ defaults with php 5.3 | # RHEL 6+ defaults with php 5.3 | ||||
| YUMCOMMAND="$SUDO yum install httpd git php php-cli php-mysql php-process php-devel php-gd php-pecl-apc php-pecl-json php-mbstring mysql-server" | YUMCOMMAND="$SUDO yum install httpd git php php-cli php-mysql php-process php-devel php-gd php-pecl-apc php-pecl-json php-mbstring mysql-server" | ||||
| fi | fi | ||||
| echo "Dropping to yum to install dependencies..." | echo "Dropping to yum to install dependencies..." | ||||
| echo "Running: ${YUMCOMMAND}" | echo "Running: ${YUMCOMMAND}" | ||||
| echo "Yum will prompt you with [Y/n] to continue installing." | echo "Yum will prompt you with [Y/n] to continue installing." | ||||
| $YUMCOMMAND | $YUMCOMMAND | ||||
| if [[ $? -ne 0 ]] | if [[ $? -ne 0 ]] | ||||
| then | then | ||||
| echo "The yum command failed. Please fix the errors and re-run this script." | echo "The yum command failed. Please fix the errors and re-run this script." | ||||
| exit 1 | exit 1 | ||||
| fi | fi | ||||
| if [[ $RHEL_MAJOR_VER == 5 ]] | if [[ $RHEL_MAJOR_VER == 5 ]] | ||||
| then | then | ||||
| # Now that we've ensured all the devel packages required for pecl/apc are there, let's | # Now that we've ensured all the devel packages required for pecl/apc are there, let's | ||||
| # set up PEAR, and install apc. | # set up PEAR, and install apc. | ||||
| echo "Attempting to install PEAR" | echo "Attempting to install PEAR" | ||||
| wget http://pear.php.net/go-pear.phar | wget https://pear.php.net/go-pear.phar | ||||
| $SUDO php go-pear.phar && $SUDO pecl install apc | $SUDO php go-pear.phar && $SUDO pecl install apc | ||||
| fi | fi | ||||
| if [[ $? -ne 0 ]] | if [[ $? -ne 0 ]] | ||||
| then | then | ||||
| echo "The apc install failed. Continuing without APC, performance may be impacted." | echo "The apc install failed. Continuing without APC, performance may be impacted." | ||||
| fi | fi | ||||
| ▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines | |||||