Ubuntu Server Setup Commands – Speedlink3 Communication And Technologies
Codes & ScriptsFundamentals

Ubuntu Server Setup Commands

______________________ SERVER SETUP START ______________________

***(Get Ubuntu Current Update)

sudo apt-get update

sudo apt-get upgrade

***(install latest PHP lamp-server)

sudo apt-get install lamp-server^

***(For Check PHP Version)

php -v

***(For Check apache2 Status)

service apache2 status 

***(Back to Root)

Ctrl + c

***(Install phpmyadmin)

sudo apt-get install phpmyadmin php-mbstring php-zip php-gd php-json php-curl

***(Install PHP version php7.4)

sudo apt install php7.4 libapache2-mod-php7.4 php7.4-common php7.4-gmp php7.4-curl php7.4-soap php7.4-bcmath php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-mysql php7.4-gd php7.4-xml php7.4-cli php7.4-zip

***(active root user with entering root password)

sudo su

***(create phpmyadmin login user,password * PRIVILEGES ALL) 

Mysql

CREATE USER ‘spwuser’@’localhost’ IDENTIFIED BY ‘112233’;

GRANT ALL PRIVILEGES ON * . * TO ‘spwuser’@’localhost’;

exit;

***(set full access permission to apache2.conf)

sudo chmod -R 777 /etc/apache2/apache2.conf

***(Open apache2.conf with Ubunto NANO Editor)

nano /etc/apache2/apache2.conf 

***(Search “<Directory /var/www/>” full code look like below)

<Directory /var/www/>

Options Indexes FollowSymLinks

AllowOverride None

Require all granted

</Directory>

***(Edit “AllowOverride None” to “AllowOverride All” full code should be look like below)

<Directory /var/www/>

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

</Directory>

***(Need to include at the end of apache.conf)

***(Copy the include line below)

Include /etc/phpmyadmin/apache.conf

***(Paste at the end of apache.conf)

***(Now Execure Exit & Save Command below)

Press Ctrl+X

Press Y

Press Enter

​ ***(Enable a2enmod rewrite mode)

sudo a2enmod rewrite

***(Restart apache2)

service apache2 restart

***(Set Full Access Permission to /var/www/html folder)

***(Must be active root user with entering root password)

sudo su

chmod -R 777 /var/www/html

______________________ SERVER SETUP DONE ______________________

Related Articles

Leave a Reply

Back to top button