Hallo,
ich hatte in der Vergangenheit bereits einen p4d auf einem alten Raspi installiert und erfolgriech getestet. Da ich meine Hardware jedoch umgestellt habe, nutze ich jetzt als Server einen PC mit Ubuntu 18.04. Leider bekomme ich die Installation nicht zum laufen.
Ich habe mich größtenteils an diese Anleitung gehalten: https://github.com/horchi/linux-p4d
Leider wird mir beim Status des p4d (service p4d status) immer folgende Fehlermeldung angezeigt:
p4d.service - P4d Control Deamon
Loaded: loaded (/etc/systemd/system/p4d.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-07-04 00:13:21 CEST; 5min ago
Process: 648 ExecStart=/usr/local/bin/p4d (code=exited, status=0/SUCCESS)
Main PID: 878 (p4d)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/p4d.service
└─878 /usr/local/bin/p4d
SQL-Error in 'connecting to database' - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (2002)
p4d[878]: Fatal, lost connection to mysql server, aborting pending actions
p4d[878]: Error, connecting to database at 'localhost' on port (3306) failed
p4d[878]: Error: Initial database connect failed
p4d[878]: SQL-Error in 'connecting to database' - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (2002)
p4d[878]: Fatal, lost connection to mysql server, aborting pending actions
p4d[878]: Error, connecting to database at 'localhost' on port (3306) failed
p4d[878]: Could not access database 'localhost:3306'
p4d[878]: Could not access database 'localhost:3306' (tried to open errors)
p4d[878]: Retrying in 10 seconds
Folgende Schritte hab ich zur Installation durchgeführt:
apt -y update
apt -y upgrade
apt-get -y install build-essential pkg-config libssl-dev libjansson-dev
apt-get -y install libcurl4-openssl-dev libmariadb-dev uuid-dev libcap-dev
apt-get -y install libssl-dev libwebsockets-dev cmake mariadb-server
apt-get -y install mosquitto mosquitto-clients
cd /usr/src
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets
mkdir build
cd build
cmake ..
make
sudo make install
ldconfig
pkg-config --modversion libwebsockets
systemctl status mysql
mysql -u root -p
grant all on *.* to root@localhost identified by 'password' with grant option;
flush privileges;
quit;
mysql -u root -Dmysql -p
CREATE DATABASE p4 charset utf8;
CREATE USER 'p4'@'localhost' IDENTIFIED BY 'p4';
GRANT ALL PRIVILEGES ON p4.* TO 'p4'@'localhost' IDENTIFIED BY 'p4';
flush privileges;
quit;
systemctl start mosquitto
systemctl enable mosquitto
cd /usr/src/
git clone https://github.com/horchi/linux-p4d/
cd linux-p4d
make clean all
make install
systemctl start p4d
systemctl status p4d
Hat jemand einen Tipp, was ich da machen kann?