|
@@ -51,7 +51,7 @@ installDepsCentOS() {
|
|
# Uninstall the conflicting packages
|
|
# Uninstall the conflicting packages
|
|
echo "${CMSG}Removing the conflicting packages...${CEND}"
|
|
echo "${CMSG}Removing the conflicting packages...${CEND}"
|
|
if [ "${CentOS_ver}" == '7' ]; then
|
|
if [ "${CentOS_ver}" == '7' ]; then
|
|
- yum -y groupremove "Basic Web Server" "MySQL Database server" "MySQL Database client" "File and Print Server"
|
|
|
|
|
|
+ yum -y groupremove "Basic Web Server" "MySQL Database server" "MySQL Database client"
|
|
systemctl mask firewalld.service
|
|
systemctl mask firewalld.service
|
|
if [ "${iptables_yn}" == 'y' ]; then
|
|
if [ "${iptables_yn}" == 'y' ]; then
|
|
yum -y install iptables-services
|
|
yum -y install iptables-services
|
|
@@ -60,7 +60,7 @@ installDepsCentOS() {
|
|
elif [ "${CentOS_ver}" == '6' ]; then
|
|
elif [ "${CentOS_ver}" == '6' ]; then
|
|
yum -y groupremove "FTP Server" "PostgreSQL Database client" "PostgreSQL Database server" "MySQL Database server" "MySQL Database client" "Web Server"
|
|
yum -y groupremove "FTP Server" "PostgreSQL Database client" "PostgreSQL Database server" "MySQL Database server" "MySQL Database client" "Web Server"
|
|
elif [ "${CentOS_ver}" == '5' ]; then
|
|
elif [ "${CentOS_ver}" == '5' ]; then
|
|
- yum -y groupremove "FTP Server" "PostgreSQL Database" "News Server" "MySQL Database" "Web Server"
|
|
|
|
|
|
+ yum -y groupremove "FTP Server" "PostgreSQL Database" "MySQL Database" "Web Server"
|
|
fi
|
|
fi
|
|
|
|
|
|
echo "${CMSG}Installing dependencies packages...${CEND}"
|
|
echo "${CMSG}Installing dependencies packages...${CEND}"
|
|
@@ -120,29 +120,29 @@ installDepsBySrc() {
|
|
if [[ "${Ubuntu_ver}" =~ ^14$|^15$ ]]; then
|
|
if [[ "${Ubuntu_ver}" =~ ^14$|^15$ ]]; then
|
|
# Install bison on ubt 14.x 15.x
|
|
# Install bison on ubt 14.x 15.x
|
|
tar xzf bison-${bison_ver}.tar.gz
|
|
tar xzf bison-${bison_ver}.tar.gz
|
|
- pushd bison-${bison_ver}
|
|
|
|
|
|
+ pushd bison-${bison_ver} > /dev/null
|
|
./configure
|
|
./configure
|
|
make -j ${THREAD} && make install
|
|
make -j ${THREAD} && make install
|
|
- popd
|
|
|
|
|
|
+ popd > /dev/null
|
|
rm -rf bison-${bison_ver}
|
|
rm -rf bison-${bison_ver}
|
|
fi
|
|
fi
|
|
elif [ "${OS}" == 'CentOS' ]; then
|
|
elif [ "${OS}" == 'CentOS' ]; then
|
|
# Install tmux
|
|
# Install tmux
|
|
- if [ ! -e "$(which tmux)" ]; then
|
|
|
|
|
|
+ if ! command -v tmux >/dev/null 2>&1; then
|
|
# Install libevent first
|
|
# Install libevent first
|
|
tar xzf libevent-${libevent_ver}.tar.gz
|
|
tar xzf libevent-${libevent_ver}.tar.gz
|
|
- pushd libevent-${libevent_ver}
|
|
|
|
|
|
+ pushd libevent-${libevent_ver} > /dev/null
|
|
./configure
|
|
./configure
|
|
make -j ${THREAD} && make install
|
|
make -j ${THREAD} && make install
|
|
- popd
|
|
|
|
|
|
+ popd > /dev/null
|
|
rm -rf libevent-${libevent_ver}
|
|
rm -rf libevent-${libevent_ver}
|
|
|
|
|
|
tar xzf tmux-${tmux_ver}.tar.gz
|
|
tar xzf tmux-${tmux_ver}.tar.gz
|
|
- pushd tmux-${tmux_ver}
|
|
|
|
|
|
+ pushd tmux-${tmux_ver} > /dev/null
|
|
CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure
|
|
CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure
|
|
make -j ${THREAD} && make install
|
|
make -j ${THREAD} && make install
|
|
unset LDFLAGS
|
|
unset LDFLAGS
|
|
- popd
|
|
|
|
|
|
+ popd > /dev/null
|
|
rm -rf tmux-${tmux_ver}
|
|
rm -rf tmux-${tmux_ver}
|
|
|
|
|
|
if [ "${OS_BIT}" == "64" ]; then
|
|
if [ "${OS_BIT}" == "64" ]; then
|
|
@@ -153,17 +153,17 @@ installDepsBySrc() {
|
|
fi
|
|
fi
|
|
|
|
|
|
# install htop
|
|
# install htop
|
|
- if [ ! -e "$(which htop)" ]; then
|
|
|
|
|
|
+ if ! command -v htop >/dev/null 2>&1; then
|
|
tar xzf htop-${htop_ver}.tar.gz
|
|
tar xzf htop-${htop_ver}.tar.gz
|
|
- pushd htop-${htop_ver}
|
|
|
|
|
|
+ pushd htop-${htop_ver} > /dev/null
|
|
./configure
|
|
./configure
|
|
make -j ${THREAD} && make install
|
|
make -j ${THREAD} && make install
|
|
- popd
|
|
|
|
|
|
+ popd > /dev/null
|
|
rm -rf htop-${htop_ver}
|
|
rm -rf htop-${htop_ver}
|
|
fi
|
|
fi
|
|
else
|
|
else
|
|
echo "No need to install software from source packages."
|
|
echo "No need to install software from source packages."
|
|
fi
|
|
fi
|
|
echo 'already initialize' > ~/.oneinstack
|
|
echo 'already initialize' > ~/.oneinstack
|
|
- popd
|
|
|
|
|
|
+ popd > /dev/null
|
|
}
|
|
}
|