Install Wordpress on SUSE: Difference between revisions
No edit summary |
No edit summary |
||
| Line 17: | Line 17: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
2. Install MariaDB: | 2. Install PHP: | ||
<syntaxhighlight lang="bash"> | |||
zypper install -y php8 php-mysql php8-gd php8-mbstring apache2-mod_php8 php8-exif php8-fileinfo | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | |||
a2enmod php8 | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | |||
systemctl restart apache2 | |||
</syntaxhighlight> | |||
3. Install MariaDB: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Revision as of 09:05, 29 August 2024
Prequisites
1. Install Apache:
zypper install -y apache2
echo '<html><body><h1>It works!</h1></body></html>' > /srv/www/htdocs/index.html
echo -e '<VirtualHost *:80>\nDocumentRoot /srv/www/htdocs\n</VirtualHost>' > /etc/apache2/vhosts.d/_default.conf
systemctl enable apache2
systemctl start apache2
2. Install PHP:
zypper install -y php8 php-mysql php8-gd php8-mbstring apache2-mod_php8 php8-exif php8-fileinfo
a2enmod php8
systemctl restart apache2
3. Install MariaDB:
zypper install -y mariadb mariadb-client
systemctl enable mariadb
systemctl start mariadb
CREATE DATABASE `example.com`;
CREATE USER 'example.com'@localhost IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON `example.com`.* TO 'example.com'@'localhost';
FLUSH PRIVILEGES;