How to install Wordpress on opensuse15.1
- 00:32 zypper install php-gd php-pdo php-mysql php-mbstring php-simplexml php-curl apache2-mod_php7
- 00:56 mysql -u root -p
- 01:24 create user user1@localhost identified by 'linuxc';
- 01:40 grant all on wordpress.* to user1@localhost;
- 02:05 flush privileges;
- 02:22 wget https://wordpress.org/latest.tar.gz
- 02:36 tar xvf latest.tar.gz
- 02:50 mv wordpress /srv/www/htdocs/
- 02:56 cd /srv/www/htdocs/wordpress/
- 03:10 mv wp-config-sample.php wp-config.php
- 03:27 vim wp-config.php
- 04:16 chown -R wwwrun:www /srv/www/htdocs/
- 04:35 chmod 775 -R /srv/www/htdocs/
- 04:58 vim /etc/apache2/conf.d/wordpress.conf
- 05:12 systemctl restart apache2
Installation of WordPress On OpenSuse 15.1
Introducion:
Wordpress is the most powerful and popular content management system (CMS) application. It is a PHP based application and using MySQL database. Wordpress that allows you to create and publish your content on the web.This video explains the method to Install Wordpress on opensuse15.1
Process
Install the Required PHP modules for wordpress
LinuxHelp:~ # zypper install php-gd php-pdo php-mysql php-mbstring php-simplexml php-curl apache2-mod_php7
Retrieving repository 'Main Update Repository' metadata ..................................................[done]
Building repository 'Main Update Repository' cache .......................................................[done]
Loading repository data...
Reading installed packages...
Overall download size: 2.1 MiB. Already cached: 0 B. After the operation, additional 1.9 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving package apache2-mod_php7-7.2.5-lp151.6.13.1.x86_64 (1/4), 1.5 MiB ( 9.2 MiB unpacked)
Retrieving: apache2-mod_php7-7.2.5-lp151.6.13.1.x86_64.rpm .................................[done (412.9 KiB/s)]
Retrieving package php7-curl-7.2.5-lp151.6.13.1.x86_64 (2/4), 51.2 KiB ( 91.2 KiB unpacked)
Retrieving: php7-curl-7.2.5-lp151.6.13.1.x86_64.rpm ..........................................[done (2.4 KiB/s)]
Retrieving package php7-gd-7.2.5-lp151.6.13.1.x86_64 (3/4), 51.7 KiB (115.7 KiB unpacked)
Retrieving: php7-gd-7.2.5-lp151.6.13.1.x86_64.rpm ........................................................[done]
Retrieving package php7-mbstring-7.2.5-lp151.6.13.1.x86_64 (4/4), 522.7 KiB ( 1.7 MiB unpacked)
Retrieving: php7-mbstring-7.2.5-lp151.6.13.1.x86_64.rpm ....................................[done (286.8 KiB/s)]
Checking for file conflicts: .............................................................................[done]
(1/4) Installing: apache2-mod_php7-7.2.5-lp151.6.13.1.x86_64 .............................................[done]
Additional rpm output:
Requesting apache restart ( instance)
(2/4) Installing: php7-curl-7.2.5-lp151.6.13.1.x86_64 ....................................................[done]
(3/4) Installing: php7-gd-7.2.5-lp151.6.13.1.x86_64 ......................................................[done]
(4/4) Installing: php7-mbstring-7.2.5-lp151.6.13.1.x86_64 ................................................[done]
Executing %posttrans script 'apache2-mod_php7-7.2.5-lp151.6.13.1.x86_64.rpm' --------------------------------[\]
Output of apache2-mod_php7-7.2.5-lp151.6.13.1.x86_64.rpm %posttrans script:
Restarting apache ( instance)
Executing %posttrans scripts .............................................................................[done]
Login into the mysql to create user and database for wordpress
LinuxHelp:~ # mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.2.25-MariaDB SUSE package
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create database wordpress character set utf8mb4;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> create user user1@localhost identified by 'linuxc';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all on wordpress.* to user1@localhost;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye
Download the Wordpress under specific directory
LinuxHelp:~ # cd /mnt
LinuxHelp:/mnt # wget https://wordpress.org/latest.tar.gz
--2019-11-07 02:38:20-- https://wordpress.org/latest.tar.gz
Resolving wordpress.org (wordpress.org)... 198.143.164.252
Connecting to wordpress.org (wordpress.org)|198.143.164.252|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11199173 (11M) [application/octet-stream]
Saving to: ‘latest.tar.gz’
latest.tar.gz 100%[===========================================>] 10.68M 1.05MB/s in 36s
2019-11-07 02:38:57 (302 KB/s) - ‘latest.tar.gz’ saved [11199173/11199173]
Extract the Downloaded file
LinuxHelp:/mnt # tar xvf latest.tar.gz
wordpress/
wordpress/xmlrpc.php
wordpress/wp-blog-header.php
wordpress/readme.html
wordpress/wp-signup.php
wordpress/index.php
….
…..
Move the extracted wordpress under htdocs directory
LinuxHelp:/mnt # mv wordpress /srv/www/htdocs/
Change directory to wordpress
LinuxHelp:/mnt # cd /srv/www/htdocs/wordpress/
Rename the file name into wp-config.php
LinuxHelp:/srv/www/htdocs/wordpress # mv wp-config-sample.php wp-config.php
Update the Mysql credentials in wp-config.php file
LinuxHelp:/srv/www/htdocs/wordpress # vim wp-config.php
Use the below commands to Change ownership and permission of the wordpress directory
LinuxHelp:/srv/www/htdocs/wordpress # chown -R wwwrun:www /srv/www/htdocs/
LinuxHelp:/srv/www/htdocs/wordpress # chmod 775 -R /srv/www/htdocs/
Long listing the current directory
LinuxHelp:/srv/www/htdocs/wordpress # ll
total 180
-rwxrwxr-x 1 wwwrun www 420 Dec 1 2017 index.php
-rwxrwxr-x 1 wwwrun www 19935 Jan 2 2019 license.txt
-rwxrwxr-x 1 wwwrun www 7447 Apr 9 2019 readme.html
-rwxrwxr-x 1 wwwrun www 6919 Jan 12 2019 wp-activate.php
drwxrwxr-x 1 wwwrun www 2438 Oct 15 02:07 wp-admin
-rwxrwxr-x 1 wwwrun www 369 Dec 1 2017 wp-blog-header.php
-rwxrwxr-x 1 wwwrun www 2283 Jan 21 2019 wp-comments-post.php
-rwxrwxr-x 1 wwwrun www 2877 Nov 7 02:45 wp-config.php
drwxrwxr-x 1 wwwrun www 44 Oct 15 02:07 wp-content
-rwxrwxr-x 1 wwwrun www 3847 Jan 9 2019 wp-cron.php
drwxrwxr-x 1 wwwrun www 7450 Oct 15 02:07 wp-includes
-rwxrwxr-x 1 wwwrun www 2502 Jan 16 2019 wp-links-opml.php
-rwxrwxr-x 1 wwwrun www 3306 Dec 1 2017 wp-load.php
-rwxrwxr-x 1 wwwrun www 39551 Jun 10 19:04 wp-login.php
-rwxrwxr-x 1 wwwrun www 8403 Dec 1 2017 wp-mail.php
-rwxrwxr-x 1 wwwrun www 18962 Mar 29 2019 wp-settings.php
-rwxrwxr-x 1 wwwrun www 31085 Jan 16 2019 wp-signup.php
-rwxrwxr-x 1 wwwrun www 4764 Dec 1 2017 wp-trackback.php
-rwxrwxr-x 1 wwwrun www 3068 Aug 17 2018 xmlrpc.php
Configure the virtual host for Wordpress
LinuxHelp:/srv/www/htdocs/wordpress # vim /etc/apache2/conf.d/wordpress.conf
<virtualhost *:80>
servername www.linuxhelp1.com
documentroot "/srv/www/htdocs/wordpress/"
<directory "/srv/www/htdocs/">
AllowOverride All
Require all granted
</directory>
</virtualhost>
Restart the Apache service to update the changes
LinuxHelp:/srv/www/htdocs/wordpress # systemctl restart apache2
Select language and Click on continue to begin installation
Fill the fields as per your needs
Login Wordpress with the user credential
With this, Installation of Wordpress on Opensuse15.1 comes to end
Comments ( 3 )