<\/span><\/h2>\r\n\r\n\r\n\r\nFirst, log in to your Ubuntu 20.04 server via SSH as the root user:<\/p>\r\n\r\n\r\n\r\n
ssh root@IP_Address -p Port_number<\/pre>\r\n\r\n\r\n\r\nYou will need to replace \u2018IP_Address\u2019 and \u2018Port_number\u2019 with your server\u2019s respective IP address and SSH port number. Additionally, replace \u2018root\u2019 with the username of the admin account if necessary.<\/p>\r\n\r\n\r\n\r\n
Before starting, you have to make sure that all Ubuntu 20.04 OS packages installed on the server are up to date. You can do this by running the following commands:<\/p>\r\n\r\n\r\n\r\n
apt-get update -y<\/pre>\r\n\r\n\r\n\r\n<\/span>Install LAMP Server<\/span><\/h2>\r\n\r\n\r\n\r\nBefore starting, the LAMP stack must be installed on your server. If not installed, you can install it using the following command:<\/p>\r\n\r\n\r\n\r\n
apt-get install apache2 mariadb-server php libapache2-mod-php php-common php-mysql php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-bcmath php-imap php-xml php-cli php-zip curl unzip git -y<\/pre>\r\n\r\n\r\n\r\nOnce the LAMP stack is installed, edit the php.ini file and modify some default settings:<\/p>\r\n\r\n\r\n\r\n
nano \/etc\/php\/7.4\/apache2\/php.ini<\/pre>\r\n\r\n\r\n\r\nChange the following lines:<\/p>\r\n\r\n\r\n\r\n
memory_limit = 256M\r\nupload_max_filesize = 100M\r\nmax_execution_time = 360\r\ndate.timezone = America\/Chicago\r\n<\/pre>\r\n\r\n\r\n\r\nSave and close the file then restart the Apache service to apply the changes:<\/p>\r\n\r\n\r\n\r\n
systemctl restart apache2<\/pre>\r\n\r\n\r\n\r\n<\/span>Create Bagisto Database<\/span><\/h2>\r\n\r\n\r\n\r\nBagisto uses MySQL\/MariaDB to store its contents. So you will need to create a database and user for Bagisto.<\/p>\r\n\r\n\r\n\r\n
First, log in to MariaDB with the following command:<\/p>\r\n\r\n\r\n\r\n
mysql<\/pre>\r\n\r\n\r\n\r\nOnce login, create a database and user with the following command:<\/p>\r\n\r\n\r\n\r\n
MariaDB [(none)]> CREATE DATABASE bagistodb;\r\nMariaDB [(none)]> CREATE USER 'bagistouser'@'localhost' IDENTIFIED BY 'securepassword';<\/pre>\r\n\r\n\r\n\r\nNext, grant all the privileges to the Bagisto database using the command below:<\/p>\r\n\r\n\r\n\r\n
MariaDB [(none)]> GRANT ALL ON bagistodb.* TO 'bagistouser'@'localhost' WITH GRANT OPTION;<\/pre>\r\n\r\n\r\n\r\nNext, flush the privileges and exit from the MariaDB with the following command:<\/p>\r\n\r\n\r\n\r\n
MariaDB [(none)]> FLUSH PRIVILEGES;\r\nMariaDB [(none)]> EXIT;<\/pre>\r\n\r\n\r\n\r\n<\/span>Install Node.js<\/span><\/h2>\r\n\r\n\r\n\r\nYou will also need to install Node.js to your server. First, add the Node source repository using the following command:<\/p>\r\n\r\n\r\n\r\n
curl -sL https:\/\/deb.nodesource.com\/setup_14.x | bash -<\/pre>\r\n\r\n\r\n\r\nNext, install the Node.js with the following command:<\/p>\r\n\r\n\r\n\r\n
apt-get install nodejs -y<\/pre>\r\n\r\n\r\n\r\nOnce Node.js is installed, verify the Node.js version using the following command:<\/p>\r\n\r\n\r\n\r\n
node -v<\/pre>\r\n\r\n\r\n\r\nYou should see the following output:<\/p>\r\n\r\n\r\n\r\n
v14.17.4\r\n<\/pre>\r\n\r\n\r\n\r\n<\/span>Download Bagisto<\/span><\/h2>\r\n\r\n\r\n\r\nFirst, you will need to install the Composer for managing PHP dependencies. You can install it with the following command:<\/p>\r\n\r\n\r\n\r\n
curl -sS https:\/\/getcomposer.org\/installer | php -- --install-dir=\/usr\/local\/bin --filename=composer<\/pre>\r\n\r\n\r\n\r\nNext, download the latest version of Bagisto using the following command:<\/p>\r\n\r\n\r\n\r\n
wget https:\/\/github.com\/bagisto\/bagisto\/archive\/refs\/tags\/v1.3.1.zip<\/pre>\r\n\r\n\r\n\r\nOnce the download is completed, unzip the downloaded file with the following command:<\/p>\r\n\r\n\r\n\r\n
unzip v1.3.1.zip<\/pre>\r\n\r\n\r\n\r\nNext, move the extracted directory to the Apache web root directory:<\/p>\r\n\r\n\r\n\r\n
mv bagisto-1.3.1 \/var\/www\/html\/bagisto<\/pre>\r\n\r\n\r\n\r\nNext, navigate to Bagisto directory and install the PHP dependencies using the following command:<\/p>\r\n\r\n\r\n\r\n
cd \/var\/www\/html\/bagisto\r\ncomposer install<\/pre>\r\n\r\n\r\n\r\nOnce all the PHP dependencies are installed, set proper ownership to Bagisto directory:<\/p>\r\n\r\n\r\n\r\n
chown -R www-data:www-data \/var\/www\/html\/bagisto\/<\/pre>\r\n\r\n\r\n\r\n