Skip to content

Commit 755e8eb

Browse files
Ricky Elrodepriestley
authored andcommitted
Fix the RHEL install script, mostly for RHEL 5.
Summary: A bunch of various fixes for the RHEL install script. Most of them are stylistic, one of them fixes the EPEL repo release RPM URL for RHEL 5. (enough acronyms there?) Test Plan: Tried installing on Fedora (which is treated as RHEL 6 due to how we handle being unable to find version in the script). Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4038
1 parent b04114f commit 755e8eb

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

scripts/install/install_rhel-derivs.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ else
3333
confirm
3434
fi
3535

36-
if [[ $RHEL_MAJOR_VER < 6 ]]
36+
if [[ $RHEL_MAJOR_VER < 6 && $RHEL_MAJOR_VER > 0 ]]
3737
then
3838
echo "** WARNING **"
3939
echo "A major version less than 6 was detected. Because of this,"
@@ -63,8 +63,12 @@ if [[ $RHEL_MAJOR_VER == 5 ]]
6363
then
6464
# RHEL 5's "php" package is actually 5.1. The "php53" package won't let us install php-pecl-apc.
6565
# (it tries to pull in php 5.1 stuff) ...
66-
echo "Adding EPEL repo, for git."
67-
$SUDO rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
66+
yum repolist | grep -i epel
67+
if [ $? -ne 0 ]; then
68+
echo "It doesn't look like you have the EPEL repo enabled. We are to add it"
69+
echo "for you, so that we can install git."
70+
$SUDO rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
71+
fi
6872
YUMCOMMAND="$SUDO yum install httpd git php53 php53-cli php53-mysql php53-process php53-devel php53-gd gcc wget make pcre-devel mysql-server"
6973
else
7074
# RHEL 6+ defaults with php 5.3
@@ -89,7 +93,6 @@ then
8993
# set up PEAR, and install apc.
9094
echo "Attempting to install PEAR"
9195
wget http://pear.php.net/go-pear.phar
92-
echo "Downloading PEAR: $PEARCOMMAND"
9396
$SUDO php go-pear.phar && $SUDO pecl install apc
9497
fi
9598

@@ -98,14 +101,16 @@ then
98101
echo "The apc install failed. Continuing without APC, performance may be impacted."
99102
fi
100103

101-
if [[ "$(pidof httpd)" ]]
104+
pidof httpd 2>&1 > /dev/null
105+
if [[ $? -eq 0 ]]
102106
then
103107
echo "If php was installed above, please run: /etc/init.d/httpd graceful"
104108
else
105109
echo "Please remember to start the httpd with: /etc/init.d/httpd start"
106110
fi
107111

108-
if [[ ! "$(pidof mysql)" ]]
112+
pidof mysqld 2>&1 > /dev/null
113+
if [[ $? -ne 0 ]]
109114
then
110115
echo "Please remember to start the mysql server: /etc/init.d/mysqld start"
111116
fi
@@ -139,4 +144,4 @@ echo
139144
echo
140145
echo "Install probably worked mostly correctly. Continue with the 'Configuration Guide':";
141146
echo
142-
echo " http://www.phabricator.com/docs/phabricator/article/Configuration_Guide.html";
147+
echo " http://www.phabricator.com/docs/phabricator/article/Configuration_Guide.html";

0 commit comments

Comments
 (0)