Question

Do you have script for auto server installation ?

hello i am trying to setup website and i got script for auto set up but i am get not everything corect this is how it looks like btw i am using Ubuntu 18.04

if [ `getconf LONG_BIT` -ne "32" ]; 
then
      installpack="apache2 php5 php5-dev php5-mysql php-pear wget unzip"
else
     installpack="apache2 php5 php5-dev php5-mysql php-pear wget unzip"
fi
dpkg --add-architecture i386
apt-get update
apt-get install sudo
sudo apt-get install -y build-essential
sudo apt-get install -y python-software-properties
apt-get install bsdutils
sudo apt-get install -y php5
sudo apt-get install -y apache2
sudo apt-get install -y libapache2-mod-php5
sudo apt-get install -y mysql-server
sudo apt-get install -y php5-mysql
sudo apt-get install -y php5-curl
sudo apt-get install -y php5-gd
sudo apt-get install php5-mcrypt 
sudo php5enmod mcrypt 
sudo service apache2 reload
sudo apt-get install -y git-core
sudo apt-get install -y phpmyadmin
sudo apt-get install nano
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
apt-get install curl
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo apt-get update
sudo apt-get install tcl8.5
wget http://download.redis.io/releases/redis-stable.tar.gz
tar xzf redis-stable.tar.gz
cd redis-stable
make
make test
sudo make install
cd utils
sudo ./install_server.sh
service apache2 restart
curl --silent --location https://deb.nodesource.com/setup_0.12 | bash -
apt-get install --yes nodejs
curl --silent --location https://deb.nodesource.com/setup_0.12 | bash -
apt-get install --yes nodejs
export DEBIAN_FRONTEND=noninteractive;apt-get --allow-unauthenticated -y -q install $installpack

for i in `seq 1 100`;
do
   echo 
done

could you tell me what is wrong with it ? thank you )


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
June 1, 2020
Accepted Answer

Hi there @r4sk4t0v,

I believe that PHP 5 is no longer available in the default Ubuntu repository.

You need to adjust your script and change all php5 reverences with either just php or php7.2.

Let me know how it goes! Regards, Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel