Suitecrm8 Installation for non experts. I tacked installation for Mediawiki at the end

I say non experts because I’m certainly not one. However I hope this script, with its few explanations will shorten the learning curve for some. There are some areas which still puzzle me, so I hope someone will provide a better explanation.

Rather than condense many instructions, I put each command on a single line, (sorry pgr) .

So far Ive been able to install this more or less flawlessly onto linux mint, and usually on debian. Hope it helps.

sudo apt-get update
sudo apt-get upgrade

#-----add php repository and determine php version
#-One of sources…
#-Think the other source was a debian12 help page, but Ive lost track of it.

#-For Debian12–set ondrej as distribution for php this way

sudo apt-get -y install lsb-release ca-certificates curl

sudo curl -sSLo /usr/share/keyrings/

sudo sh -c ‘echo “deb [signed-by=/usr/share/keyrings/] $(lsb_release -sc) main” > /etc/apt/sources.list.d/php.list’

sudo apt-get update

#-For Mint, and some other non Debian, set ondrej as distribution for php this way

sudo add-apt-repository -y ppa:ondrej/php
sudo apt update
sudo apt-get upgrade

-General plan here is to load php8.0 versions, set 8.0 as version to use, and prevent changes.
-Prevent from update -sudo apt-mark hold php
-Show holds version -sudo apt-mark showhold
-Allow update -sudo apt-mark unhold php

-Install php requirements per
-This translates to installing php8.0 and preventing changes until suitecrm is updated.

sudo apt install php8.0
sudo apt-mark hold php8.0
sudo apt install php8.0-common
sudo apt-mark hold php8.0-common
sudo apt install php8.0-cli
sudo apt-mark hold php8.0-cli
sudo apt install php8.0-curl
sudo apt-mark hold php8.0-curl
sudo apt install php8.0-phpdbg
sudo apt-mark hold php8.0-phpdbg
sudo apt install php8.0-gd
sudo apt-mark hold php8.0-gd
sudo apt install php8.0-imap
sudo apt-mark hold php8.0-imap
sudo apt install php8.0-intl
sudo apt-mark hold php8.0-intl
sudo apt install php8.0-mbstring
sudo apt-mark hold php8.0-mbstring
sudo apt install php8.0-mysql
sudo apt-mark hold php8.0-mysql
sudo apt install php8.0-soap
sudo apt-mark hold php8.0-soap
sudo apt install php8.0-xml
sudo apt-mark hold php8.0-xml
sudo apt install php8.0-zip
sudo apt-mark hold php8.0-zip

#—How to install php-json depends on distribution and other unknowns.
#sudo apt install php8.0-json
#sudo apt-mark hold php8.0-json

#----or for Debian and Mint, json is included in following
#–sudo apt install php8.0-phpdbg
#–sudo apt-mark hold php8.0-phpdbg


#— Following seems to be optional, but I install them anyway.
sudo apt install php8.0-ldap
sudo apt-mark hold php8.0-ldap
sudo apt-get install libpcre3
sudo apt-get install libpcre3-dev
sudo apt install zip unzip iotop htop
sudo apt-get install zlib1g
sudo apt-get install zlib1g-dev

#–unable to locate these two. It doesnt seem to matter which leads me to think I messed up and they are not really needed.



#—Its not needed, but you can check the php version
sudo php -v

#–Install apache and MariaDB (is actually already installed). Start the Apache service, enable Apache and MariaDB to start on system start
#–Note that MX Linux (Based on Debian) wont start Apache unless Systemd is set to enabled at the boot screen. Debian doesnt have that quirk.

sudo apt-get install apache2
sudo apt-get install mariadb-server
sudo systemctl start apache2
sudo systemctl start mysql
sudo systemctl enable apache2
sudo systemctl enable mariadb

#–Edit php.ini Note the location varies per php version.

sudo nano /etc/php/8.0/apache2/php.ini

#–change the following two lines and save file.

upload_max_filesize = 80Mupload_file

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE & ~E_WARNING

#–Secure and harden MariaDB. Follow prompts.

sudo mysql_secure_installation

#these are my responses to questions

Enter current password. Enter the root password
Switch to unix_socket no
Change root password no
Remove anon users yes
Disallow root login remotely yes
Remove database named “test” yes
Reload priviledge tables yes

#–Relog into MariaDB to create database. This extra step double checks your password skills.

#–Enter command “exit;” when done.
sudo mysql -u root -p
MariaDB [(none)]>CREATE DATABASE suitecrm;
MariaDB [(none)]>CREATE USER ‘larry’@‘localhost’ IDENTIFIED BY ‘password’;

#–This next command seems to vary among the various Mariadb guides.

MariaDB [(none)]>GRANT ALL PRIVILEGES ON . TO ‘larry’@localhost IDENTIFIED BY ‘password’;
MariaDB [(none)]>exit;

#–Because you messed with stuff, Restart Apache.

sudo systemctl restart apache2

#--------------------------- this block is Only for Suitecrm7 install-----and its been a while since I used it.

#–Download the latest SuiteCRM files
#–Create a blank directory named suitecrm at this location. /var/www/html/suitecrm
#–Copy-paste downloaded files to this blank suitecrm directory
#–Unzip the downloaded file into this suitecrm directory
#–Open a root terminal in the suitecrm directory
#–Assign appropriate permission to the unzipped folder

cd /var/www/html/suitecrm
sudo chown -R www-data:www-data /var/www/html/suitecrm
sudo chmod -R 755 /var/www/html/suitecrm

#–Open your internet browser and enter URL:


#–complete installation

-----------------------------end Suitecrm7 install -----------------------

-----------------------------t\This block is for Suitecrm8 install--------
#–open a root filemanager
#–Create a blank suitecrm folder at /var/www/html/suitecrm
sudo mkdir /var/www/html/suitecrm

#–Download and unzip Suitecrm8 into the suitecrm folder var/www/html/suitecrm
#–Open a root terminal from suitecrm folder. Debian wont let you. Mint will.
#–Set permissions for crm folder and all sub folders.

cd /var/www/html/suitecrm
sudo find . -type d -not -perm 2755 -exec chmod 2755 {} ;
sudo find . -type f -not -perm 0644 -exec chmod 0644 {} ;
sudo find . ! -user www-data -exec chown www-data:www-data {} ;
sudo chmod +x bin/console;

#Configure URL re-writes. (Specific to Linux Mint, Possibly Debian and Ubuntu )

#–Create this document.

sudo nano /etc/apache2/sites-enabled/suitecrm.conf

#–insert one of the following blocks. This gets difficult. Suitecrm documentation says to use the first block containing <virtualHost… statement, but I cannot get it to work in any distribution I tried ie Debian.Ubuntu. Mx. Mint. I have no explanation or understanding as to why, but one day…

#–Block1. --Suitecrm says to use this, but I cant get Debian or Mint does to like it. When I try this block, when its time to run the install at localhost/suitecrm/public, the screen stays blank.

<VirtualHost *:80>
DocumentRoot /var/www/html/suitecrm/public
<Directory /var/www/html/suitecrm/public>
AllowOverride All
Order Allow,Deny
Allow from All

#–Block2. This works for me in Debian Ubuntu MX and Mint. No, dont know why.

DocumentRoot /var/www/html/suitecrm/public
<Directory /var/www/html/suitecrm/public>
AllowOverride All
Order Allow,Deny
Allow from All

#–Enable rewrites and restart apache.

#–Typos and errors in suitecrm.conf will result in Apache complaining, and if it does that, there is no point in proceeding.

sudo a2enmod rewrite
sudo systemctl restart apache2

#–Start install. Enter this address into browser.


#–Accept License, (If you can find it-- I couldn’t) then click on configuration.

#–Fill in the form. If you misconfigure or make a booboo, refresh the form and start over. Dont just fix the mistake. It sometimes wont work and it wont tell you.

URL = https://localhost/suitecrm

DataBase User = larry

Password = password

#–Hostname will be either localhost or .
#-- Mint requires localhost.
#-- Debian might require
#-- I could be wrong

Host name = localhost

Database Name = suitecrm

#–Mariadb and Mysql both use a port of 3306

DataBasePort = 3306

#–Answer the “hidden” question “Populate Database with demo data” by clicking below "Populate "

Choose Y or N

Application Admin Name = larry

#–< I use the same password for root, the database, and everything else. You dont have to if you can keep them separated. Dont copy and paste password, it doesnt always work.

Admin User password = password

#–Log in to suitecrm, check Admin > then immediately log out.
#–Note that a bug in suitecrm8, (or an error of unknown to me cause) will create a formatting error in public/legacy/.htaccess which we will now fix.

#–Edit the hidden file .htaccess. If you can’t find it in file manager change View to show hidden files.

sudo nano /var/www/html/suitecrm/public/legacy/.htaccess

#–Correct the formatting error caused by wrong pathing in the rewrite rules. This causes issues such as Help not displaying in Studio, module builder and odd menu wierdness.

#–Look for these two lines

RewriteEngine On
RewriteBase /suitecrmlegacy/ <------- This line is malformed different ways on different types of install.

#-- fix malformed line to following, and save.

RewriteBase /suitecrm/public/legacy <------- might depend on where you installed suitecrm

#–This next step is an unofficial workaround for bug # 181 that causes relate fields not to be listed in lists. I am still waiting for someone “official” to double check it. I thank the person who suggested this to me.
#-- Line 264 might change if there are other changes.

#-- Edit line 264 in core/backend/Data/LegacyHandler/BaseListDataHandler.php

sudo nano /var/www/html/suitecrm/core/backend/Data/LegacyHandler/BaseListDataHandler.php

#search for “relate”. Goto the next line.

#–Add in the // before “continue” if missing. Then save. Should look like this.

if ($type === ‘relate’ && !$this->isValidRelate($fieldDefinition)) {

###—Other Programs###

sudo apt install phpmyadmin


copied from mediawiki debian/ubuntu install

sudo mysql -u root -p

#—following will fail, if you already entered it installing suitecrm
CREATE USER ‘larry’@‘localhost’ IDENTIFIED BY ‘password’;



sudo apt-get install apache2 mariadb-server php php-mysql libapache2-mod-php php-xml php-mbstring

sudo apt-get install php-apcu php-intl imagemagick inkscape php-gd php-cli php-curl php-bcmath git

sudo service apache2 reload
sudo systemctl restart apache2

#—Get MediaWiki

cd /tmp/

tar -xvzf /tmp/mediawiki-.tar.gz
sudo mkdir /var/lib/mediawiki
sudo mv mediawiki-
/* /var/lib/mediawiki

sudo nano /etc/php/8.2/apache2/php.ini

–memory_limit = 128M

Navigate your browser to http://localhost/mediawiki
If this gives a 404 error then making a symbolic link should solve the issue.

sudo ln -s /var/lib/mediawiki /var/www/html/mediawiki

go back to http://localhost/mediawiki

You should see Success- Set up wiki
PHP 8.0.29 is installed…

Reminders to fill in form.

Database Name = wiki
Database User Name = larry
Pw = password

Name of wiki = Info <or whatever you want.
username = larry

Place the file LocalSettings.php file into mediawiki at /var/lib/mediawiki/