Monica - Take Two
I'm going to try getting Monica going again from the start today. So I start off today by wiping the virtual disk and reinstalling Debian.
Configure the Operating System
Steps performed on MONICA-01
apt update
apt install sudo
/sbin/adduser david sudo
nano /etc/network/interfaces
I set my network information and then reboot. Next I reconfigure SSH using the key I had already created.
mkdir ~/.ssh
nano ~/.ssh/authorized_keys
I copy/paste the public key in and save.
chmod 600 ~/.ssh/authorized_keys
sudo nano /etc/ssh/sshd_config
PermitRootLogin no
PubkeyAuthentication yes
PubkeyAcceptedKeyTypes ssh-ed25519
PasswordAuthentication no
AuthorizedKeysFile /home/david/.ssh/authorized_keys
I save my changes.
sudo sshd -t
sudo systemctl restart ssh
Install Prerequisites
Steps performed on MONICA-01
sudo apt update
sudo apt install apache2
sudo apt install git
apt install -y php php-bcmath php-curl php-gd php-gmp php-intl php-mbstring php-mysql php-redis php-xml php-zip
wget -q -O - https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
Composer (version 2.3.5) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer
wget -q -O https://deb.nodesource.com/setup_16.x | bash -
apt install -y nodejs
Success!
npm install --global yarn
wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
apt install ./mysql-apt-config_0.8.22-1_all.deb
apt update
apt install mysql-server mysql-client mysql-common
I set my MySQL root password and saved it to my password manager.
Installing Monica
Steps performed on MONICA-01
cd /var/www/
sudo git clone https://github.com/monicahq/monica.git
cd /var/www/monica
git fetch
git checkout tags/v2/18.0
mysql_secure_installation
Success!
mysql -uroot -p
CREATE DATABASE monica CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'monica'@'localhost' IDENTIFIED BY 'strongpassword';
GRANT ALL ON monica.* TO 'monica'@'localhost';
FLUSH PRIVILEGES
exit
cp .env.example .env
nano .env
APP_ENV=production
- I also set the
DB_Username
andDB_Password
. I update these values in my password manager.
composer install --no-interaction --no-dev
Errors again.
Your lock file does not contain a compatible set of packages. Please run composer update.
Ocramius/package-versions is locked to version 1.5.1 and an update of this package was not requested.
Ocramius/package-versions 1.5.1 requires composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint.
Ocramius/package-versions 1.5.1 requires composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint.
Jean85/pretty-package-versions 1.2 requires ocramius/package-versions ^1.2.0 -> satisfiable by ocramius/package-versions[1.5.1].
Jean85/pretty-package-versions is locked to version 1.2 and an update of this package was not requested.
Well I try running composer update
next.
composer update
Error "Your requirements could not be resolved to an installable set of packages." It suggests using --with-all-dependencies (-W)
to allow upgrades, downgrades, and removals of packages currently locked to specific version.
composer update --with-all-dependencies
This gives me the exact same error message.
composer update --ignore-platform-reqs
Same error again.
composer update --ignore-platform-reqs --with-all-dependencies
Same error again.
composer install --ignore-platform-reqs
It begins to run and my hope jumps. Shortly after it errors out. Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
Man what am I missing? I'm man enough to admit I am stuck, and when I get stuck it is best to take a step away and try again another day.