xxxxxxxxxx
// The nginx package supplies a /etc/init.d/nginx script that provides the usual start|stop|restart|reload ... functionality.
/etc/init.d/nginx restart
// will restart nginx as will
service nginx restart
xxxxxxxxxx
const { exec } = require('child_process');
exec('sudo service nginx restart', (error, stdout, stderr) => {
if (error) {
console.error(`Error: ${error.message}`);
return;
}
if (stderr) {
console.error(`stderr: ${stderr}`);
return;
}
console.log(`stdout: ${stdout}`);
});
xxxxxxxxxx
sudo mysql
CREATE USER 'admin'@'localhost' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
sudo nano /etc/phpmyadmin/config.inc.php
$cfg['Servers'][$i]['AllowNoPassword'] = true;
sudo systemctl restart apache2
sudo systemctl stop mysql
sudo systemctl start mysql
sudo systemctl stop apache2
sudo systemctl start apache2